JCarter426

M478_Staff
  • Content Count

    1,544
  • Joined

  • Last visited

  • Days Won

    132

Posts posted by JCarter426


  1. UTI files don't determine the body model directly. The UTI file determines the base item type, which points to a row in baseitems.2da. That row determines a letter (A–J in K1, A–N in K2) for the body model variation, which points to a column in appearance.2da. The final model is determined by the entry in appearance.2da located at the appearance row and model variation column.

    It's not possible to add an additional body model variation because the game will not recognize new columns added to appearance.2da.

    All extant body model variations are used for K1. In K2, model J is unused. Mod compatibility is an issue, however, as that is the only one available.


  2. 56 minutes ago, Mephiles550 said:

    I'm guessing his cape animation would also be messed up, I don't think the jawless model has all the right animations. 

    As far as I remember, the two Malak models are identical except for the jaw, so animations aren't an issue. And even if they were an issue, the models are similar enough that they could fixed with a simple edit.

    As far as changing Malak's appearance mid-cutscene, this is easy enough to implement by giving him a disguise effect or item.

    If you are expecting to see the jaw being cut off with elaborate visuals, then Salk is right that it would require a stunt animation, which is a fair bit of work.


  3. There are a lot of parts involved, but this is perfectly reasonable first as a first attempt at modding if you are prepared to learn.

    The basic steps are:

    1. Create the merchant NPC (UTC file)
    2. Create the store inventory (UTM file)
    3. Add the merchant and store to the the game
    4. Create a dialogue (DLG file) so you can talk to the merchant and attach this to the Conversation field on the merchant
    5. Write a script to open the store and attach this to a node in the dialogue file

    Here are the essential tools required for the job:

    • KOTOR Tool to extract files
    • K-GFF to edit the merchant's UTC file, store inventory UTM file, and UTI files for any new items you might want to create
    • DLGEditor to edit the merchant's dialogue
    • NWNNSSComp to compile scripts
    • TSLPatcher and ERFEdit for compatibility if you intend to release the mod

    You can find a rundown of the most common modding tools here.

    There is also an archived tutorial from LucasForums on how to create a merchant here.

    A couple more notes:

    • For my Jedi Tailor mod, I added a trigger (UTT file) to the dynamic area information (GIT file) that spawned the merchant and all other related objects. I felt that this had the smallest footprint and would therefore be best for compatibility.
    • I also added a few invisible placeable objects to keep track of local variables relating to the tailor's dialogue. KOTOR 1 typically uses global variables for this, and I feel this should be avoided unless strictly necessary, again for compatibility. KOTOR 2 has more local variables available, so the merchant could handle them all alone.
    • Like 1
    • Thanks 1

  4. Assuming there are no file name conflicts, yes, that should work.

    It's somewhat better practice for compatibility purposes to use TSLPatcher to patch the merchant file in a .mod file, but this isn't strictly necessary, especially if this is for your own personal use.

    The only caveat to add is that you have to load a save from before you ever entered the area where the merchant is.


  5. 9 hours ago, Sith Holocron said:

    This mod might fix your issue.

    8 hours ago, DarthParametric said:

    The vanilla issue is fixed by the Community Patches.

    Yes, as I recall, I updated my mod with the same fix we added to the Community Patch. So either should work in the meantime until SS is able to add the fix to his mod.


  6. 21 hours ago, ZeldaTheSwordsman said:

    Where the hell in all of my messages do you keep getting that idea from? Especially in the one you just quoted.

    Because you keep insisting that if Malachor existed, it would be the only place Malak would have taken Bastila without giving any evidence for that claim. Especially in the post I just quoted.

     

    21 hours ago, ZeldaTheSwordsman said:

    Not arguing that Lehon isn't tainted enough to be suitable for Jedi-corrupting, I'm just arguing that the temple there isn't a specialized Jedi-corrupting facility like the Trayus Academy is; the temple's main function is acting at the ground-level control for the Star Forge's defenses.

    Where is your evidence for this? The temple has a torture chamber for torturing Jedi which was successfully used to seduce a Jedi to the dark side.

     

    21 hours ago, ZeldaTheSwordsman said:

    Kreia just saying "You were right" isn't the same thing as the Exile actually tendering a rebuttal to her.

    Fine, then, you were wrong. Happy now?

     

    21 hours ago, ZeldaTheSwordsman said:

    Well, actually TSL seems to lean more on "Revan's plans and the Exile and Bao-Dur's actions" than "Revan's actions".

    I don't see how this is a problem. Revan was not personally responsible for everything that ever happened, nor should Revan be.

    KOTOR 2 goes in depth about the Exile's involvement in the Mandlaorian Wars because the game is about you, but it also builds up Revan as a master strategist and godlike figure more than even KOTOR 1 does.


  7. 11 hours ago, ZeldaTheSwordsman said:

    K2 seems to sell Trayus as the main, and stronger, Jedi-breaker though. And whether it's more specialized compared to the Dreshdae facility... the Trayus Academy certainly is a more specialized Jedi-corrupter than the Rakatan temple (which is where Malak brought Bastila).

    What is your evidence for this?

    It is by no means said in KOTOR 2 that Malachor is the only place to make Jedi fall to the dark side, or even the first:

    Quote

    Kreia: Revan knew the power of such places... and the power in making them. They can be used to break the will of others... of Jedi, promising them power, and turning them to the Dark Side.

    It seems likely that Lehon had the same property:

    Quote

    Jolee: This planet is a tainted place, the Star Forge and the Temple have twisted the Force into an instrument of evil - just as Malak has twisted Bastila into a servant of the Sith.

    Malachor is perhaps the most important of these three locations in KOTOR 2, but that is in KOTOR 2, when it is the only one of the three that has not been discovered and attacked by the Republic.

     

    11 hours ago, ZeldaTheSwordsman said:

    There's a reason that most Star Wars sequels to games with multiple endings just pick one. If the choice is to be preserved, then a lot more legwork needs to be put in to prop up the Dark Side choice.

    If your alternative is that there is no choice and other people should not be allowed to make a choice that you disagree with, in a roleplaying game, then I cannot be convinced this alternative is inherently better.

     

    11 hours ago, ZeldaTheSwordsman said:

    Yes, but K1 presents the Star Forge as the Dark Side McGuffin Place of Doom in their empire

    Yes, because it was the source of the infinite fleet. The Trayus Academy was not.

    Later, the Sith lost the Star Forge, but still had the Trayus Academy.

     

    11 hours ago, ZeldaTheSwordsman said:

    (as well as what corrupted them)

    No, this is not true:

    Quote

    Vrook: Perhaps this discovery was what first corrupted them... or perhaps they sought the cave out because they were already corrupted.

    Quote

    Dorak: No one is denying that Revan was one of the keys to defeating the Mandalorians... but something happened out there on the Outer Rim. Instead of returning after the war's end, the ships under Revan's command went deep into unexplored space.

    There is no definitive answer given in the game, and it is speculated that they had already begun to fall before discovering the Star Forge.

     

    11 hours ago, ZeldaTheSwordsman said:

    That actually doesn't automatically contradict her view

    You said the game gave you no opportunity to counter Kreia's argument, and I showed you a quote in which Kreia literally says "you were right." I don't know what more you want. Do you want another example of Kreia saying you were right?

    Quote

    Kreia: No... no, many choices were there, but... you made the right ones.

     

    11 hours ago, ZeldaTheSwordsman said:

    Here's a key point: "It was not your ships or your men or your vaunted 'fight for freedom' that won this, the final battle of the war. It was by the actions of one person - you - that the Republic prevailed."
    That seems to make it pretty damn clear that A. the entire paragraph is in fact specifically talking about the Battle of Malachor V and B. The victory is attributed Revan's own actions.

    Yes, Canderous attributes the Republic's victory at Malachor to Revan's strategy. So does everyone in KOTOR 2.

    However, other people were there and did things that Revan personally did not do.

     

    11 hours ago, ZeldaTheSwordsman said:

    That iffy statement you quote makes partial sense in the context of the first game (hinting at the Star Forge) and prior Expanded Universe material re: the Sith after Exar Kun's defeat; maybe a concept in the writers' heads that they didn't articulate properly was that Revan and Malak absorbed the remnants of Kun's empire.

    There is no indication of any connection between Exar Kun's Sith and Revan's Sith in the game beyond this one line. I think it's a relic from an earlier draft of the game in which Bastila was Vima Sunrider and the game followed up more closely on the events of the Great Sith War, but that is only speculation on my part.

    On that note, though, you are willing to accept connection between Exar Kun's Sith and Revan's Sith in order to explain this continuity error, but you are not willing to accept a connection between Revan's Sith and the Sith of KOTOR 2 who were explicitly written to be survivors of Revan's Sith?

    • Like 3

  8. 1 hour ago, ZeldaTheSwordsman said:

    My point is, why bring such an important capture as Bastila to the center of power to corrupt her if his empire supposedly has a more specialized facility elsewhere?

    It is not "more specialized." It's mentioned at various points  in the game that there are many worlds like Malachor and Korriban that are wounds in the Force that the Sith used to break Jedi.

     

    1 hour ago, ZeldaTheSwordsman said:

    My issue isn't the lack of the Star Forge per se, it's K2 trying to let you choose K1's ending when because of the Star Forge only one ending would logically lead to K2's status quo.

    So choose that Revan was light-sided. Those who prefer that Revan was dark-sided and are fine with the subsequent events should still be free to do so.

     

    1 hour ago, ZeldaTheSwordsman said:

    That's not the main point. The main point is that Revan quietly probing their own ranks for Force-sensitives and "disappearing" them to the Trayus Academy for Dark Side training - and the level of scrutiny that requires - is at odds with the Dreshdae Academy's semi-open-door policy and relative lack of scrutiny (which Revan being able to infiltrate Korriban in K1 kinda relies on); it makes that look that much more questionable.

    I'm not going to defend the competency of NPCs in either game.

    But as for the two locations being different, yes, the place where Jedi were taken to be turned to the dark side against their will is different from the place where Force sensitives who have already turned to the dark side willingly go.

     

    1 hour ago, ZeldaTheSwordsman said:

    Nothing in the first game gives any indication that Revan and Malak had another Dark Side McGuffin Place of Doom.

    They have conquered half the galaxy. It stands to reason there are many places in their empire that we do not see.

     

    1 hour ago, ZeldaTheSwordsman said:

    The Sith Triumvirate could easily have been written without tying any of them to Revan and Malak personally.

    But they weren't. That's not the plot of the game.

    And I don't see how it would be an improvement to completely disconnect the sequel from the original.

     

    1 hour ago, ZeldaTheSwordsman said:

    Where did Zhar say this? It's been a while.

    I referenced this quote before.

     

    1 hour ago, ZeldaTheSwordsman said:

    Disagree? Yes. Actually counterargue? Not so much, from what I can recall. You can tell her to shove it, but you can't really debate her much that I can recall (I.E. whenever she bitches at you for being charitable and goes "Helping people weakens them" you can't say "Not necessarily - it can inspire them to find the strength to help others in turn" or anything like that).

    Quote

    Exile: You said I have grown strong in the Force - but you said there was more I had to learn from small actions.

    Kreia: Before, you fought with me about small kindnesses. You were correct. From the slightest push, a decision, a chain of events may be set in motion. Even on a small microcosm as this ship, such echoes may be created. This is my challenge to you. Use small kindness, small cruelties, and listen for the echo in the Force.

     

    1 hour ago, ZeldaTheSwordsman said:

    "You fought us to a standstill and then began pushing back."

    Most of what you're talking about here is Canderous' description of the war in general, not the Battle of Malachor V specifically.

    I would also point out that Canderous has some dialogue in this conversation that makes absolutely no sense in the context of either game:

    Quote

    The Sith had gone - retreated into their empire. They sealed themselves off from the rest of the galaxy. We thought it would be centuries before they'd come back. It's amazing that they could rebuild their fleet so fast. But at the time, it looked like the galaxy was in our grasp!

     

    1 hour ago, ZeldaTheSwordsman said:

    This hammers home the point of Revan themself being the one who won the day. Not some other Jedi under Revan's command, Revan themself being there and in charge and directly kicking butt. K2 attributing swinging the battle to the Exile diminishes Revan's established role.

    Regardless of the Exile's role at Malachor, according to KOTOR 2, the battle was Revan's strategy and Revan was still the impetus of the Republic's victory. But of course Revan was not the only Jedi there.

    • Like 2

  9. On 1/16/2021 at 1:59 PM, ZeldaTheSwordsman said:

    That is a cheap copout if ever I heard one, especially since the idea of Revan not intending they keep the Star Forge and the idea of Revan leaving at all are completely disconnected from the first game's Dark Side ending.

    The implication of the dark side ending is that the Republic is destroyed. Obviously there had to be some semblance of a status quo for a sequel to happen and for the Republic to exist in the films. Revan's disappearance allows for that while also at least giving some recognition of players' choice in the first game.

     

    On 1/16/2021 at 1:59 PM, ZeldaTheSwordsman said:

    If the Trayus Academy was specifically used for breaking Jedi to the Dark Side, why did Malak take Bastila to Lehon to do it instead?

    Even if Malak had access to the Trayus Academy, it was not his center of power. The Star Forge was. On the other hand, and I know you take issue with this, the Sith of KOTOR 2 did not have the Star Forge. In the wake of their civil war, their center of power moved.

     

    On 1/16/2021 at 1:59 PM, ZeldaTheSwordsman said:

    The idea of the Trayus Academy having anything to do with Revan and Malak feels like a forced attempt to unnecessarily tie the sequel's Dark Side McGuffin Place of Doom to the first game's baddies

    I don't understand what this means. The Sith in KOTOR 2 would not exist without Revan. Of course the Trayus Academy was connected to him or her.

     

    On 1/16/2021 at 1:59 PM, ZeldaTheSwordsman said:

    There isn't a Sith Academy on Taris; not for actual Force wielders, anyway.

    The Sith governor you meet was still being trained. Presumably, there, but that is beside the point. There were multiple training facilities. Korriban was not unique.

     

    On 1/16/2021 at 1:59 PM, ZeldaTheSwordsman said:

    However: KotOR II's saying "Revan had many masters" is a retcon that exists to shoehorn Kreia in there.

    Again, the idea that Revan had multiple masters was established in the first game. Zhar says that Revan had a master other than himself, and we are never told who this is. KOTOR 2, as a sequel, introduces us to a character that must have existed, but that we had never met before.

     

    On 1/16/2021 at 1:59 PM, ZeldaTheSwordsman said:

    The problem is that it's not simply "the villain's point of view." The problem is that A. it's the writer's point of view, mouthpieced through the villain

    You are given every opportunity to disagree with Kreia in dialogue, and the very nature of the game, with you as the player and Kreia as the final boss, forces you to oppose her ideologically. Kreia herself admits to her hypocrisy and that she has to be stopped:

    Quote

    Kreia: You may hold Malachor in your grasp, but I hold the answers to your past and future in mine. Would you destroy us both before learning them? If so, then do it - for you have already failed me.
    Exile: If I had to, I would. You have to be stopped.
    Kreia: I know. But there is more than death in this galaxy, and you shall not find it easy.

    Quote

    Kreia: But perhaps these are the excuses of an old woman who has grown to rely on a thing she despises.

    Nobody is forcing you to believe her point of view is correct. Chris Avellone has said that he wrote Kreia to raise questions that he had about Star Wars, but I think you are putting words into his mouth as much as he put into Kreia's.

     

    On 1/16/2021 at 1:59 PM, ZeldaTheSwordsman said:

    Kreia's prophecy about Mandalore. It is an explicit reference to Jango Fett's death. And it's stupid, because it implies that Jango Fett was the last of the Mandalorians; that was wrong even at the time the game came out.

    I'm not familiar with other Expanded Universe material relating to the Mandalorians from that time, so I can't comment, but this is a minor reference that players familiar with the films would understand and is irrelevant to the story of the game.

     

    On 1/16/2021 at 1:59 PM, ZeldaTheSwordsman said:

    The inconsistency is that the dialogue in KotOR 1, sparse on info though it is, implies an intense but straightforward battle, not a battle where the Republic resorted to a cataclysmic superweapon to turn the tide. "The Republic broke our ranks" does not really paint a picture of "The Republic used a gravity crush superweapon that wrecked their own fleet almost as bad as it wrecked ours"; it paints a picture of Republic troops and/or ships battering their way through the Mandalorian lines.

    I don't know how you inferred so much from a few sentences that say little more than "a battle happened." The Battle of Malachor V is a minor plot point that is barely mentioned in the original and elaborated upon in the sequel.

    • Like 3
    • Light Side Points 2
    • Dark Side Points 1

  10. 1 hour ago, ZeldaTheSwordsman said:

    But KotOR II also tries to let you choose whether the first game had the Light Side or Dark Side endings (hence why the galaxy is so jacked-up) but that. Doesn't. Actually. Work. Because except in the situational alternate Dark Side ending, THE STAR FORGE DOESN'T GET DESTROYED on the Dark Side path. The Dark Side ending of KotOR 1 is: "Revan kills Malak, reclaims the Sith empire and the Star Forge, is poised to conquer the galaxy." With something like the Star Forge in play... trying to have it both ways like KotOR II does just doesn't work.

    It is explained that after Revan disappeared, nobody was powerful enough to control the Star Forge:

    Quote

    There is no one left with the power to control the Forge, though many have tried. I have watched them be devoured, their life drained from them as they attempt to tap into its power. Knowing what we do of the Builders and their fate, I am convinced that Revan did not intend us to keep the Star Forge. To use it would mean the end of the Sith... and the end of the Force.

     

    1 hour ago, ZeldaTheSwordsman said:

    1. Revan already had a secret ancient Dark Side MacGuffin facility that was part of what factored into their going Dark: it was called the Star Forge. 2. I'm sorry, but I think if Revan and Malak's empire used the Trayus Academy to convert Jedi then Malak would have taken her there rather than Lehon, no? 3. If Revan was sending suitable captured Jedi to Trayus as well as "disappearing" Force-sensitives from the ranks to send them to Trayus (and this seems too big a thing to keep secret from Malak), then somehow I don't think the Dreshdae Academy on Korriban would have been so blindly welcoming to defector Jedi and supposed defector Jedi. And would have been screening students in need of "correction".

    The existence of one academy does not preclude the existence of other academies for other purposes. The Sith have multiple training facilities in the first game: Korriban, Lehon, Manaan, Taris. There is no reason they couldn't have had another on Malachor, assuming it was even active after Malak took over. Chronicles of the Old Republic implies that it was abandoned at some point and reestablished by Kreia after the events of the first game:

    Quote

    Guided by Kreia's influence, Sith assassins once again begin to emerge silently from Malachor V and strike at isolated Jedi across the Republic, capturing some Jedi to turn to the dark side, and slaying those that resist. Taken to the dark side world of Malachor V to be fed to the planet's dark energies, these Jedi husks create even more assassins and DARK JEDI, feeding the planet's hunger.

    Although that source is riddled with continuity errors.

     

    1 hour ago, ZeldaTheSwordsman said:

    Subtext in the first game seems to strongly indicate that Revan was Vrook Lamar's Padawan.

    I don't know where you got this from. The only character in the first game who explicitly mentions having trained Revan is Zhar:

    Quote

    When I was still on Coruscant Revan and Malak often came to me for additional training. In particular, Revan's hunger to learn seemed insatiable. I should have recognized this as a warning sign.

    And that implies that Zhar was not Revan's primary master, just as in the second game, it is said that Revan had many masters:

    Quote

    Revan had many Masters. Zhar, Dorak, Master Kae before Kae left for the Wars. Towards the end of her training, she sought out many to learn techniques.

     

    1 hour ago, ZeldaTheSwordsman said:

    Because what I took away from this game was "It's not okay to question my super-negative intepretation of the Force and I'm gonna viciously staple it to your forehead."

    You disagree with the villain of the story's point of view. And this is a problem how?

     

    1 hour ago, ZeldaTheSwordsman said:

    Kreia's prophesy re: Mandalore is dumb for various reasons even in the context of Legends (I'm sure Karen Traviss in particular probably had a few things to say to Avellone about that one). Rewrite it for accuracy or just chuck it outright and never look back.

    I thought this was an explicit reference to Jango Fett's death in Attack of the Clones.

     

    1 hour ago, ZeldaTheSwordsman said:

    * This game's presentation of the Battle of Malachor V doesn't seem to quite jibe with what the first game told of the last battle of the Mandalorian Wars. Not sure of a fix here, admittedly. But... It does feel worth commenting on.

    The only mentions of Malachor in the first game are:

    Quote

    I still remember that final battle in the skies above Malachor V. The two fleets filling the space around it, outshining the stars...

    Quote

    Canderous! I haven't seen you since the Republic broke our ranks at the battle of Malachor!

    This seems consistent with the second game's depiction of the events to me, in as much as it can be consistent with so little existing information.

    • Like 4

  11. 5 minutes ago, Tathrin said:

    Yes, I also have the "Untold Love Story" mod installed (found here: https://www.gamefront.com/games/knights-of-the-old-republic/file/bastila-female-revan-untold-love-story) which is supposedly compatible with this mod as long as I install this one second, which I did...but it's possible that I installed it wrong, or that the person who reported their compatibility was in error.

    It looks like whatever changes that mod makes to Bastila's dialogue is incompatible. However, the two mods do essentially the same thing, at least as far as Bastila is concerned.

    If you want to use the rest of that mod, it should work if you delete the Bastila files before installing mine.


  12. 2 hours ago, Tathrin said:

    I'm assuming that the fact that lev_m4aa, sta_m45ac, and unk_m44ac already existed in my modules folder and were skipped was due to another mod I installed earlier, so I deleted those three files (well, moved them to a backup folder in case I needed them actually) and ran the patcher again.

    This is normal. You shouldn't move/remove them before running TSLPatcher. TSLPatcher will patch the existing files and this is usually fine.

    2 hours ago, Tathrin said:

    That still left three warnings:

    • Unable to find a field label matching "EntryList\214\RepliesList\1\Active" in k_hbas_dialog.dlg, skipping...
    • Unable to find a field label matching "ReplyList\106\EntriesList\0\Active" in k_hbas_dialog.dlg, skipping...
    • Unable to find a field label matching "ReplyList\303\EntriesList\0\Active" in k_hbas_dialog.dlg, skipping...

    This, however, is not normal and means the mod didn't install correctly.

    Are you using any other mods that affect k_hbas_dialog.dlg? And if so, could you attach your backup copy of it?


  13. 1 hour ago, AmanoJyaku said:

    I should point out Microsoft's documentation is mostly filled contrived examples. Post one of their examples on StackOverflow and prepare to be burned.

    Yeah, I know. And with a managed language, they have the luxury of being more willy-nilly than if it were C++ or C. Still, I don't think they would be doing it all over the place if it were so universally unacceptable. It's safe as long as you don't read before assigning at some point, and modern IDEs and compilers go out of their way to prevent you from doing that by accident.

    Again, if you have a compiler you can trust. I know the Visual Studio C++ compiler has some silly bugs, and Clang lets you do things it really shouldn't do because that code won't compile with anything else, to say nothing of NWNNSSComp.

    1 hour ago, AmanoJyaku said:

    There's a mantra you should repeat to yourself: code for correctness, worry about performance later. Modern CPUs are fast, and compilers are good at optimizing your code for those CPUs. A CPU that operates at 3 billion cycles per second does not benefit from saving a few dozen cycles by omitting a single variable initialization.

    I know in most use cases it's minimal, but it can make a difference if you're processing huge amounts of data in a database, which C# and .NET are often used for. The reason C# allows uninitialized local variables, unlike, say, Java, is specifically for the performance gain. It mattered to somebody somewhere at some point.

    1 hour ago, AmanoJyaku said:

    I'm not sure I know what you mean by hiding variables, but if you place them where you use them then they aren't hidden. Conflicts can easily be avoided by using descriptive names.

    I mean if you give a variable in an inner scope the same identifier as one in the outer scope. The variable in the outer scope is hidden.

    Which you can also file under don't do that, but people make mistakes.

    1 hour ago, AmanoJyaku said:

    And a function should only be as large as the single task it performs.

    Well yes, ideally you shouldn't have too much nested code in the first place. Another reason why I don't mind NWNNSSComp replacing nested else/if with else if.


  14. 2 hours ago, AmanoJyaku said:

    I don't know who taught you this, but it's a practice that's frowned upon even with modern compilers. We try to learn good habits rather than relying on the compiler to handle things we could easily do ourselves. It's not uncommon for bugs to creep into compilers, and you can track these down more readily with proper code. This advice comes from the best programmers at places like Apple, Google, and Microsoft, and even the ISO C and C++ committees.

    I've seen numerous examples in the documentation for C# and Java, including the very page on variable initialization in C#. The C++ textbooks I've read (Starting Out with C++, Professional C++, C++ Notes for Professionals) obviously warned about the dangers of using uninitialized variables, but still used the extensively when it was safe.

    I was taught that a) it is theoretically more efficient in languages that don't require variables to be initialized (e.g. C++ and C#) as minimal as that efficiency gain may be, and b) it's more readable—if you don't know what the value will be, don't say that's the value, as that's potentially misleading.

    3 hours ago, AmanoJyaku said:

    Why not create variables local to the else branch's scope? That's the whole point of having scopes, to create variables only where they're needed. Variables placed in too high a scope, e.g. the global scope, are at risk of being overwritten erroneously.

    This, on the other hand, I was taught was bad practice because it increases the chance of hiding variables by accident and creating conflicts. So I was told that it's better to avoid this except for temp variables in a for loop or for a swap. This was just within a function, though—obviously global variables have their own problems.

    I was also told that, in terms of memory, it's better to allocate it at the start of a function and have it crash there if it's going to crash rather than in the middle of execution. But I question whether that's a realistic problem anymore.

    3 hours ago, AmanoJyaku said:

    As for the compiler knowing better than we do, that's true of professionally written compilers. Which nwnnsscomp is not. I've already listed some of the basic things it fails to optimize, e.g. failing to remove empty functions. To be fair, the original compiler from BioWare has an even bigger problem in that logical AND and logical OR are incorrect. Which nwnnsscomp doesn't fix...

    Well... yes. I believe you. 😧


  15. On 12/13/2020 at 11:12 AM, AmanoJyaku said:

    You should never create uninitialized variables, but it was once a common practice.

    This is still common practice, at least as far as I've been taught. Yeah, there are security issues if you then try to read one, but modern compilers either won't let you do that or will initialize it with a default value, if the language itself doesn't. With that in mind, I don't see the issue.

    6 hours ago, AmanoJyaku said:

    the result, while syntactically different, should functionally be the same as the original source

    6 hours ago, DarthParametric said:

    That seems fine to me. I was more concerned that certain files might not able to be decompiled at all. This is the case for DeNCS as well, based on my own experiments.

    I agree. I'm not concerned about syntactically identical source code. The way the source code is written is... not always the best way, to put it lightly.

    The issues you've mentioned before don't seem like they should cause problems to me. Like with the nested else/if vs a simple else if, that'll only be functionally different if you declare something local to the else branch's scope. And, obviously, don't do that. And I doubt the compiler would've optimized for it that way if it would produce functionally different code. It usually knows better than we do.

    6 hours ago, AmanoJyaku said:

    I don't know what the policy is for reverse engineering mods, but I assume that's frowned upon?

    I think that depends on whether you ask Oracle or Google...


  16. 7 hours ago, Untold Prophecy said:

    What would be really cool to see would be the possibility of sabers' sound effects changing depending on what color the lightsaber is, in a similar manner to how sound fonts work in the custom lightsaber collecting hobby. For example: you could have the green saber use effects from Luke's in ROTJ and the red model use sounds from Dooku's.

    This isn't possible. Weapon sounds are determined by the base item type, and it isn't possible to add new lightsaber types. At most you could have different sounds for standard/short/double.