Aller au contenu

Photo

How to modify core_h.nss?


  • Veuillez vous connecter pour répondre
5 réponses à ce sujet

#1
Xenoseroster

Xenoseroster
  • Members
  • 101 messages
So I'm tired of things like double-haste or haste + Momentum reseting the swing timer to normal speed, and I want to fix the line of code that sets it to 1 to set it to .5, like it should be.  Unfortunately I can't figure out how to make modifying the include files actually affect in-game mechanics. 

The stuff I've read on the matter says you need to export both the include file and the relevant files that call the include file.  IE to effectively modify Spell_constants_h you would need to export the Spell_modal, Spell_singletarget, etc.  However, when I tried modifying the talent/spell include scripts to change things, I can never get it to have any affect in-game. 

Do I have to do "export with dependant resources" to get it to work?  Seems like that would be a lot of flack, possibly messing w/ game functionality to just modify a single mechanic.  Anyone wanna explain it to me?

#2
Xenoseroster

Xenoseroster
  • Members
  • 101 messages
So I actually managed to figure it out myself based off of another thread, and it seems to work fine in vanilla DAO, BUT it seems to at minimum break gift-giving in Awakening, so it's kinda a mixed blessing. I'd kinda imagine it will do other things, if it breaks something like that, but that's just the first one I noticed.



If you want to repeat my process, or if you have feedback to improve it/make it more compatible, feel free:



1.) Dunno if it works w/ Open local copy, but I just did a Check Out of core_h.nss, go to line 2693

2.) replace fSpeedEffects = 1.0f; with fSpeedEffects = 0.5f;, save/check in, etc.

3.) Export w/o dependants like normal, delete extra-exported files like always

4.) Open local coppies of rules_core, player_core, module_core, creature_core. Compile & export each.

5.) Again, delete all the extra files like normal.



After that, the swing timers for my chars over the haste cap worked exactly as I wanted, I could run 2 hastes + whatever I wanted and still only had 1/2 swing speed. From my current experience, it seems to have no adverse effects in the main game.



For some reason though, it seems to affect gift giving in Awakening. Vellana and Nathaniel, for instance, always gave exactly +5 approval & acted like it was a "matching" gift regardless of whom it was actually for. Anders was the opposite, all gifts given to him gave +1 approval & acted like it was a "non-matching" gift, regardless of whether it was his or not.



I'm not sure why it behaved the way it did really, I see the lines where gift giving is covered in the rules_core script, but it doesn't really explain the behavior. Possible scenarios I could see are invalid item/follower values for:

int nApprovalChange = Approval_HandleGift(nFollower, oItem);

But that doesn't explain why some of the followers get a 5/liked gift response 100% of the time, while others get a 1/dislike gift response 100% of the time.



SO, anyone have insite or help, or anything like that for this?

#3
Xenoseroster

Xenoseroster
  • Members
  • 101 messages
More updates:



Forgot to mention earlier, the bit that causes trouble in Awakening is specifically rules_core.ncs. All other called script seem to do fine, but without rules_core it doesn't work, and with rules_core, it causes the aforementioned gift problems.



Further testing seems to show that all is not well even in origins. For some reason, having the rules_core file active seems to cause aweful combat lag. I'm used to a modicrum of combat lag, (probably due to how many customized core scripts I have) where animations for enemies & allies all play normally, but damage and effects take a second or so to register, usually in larger battles. But this was exceptionally bad. I would swing 5-6 times before 1 hit would register, or do an AOE 2h sweep and not have it do any damage for 5-6 seconds, and then everything would explode at once. On the flip side, this may be due to the fact that the faster my swing timer on whatever character I'm playing, the more sluggish combat effects seem to be. Even un-fixed DW backstabby rogue I have with a -.49 swing time adjustment will stab several times before the first damage is applied. Maybe that's why they haven't done anything about it yet in the major patches?



So, it seems this is probably beyond my scope of ability or understanding. Hopefully someone else can think of a way to get this functional, since it may not get patched any time soon (hasn't yet =/ ).

#4
traversc

traversc
  • Members
  • 274 messages
Hello. I made the change as well in one of my mods: http://www.dragonage...le.php?id=1041.



Simply changing the attack speed should have no effect on other functions in rules_core because Awakening uses the exact same rules_core as the latest version in the toolset. And even if Awakening overrides one of the events in rules_core, it should never even see the difference. If I had to guess, the gift giving problem is due to something else. I also have not noticed any combat lag.



If you REALLY really think that somehow compiling rules_core is the problem,you can simply override the event that you need. The best way to do that is with Anakin55's Event Manager here: http://www.dragonage...file.php?id=726



Good luck.

#5
Xenoseroster

Xenoseroster
  • Members
  • 101 messages
Well, I used process of elimination. I removed all of the modified files related to this from the override, then re-added the modified/compiled scripts one by one until the problem re-occured. The only one that caused any trouble was when I placed rules_core into the override with the rest of them. Since that's also one of the scripts with gift mechanics in it, it seems logical that, of the scripts in question, it would be the cause. Though like I said, I'm at a loss to establish why the problem occurs as it does. I may fiddle around some more later, I really enjoyed not having to worry about the +attack speed "cap".

#6
Xenoseroster

Xenoseroster
  • Members
  • 101 messages
I went ahead & downloaded your mod, had a lot of stuff I'd been wanting to do, but was too lazy to implement myself. I'll see how things work, thanks for being unlazy like myself & getting things done. =P