CO Stats Datasheet

Discussion of hacking, editing and developments in Advance Wars games.
Remember, no Rom Requests
User avatar
Xenesis
Tri-Star CO
Tri-Star CO
Rank: Hydrocarbon Inspector
3DS Code: 2535-4646-7163
Location: 0x020232DD

CO Stats Datasheet

Post by Xenesis » Thu Sep 15, 2005 5:35 pm

Okay, there's one or two things I can't remember what they do in the CO dataset, but you guys can correct anything that I've missed.

The COs start at each of these points:
These are the offsets for the CO's:
5D3DD4- Nell
5D3ED8- Andy
5D3FDC- Max
5D40E0- Olaf
5D41E4- Sami
5D42E8- Grit
5D43EC- Kanbei
5D44F0- Sonja
5D45F4- Eagle
5D46F8- Drake
5D47FC- Sturm
5D4900- Flak
5D4A04- Lash
5D4B08- Adder
5D4C0C- Hawke
5D4D10- Hachi
5D4E14- Colin
5D4F18- Jess
5D501C- Sensei

More accurate offsets:

5D3DD0 - Nell
5D3ED4 - Andy
5D3FD8 - Max
5D40DC -Olaf
5D41E0 - Sami
5D42E4 - Grit
5D43E8 - Kanbei
5D44EC - Sonja
5D45F0 - Eagle
5D46F4 - Drake
5D47F8 - Sturm
5D48FC - Flak
5D4A00 - Lash
5D4B04 - Adder
5D4C08 - Hawke
5D4D0C - Hachi
5D4E10 - Colin
5D4F14 - Jess
5D5018 - Sensei


Okay, to begin with, here's andy's data:
Andy's Data@5D3F48
18 0A 00 00 D1 00 00 00 00 00 00 00 03 00 00 00
06 00 00 00 01 00 01 19 5F 00 00 00 09 C2 05 08
5F 0B 60 0B 61 0B 62 0B 63 0B 64 0B 79 09 7A 09
7B 09 7C 09 46 0B 00 00 00 00 00 00 D9 43 04 08
00 00 00 00 00 00 0A 00 00 00 00 00 00 00 00 00
1C 51 5D 08 FC 51 5D 08 DC 52 5D 08 F0 3B 5D 08
F0 3B 5D 08 F0 3B 5D 08 F0 3B 5D 08 F0 3B 5D 08
F0 3B 5D 08 F0 3B 5D 08 F0 3B 5D 08 E4 08 00 00
D9 43 04 08 00 00 00 00 00 00 0A 00 00 00 00 00
00 00 00 00 1C 51 5D 08 FC 51 5D 08 DC 52 5D 08
F0 3B 5D 08 F0 3B 5D 08 F0 3B 5D 08 F0 3B 5D 08
F0 3B 5D 08 F0 3B 5D 08 F0 3B 5D 08 F0 3B 5D 08
E5 08 00 00 D9 43 04 08 00 00 00 00 00 00 0A 00
00 00 00 00 00 00 00 00 1C 51 5D 08 FC 51 5D 08
DC 52 5D 08 F8 3B 5D 08 F8 3B 5D 08 F8 3B 5D 08
F8 3B 5D 08 F8 3B 5D 08 F0 3B 5D 08 F0 3B 5D 08
F0 3B 5D 08
Now, to explain what each does, I'll go in a line by line fashion. Anything I haven't mentioned, I either don't know or don't remember.

Line 1:
18 0A 00 00 D1 00 00 00 00 00 00 00 03 00 00 00

Red: The CO's name Index number
Purple: Snowbringer Value
Gray: Rainbringer Value
Green: This is the music this CO has.
Blue: This is how many stars the CO Power is.
Orange: Appears to be an unused area

Line 2:
06 00 00 00 01 00 01 19 5F 00 00 00 09 C2 05 08
Red: This is how many stars the Super CO power is.
Green: This is which Army unit sprites this CO uses.
Blue: This is which colour is this CO's default (ie. in War Room)

Line 3:
5F 0B 60 0B 61 0B 62 0B 63 0B 64 0B 79 09 7A 09
Red: These are text IDs for CO Power quotes
Blue: These are text IDs for the CO Dossier.

Line 4:
7B 09 7C 09 46 0B 00 00 00 00 00 00 D9 43 04 08
Blue: These are text IDs for the CO Dossier.
Green: This is the text ID for the Victory Quote
Orange: This is a pointer to the type of animation for a default CO power, but during D2D, this remains unused.

Line 5:
00 00 00 00 00 00 0A 00 00 00 00 00 00 00 00 00
Red: Special Unit Properties day to day.
Green: Day to day vision alterations
Blue: Day to day Positive Luck alterations. (MUST BE AT LEAST 1 OR GAME CRASHES)
Purple: Day to day Negative luck alterations.
Gray: Day to day Counterattack Strength
Orange: Day to day unit price
Yellow: Day to day capture rate.

Line 6:
1C 51 5D 08 FC 51 5D 08 DC 52 5D 08 F0 3B 5D 08
Red: Pointer to movement penalties chart in Clear Weather day to day.
Green: Pointer to movement penalties chart in Snow Weather day to day.
Blue: Pointer to movement penalties chart in Rain weather day to day.
Purple: Pointer to Soldier unit modifications day to day.

Line 7:
F0 3B 5D 08 F0 3B 5D 08 F0 3B 5D 08 F0 3B 5D 08
Red: Pointer to Vehicle unit modifications day to day.
Blue: Pointer to Plane unit modifications day to day.
Green: Pointer to Copter unit modifications day to day.
Purple: Pointer to Navy unit modifications day to day.

Line 8:
F0 3B 5D 08 F0 3B 5D 08 F0 3B 5D 08 E4 08 00 00
Red: Pointer to Direct unit modifications day to day.
Blue: Pointer to Indirect unit modifications day to day.
Green: Pointer to Transport unit modifications day to day.
Purple: Index Number for CO Power Name

Line 9:
D9 43 04 08 00 00 00 00 00 00 0A 00 00 00 00 00
Red: Pointer to CO Power animation effects code.
Blue: CO Power Special effects.
Green: Vision Modifications during CO power
Purple: Positive luck during CO Power (MUST BE AT LEAST 1 OR GAME CRASHES)
Gray: Negative Luck during CO Power
Orange: Counterattack Strength during CO power.

Line 10:
00 00 00 00 1C 51 5D 08 FC 51 5D 08 DC 52 5D 08
Red: Unit price during CO power
Blue: Capture rate during CO Power
Green: Pointer to Clear movement types chart during CO power.
Purple: Pointer to Snow movement types chart during CO Power
Gray: Pointer to Rain movement types chart during CO Power.

Line 11:
F0 3B 5D 08 F0 3B 5D 08 F0 3B 5D 08 F0 3B 5D 08
Red: Pointer to Soldier unit modifications during COP.
Blue: Pointer to Vehicle unit modifications during COP.
Green: Pointer to Plane unit modifications during COP.
Purple: Pointer to Copter unit modifications during COP.

Line 12:
F0 3B 5D 08 F0 3B 5D 08 F0 3B 5D 08 F0 3B 5D 08
Red: Pointer to Navy unit modifications during COP.
Blue: Pointer to Direct unit modifications during COP.
Green: Pointer to Indirect unit modifications during COP.
Purple: Pointer to Transport unit modifications during COP.

Line 13:
E5 08 00 00 D9 43 04 08 00 00 00 00 00 00 0A 00
Red: ID Number for SCOP Name
Blue: Pointer to SCOP Animation effects
Green: SCOP Special effects.
Purple: Vision modfier during SCOP
Gray: Positive Luck during SCOP (MUST BE AT LEAST 1 OR GAME CRASHES)

Line 14:
00 00 00 00 00 00 00 00 1C 51 5D 08 FC 51 5D 08
Red: Negative Luck during SCOP
Blue:Counter attack strength during SCOP
Green: Unit Price during SCOP
Purple: Capture rate during SCOP.
Gray: Clear movement type table pointer during SCOP
Orange: Snow movement type table pointer during SCOP

Line 15:
DC 52 5D 08 F8 3B 5D 08 F8 3B 5D 08 F8 3B 5D 08
Red: Rain movement type table pointer during SCOP
Blue: Pointer to Infantry Modifications during SCOP
Green: Pointer to Vehicle Modifications during SCOP
Purple: Pointer to Plane modifications during SCOP

Line 16:
F8 3B 5D 08 F8 3B 5D 08 F0 3B 5D 08 F0 3B 5D 08
Red: Pointer to Copter Modifications during SCOP
Blue: Pointer to Navy Modifications during SCOP
Green: Pointer to Direct Modifications during SCOP
Purple: Pointer to Indirect Modifications during SCOP

Line 17:
F0 3B 5D 08
Red: Pointer to Transport modifications during SCOP.

Whew. That's all for now.
Last edited by Xenesis on Wed Jan 17, 2007 4:38 pm, edited 2 times in total.

Mr Dev
Rank: Slaving Away On Something or Another
Location: The Moon

Post by Mr Dev » Wed Sep 28, 2005 4:22 am

Can we have the Co pointers here?

These are the offsets for the CO's:
5D3DD4- Nell
5D3ED8- Andy
5D3FDC- Max
5D40E0- Olaf
5D41E4- Sami
5D42E8- Grit
5D43EC- Kanbei
5D44F0- Sonja
5D45F4- Eagle
5D46F8- Drake
5D47FC- Sturm
5D4900- Flak
5D4A04- Lash
5D4B08- Adder
5D4C0C- Hawke
5D4D10- Haichi
5D4E14- Colin
5D4F180- Jess
5D501C- Sensei

Just for esier reference... You'll understand...

User avatar
golden_cow2

Post by golden_cow2 » Mon Oct 31, 2005 12:22 pm

If you didn't color it there does that mean it does nothing or you don't know what it does?
No, I do not make golden milk. Technically I'm a bull.

User avatar
Belgdor
Rank: That guy

Post by Belgdor » Mon Oct 31, 2005 12:58 pm

No idea what it does. XD
You're an escaped prisoner, this ship is about to explode, and I have the ONLY way off of this ship. I'm offering to take you with me. And you're arguing.

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

Post by Xenesis » Wed Jan 17, 2007 4:40 pm

I've updated the datasheet, improving the accuracy of the highlights.

Yes, IS is using a word (4 bytes) to store how many COP and SCOP stars a CO has. <_<;
IST wrote:Even the worst individual needs to discover the joys of a chicken statue that is also a pregnant blonde housewife.

colonel_lionel

Re: CO Stats Datasheet

Post by colonel_lionel » Thu Jan 15, 2009 9:11 am

I've been going through the code for Olaf, and I'm wondering how I see his movement in snow? Do I search the pointer, or is there something else I do?

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

Re: CO Stats Datasheet

Post by Xenesis » Thu Jan 15, 2009 11:12 am

The stuff that affects Olaf in snow is the movement costs pointers. You'll notice that for Clear, he has the normal one, for Snow he has the clear one, and in rain he has the pointer to what everyone else has for Snow movement costs.
IST wrote:Even the worst individual needs to discover the joys of a chicken statue that is also a pregnant blonde housewife.

colonel_lionel

Re: CO Stats Datasheet

Post by colonel_lionel » Thu Jan 15, 2009 11:41 am

So it is, my bad. Sorry if some of my questions are stupid, my previous dealings with the workings of programming is writing a rock paper scissors program for my TI-83. And that's not really practical for any computer type stuff.

Thanks!

tummychow

Re: CO Stats Datasheet

Post by tummychow » Fri Jan 23, 2009 4:32 am

Er, the pointers might be a bit off...
I was looking around in my original unhacked rom to see where Andy's data was, to get my feet wet with this hack. I went to the indicated offset (5D3ED8) and found myself a few bytes off of where Andy's indicated data began. Moving back a little bit, I found the first part (180A) at 5D3ED4.
I'm a tad confused here. It could easily just be my ROM, but could it also be that the data is off? I don't have the intelligence to find this myself... could someone post, say, the first few parts of every CO's data so I can check to make sure I'm on target?

Xen

Re: CO Stats Datasheet

Post by Xen » Fri Jan 23, 2009 1:12 pm

Some of the pointers are a touch off, as they were worked out back in the dark ages of AW2 hacking and never updated. Originally the CO's music values were used as the known starting point...so you'll be a few bytes off.

So yeah. But they're the general area and you can figure it out pretty easily from there. Just use relative points of reference.

tummychow

Re: CO Stats Datasheet

Post by tummychow » Sun Jan 25, 2009 2:34 am

OK, so they will be a tad off... so then how long is each CO's data, in hex? (This way, I can just add the amount to each CO's offset to find the next CO's starting point).
Oh, and what happens if I set the number of stars for a COP or SCOP to zero?

PS: I just looked around in Andy's data starting from 5D3ED4 (that's where I found the 180A) and I discovered, to my consternation, that there was no instance of F03B 5D08, the last line. I found a lot of 5D08s, though. I am now confused...

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

Re: CO Stats Datasheet

Post by Xenesis » Sun Jan 25, 2009 4:25 am

Co Data is 0x104 bytes long in the ROM.

COP = 0 Stars, CO can't use CO Power (Eg, Sturm)
SCOP = 0 Stars, SCOP will always be charged - If you want to turn off CO powers you'll need to do some hacking.
PS: I just looked around in Andy's data starting from 5D3ED4 (that's where I found the 180A) and I discovered, to my consternation, that there was no instance of F03B 5D08, the last line. I found a lot of 5D08s, though. I am now confused...
Reverse it to get the addresses, regardless. If you goto (08)5Dxxxx (Drop the 08 when just editing the ROM), you'll find the stats. Most of the COs have their own set...Some of the COs with the same stats for something don't share the same address in the ROM.
IST wrote:Even the worst individual needs to discover the joys of a chicken statue that is also a pregnant blonde housewife.

tummychow

Re: CO Stats Datasheet

Post by tummychow » Mon Jan 26, 2009 2:06 am

I just had a thought. I was checking in a hacked rom with your pointer hacks in it (to relocate all the CO unit stats to one place). Could it be that this was the cause for changed pointers?... Also, what if I set COP to 1 star and then SCOP to 1 star? If I charge up one whole energy star, does that mean I could use either?
There's a lot of potential here...

EDIT: With the help of the notes thread, I may have found more accurate CO pointers (I have not tested them yet).
5D3DD0 Nell
5D3ED4 Andy
5D3FD8 Max
5D40DC Olaf
5D41E0 Sami
5D42E4 Grit
5D43E8 Kanbei
5D44EC Sonja
5D45F0 Eagle
5D46F4 Drake
5D47F8 Sturm
5D48FC Flak
5D4A00 Lash
5D4B04 Adder
5D4C08 Hawke
5D4D0C Hachi
5D4E10 Colin
5D4F14 Jess
5D5018 Sensei

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

Re: CO Stats Datasheet

Post by Xenesis » Mon Jan 26, 2009 4:07 am

Could it be that this was the cause for changed pointers?
Yes, it very well would be. The pointer hack changed every single one :P
Also, what if I set COP to 1 star and then SCOP to 1 star? If I charge up one whole energy star, does that mean I could use either?
You'd be able to use either power. If the SCOP is less than the COP, however you can never charge up a COP. Basically the game only cares if the charge value is greater than the star value.
IST wrote:Even the worst individual needs to discover the joys of a chicken statue that is also a pregnant blonde housewife.

tummychow

Re: CO Stats Datasheet

Post by tummychow » Wed Jan 28, 2009 2:39 am

Well, I resolved a long list of hacks today...
And I came upon an annoying problem.
First, here are the things I did:
Give every CO all the special properties (hidden HP, city deploy, first-strike counters and vision into woods/reefs)
Reduce deployment costs (by the way, is it actually FCFF for free units, or is it 9CFF as I calculated? Either way I was unable to push deployment costs below 1% of the norm)
Expand vision (by 50 spaces heheheh!)
Increase positive luck (equal to Nell under SCOP)
Increase capture rate to constant victory march
Give everyone Sturm movement charts for everything

After instating all these hacks, I noticed my command systems were moving like sludge. Every time I issued a command, there was a delay before the visual confirmation. Example: I hit a unit to move it. It takes about a second before all the movement squares appear. I move the arrow around at normal speed and give it a target (none of my units move more than 11 spaces), then press A. The move spaces disappear, I wait a second or so and then the unit runs to its new position. Another lag passes before the final menu appears so I can select Wait. When that happens, the unit delays again until it finally turns darker, to indicate it's been moved. No instant gratification like before (am I spoiled or what?). I have to wonder... why?
This effect could be found anywhere. When I selected a base or city to build units, it took a small amount of time before the unit select menu appeared. (The effect with relation to bases was fairly insignificant when there were almost no units on the battlefield, but with cities this always seemed to happen). I can confirm that this is due to the hacks, because I tested a CO on which I had not deployed these hacks, and it worked fine. What is going on?
Also, I can now confirm (through these hacks) that my CO pointers, at least on my stat-pointer-hacked ROM, are correct.

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

Re: CO Stats Datasheet

Post by Xenesis » Wed Jan 28, 2009 8:10 am

The change that would be causing all the lag would likely be the +50 vision - the game calculates vision size but the method isn't very efficient. It's not designed to work well beyond the default single-digit vision sizes.

You'll find the exact same thing will happen for example if you give indirects +20 range or something like that. The game will chug while you hold B to display the range or you attempt to target a unit.

Although, higher values of luck can also be a tad sluggish, they're not hugely so. For the deployment menus - the game has to check some rather obscure things (like checking vision ranges when you open the menu for some absurd reason) and is likely linked to the above.

And yes, 9CFF should be 0% Costs. If you can't get lower than 1%, it's probably because the game adds 1% to prevent division errors.
IST wrote:Even the worst individual needs to discover the joys of a chicken statue that is also a pregnant blonde housewife.

tummychow

Re: CO Stats Datasheet

Post by tummychow » Thu Jan 29, 2009 9:06 am

I was blindly speculating that it was movement charts, but that does make sense... Alright, thanks! I'll try it out...
Oh, btw, would it still get affected if fog of war is off (would vision still lag up my units?)?

User avatar
RadioShadow
Rank: Holding the Mega Drive controller
Location: UK, England

Re: CO Stats Datasheet

Post by RadioShadow » Thu Jan 29, 2009 10:37 am

Added the accurate offset pointers to the main topic.

tummychow

Re: CO Stats Datasheet

Post by tummychow » Fri Jan 30, 2009 5:49 am

Alright, finally! Hacks working like magic! You were right - it was vision. Recon, subs and missiles are still giving me a little lag... but I'm OK with that.
I was writing a reverse hack to cripple COs, and I was reducing capture rate. So I put in 32FF (like in stat edits) and I found that it led to instantaneous capture (I don't really care why). I considered what I was doing wrong and wandered around until I got a better value, CEFF. Then I got what I was looking for.
The question behind this is something like this: if I was reducing counterattack strength, would I say 32FF or CEFF?
Also, I was reducing vision in this hack, and when I reduced it by one I found that APCs and such still had 1 vision, not 0. Do all units have to have at least one vision? (Heheheheh...)
To clear up my previous question about cost, I must have been doing something wrong - I got free units when I tested again.

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

Re: CO Stats Datasheet

Post by Xenesis » Fri Jan 30, 2009 5:16 pm

Okay, here's what you need to understand how the adding and subtracting of bonuses and penalties work.

Hardware mathematics takes place on a number line. So if you go over the end, you'll go back to the start again.

In AW2's case, this is done with a halfword. In decimal the largest possible value is 65535 and the smallest is 0, or FFFF and 0000. The game adds the base stat to the bonus.

For example, with Grit, 0x0064 is added to 0x0014 for his indirect unit's firepower, which gives 0x0078. The GBA reads bytes in the reverse order, so you'll see the bonus as 1400 in the ROM.

Now, for negative bonuses the same thing happens. Grit's directs are 0x0064 + 0xFFEC. Now if you do this by direct addition, you'll end up with 0x10050. However, as we're limited to a halfword anything in the higher bytes gets truncated off, and we end up with 0x0050, or 80 in decimal.

The same applies to all other CO boosts and nerfs (apart from luck which is just an absolute value). So if you want to do a reduction, the easiest way is to open up like Windows Calculator in HEX mode. Enter in 0x10000 and subtract the desired value. Reverse the bytes and stick it in.

In your case with the capture, the reason you were getting instacaptures is that FF32 + 64 = FF96, which results in a capture power of 65430%. FFCE + 64 = 0x10032, which truncates to 0x0032 or 50% capture power.

And yes, all units have a minimum of 1 vision - you could see this in the original unmodified game when 1 vision units like the MdTank were in Rain (-1 Vision) resulting in a total of 0 vision yet they could still see 1 square.
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: No registered users and 0 guests