Jump to content


Daemonjax

Member Since 12 Mar 2021
Offline Last Active Jan 14 2025 06:27 PM

Posts I've Made

In Topic: Is there a way to remove the unit health modifiers given by the difficulty se...

14 January 2025 - 04:18 PM

I'll take a look at it soon, because it was something I planned on doing for myself -- setting units to 100%/100% health for... some setting, probably normal. 

 

What I'd really _like_ to do is shift _all_ the difficulty setting "to the left", basically replacing easy with the current normal settings, etc. in order to open up a difficulty setting higher than hard but not sure if its worth spending the time to do the testing for that. 

 

But I'll probably just make normal 100%/100% instead of 200%/100%... leaving easy and hard the way it is now -- it'll make testing simple, too because i just need to test ONE thing. 

 

 

Update:

 

My testing confims this works:

 

data/attrib/tables/tuning.rgd

... such that the record for: player_metamap_difficulty_modifiers->normal->modifier_01->value = 1 (instead of 2, so it just multiplies player health by 1)

 

Note1: modifying the same value in data/attrib/tuning/player_metamap_difficulty_modifiers.rgd has no effect ingame.  Not sure why, didn't investigate further.

Note2: Comparing the original (from for Dark Crusade 1.2 cd version) to the modified tuning.rgd in a hex editor...

 

total offset (decimal) = 78236

original  : 00 00 00 40 (little endian single float32 =  2)

modified: 00 00 80 3F (little endian single float32 = 1)

 

Those are the only 4 bytes that need to be modified for this simple change.  Corsix's Mod Studio does also modify 4 bytes within the the file header as well, but that has nothing to do with this modification -- I can't make heads or tails of it.  I'm a little curious, but I'm unlikely to find an answer without digging through the code for the mod studio... and I'm not about to do that.  My best guess is that it's an artifact from how it actually exports the rgb after editing -- it probably converts it to lua first, and then back to rgd before saving. 

 

If someone could point me to header format info for .RGD files, that would be nice.

 

Anyways, if you're using a mod that includes a modified tuning.rgd for some reason you should be able to just hexedit in that one float32 change and it should still work as expected.

 

--------------------------------------------------------------------------------------------

 

Here's an archive that contains 3 files for Dark Crusade 1.2 (cd version):

 

1) the original (as extracted using corsix's mod studio)

2) a modified version (as modified and exported using corsix's mod studio)

3) another modified version (made by hexediting the original from #1)

 

#2 and #3 work ingame exactly the same (player health on normal is set to 100%).

 

Testing includes: starting new compaign on normal, choosing space marines, checking health on commander screen, and attacking some territory and then checking the commander's health in the battlescape.  So, not exactly exhaustive, but it should be fine for all maps and all commanders

 

 

https://drive.google...iew?usp=sharing