Leaderboard


Popular Content

Showing content with the highest reputation on 03/30/2020 in Posts

  1. 2 points
    Greetings, thread master - and fellow Jedi as well! Salute for the progress made regarding the development of the tool, and recent discovery concerning script's decompiling -- a promising future in script-modding indeed. Not to being off-thread and hoped what I've got here can provide an insights more so to the tool's development [and/or discussion]. So I found another script that failed to be decompiled by DeNCS, it's k_creditsplay; a script that fires the lightside credit sequence fired in STUNT_57 RIM/module. It had these with the bytecodes -- which in NSS could be -- Meanwhile, the other script which is slightly longer; k_stunt_end -- fires the darkside credit sequence fired in STUNT_55a RIM/module, can be decompiled and had these with the bytecode -- which in NSS will be -- Therefore the question is -- Why two similar scripts had different result, as in one can be decompiled while other isn't? From my limited view and understanding, there's a difference in how the StartCreditSequence were called - observed by the bytecodes. k_creditsplay has -- 00000013 20 00 RETN 00000015 04 05 0000 str CONSTS "" 00000019 04 03 00000000 CONSTI 00000000 0000001F 05 00 0206 02 ACTION StartCreditSequence(0206), 02 while k_stunt_end -- 00000093 20 00 RETN 00000095 04 03 00000000 CONSTI 00000000 0000009B 05 00 0206 01 ACTION StartCreditSequence(0206), 01 That's only far as I can go with what I've got - and much thanks for considering this.
  2. 1 point
    It's because you're trying to add the item using an existing game. Start a new game. tl;dr KOTOR loads UT* files and saves them in the save files. Your save file doesn't have a_robe_45.uti, so it's acting weird.
  3. 1 point
    Just so I understand right, you tried adding it to your inventory after adding the UTI extension to the file, correct? Can you successfully load the file back into KotORTool?
  4. 1 point
    Your UTI appears to lack a file extension. Add .uti to the end.
  5. 1 point
    It's trying to call it like: StartCreditSequence(0, ""); AmanoJyaku can correct me if I'm interpreting the bytecode incorrectly, being further along the get a degree in computer science in order to make better modding tools for a 15-year-old game career track, but I believe the number after the function is the number of arguments to call the function with, and then those arguments are taken off the stack. Things are taken off a stack last in, first out, so it takes the integer 0 and then the empty string. My guess is that at some point in development, the function took two arguments - maybe the string was for the name of a movie file - but they changed how the function behaves sometime after this script was compiled, and never recompiled it. That seems to be the case. I tested with the following: int testInt() { return 1; } int TEST_INT = testInt(); And that will cause DeNCS to fail to decompile any script that includes it. For completion's sake, I also tried it this way: int testInt() { return 1; } int x; x = testInt(); Interestingly, this would not even compile. It seems the tools aren't very fond of variables with global scope, but I'm not sure why it would care whether one was initialized or not.
  6. 1 point
    They tried to use a (blank) string instead of an int? Or a string and an int.
  7. 1 point
    Not off-topic at all!!! My guess is because the compiled script is wrong. Look at what it does: //Simplified code void main() { StartCreditSequence(); SetGlobalBoolean(); SetGlobalFadeOut(); } So, what's wrong? The very first function: // 518: StartCreditSequence void StartCreditSequence( int bTransparentBackground ); It takes one parameter, an integer. However, look at the byte code: 04 05 0000 //CONSTS - Place Constant String Onto the Stack, 0 characters 04 03 00000000 //CONSTI - Place Constant Integer Onto the Stack, value of 0 05 00 0206 02 //ACTION - Call an Engine Routine, 0x0206 [518, or StartCreditSequence(int)], with two arguments Can you see what's wrong here? Off-Topic: Sometimes the code blocks have colored code. Then, it goes white. Why???
  8. 1 point
    Veeeery interesting. I'm seeing the same thing in all files, so I hope it's the culprit. Basically, every NCS file I've worked on uses global variables initialized from constants. However, the files you've given me all include a global that's initialized from an engine routine! I'm wondering if DeNCS is choking on that. 0x00000c67 RSADDS 0x00000c69 CONSTI 32289 0x00000c6f ACTION 239 1 0x00000c74 CPDOWNSP -8 4 0x00000c7c MOVSP -4 // 239: Get a string from the talk table using nStrRef. string GetStringByStrRef(int nStrRef);
  9. 0 points
    Quick update: I'm still working on the Revan Head. Right now there's an issue with the mouth as it does not allow for the mouth to move when speech occurs. I am attempting to try and correct that issue. However, I have not been able to work on the head given the covid-19 craze. I had to leave the UK where I was studying and I'm back in Canada under quarantine so I can't really do much. I'll probably work on the head after the quarantine is over. So far, I'm in good health so I don't think that will be an issue. As for doing the head with scars I will try to add that option too down the road after I get the mouth issue fixed.