• 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!

Guide TEHO modding (tehomod and scripts are here)

Can you please place the link to stormex, also on the first post, @kb31?

I'm making this suggestion because, when a new update comes it would be easier for those who don't know about your tool to find it.
 
So i've tested critical damage and cuirasses.
Basically all cuirasses in initItems file get 0.0 "critical" value meaning that they do indeed absorb all damage from crit by the calculations from LAi_fightparams file. But they do not calculate that critical chance correctly - othervise i would've got hit for the base damage.

Screenshot with the code itself

I've edited file that so if any NPC other than hero would crit - a log message appears. Then i've modded it that so it crits 100 times stronger just to see if it really goes through 100% change to block of Milano Cuirass and onehits me. Any ideas on how to fix that?
 
Maybe it absorbs much of the damage making it look like it absorbs the critical hit bonus. :shrug

But making it do so much damage makes it make no difference.

I could be wrong, so i will see the code when i have the time.
 
I managed to fix it!

if (CheckAttribute(enemy, "cirassId") && critical > 0.0 && CheckAttribute(&Items[sti(enemy.cirassId)],"critical") )
Last one of the three conditions is always false for some reason, doesn't have something to do with the "&" in it, simple removal made everything work as intended (well, partially, now needs some fixes in initItems to make crit absorbsion match ingame description)
 
It seems that the problem is actually in initItems file, and not in the LAi_fightparams script itself. Critical value for some reason can't seem to get initialized. And so whenever it gets called it returns "0."(zero and a dot) instead of actual float value of whatever (tried setting it to 10), whilst other suit parameters like blade damage reduction return a float value of "0.30000000" in case of Milano Cuirass.
If that's somehow solved - then there is no need to change LAi_fightparams file whatsoever. Might be somehow related to engine restrictions, i dunno

EDIT: used `stf(Items[sti(enemy.cirassId)].critical)` to get crit chance,
`stf(Items[sti(enemy.cirassId)].B_CirassLevel` for dmg reduction

EDIT2: So fixing that was the easy part - just need to adjust critical values of cuirasses and make suit.critical attribute appear on curasses at all times (all in the initItems file). Requires new game from a new profile though, because changes to init file won't affect your current game and saves. Funny though how this issue with crits went under notice for such a long time, will pack it up as a mod soon-ish ;)
 
Last edited:
Packed everything up and tested it on a russian 1.6.0 - everything seems to be in order now
All cuirasses and suits have their crit block chance adjusted to match in-game description
Also checked scripts for english version - files match, so this fix is practically global, changed the date of required version for ENG, hope that's enough for it to run :oops:

EDIT: Oh and by the way, this fix affects NPCs too! Named NPCs are tougher to beat now, because some of them get cuirasses, and so they get their chance to block critical hit according to what they currently wear. Suddenly increases survival rate of your officers :D
I'll make an addition to this mod that notices when you block a crit or it goes through for ENG version soon enough ;)
 

Attachments

  • CritFixENG.rar
    24.9 KB · Views: 499
  • CritFixRUS.rar
    24.9 KB · Views: 503
Last edited:
I will try it out on the ENG version when i find the time.

Thanks @Markus242 for the mod!!!:cheers

EDIT: You could make a separate thread for the mod if you want, it would help people find it. ;)
 
Oh god, version 1.6.1 is out. My saves are all messed up. :modding I don't think the scripts are working anymore. My mods and other installed ones disappeared. :cool
 
Weird but I did try the new scripts from stormex and the game wouldn't load. So I've put back the old 1.6.0 PROGRAM files then it worked and for some reasons, my game version is back to 1.6.0? o_OxD Corsairs3_0002.jpg
I don't care though and I'm very happy because all my modded files are back and usable again! Yey! Corsairs3_0000.jpg :dance
 
Hello there, i am new to the game and mod. I am using active maps 1.3 and i see it needs this mod as it mentions. Is there any issue using this mod? I see that the game version should be 1.7 with all dlc, but when opening the menu it says 1.6 with one less dlc. Is this just a visual bug?
 
Back
Top