Help with Dual Strike stats and skills (hex)

Discussion of hacking, editing and developments in Advance Wars games.
Remember, no Rom Requests
User avatar
D-Reaper
Rank: Pasota Ilustrado

Help with Dual Strike stats and skills (hex)

Post by D-Reaper » Fri Mar 16, 2018 9:56 am

Hi! This is my first post here, anyway, I am getting desperate to modify a few things in Dual Strike but I must be really dumb because after reading through all the info about the game (hex data) in these forums I'm still quite lost... I have experience hex editing Pokemon but I think the data there is more straightforward, at least in the numerical stats department.

Lets see, first I have no idea how the CO unit stat data pointers work (do pointers read different in this rom? I just reversed the bytes before the 02 and went to that offset only to find seemingly random bytes) and I dont get how unit stats are calculated in hex, like... Is as simple as decimal to hex? 82 means a 130 stat? In the CO data post Xenesis wrote this:

Format's the same as AW2:
1E 00 EC FF 00 00 00 00
Atk, Def, Move, Range

But I dont really get what that means or what I have to do to change a stat to a certain number like 120, please understand that I'm totally new to Advance Wars editing. Also I already said this as a guest in the SuperForces patch post but I'm trying to edit the skill parameters from Dual Strike myself, hopefully only changing the numerical values instead of reworking the whole skill system like SuperForces does will let me play with modified skills on hardware. The problem is I wasnt able to find the skill data in hex and if its only accesible with ASM thats a problem because I have no idea how that works.

User avatar
Satel

Re: Help with Dual Strike stats and skills (hex)

Post by Satel » Sat Mar 17, 2018 4:09 am

In this little tidbit, each stat bonus is in 2 bytes
1E 00 means +30% atk (1E being 30)
EC FF means -20% def (the value is signed, so here FFEC -hex is read backwards btw- is 65516, substract 65536 -10000 in hex- and you have -20)
00 00 means no movement bonus
same goes for range

if you want to make the attack +20%, change the 1E to 14 (20 in dec).

by the way those values aren't pointers

this is a good start to change CO stats, but i can't help you with changing skills, mostly because i don't know how to change that myself
Joey wrote:i think i was mad at certain players and wanted to wave st3rn's success in their face at the most opportune moment, or something

st3rn fudge st3rn

User avatar
D-Reaper
Rank: Pasota Ilustrado

Re: Help with Dual Strike stats and skills (hex)

Post by D-Reaper » Sat Mar 17, 2018 4:44 am

Ok thanks for explaining that, and by pointers I mean parts like this 1C 58 18 02 or 58 27 15 02 which are supposed to be pointers for the unit stats but if I go to the offset 152758 it doesn't lead to stat bytes so I think Im not "reading" the pointers correctly.

Edit: Nevermind, after reading again the CO Data posts I understand that the location of the unit stats is not exactly where the pointers... Well, point. Now I know how to locate the stats of a certain CO.

User avatar
Satel

Re: Help with Dual Strike stats and skills (hex)

Post by Satel » Sun Mar 18, 2018 2:01 am

Pointers ending with 02 point to the RAM, and it's not something you can access in the ROM. Pointers you would be able to access end with 08.
Joey wrote:i think i was mad at certain players and wanted to wave st3rn's success in their face at the most opportune moment, or something

st3rn fudge st3rn

User avatar
Xenesis
Tri-Star CO
Tri-Star CO
Rank: Hydrocarbon Inspector
3DS Code: 2535-4646-7163
Location: 0x020232DD

Re: Help with Dual Strike stats and skills (hex)

Post by Xenesis » Tue Mar 20, 2018 5:21 pm

Yeah, the NDS is not like the GBA - with GBA games you can read directly from the cartridge (hence pointers starting with 0x08 point to an exact location in the ROM). NDS loads data from the ROM into RAM so you have to read pointers for everything directly from RAM (so it starts with an 0x02 or an 0x03 to signify the RAM location).

As far as the numbers go, it's as Satel said.
D-Reaper wrote:
Fri Mar 16, 2018 9:56 am
I'm trying to edit the skill parameters from Dual Strike myself, hopefully only changing the numerical values instead of reworking the whole skill system like SuperForces does will let me play with modified skills on hardware. The problem is I wasnt able to find the skill data in hex and if its only accesible with ASM thats a problem because I have no idea how that works.
This is pretty much the case - The game has a bunch of code that basically says "check if you've got this skill equipped, if true, add this thingy to your damage" or w/e. If you look at the disassembly in an emulator (no$gba or desmume should do it) you'll see blocks that basically just look like this (with just numbers instead of labels, this is my disassembly of it):

Code: Select all

.org 0x020E6778
	stmfd	r13!,{r4,r5,r14}
	mov	r5,0x0
	
	ldr	r2,=0x027C027C
	ldr	r1,=0x027C0284
	ldr	r3,[r2]
	ldr	r2,[r1]
	mov	r1,0x98
	add	r2,r3,r2,lsl 0x2
	mul	r4,r0,r1
	ldr	r2,[r2,0x48]
	add	r0,r2,0x5000
	ldr	r0,[r0,0xA58]
	add	r0,r0,r4
	add	r0,r0,0x74
	mov	r1,ForceRankInvader
	bl	ForceRankBitChecker
	cmp	r0,0x0
	addne	r5,r5,ForceStatInvader
My AWDS notes however should tell you where the code is, that particular code for instance is the capture skills and you'll find it at 0x020E6778 if you look in RAM in an emulator. The addne r5,r5 opcode could be changed to give you a different number, and that'd change the strength of the skill.

I can probably walk you through it better on the discord or w/e, so hit me up when I'm awake and I'll see if I can help you out.
IST wrote:Even the worst individual needs to discover the joys of a chicken statue that is also a pregnant blonde housewife.

Who is online

Users browsing this forum: Multivac [Bot]