For some reason, this value cannot go higher than 127 (0x4b) (solved)

Started by adiamaq, October 07, 2020, 02:41:28 PM

Previous topic - Next topic

adiamaq

Hey people! Awesome game, awesome modding community. I am editing game core assembly.dll. I know 0 about modding on c#, only used dnspy to change IL for some non-edit friendly mods.

Anyway, I wanna stack more than 75 meat. I succeeded with values lower than 127, but higher this happens o.O why this could be and how to fix? Thank you so much in advance!

LWM

No idea.  You may get a clearer answer to your question on a dnSpy messageboard?  But....surely you can change the XML to set a higher stacklimit?

There are a lot of resources and tools that let you do a lot of things to the code.

And in case you didn't know, the ...Ogrestack? mod lets you set stacklimits for any def you want?  Tedious perhaps with meat, but doable (you'd need to either edit the IL directly as you are doing or use Harmony and C# to change the def generator to get all of them at once)  There are of course also other options - mods that mix all meat together, and of course storage mods, that might also answer your needs.


RawCode

you probably should read manual (or wiki, or just paste instruction name into google) before asking stupid questions

0x1F    ldc.i4.s <int8 (num)>    Push num onto the stack as int32, short form.    Base instruction

adiamaq

Sure RawCode, not knowing what a  ldc.i4.s instruction is obviously an stupid question.. my my, this people.

Anyway I figured it out by myself 5 minutes after. I tried to remove my post after that but it didn't

RawCode

not knowing what ldc.i4.s is not stupid.
not knowing what ldc.i4.s is AND using it is stupid.

asking on forum question clearly defined in manual also stupid.

adiamaq

I think you did not understood. I didn't "use ldc.i4.s" out of nowhere. It was there already. I was just editing it, and my question came it when I could not edit the value, that's all