Jump to content

Qwinn´s Ultimate DAO Fixpack v3 (no longer beta!)


Katzapult

Recommended Posts

Wow, this is really kinda sad. Have you ever wondered, like I always did, if high or low morale for the militia and knights during the siege had any actual effect? I mean, we knew knight morale was bugged and couldn't be high or low, but if it *could* change, would it do anything? And militia could be high or low, did *it* work?

 

At first I was hopeful, as there's a TON of code revolving around it, but with further investigation, as far as I can tell, the answer is no. Which is a frikkin' sin, because there's so much elegant code to make it work, and right at the very last step they attempted to do some bizarre cludgy thing like using AddAbility as some sort of variable set, when there's far better ways to do so.

 

Okay. I'll try and describe the problem. The game applies an "AddAbility(1)" to high morale village defenders and "AddAbility(-1)" to low morale defenders. That second one is just bizarre, since there are no negative abilities in ABI_base.xls. Worse, ability 1 according to that same spreadsheet is "Shield Pummel". Which would be fine! If the knights didn't already have it, and if the militia had any shields. Sigh.

 

The scripts then check HasAbility to see if those were set in order to determine the creature's morale. This is trying to use the creature's ability list as effectively what amounts to a variable local to the creature object. Why? We *have* local variables for creatures, and we can use them! Naturally, "HasAbility(-1)" (which all the defender creature scripts check to see if they panic) doesn't work because there is no such thing as a -1 ability and I'm sure the function that would try to -set- a -1 ability would just fail to create it. All the code for the morale and stuff is elegant, efficient and working, right up until this point - and then it's a complete WTF.

 

I tested by giving all the militia shields, and adding shield pummel, but that didn't work. That drove me nuts trying to figure out why until I realized that all of the militia are set up with Archer AI. Which is fine - and they all have oodles of archer talents, if they're using a bow - but if they get forced to pull out their daggers, they're useless as far as melee abilities go.

 

Anyway, as I mentioned, there's code in all the defender creature files that, if they have *low* morale,every time they get damaged they're supposed to have a 20% chance to shout a line in panic and get hit with a Fear effect for a few seconds. Again, this only doesn't work because they tried to use the AddAbility function to keep track of the creature's morale, when it would've been infinitely easier and cleaner to just set a local variable on the creature objects.

 

Another thing I've found is a huge set of combat barks. The siege fights, I never noticed until now, are incredibly silent. Only your party ever *says* anything. But all the fighters do have combat shouts in their dialogues, and Murdock and Perth have pretty extensive ones. I intend to enable those as well, so it's not JUST the "break in fear" ones. The tricky part is going to be spacing them out so you don't have them constantly overwriting themselves - there really isn't any "don't do this again for 10 seconds" type of logic available in scripting. I think having any knight or militia member that deals a killing blow do a combat shout should work fine - I don't see them killing one and then killing another before the first shout is done.

 

ANYWAY. So. How to make this all work (and I AM going to make it work, it's a sin for this much elegant code to go to a complete waste). Once I get the breaking in fear working, I think that's sufficient as a low morale effect. For high morale, though, we have nothing to go on, really (shield pummel just isn't going to work, and I don't think them trying to use the value "1" as an indicator of morale really had anything to do with them wanting to add shield pummel anyway. What I'm leaning towards for high morale is granting the knights the passive ability Bravery (higher crit% scaling up based on how many critters are engaged), and the militia the passive ability Powerful (+25 health and -10% fatigue).

 

To balance a bit for the fact that I'm making the fight easier with high morale, I intend to make it a bit harder to reach high morale. I can't really do that for the knights because the range goes from -1 to 1, heh. But the militia morale scales from -4 to 4 depending on your actions, and you only need 2 to get high morale, which is REALLY easy to do (just encourage Murdock with an easy persuasion check and get Owen to make equipment is sufficient). I intend to change that to 3... in the unmodded game, high morale doesn't do a damn thing so it being easy doesn't make a difference. I'm making it make a difference, so I'm going to require that that difference takes a little more effort to be earned.

Edited by Qwinn
Link to comment
Share on other sites

  • Replies 1.2k
  • Created
  • Last Reply

Top Posters In This Topic

<snip>

I'm making it make a difference, so I'm going to require that that difference takes a little more effort to be earned.

 

Bravo! Thanks again, Qwinn. The work is definitely appreciated.

 

Am currently finishing my umpteenth Inquisitor playthrough, but am saving my next Warden run for when I can use the Fix Pack v3.0!

Link to comment
Share on other sites

Still investigating the siege itself. In the meantime, replacing fix #8 above with this:

 

8. (v3.0) "A Village Under Siege": The subquests for recruiting Dwyn, bringing amulets to Ser Perth, and telling Ser Perth about the oil would remain stuck open if you did not complete them. They will now be closed with a failed entry if you didn't complete them by the time the siege begins. The ones involving Ser Perth would leave a permanent plot marker on him as well (though not on the nighttime version).

Edited by Qwinn
Link to comment
Share on other sites

Aaaaand crap. Just checked. The knights already have bravery, and the militia already have powerful.

 

But that's actually okay! Cause I did a little more digging before hitting post on that last sentence... and guess what I found in ABI_Base.xls?

 

TRAIT_HIGH_MORALE: +2 armor, +5 defense, +3 strength!

TRAIT_LOW_MORALE: -2 armor, -5 defense, -2 damage!

 

Woohoo! I don't have to pick something arbitrary! It's in there!

 

Of course, there's absolutely no way to test if they work (other than running thousands of combats and seeing if fights with it go better than without it, heh. But hey, it *definitely* doesn't do anything now. Now it'll be ambiguous again, just like before I looked into it!

 

There is still also the scripting in the creature file for low morale which makes the knights and militia freeze up in fear every once in a while when they get hit. It's there, I can see what broke it, so I'll probably make that work as well.

 

Yay. I love it when things I thought I was gonna have to make arbitrary decisions about turn out not to have to be.

 

EDIT: Hmmm, just found evidence in the scripting that the intent was that knights simply can't have low morale. The same script does indicate they should be able to have high morale though. So that makes it a bit easier. And it makes sense. They're bloody knights, ferchrissakes. I can see having holy Maker amulets for the first time giving them a morale boost, but since they never had them before, I can't see *not* having them make them fall to pieces.

 

EDIT 2: Okay, what I'm seeing is making more sense now. The problem may just be in the values listed in arl_constants_h for the traits. If the 1 and -1 were just holding values that never got updated to the proper trait ids, then no, they weren't trying to use them as local variables. I'm not updating that include because it would cause practically everything in the arl eamon branch to need to be recompiled. But if I just fix the id's for the traits in the scripts they're used in, all the fear logic for low morale militia might just start working without further need to fuss about.

Edited by Qwinn
Link to comment
Share on other sites

11. (v3.0) The script code that was explicitly supposed to make the militia non-lootable during the siege was bugged and not working. As a result, they each drop each and every piece of equipment they were given for the fight, making letting them all die by far the most lucrative option. The militia are no longer lootable.

Edited by Qwinn
Link to comment
Share on other sites

Well, I'm glad I did that last fix. Because back to the morale thing - I did think of a way I could test that TRAIT_HIGH_MORALE ability. I applied it to Alistair. If it's having any effect, it's not showing up on his character sheet. So. Bummer. Probably why they didn't bother applying them.

 

The important thing is, though, that we know what they wanted the bonuses to be. I'm going to make high morale and low morale amulets with those specific bonuses/penalties, add them to their inventory and equip them. I can't see how that *couldn't* work. And now that I fixed the no-looting-dead-militia bug, players looting these amulets won't be an issue. (They won't be stealable either, sorry rogues!)

 

 

EDIT: Well, I couldn't get it exact, but pretty close. Here's the traits as they were supposed to be according to the ability spreadsheet, followed by the closest equivalent I could come up with.:

 

Official TRAIT_HIGH_MORALE: +2 armor, +5 defense, +3 strength

Qwinn AMULET_HIGH_MORALE: +2 armor, +6 defense, +2 strength

 

Official TRAIT_LOW_MORALE: -2 armor, -5 defense, -2 damage

Qwinn AMULET_LOW_MORALE: -3 armor, -3 defense, -2 damage

 

 

I figure that's pretty close. Some of the item boosts can only be applied in increments (for example, defense can only be added/subtracted by 3 at a time. No way to get a 5 out of that - that's why I couldn't nail it exactly.).

Edited by Qwinn
Link to comment
Share on other sites

"The militia are no longer lootable."

 

Awwww. : (

 

Now I have to cancel my vacation plans since I no longer have all that gold to spend. I think you could get 4g from their gear? I kept wanting the knights to die just so I could see what I could get.

 

Since you're looking at the battle, can you see if the right number of undead are spawning? It just seems from the battle cutscene that a HORDE is coming from the castle, yet a mere dozen or so in the upper area, one at a time, is pathetic. Would you be up to increasing the number? Like to 50 or 100? The lower area seems fine because they're not the main force so they should have fewer.

Link to comment
Share on other sites

Agreed that that's not a fix. I do see at least a couple dozen zombies in the knight fight anyway. And it definitely is the easier fight, but that's to be expected considering all the heavy hitters (knights, Dwyn) are up there. The fight below with the militia is the real challenge, and that's fine with me.

 

I've decided to undertake my own challenge. I actually already managed to restore combat barks during the fight, and I do think they make the whole thing a lot more fun (there's a TON of unused barks in these dialogues, and some are pretty amusing, particularly from the three drunks! Yes, the "Militiamen" are, in fact, drunks.). The challenge, however, is that I'm seeing if I can get the various knights and militia to call for help when they're low on health, say below 35%. The fixpack justification? It's frankly implausible in a huge melee like this that someone barely hanging on to life wouldn't just ask for help, heh, and besides, it's more fun and maybe you won't have to spend the entire damn fight with the TAB key pressed down to see how badly everyone's been hurt. Between "implausible that rookie troops wouldn't call for help" and "greatly helps immersion", I'm inclined to do it.

 

I can't make it work for Murdock, Perth or Dwyn, they simply don't have a good "Help me!" line in their dialogue, but seeing as they're the leaders it's plausible they *would* go down rather than discourage their men. Can't do it for Berwick either, but it frankly doesn't matter if he dies. Nor Tomas... well, maybe I can get away with "We're never going to survive this" as the line for him. I do think I can do it for all 3 knights and 8 militia though, and Lloyd. That's the bulk of the folks on your side, and includes pretty much everyone who's likely to go down in health quickly.

 

Whatcha all think? Sound like a cool fix/restoration? Note that most of these lines were *not* intended as a low health thing, they were intended for low morale (which, for reasons explained before, didn't work) - but I think it's more realistic and immersive (especially in a fight where the goal is to keep everyone alive) that someone who's about to die, even if they have high morale, would call for help.

 

I'm also pondering making the material of the helm that you get for keeping everyone alive scale to the player's level. Tier 3 steel? Seriously? For *that* big a challenge? Even if it scales to dragonbone, the stat bonuses on it are still pretty crappy and it probably won't get used, but at steel it's pretty much just a joke, and I'm inclined to at least let the material scale for the purpose of not wanting to simply strangle Teagan for giving you a tier 3 helm after the dozen+ reloads you just did trying to keep everyone alive. Not quite as loathsome as the Orzammar plot rewards, but I'm not planning on making it uber either, just not pathetic. I'm not fixated on this one though. If anyone objects, I'll probably say fine and leave it out.

Edited by Qwinn
Link to comment
Share on other sites

Success!

 

The knights will do a combat bark whenever they get the killing stroke on a zombie, which spreads them out nicely... maybe a little too vocal, but I can easily tweak it so they only have a 50% chance of doing a bark on a kill, or whatever works well - in fact, I think I will do that so the calls for help don't get buried in stringhead spam. If the knight goes below 33% health, they'll shout for help once (with lines like "There are too many!", "Help me! I cannot stand against them all!" and "I cannot fight them off! Help me!"). If you heal them back up over 33%, that resets them so that they'll shout for help again if they go back below 33%.

 

The underlying code is already all there for the militia and Lloyd too, I only have to apply some changes to their dialogue files, but as each dialogue is done they should go instantly and fully functional.

 

Oh, by the way! They will have different barks depending on their morale too! :D And every individual in the fight that can call for help has an additional 5-7 barks fully unique to that individual militia member/knight (though you might only see 3 or 4 for each guy in a single run through the battle, since as I said some of them are only heard at a certain morale level).

 

I think the restored combat barks are working awesome and really makes it a much cooler battle. And with so many possible barks, you might get to hear new ones each time you reload in your attempts to save them all! I hope you all like it.

Edited by Qwinn
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...