Page 1 of 1

Is it possible to modify a character's carry weight ability

Posted: October 3rd, 2014, 5:30 pm
by Glimmer_Man
without modifying strength?


:D

Re: Is it possible to modify a character's carry weight abil

Posted: October 4th, 2014, 12:06 am
by McDougle
I looked for that as well (carry weight sucks... thats the one point where I often cheat in RPG's... I just want it all :lol: ), but didn't find a way.

Re: Is it possible to modify a character's carry weight abil

Posted: October 4th, 2014, 1:57 am
by fall_ark
Yes. It's in the Assembly-CSharp.dll, so consult the Reduced Skill-Meter thread if you don't know how to edit the file.

And backup the dll before doing any editing.

I'll keep it short. With JustDecompile and Reflexil, search the CalculateStatBase function. The max carry weight is defined as:

Code: Select all

        if (statName == PCStatsManager.maxWeight)
        {
            return 45 + item1 * 12;
        }
(item1 is Strength, obviously)

Open the Reflexil panel, scroll down to the relevant numbers:

Image

Both the base carry weight (45) and the Strength multiplier (12) can be edited, so do that and save your file.

Re: Is it possible to modify a character's carry weight abil

Posted: October 4th, 2014, 3:11 am
by Glimmer_Man
Omg Ark thank you

:D

Re: Is it possible to modify a character's carry weight abil

Posted: October 4th, 2014, 12:00 pm
by RangerJohn
Gotta say I'm really happy to see this! Thanks Ark!

Re: Is it possible to modify a character's carry weight abil

Posted: October 4th, 2014, 4:50 pm
by REX-1
Hey, thanks a lot, fall_ark, being a complete programming rook that was very informative. It's worth noting that Reflexil plugin can be downloaded from inside of JustDecompile program: Plugins->Plugin Manager->Assembly Editor (apparently, it's a ported version of Reflexil for Telerik's JustDecompile. At first I tried downloading reflexil from the official website and putting it in Plugins' folder but that wouldn't work). Also, the return value (default: 45) of this code:

Code: Select all

return 45 + item1 * 12;
Wouldn't go above 125 for me and anything above that resulted in return value being forced to 0. Thought that might help someone or I'm just doing something wrong since you put 200 in one of your screenshots. Still doesn't matter since you can increase multiply value from 12 significantly.

Kind regards and thanks again for this,
REX-1

Re: Is it possible to modify a character's carry weight abil

Posted: October 4th, 2014, 10:57 pm
by sprgfld
REX-1 wrote:-snip-
sByte max value is 127 that's why. Change opcode to ldc.i4 and type to int32 then put whatever value you want. :D

Re: Is it possible to modify a character's carry weight abil

Posted: October 5th, 2014, 1:31 am
by fall_ark
REX-1 wrote:Hey, thanks a lot, fall_ark, being a complete programming rook that was very informative. It's worth noting that Reflexil plugin can be downloaded from inside of JustDecompile program: Plugins->Plugin Manager->Assembly Editor (apparently, it's a ported version of Reflexil for Telerik's JustDecompile. At first I tried downloading reflexil from the official website and putting it in Plugins' folder but that wouldn't work). Also, the return value (default: 45) of this code:

Code: Select all

return 45 + item1 * 12;
Wouldn't go above 125 for me and anything above that resulted in return value being forced to 0. Thought that might help someone or I'm just doing something wrong since you put 200 in one of your screenshots. Still doesn't matter since you can increase multiply value from 12 significantly.

Kind regards and thanks again for this,
REX-1
sprgfld has explained the reason. I kind of just put 200 in there as an afterthought, now I feel stupid... :oops:

I'd suggest against changing the integer form though. We don't really know if it might screw with any other function. Just change the multiplier and it should be fine. Safety first!

Re: Is it possible to modify a character's carry weight abil

Posted: October 14th, 2014, 9:21 pm
by mykl_c
@fall_ark - Your tute is excellent! I have one tiny question - where on earth is the Save option???
Not in JustDecompile, nor Reflexil. I can't even find an Exit button, just Close (Alt-F4).
I've set the security on the file and folders to allow full rights, Reflexil allows me to do the edits but closing JustDecompile and re-opening it shows no change to the two items changed (base carry and strength multiplier).
I'm sure it's something incredibly basic I'm missing. Can I buy a vowel??

Re: Is it possible to modify a character's carry weight abil

Posted: October 15th, 2014, 12:59 am
by MrMoe
right click on the .dll and its somewhere in the context menu. fall_ark posted this screenshot in an other topic

Image

Re: Is it possible to modify a character's carry weight abil

Posted: October 15th, 2014, 1:26 am
by mykl_c
Thanks, MrMoe!
D'oh.
:oops:

Re: Is it possible to modify a character's carry weight abil

Posted: January 22nd, 2015, 6:56 am
by Duchess of Kvetch
Thanks for this!

I actually didn't know about the Just Decompile app - makes a lot of things easier, no need to use ILDASM or other clunkier tools.

However, I can see where hacking raw binaries directly will freak some people out. ;-) So it might be good to eventually post links to the edited DLL's.

I also noticed that the offsets were different again for Patch 5 - I suspect that since Assembly-CSharp is a core file, it will get modified with every patch and people will need to update their hacked values...?

Re: Is it possible to modify a character's carry weight abil

Posted: February 17th, 2015, 6:38 am
by The Tallest
I've wanted to try this but it looks rather complicated. I may need to play around with it some. Thanks for this.

Re: Is it possible to modify a character's carry weight abil

Posted: February 17th, 2015, 5:39 pm
by Duchess of Kvetch
I just did it again for patch 6. The tool itself is very useful, but a bit counterintuitive - as is often the case with apps aimed at devs. They're not designed for user friendliness. I had to read through this entire thread and the other one referenced within, before I figured it out.

The Mod Injector author(s) would probably have a more useful/easier way to go about it, but I trust my own eyes when it comes to hacking the "core" files. This is really just raw byte hacking, but using a "Reverse engineering" tool to see where you're going.

Re: Is it possible to modify a character's carry weight abil

Posted: February 18th, 2015, 12:34 am
by NovaRain
I made a plugin for Mod Injector few months ago. You can change the base value and Strength multiplier in the carry weight formula: viewtopic.php?p=141272#p141272 (It still works for current patch 6.)

Re: Is it possible to modify a character's carry weight abil

Posted: March 9th, 2015, 9:11 pm
by Kpoda9158
hmmm well you can use a cheat engine table to set all weights to 0 BUUT that would be cheating ;) :D :lol:

Re: Is it possible to modify a character's carry weight ability

Posted: March 4th, 2018, 4:29 pm
by Plague
Ok when I edit this, I got to the carryweight in that program you said but mine said

if (statName == PCStatsManager.maxWeight)
{
return 1000 + item1 * 500;

Might need some help

Re: Is it possible to modify a character's carry weight ability

Posted: June 3rd, 2019, 8:34 am
by Silencedmind
If someone would be so kind to help me, i need some guidance.

I followed the steps from this thread, i have justdecompile and reflexil. What i found out however, is the mod i'm using changed the outlay. The keywords suggested to find are not there anymore.

I use the assembly from this mod: https://www.nexusmods.com/wasteland2/mo ... ption&BH=3

How should i proceed? if i cannot find the setting, what to do now?

The closest thing i found is:

public int GetMaxCarryWeight()
{
return MathfX.FloorToIntCarefully(this.derivedStatValues[7]);
}

Any help or tips appreciated!

Edit:
scrap the above mention, the closest thing i found is:

{
statName = PCStatsManager.maxCarryWeight,
table = new float[] { 45f, 57f, 69f, 81f, 93f, 105f, 117f, 129f, 141f, 153f, 165f }
};