• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Pre Build Mod 13 beta Fix Pack posted!

<!--quoteo(post=160231:date=Sep 2 2006, 06:02 AM:name=Pieter Boelen)--><div class='quotetop'>QUOTE(Pieter Boelen @ Sep 2 2006, 06:02 AM) [snapback]160231[/snapback]</div><div class='quotemain'><!--quotec-->Anyway: When a character is knocked out, this character gets the stunned_dialog.c file as dialog file. You can then loot his items through that dialog or resurrect the character. After resurrecting, the dialog is restored. Also: Characters resurrect after a while anyway, even if you don't do so yourself.<!--QuoteEnd--></div><!--QuoteEEnd-->

You forgot to transfer CurrentNode as well. Which, is the leading factor in why so many quest characters get broken with all this dialog file switchings around that have been put in since stock game. I have added the currentnode code in for the next batch of updates.

<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->I can imagine some problems occurring though, so I suppose we should add another check. Maybe we can use the .nodisarming attribute again: If a character has that attribute, he will not be knocked out, meaning you MUST kill him.

I introduced the .nodisarming attribute for all characters that MUST die for the game to continue. So if we give that attribute to all characters that need it AND make sure that attribute is used wherever nescessary, that should stop the quest troubles without completely disabeling the bladedamage mod.
<!--QuoteEnd--></div><!--QuoteEEnd-->
I want to make a note on coding techniques and how to prevent things from getting out of hand. Reusing the same attribute for one thing, to work for another, and then another, is not a good way about doing anything. This is why many bugs existed already. People misusing variables and attributes. Like someone hijacking the use of a global, because they liked that it was already setup for them. Then people down the line go "why the heck is this using 'nodisarm' ?!".

I will not use "nodisarm" to determine if a quest captain should not be talked to. Thats absurd. I will never use "nodisarm" for keeping a character from getting stunned either.

You want those sorts of things added to each and every character, then make them right and unique. However that method is usually a more painful and possibly unneeded one. Adding (and hoping you got it on all) to every character that should have it. Its about as bad as the nosurrender flag that was missing on half the needed characters who should have had it.


In my own code, I simply added a single line to the top of the LAi_Stunned_StunCharacter function itself "if (LAi_IsBoardingProcess()) return;", to exit the function if boarding is active. Then got rid of copy/pasted leftover code of doubling and tripling up the stars particles that were left in there from prior modders not realizing that the stars particles are already handled in the stunned function itself. Plus, you have to keep in mind, there are many more locations where the stunnned function is called. Lastly, there is a death check ahead of the stunned function calls to prevent stunning dead people already.

I havnt tested this change fully. Worst it can do, is make it so no one gets knocked out during a boarding. Which I'm fine with.
 
<!--quoteo(post=160251:date=Sep 2 2006, 04:44 PM:name=IncredibleHat)--><div class='quotetop'>QUOTE(IncredibleHat @ Sep 2 2006, 04:44 PM) [snapback]160251[/snapback]</div><div class='quotemain'><!--quotec-->
You forgot to transfer CurrentNode as well. Which, is the leading factor in why so many quest characters get broken with all this dialog file switchings around that have been put in since stock game. I have added the currentnode code in for the next batch of updates.
<!--QuoteEnd--></div><!--QuoteEEnd-->
I never wrote that code. It was written after I had written the fists code, then my fists code was made to use that code, but I did not do that. Good point about that one though: That would cause some trouble, yes.

About the .nodisarm attribute: Don't let the name fool you. This attribute is meant to turn off certain mods for certain quest characters, because if they would be enabled for these characters, the quests might break. This goes for the disarming mod, but also the bladedamage mod and the knocking out mod. The name "nodisarm" is misleading, but that is the only place where it was originally used. Now it is used in more places in the code. But the purpose remains the same: Making sure that the quests work properly.
 
Back
Top