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

Discussion of hacking, editing and developments in Advance Wars games.
Remember, no Rom Requests
Mr Dev
Rank: Slaving Away On Something or Another
Location: The Moon

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

Post by Mr Dev » Thu Dec 01, 2005 4:46 am

Campaign Maps extra headers
For levels that appear on the worldmap in a campaign a little more data needed. And I guess it saved IS space to include this kinda stuff in the other map header. Anyways.

Cleanup Worldmap data @ 615194: ( example)
8A00 0001 0100 3700 AF00 0000 1849 6108
0D00 0000 00F8 4B08 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
Line 1:
8A00 0001 0100 3700 AF00 0000 1849 6108
Red : Which map to go to (Map ID)
Yellow : Special level?
00 - normal
04 - Stared flag
20 - Something to do with Labmap
Purple : Star difficulty of this level
Green : Flag co-ordinates in pixels (00,00 is Top L)
Bold - map section to recolour

Line 2:
0D00 0000 00F8 4B08 0000 0000 0000 0000

Bold Italic
- Map description, ie Destroy black hole's troops.
Underlined - Pre-level dialogue

Line 3:
0000 0000 0000 0000 0000 0000 0000 0000
Pink : Co select:
NOTE: I know these are pointers but I'm not going to decode what is there and how to customise it yet.
0000 0000 - None, just use the co specified
9187 0708 - Liberation style, Three OS cos, ONLY if in the corresponding map header the 1st co value is FF!!
B987 0708 - Factory Blues, Three BM cos player 1, three os cos player 2, ONLY if in the corresponding map header the 1st co value is FF!!
A5 87 07 08 - BM Only
ED 87 07 08 - YC Only
01 88 07 08 - YC Factory + OS/BM support
35 88 07 08 - GE Only
49 88 07 08 - GE, OS, YC
65 88 07 08 - All - Hot Pursuit
85 88 07 08 - All - Final Front
91 88 07 08 - Orange Star (Liberation HC)

Navy : Pointer to factory script.
Bold: Hard Camapign Factory Script

After this example the maps are in order like:
OS NC, BM BOTH CAMPAIGN, YC BOTH CAMPAIGN, GE BOTH CAMPAIGN, BH BOTH CAMPAIGN, OS HC (Map order in each countries campaign is like that in x0_000's offset topic.



Edit Map Headers (Inside)
This bit deals with the stuff once you get off the worldmap and get into the level. For stuff outside the map see above.


The map order is the same as that in the text area of the rom, so the order that the map names are in is the order of the maps. If I'm feeling nice I may find offsets for the first map of each map case.

Cleanup Data @ 5CA938:
2875 1C08
801D 4A08 7004 4C08 0000 0000 0000 0000
BD0A 0700 0200 0100 0100 0100 0800 0000
0000 FF05 0100 0000 2875 1C08 0000 0000
F0E1 5C08 0000 0000 010B 0000 0105 0304
0102 0304 FFFF 0000 FFFF 0000 FFFF 0000
FFFF 0000 0100 0000 C475 1C08
Note: Hard Campaign
The Orange Star Missions for Hard Campaign have their own header, because the mission names and order are different in both.

Blue Moon, Yellow Comet, Green Earth and Black Hole however use the same header for both Normal and Hard Campaign.

Line 1:
2875 1C08
Something to do with the map, because it is the same as the map pointer?

Line 2:
801D 4A08 7004 4C08 0000 0000 0000 0000
Red: Pointer to dialogue list (more later in upcoming dialogue editing topic).
Blue: Pointer to the dialogue list for the terms menu. If set to 0x00000000 Terms is disabled.
Bold: Sets what graphic is used for the tile ID AB01 in the map data.
Examples:
A82D0D08 - Giant Silo
AC380D08 - Fortress

Line 3:
BD0A 0700 0200 0100 0100 0100 0800 0000
Red: Map name index
Bold: Fog of war toggle, 01 = yes, 00 = no
Green: Number of players, extra players cannot play but in the Co dossier Nell appears as the other teams cos... (Unless hacked otherwise ;) )
Orange: 100 points speed (day) requirement.
Blue: 100 Points Speed (Day) Requirement Hard Campaign.
Brown: 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

Line 4:
0000 FF05 0100 0000 2875 1C08 0000 0000
Blue: AI Offset
Red: Where the map you are playing is on... (Excluding units :O )
Green: Pointer to the map you are playing on in Hard Campaign.

Line 5:
F0E1 5C08 0000 0000 010B 0000 0105 0304
Red: Where and what are the units you are using on this map. See section below for format.
Bold: Where and what are the units you'll use on this map in Hard Campaign.
Blue: Player 1 CO (List at bottom)
Brown: Player 2 CO
Cyan: Player 3 CO
Yellow: Player 4 CO
Indigo: Player 1 team colour (1 - OS player, 2 - BM player, 3 - GE player, 4- YC player, 5 AI controlled)(Also depends upon map case, so in war room only 01 is playable)
Orange: Player 2 colour
Green: Player 3 colour
Violet: Player 4 colour

Line 6:
0102 0304 FFFF 0000 FFFF 0000 FFFF 0000
Red: Player 1 alliance (Same number, 1-4 = same team)
Blue: Player 2 alliance
Green: Player 3s
Yellow: Player 4s


Line 7:
FFFF 0000 0100 0000
Orange: This affects what kind of intro the map gets (Campaign only)(Music and colour of rotating mission start seal...)
01- OS Cam (HC inc)
02 - BM Cam (HC inc)
03 - GE Cam (HC inc)
04 - YC Cam (HC inc)
05 - BH Cam (HC inc)

Co no list:
(Something tells me this may be what tells the game who talks when too, more if I find it :D )
00 - Nell
01 - Andy
02 - Max
03 - Olaf
04 - Sami
05 - Grit
06 - Kanbei
07 - Sonja
08 - Eagle
09 - Drake
0A - Sturm
0B - Flak
0C - Lash
0D - Adder
0E - Hawke
0F - Hachi
10 - Colin
11 - Jess
12 - Sensei
13 - OS Troop (Glitchy units buildings etc)
14 - BM Troop (Glitchy units buildings etc)
15 - GE Troop (Glitchy units buildings etc)
16 - YC Troop (Glitchy units buildings etc)
17 - BH Troop (Glitchy units buildings etc)
18 - Nell Happy (Face) (Glitchy units buildings etc)
19 - Andy happy (Face) (Glitchy units buildings etc)
Etc...
FF - CO select, very buggy, Only works on maps that actually already have co select...

Change Factory Scripts:

Basically it's just a list of the units dropped from the factory:

Each set of three bytes represents the factory drop squares from left to right. There are 32 days worth of units, one after the other:

Or six lines of units if you have your hex editor with 16 bytes per row.

NC Liberaton: 576EC3
NC Factory Blues: 576F23
NC The Hunt's End: 576F83
NC Great Sea Battle: 576FE3
HC Liberation: 577043
HC Factory Blues: 5770A3
HC Hunt's End: 577103
HC Great Sea Battle: 577163

All levels have now been confirmed.

The unit numbers are the same as in Sensei's drop power:

00 Nothing
01 Infantry
02 Mechs
03 Md Tanks
04 Glitchy
05 Tanks
06 Recons
07 APC
08 Neotanks
09 Glitchy
0A Artillery
0B Rockets
0C Glitchy
0D Glitchy
0E AAs
0F Missiles
10 Fighters
11 Bombers
12 Glitchy
13 Battle Copters
14 T- Copters
15 Battleships
16 Cruisers
17 Landers
18 Subs

Edit Unit Placements
Okay, Xen here with the info on how to edit your unit's placements!

Note: Coordinates are determined from the top left corner which is assigned the number 00,00.
Cleanup's Unit Placements @ 5CE1F0 wrote: FE 01 00 00 00 00 00 00 00 00 00 00 01 08 01 00
64 00 63 00 00 00 00 00 02 09 01 00 64 00 63 00
00 00 00 00 02 07 01 00 64 00 63 00 00 00 00 00
00 05 07 00 64 00 46 00 00 00 00 00 FE 02 00 00
00 00 00 00 00 00 00 00 0C 03 01 00 64 00 63 00
00 04 00 00 0B 03 01 00 64 00 63 00 00 04 00 00
FF 00 00 00 00 00 00 00 00 00 00 00
Pretty straightforward this one. The format is as follows:
'Team Header'
'Unit Data for each unit on team'
'Team Header'
'Unit Data for each unit on team'
'End of Unit Data'

Team Header:
FE 01 00 00 00 00 00 00 00 00 00 00
Says what team the next lot of units belongs to.

Unit Data for one unit:
0C 03 01 00 64 00 63 00 00 04 00 00
This is a unit data.
Red: X-Coordinate of Unit
Blue: Y-Coordinate of Unit
Yellow: Unit Type (Same as Sensei drop power, and unit list in lists topic)
Green: Setting it gives very odd effects.
00: Default
01: Stuns the unit for a turn. Turns sprite into an Orange BH Soldier
02: Makes the unit invisible to cursor and view until moved
03: Nothing
04: Makes unit invisible to view until moved
05: Makes unit invisible to view and won't move unless you're close to it.
0A: Invisible like 02. Doesn't move.

Orange: Unit HP in x/100 Format (% in hex)
Purple: Current Ammuntion amount
Gray: Current Fuel Amount
Bold: AI Control Bits
00 = Stationary. Reactionary attacks only
04 = Actively Attack

End of Unit Data:
FF 00 00 00 00 00 00 00 00 00 00 00


Well, that's all for now.
Last edited by Mr Dev on Wed Feb 28, 2007 4:07 am, edited 41 times in total.

Guesty person

Post by Guesty person » Thu Dec 01, 2005 10:01 pm

Woo, I made NC Liberation's factory drop out subs... xD

User avatar
Frankdeslimste
Rank: Founder of The Flaming Squirrels
Location: The Netherlands

Post by Frankdeslimste » Fri Dec 02, 2005 2:05 am

Can you also hack the factory in VS maps?
Image
I bet the bastard is throwing a party with a huge poster of a 2HP B-copter ~ Linkman 145
I like Frankie, so nyeh. ~ Linkman 145
Dammit now I have a bunch of emails in my inbox saying 'Dirty Penguin Sex Notification' ~ Thefalman

User avatar
Kireato

Post by Kireato » Fri Dec 02, 2005 3:40 am

Rimdev said he had managed it in the topic made by Donnyton. Seems the hack factory uses the building order of the liberation NC factory. (Or so I understood, he's got the precisions.)

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

Post by Mr Dev » Fri Dec 02, 2005 3:44 am

Does Frank mean:

Hacked in Factories on custom maps?

If so then no...

They don't have a special header with the unit list....

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

Post by Mr Dev » Sat Feb 04, 2006 2:01 am

Hugemongiolous update, we Still cannot edit the actual maps but it seems I may be VERY close to editing things like Co and map name indexes, I've already found the latter, ;)

User avatar
Frankdeslimste
Rank: Founder of The Flaming Squirrels
Location: The Netherlands

Post by Frankdeslimste » Sat Feb 04, 2006 2:50 am

Map name indexes?

Could you please explain what that exactly is?
Image
I bet the bastard is throwing a party with a huge poster of a 2HP B-copter ~ Linkman 145
I like Frankie, so nyeh. ~ Linkman 145
Dammit now I have a bunch of emails in my inbox saying 'Dirty Penguin Sex Notification' ~ Thefalman

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

Post by Mr Dev » Sat Feb 04, 2006 3:01 am

It's basically 4 hex digits that tell the rom what/where the map name is. Indexes are also used for Co names and some other text parts...

For example BD0A is the index for Cleanup, Xen could explain it more technically but pah :P

Also, I've now found what army = what colour and which allied co you use!

User avatar
Frankdeslimste
Rank: Founder of The Flaming Squirrels
Location: The Netherlands

Post by Frankdeslimste » Sat Feb 04, 2006 3:12 am

So that means you can change campaign names?
Image
I bet the bastard is throwing a party with a huge poster of a 2HP B-copter ~ Linkman 145
I like Frankie, so nyeh. ~ Linkman 145
Dammit now I have a bunch of emails in my inbox saying 'Dirty Penguin Sex Notification' ~ Thefalman

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

Post by Mr Dev » Sat Feb 04, 2006 3:26 am

We could change the map names in the first place in the rom (Text area) but indexes just say, go here to look for the map name...

*Updated first post*

User avatar
Kireato

Post by Kireato » Sat Feb 04, 2006 4:58 am

Ah! I'm able to confirm here what I wanted to remember. Good to check this:
There are 25 units (including the glitchy).

Xen @ Work

Post by Xen @ Work » Sat Feb 04, 2006 11:12 am

Line 2:
0000 FF05 0100 0000 2875 1C08 0000 0000
Red: Where the map you are playing is on... (Excluding units :O )
That's golden! Now I know where to find the map data to work on!

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

Post by Mr Dev » Sat Feb 04, 2006 11:25 am

Tried it and it doesn't have much resemblence to Kawa's work AT ALL...

And it's very complicated, or so it looks, and it bears little resemblance to the memory editor stuff

Xen @ Work

Post by Xen @ Work » Sat Feb 04, 2006 11:29 am

I think I'll use my usual method on it then.

Just destroy the data and see what effects it has.

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

Post by Mr Dev » Sat Feb 04, 2006 11:30 am

Xen, I'll probably still be on, I'm feeling nocturnal...

So just pop on later... >_> :D

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

Post by Xenesis » Sat Feb 04, 2006 6:34 pm

I added something to line 3, the Fog of War toggle.

Show Stopper, etc. have this if the mission is a Fog one.

I tried adding it to the war room, but it didn't seem to work. So, I copied the entirety of Show stopper's data over Spann Island's and I could no longer select it as a war room map.

Also, I found something interesting.

Set the colours of both the player and the enemy to Black Hole. Play the map and enjoy the show!
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

Post by Mr Dev » Sat Feb 04, 2006 7:59 pm

I tried the FOW thing and it didn't work Xen... O.o

Edit: Corrected it, and added more... ^_^

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

Post by Xenesis » Sun Feb 05, 2006 2:30 am

Whoops, I put it in the wrong place. <_<;
IST wrote:Even the worst individual needs to discover the joys of a chicken statue that is also a pregnant blonde housewife.

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

Post by Xenesis » Mon Feb 06, 2006 1:12 am

Okay, I've just added a section on how to edit the unit placements. Expect more updates to it in the future!
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

Post by Mr Dev » Mon Feb 06, 2006 1:21 am

peh Xen did the easy stuff :P

Took me long enough to find map headers...

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

Post by Xenesis » Thu Feb 16, 2006 11:38 pm

Ahah. I filled in a few blank spaces!

They're used for the not so aptly named HARD CAMPAIGN!

Like I added in the note, the OS NC and OS HC maps have seperate headers, however.

Also, Headers are organised by map case, despite the name order in the text data. Eg. the New AW2 Versus Maps appear in their respective orders (Eg. Big Daddy appears after the other predeployed maps, rather than right before campaign maps).

I'll place my list so far in the Lists Topic.
IST wrote:Even the worst individual needs to discover the joys of a chicken statue that is also a pregnant blonde housewife.

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

Post by Xenesis » Mon Apr 10, 2006 2:51 am

Added a very tiny bit of data on AI Control in the unit placement. It's too late for me right now to go have a look at other values, however.
IST wrote:Even the worst individual needs to discover the joys of a chicken statue that is also a pregnant blonde housewife.

Belgdor using Crapintosh

Post by Belgdor using Crapintosh » Fri Apr 21, 2006 8:52 am

Frankdeslimste wrote:Can you also hack the factory in VS maps?
In a way, Yes.
The factory itself is hackable, but unit production? If the factory is controlled by the AI then it cranks out glitchy units that crash the game.[/u]

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

Post by Xenesis » Fri Apr 21, 2006 11:28 am

That's because only Factory Maps have a factory pointer set, dude. :P

If you set one yourself, they should work.
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

Post by Mr Dev » Mon Aug 21, 2006 8:52 pm

Okay, changed this a bit, I've done a units muck-up all over again. I got where the datasheet begins a tad wrong by a few lines. My dialogue hacking made me find this out. The data actually begins at 5CA938 and goes till 5CA997.

Also added the pointer to dialogue list, which goes to a list of pointers which eventually goes to different parts of dialogue. Will be explained more as I find out more.

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

Post by Mr Dev » Tue Aug 22, 2006 11:43 pm

Added campaign maps' extra header.

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

Post by RadioShadow » Wed Aug 23, 2006 12:21 am

We're nearly there. Come on Rimmer. :D

I might have a little play about with it today. The main thing that we need to get is the pointers for the world maps.

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

Post by Mr Dev » Wed Aug 23, 2006 12:33 am

RadioShadow wrote:We're nearly there. Come on Rimmer. :D

I might have a little play about with it today. The main thing that we need to get is the pointers for the world maps.
The what?

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

Post by RadioShadow » Wed Aug 23, 2006 12:35 am

^ Pointers to the World Map Data for each level.

615194 - Cleanup

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

Post by Mr Dev » Thu Aug 24, 2006 7:01 am

Thanks to RS' request as to where pointers to factory scripts are, I found them in the campaign map only header.

Updated

User avatar
Guesty

Post by Guesty » Thu Aug 24, 2006 7:10 am

Now we can actually create our own custom campaigns. If only we could change the text...
Nice job rimmers.
Image
Sig by Sasquatch.
Hit: Cute Things
Miss: Phones

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

Post by RadioShadow » Thu Aug 24, 2006 7:24 am

Guesty wrote:Now we can actually create our own custom campaigns. If only we could change the text...
Nice job rimmers.
We have know that for ages Guesty.

*points to his hack, tells Guesty to check out the Prologe in his Ember hack*

What I knew was how to edit the text and make text longer.

What rim has found out is extra stuff like what CO's face appears in the text, what order they speak in etc.

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

Post by Xenesis » Fri Sep 01, 2006 12:16 am

Well, I've updated the CO select pointers.

There's an interesting effect if you use one of the Lab ones and force the level to select two COs.

That's right, you are forced to choose Two COs from one nation.

As an aside, I also confirmed how the flags are moved about. Pixels, yo.
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

Post by Mr Dev » Fri Sep 01, 2006 12:20 am

Well it would've been, from top left right?

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

Post by Xenesis » Fri Sep 01, 2006 12:23 am

Aye
IST wrote:Even the worst individual needs to discover the joys of a chicken statue that is also a pregnant blonde housewife.

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

Post by RadioShadow » Fri Sep 01, 2006 1:11 am

Xenesis wrote:Well, I've updated the CO select pointers.

There's an interesting effect if you use one of the Lab ones and force the level to select two COs.

That's right, you are forced to choose Two COs from one nation.

As an aside, I also confirmed how the flags are moved about. Pixels, yo.
Cool, I made the order of the COs in VS mode in the correct order.

Andy
Max
Sami
Nell
Hachi
Olaf
Grit
Colin
Eagle
Drake
Jess
Kanbei
Sonja
Sensei
Flak
Lash
Adder
Ember
Sturm

Nice find Xen :wink:

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

Post by Mr Dev » Sun Feb 04, 2007 10:52 pm

I've followed those CO select pointer and had a tweak there and found nothing, I've tried changing the liberation co slects bit to exactly the same as factory blues and others and it glitches, it looks like another evil thing :\

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

Post by RadioShadow » Tue Feb 27, 2007 10:01 am

Cleanup Data @ 5CA938:
2875 1C08
801D 4A08 7004 4C08 0000 0000 0000 0000
BD0A 0700 0200 0100 0100 0100 0800 0000
0000 FF05 0100 0000 2875 1C08 0000 0000
F0E1 5C08 0000 0000 010B 0000 0105 0304
0102 0304 FFFF 0000 FFFF 0000 FFFF 0000
FFFF 0000 0100 0000 C475 1C08

RS knows what the highlighted blue data is.

When you try and add a Large Silo/Blocked Fortress to the map (tile ID being AB01), the picture will not display correctly. It will all be mucked up.

That's because there is data in the map header which tells the game which image to use. At the moment it is set as '0000 0000' which just loads up a bunch of rubbish.

In a simple way, the BF and GS share the same terrain ID but use a separate image. You got to tell the game which one to use.

Now change the blue to one of the following:

Giant Silo - A82D0D08

Fortress - AC380D08

Now play the map again and you will find the Blocked Fortress/Giant Silo picture will display correctly. :D

I'm so happy. :)

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

Post by Xenesis » Tue Feb 27, 2007 3:14 pm

That's a very nice find RS. Which also means that it'd be stupidly easy to include a custom 'unpassable' terrain.
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

Post by Mr Dev » Wed Feb 28, 2007 4:08 am

RadioShadow wrote:RS knows what the highlighted blue data is.
I sense someone trying to mimic something Xen has said before :P

Anyway, added, dunno why you didn't do it yurself.

Who is online

Users browsing this forum: No registered users and 0 guests