Weapon energy hacking question

Jan 19, 2009 at 12:43 AM
Been here way too long...
"..."
Join Date: Jan 21, 2006
Location:
Posts: 369
Quoting rune lancer
"Also, the following two values control how much a weapon energy crystal has to be worth in order to switch sizes (ie, medium and large.) This is somewhere in the vicinity of 0x0026A10.
48 44 89 4D 8C 83 7D 8C 05 74 08 83 7D 8C 14 74"

I can't make sense of this paragraph. I tried changing the 05 and 20 (the 14 its hex) to different values hoping these would be the "two values" which actually control the size change, but to no avail. Sadly i have no other way of trying to figure this out. Any help would be appreciated.
 
Jan 19, 2009 at 3:24 AM
Been here way too long...
"Life begins and ends with Nu."
Join Date: Jan 4, 2008
Location: Lingerie, but also, like, fancy curtains
Posts: 3052
I might give it a shot.
Best thing to do is screw around with the values until something happens, though this can take forever, and crash the game, it is sort of fun.

However, I am too outraged to help right now, sorry.
:(
 
Jan 19, 2009 at 3:44 AM
Been here way too long...
"..."
Join Date: Jan 21, 2006
Location:
Posts: 369
Stop being outraged. Help a brother out. I messed around with lots of stuff, but nothing i did created less energy poping out of the enemys. I achieved many crashes, and same size energy yielding different experience (but only 1 5 or 20 :()
 
Feb 1, 2009 at 1:34 PM
Junior Member
"It's dangerous to go alone!"
Join Date: Jan 3, 2009
Location:
Posts: 36
What are you trying to do? Change the amount of XP that you get for killing an enemy, or change the sprite that's shown for a certain XP value (like for example make a 1XP unit look like the "big" triangle that's normally 20HP).

Former:

XP for killing a monster is a per-monster setting and is stored in NPC.TBL.

Latter:

I don't know exactly, but I know that when a monster dies it takes it's whole XP "worth", say you get 23 for killing it, and passes it into a function that splits that up into the separate triangle pieces. It's sort of like a function for making change (what coins should I give out to equal 23 cents), or a function for printing a number to the screen, only using a different base system. So I think you would have to screw with that function if you wanted to mess up which XP's you got for what.

As for how much each actual triangle is worth when you collect it, I think each one has it's own AI code and that value is hardcoded into the AI function for each one.
 
Feb 1, 2009 at 2:09 PM
Been here way too long...
"Life begins and ends with Nu."
Join Date: Jan 4, 2008
Location: Lingerie, but also, like, fancy curtains
Posts: 3052
Close, but not quite.
The values are for how much can be stored in each crystal, and he wants to change that, normally, it is one for small, 5 for medium, and 20 for big. If a monster gives, say, 26 exp, it will split this up into the correct sized experience, doing as many big as possible, then as many medium as possible, and then as many small as possible. What SF wants to do is make it so that say, the big one only holds 16, the medium holds four, and the small holds one. To do this he needs to find the values, blablabla.

I'll get back to you, HappyFace.
=D

Edit:
Actually, very, very, right.
I just didn't read close enough.
 
Feb 1, 2009 at 2:16 PM
Been here way too long...
"Life begins and ends with Nu."
Join Date: Jan 4, 2008
Location: Lingerie, but also, like, fancy curtains
Posts: 3052
Hacking is not a subforum!

Kay, after some poking around in the code, I found the function that rune pointed to.
Code:
00426A0F 8B 48 44				mov ecx,[eax+0044]
00426A12 89 4D 8C				mov [ebp-0074],ecx
00426A15 83 7D 8C 05				cmp dword ptr [ebp-0074],05
00426A19 74 08					je 00426A23
00426A1B 83 7D 8C 14				cmp dword ptr [ebp-0074],14
00426A1F 74 22					je 00426A43
00426A21 EB 3E					jmp 00426A61

It doesn't have the one because it's redundant, if it can't fit the others, it turns the rest into ones. (jmp 00426A61)
[ebp-0074] seems to hold the amount of experience the npc holds, and 14 and 5 do seem to be the switch nums, so they should work if you change them.
But, hmm...

You got any ideas sshsigi?
 
Back
Top