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

For community content (fan-art, fanfic, etcetera) for Wasteland 2.

Moderator: Ranger Team Alpha

Post Reply
Glimmer_Man
Initiate
Posts: 6
Joined: September 26th, 2014, 2:59 pm

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

Post by Glimmer_Man » October 3rd, 2014, 5:30 pm

without modifying strength?


:D

User avatar
McDougle
Adventurer
Posts: 513
Joined: October 20th, 2012, 4:00 am

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

Post by McDougle » October 4th, 2014, 12:06 am

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.
>When I said “no” I felt like a kid who had to stay inside and practice the piano while all his friends got to go eat ice cream and have awesome sex on the moon.<Pat Rothfuss
Shadowrun Returns videos (LetsPlays, Editor Tutorials, Modding)

fall_ark
Initiate
Posts: 13
Joined: September 23rd, 2014, 8:19 pm

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

Post by fall_ark » October 4th, 2014, 1:57 am

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.

Glimmer_Man
Initiate
Posts: 6
Joined: September 26th, 2014, 2:59 pm

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

Post by Glimmer_Man » October 4th, 2014, 3:11 am

Omg Ark thank you

:D

User avatar
RangerJohn
Scholar
Posts: 122
Joined: December 28th, 2013, 5:48 am

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

Post by RangerJohn » October 4th, 2014, 12:00 pm

Gotta say I'm really happy to see this! Thanks Ark!

REX-1
Initiate
Posts: 5
Joined: March 8th, 2012, 9:44 am
Location: Bemidji, MN

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

Post by REX-1 » October 4th, 2014, 4:50 pm

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
Initiate
Posts: 1
Joined: October 4th, 2014, 10:30 pm

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

Post by sprgfld » October 4th, 2014, 10:57 pm

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

fall_ark
Initiate
Posts: 13
Joined: September 23rd, 2014, 8:19 pm

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

Post by fall_ark » October 5th, 2014, 1:31 am

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!

mykl_c
Initiate
Posts: 2
Joined: October 14th, 2014, 4:36 pm

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

Post by mykl_c » October 14th, 2014, 9:21 pm

@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??

User avatar
MrMoe
Explorer
Posts: 324
Joined: June 26th, 2012, 6:01 am

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

Post by MrMoe » October 15th, 2014, 12:59 am

right click on the .dll and its somewhere in the context menu. fall_ark posted this screenshot in an other topic

Image

mykl_c
Initiate
Posts: 2
Joined: October 14th, 2014, 4:36 pm

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

Post by mykl_c » October 15th, 2014, 1:26 am

Thanks, MrMoe!
D'oh.
:oops:

Duchess of Kvetch
Initiate
Posts: 10
Joined: January 19th, 2015, 2:45 pm

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

Post by Duchess of Kvetch » January 22nd, 2015, 6:56 am

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...?

User avatar
The Tallest
Adventurer
Posts: 972
Joined: March 15th, 2012, 3:30 am

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

Post by The Tallest » February 17th, 2015, 6:38 am

I've wanted to try this but it looks rather complicated. I may need to play around with it some. Thanks for this.
I am a member of Macho Yintit's Society for Pantsless Landsharks.
David Ngo wrote: There are two kinds of people: sheep and sharks. Sharks are winners, and they don't look back because they have no necks. Necks are for sheep.

Duchess of Kvetch
Initiate
Posts: 10
Joined: January 19th, 2015, 2:45 pm

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

Post by Duchess of Kvetch » February 17th, 2015, 5:39 pm

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.

User avatar
NovaRain
Scholar
Posts: 127
Joined: October 29th, 2012, 8:03 pm
Location: Taiwan

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

Post by NovaRain » February 18th, 2015, 12:34 am

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.)

Kpoda9158
Initiate
Posts: 18
Joined: March 9th, 2015, 4:57 pm

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

Post by Kpoda9158 » March 9th, 2015, 9:11 pm

hmmm well you can use a cheat engine table to set all weights to 0 BUUT that would be cheating ;) :D :lol:

Plague
Initiate
Posts: 1
Joined: March 4th, 2018, 4:27 pm

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

Post by Plague » March 4th, 2018, 4:29 pm

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

Silencedmind
Initiate
Posts: 8
Joined: June 3rd, 2019, 8:31 am

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

Post by Silencedmind » June 3rd, 2019, 8:34 am

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 }
};

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests