Map Header Editing, and Predeployed Units... (NEW!!)

Discussion of hacking, editing and developments in Advance Wars games.
Remember, no Rom Requests
User avatar
RadioShadow
Rank: Holding the Mega Drive controller
Location: UK, England

Re: Map Header Editing, and Predeployed Units... (NEW!!)

Post by RadioShadow » Wed Dec 03, 2008 11:04 am

BD0A 0700 0200 0100 0100 0100 0800 0000

It is the value to tell the game which 'Category' the map gets placed:

01 = Campaign
02 = Classic
03 = Vs. Maps
04 = Pre-Deployed
05 = 3P Maps
06 = 4P Maps
07 = War Room
08 = Design Maps

Transferring a VS Mode map into the 'War Room' category causes a glitch giving you a S-Rank and screwed up score. Same might happen with a Campaign Map and this might be due to dedicated space for the where the Ranks/Score get saved.

Transferring a War Room Map into a VS Mode Category is fine however. Should be fine to transfer a Campaign Map to VS Map category as it shouldn't affect the Campaign itself (not tested).

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

Re: Map Header Editing, and Predeployed Units... (NEW!!)

Post by Xenesis » Wed Dec 03, 2008 11:48 am

Transferring a VS Mode map into the 'War Room' category causes a glitch giving you a S-Rank and screwed up score. Same might happen with a Campaign Map and this might be due to dedicated space for the where the Ranks/Score get saved.
Yeah. There's only enough RAM allocated for the maps that are already War Room maps. If you put Vs maps in there you're accessing areas that are typically out of bounds. Most notably, Campaign maps and War Room maps share the same area with War Room using 5 slots (Top 5 scores) and Campaign using 2 Slots (Normal/Hard)

The format is in my notes dump, it's relatively new stuff.
IST wrote:Even the worst individual needs to discover the joys of a chicken statue that is also a pregnant blonde housewife.

User avatar
Mark999
Rank: GM_S9_S9
Location: In America

Re: Map Header Editing, and Predeployed Units... (NEW!!)

Post by Mark999 » Tue Dec 23, 2008 1:08 pm

Xenesis wrote:
Transferring a VS Mode map into the 'War Room' category causes a glitch giving you a S-Rank and screwed up score. Same might happen with a Campaign Map and this might be due to dedicated space for the where the Ranks/Score get saved.
Yeah. There's only enough RAM allocated for the maps that are already War Room maps. If you put Vs maps in there you're accessing areas that are typically out of bounds. Most notably, Campaign maps and War Room maps share the same area with War Room using 5 slots (Top 5 scores) and Campaign using 2 Slots (Normal/Hard)

The format is in my notes dump, it's relatively new stuff.
Can the format be changed to allow for more maps?

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

Re: Map Header Editing, and Predeployed Units... (NEW!!)

Post by Xenesis » Tue Dec 23, 2008 1:19 pm

Don't see why not. It'd take a lot of work though.
IST wrote:Even the worst individual needs to discover the joys of a chicken statue that is also a pregnant blonde housewife.

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

Re: Map Header Editing, and Predeployed Units... (NEW!!)

Post by Mr Dev » Fri Sep 25, 2009 4:02 am

I followed the Co Select pointers. Here id anybody can fathom a guess:

OS Cos: 078790
B5 FF F7 33 FF 00 20 FF F7 36 FF FF F7 D0 FF 01
BC 00 47 00

Bm:0787A5
B5 FF F7 29 FF 00 20 FF F7 54 FF FF F7 C6 FF 01
BC 00 47 10

BM cos & os cos:0787B9
B5 FF F7 1F FF 00 20 FF F7 4A FF 04 1C FF F7 1F
FF 04 1C 6B 20 C4 F7 03 FA 00 28 05 D0 20 1C FF
F7 64 FF FF F7 C8 FF 01 E0 FF F7 AD FF 10 BC 01
BC 00 47 00

0787ED - YC Only
B5 FF F7 05 FF 00 20 FF F7 56 FF FF F7 A2 FF 01
BC 00 47 10

But yes changing the pointer for the first mission to the OS co select and making the player 1 co FF in the main map header works fine. Then setting it to be a BM co select works fine, player 1 becomes Blue.

But changing the OS co select code to exactly the same as the BM code just crashes the game. Then changing each value one at a time or partially crashes the game too.

Xen is there anything more complex here?

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

Re: Map Header Editing, and Predeployed Units... (NEW!!)

Post by Xenesis » Mon Feb 21, 2011 8:30 pm

Line 4:
0000 FF05 0100 0000 2875 1C08 0000 0000
Blue: AI Offset

Guess what this does? It specifies an offset to the rules an AI uses in determining what to build or not. For any map that the AI won't build the right unit types (no air/sea) - change this to one that actually builds them: Eg, one of the original maps with the right unit types. Default is 0x00 for Vs Mode AI, otherwise they use special rules and there appear to be one set for each map type :/
IST wrote:Even the worst individual needs to discover the joys of a chicken statue that is also a pregnant blonde housewife.

User avatar
Mark999
Rank: GM_S9_S9
Location: In America

Re: Map Header Editing, and Predeployed Units... (NEW!!)

Post by Mark999 » Wed Mar 18, 2015 5:18 am

Mr Dev wrote:I followed the Co Select pointers. Here id anybody can fathom a guess:

OS Cos: 078790
B5 FF F7 33 FF 00 20 FF F7 36 FF FF F7 D0 FF 01
BC 00 47 00

Bm:0787A5
B5 FF F7 29 FF 00 20 FF F7 54 FF FF F7 C6 FF 01
BC 00 47 10

BM cos & os cos:0787B9
B5 FF F7 1F FF 00 20 FF F7 4A FF 04 1C FF F7 1F
FF 04 1C 6B 20 C4 F7 03 FA 00 28 05 D0 20 1C FF
F7 64 FF FF F7 C8 FF 01 E0 FF F7 AD FF 10 BC 01
BC 00 47 00

0787ED - YC Only
B5 FF F7 05 FF 00 20 FF F7 56 FF FF F7 A2 FF 01
BC 00 47 10

But yes changing the pointer for the first mission to the OS co select and making the player 1 co FF in the main map header works fine. Then setting it to be a BM co select works fine, player 1 becomes Blue.

But changing the OS co select code to exactly the same as the BM code just crashes the game. Then changing each value one at a time or partially crashes the game too.

Xen is there anything more complex here?
I figured out what this is. The "CO Select Pointer" is actually a pointer to ASM code that "sets up" the CO Select screen. So in order to mess with this you need to know ASM. Though I can point out the important RAM addresses for you (courtesy of Xen's notes naturally):

0x03005944 - How many countries the player may choose from
0x03005948 - The first byte is how many COs in OS, the next byte is how many COs in BM, then GE, etc.
0x030058E0 - A full list of all COs selectable, starting with OS's, then BM's, etc.

So as long as the code the CO Select Pointer points to writes to these values it'll work, and if you're good with ASM you can make different COs available based on a variety of conditions like in the original game.

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

Re: Map Header Editing, and Predeployed Units... (NEW!!)

Post by Xenesis » Wed Jun 29, 2016 9:15 pm

Line 2:
0D00 0000 00F8 4B08 0000 0000 0000 0000
I found something by accident today. Line 2 of the Campaign map headers, third word (first set of 0x00000000) is an Event pointer to an event that runs after a return to the world-map. It'll run after either a victory or a loss.

Edit: I also found something else. If you set the victory wallpaper value to 0, it'll randomly choose one from the selection.
IST wrote:Even the worst individual needs to discover the joys of a chicken statue that is also a pregnant blonde housewife.

User avatar
Mark999
Rank: GM_S9_S9
Location: In America

Re: Map Header Editing, and Predeployed Units... (NEW!!)

Post by Mark999 » Wed Jul 06, 2016 2:53 pm

Seriously? I don't think any of the maps in vanilla AW2 even use that event pointer...that's pretty strange.

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

Re: Map Header Editing, and Predeployed Units... (NEW!!)

Post by Xenesis » Thu Jul 07, 2016 4:11 pm

Mark999 wrote:Seriously? I don't think any of the maps in vanilla AW2 even use that event pointer...that's pretty strange.
They don't. It's a null pointer for every map. That being said, it's sorta useless because it runs if you win or lose.

I added to the AW2 TCRF page because of it.
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