(AW2) Campaign mode mission unlock order editing

Discussion of hacking, editing and developments in Advance Wars games.
Remember, no Rom Requests
Post Reply
User avatar
Mark999
Rank: GM_S9_S9
Location: In America
Contact:

(AW2) Campaign mode mission unlock order editing

Post by Mark999 » Sun Apr 12, 2015 3:02 pm

Just about the only aspect of Campaign mode we can't edit yet is the order the missions get unlocked. This makes making a campaign annoying since you originally had to account for the vanilla unlock order.

That is about to change.

To edit the order in which the missions unlock, turn your attention to the pointer table at 0x61500C. This table controls the unlock order, with one pair of pointers representing each campaign mission (With the OS NC missions having separate pointers than the OS HC ones - take note, it's very possible to make a 42-mission campaign and have no problems! RAM space is reserved for both NC and HC scores across all 42 maps.)

In each pair, the first pointer indicates a list of missions to be unlocked. The second pointer indicates the prerequisite missions that must be cleared or the game won't unlock the missions in the first pointer.

Here's an example. These are the pointers for the BM mission Toy Box:

0x614DC4
0x614DD0

If we follow the first pointer, we see 0B, 0C, 0D, then FF. The first three refer to the second set of BM missions - T-Minus 15, Two-Week Test and Nature Walk. The FF is an "end of list" byte. Recall that in AW2 the second set of missions is unlocked when two of the initial three missions are cleared. Here's what's the second Toy Box pointer points to:

C8 4D 61 08 02 04 00 00

First, we have another pointer; this one indicates the prerequisite missions that must be cleared, which are 08, 09, 0A, 0B, 0C, 0D, and then FF to end the list. The 02 here indicates the number of prerequisite missions that must be cleared for the missions defined above to be unlocked. The 04 indicates the number of missions that must be cleared for the final map in that group of maps to unlock.

Map groups are determined by a list at 0x61515C. The first byte is the number of the final OS NC mission, then the seven bytes for the seven missions in the OS NC campaign, then the BM campaign, then YC, then GE, then "21FEFEFEFEFEFEFE" (probably just means 0x21 is the final mission overall so it knows when to run the credits) and then the OS HC campaign.

The only mystery left at this point is how Lab missions are handled as well as unlocking Neotanks. The missions with the lab maps don't really imply anything and the lab missions themselves unlock the factory maps but also have the factory maps as prerequisites so that accomplishes nothing. I'll need to investigate more but we now have the knowledge to alter the campaign routes. Fun!

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

Re: (AW2) Campaign mode mission unlock order editing

Post by Xenesis » Sun Apr 12, 2015 4:22 pm

Awesome stuff. Beat me to it.

From what I'm aware, the Neotank missions (with the exception of the OS NC Neotank Mission which is always unlocked regardless) are handled through the in-map scripts.
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
Contact:

Re: (AW2) Campaign mode mission unlock order editing

Post by Mark999 » Sun Apr 12, 2015 8:08 pm

I might have a look at that if I decide to put a Lab map in my hack.

In the meantime, I figured out something else: the mission unlock pointers are tied to the Map Header, not the Campaign Header. Meaning that if you change the first mission so that, say, Bean Island's map header is used instead of Cleanup's, the game will look for the unlock pointer in a place it's not supposed to be in which will cause issues. The scores that the game records in the RAM are also positioned based on map header so using for instance Strong Land's header in a campaign map will cause your score in campaign mode to overwrite part of the War Room scores saved. Expanding the number of allowed Campaign maps won't be easy for these reasons.

Now here's the annoying part: It seems that if the map headers for the original game's Factory missions (Liberation, Factory Blues, The Hunt's End, and Great Sea Battle) are used in campaign mode, when you finish the mission the game will play the cutscene for the next country and open up the first sets of missions regardless of what the unlock pointers set - this appears to be hardcoded and I'm not sure if this can be changed. If you want to avoid this, don't use the original Factory missions' headers. It's a real shame too, because the mission intro/victory themes for these maps also appear to be hardcoded to only appear for these headers.

User avatar
MysteriousLad
Rank: Mysterious President
Location: In your computer.

Re: (AW2) Campaign mode mission unlock order editing

Post by MysteriousLad » Sun Apr 12, 2015 8:38 pm

Maybe some assembely?
"i put on my robe and wizard hat" ~Pkdragon
"rocks fall everyone dies" ~HPD
Welcome to the optimistic world of WWN :D

And logic doesn't work on MysteriousLad... ~Kireato
Wait, wait, wait.

Organized crime is selling bagels on television? Since when? ~Dragon Fogel

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

Re: (AW2) Campaign mode mission unlock order editing

Post by Xenesis » Sun Apr 12, 2015 8:51 pm

Mark999 wrote:In the meantime, I figured out something else: the mission unlock pointers are tied to the Map Header, not the Campaign Header. Meaning that if you change the first mission so that, say, Bean Island's map header is used instead of Cleanup's, the game will look for the unlock pointer in a place it's not supposed to be in which will cause issues. The scores that the game records in the RAM are also positioned based on map header so using for instance Strong Land's header in a campaign map will cause your score in campaign mode to overwrite part of the War Room scores saved. Expanding the number of allowed Campaign maps won't be easy for these reasons.
Yep, and that's consistent across all game modes.

The RAM allocated to the maps is based on the map header ID for Campaign and War Room. Just keep in mind that Campaign has two scores (Normal/Hard) and War Room fills up five (1st place-5th Place). I can't remember if the campaign has 'empty' area or not, but I don't think so.
It's a real shame too, because the mission intro/victory themes for these maps also appear to be hardcoded to only appear for these headers.
Yeah, they're hardcoded (as well as the very last stage), I've got most of them listed in my notes as a very short asm snippet. Don't have them on me to check, though.
Now here's the annoying part: It seems that if the map headers for the original game's Factory missions (Liberation, Factory Blues, The Hunt's End, and Great Sea Battle) are used in campaign mode, when you finish the mission the game will play the cutscene for the next country and open up the first sets of missions regardless of what the unlock pointers set - this appears to be hardcoded and I'm not sure if this can be changed. If you want to avoid this, don't use the original Factory missions' headers
Probably more scripting. I'm itching to look through it all when I get home.
IST wrote:Even the worst individual needs to discover the joys of a chicken statue that is also a pregnant blonde housewife.

User avatar
HPD
Tri-Star CO
Tri-Star CO
Rank: Mentat
Location: The Mountain
Contact:

Re: (AW2) Campaign mode mission unlock order editing

Post by HPD » Sun Apr 12, 2015 9:32 pm

xen haven't you found IS' headquarters yet in Japan so you can bug them about it directly?
"So when I say the fudge shaman flies he goddamn well flies and that's that." - Narts
"My motto is that there are far too many women in the world to waste time with men." - thefalman
"It's just that I'm not really aware of how a common conversation goes." - Imano Ob, talking on MSN about talking on MSN
"As for FE8, that was IS' variant of Man Spam - Dudes with Swords edition." - Xenesis

User avatar
Satel

Re: (AW2) Campaign mode mission unlock order editing

Post by Satel » Sun Apr 12, 2015 9:39 pm

After a quick search through wikipedia, their HQ is somewhere in Kyoto, 7 minutes of walking after the closest station.

Doesn't seem that hard to find, heh.
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
Contact:

Re: (AW2) Campaign mode mission unlock order editing

Post by Xenesis » Sun Apr 12, 2015 10:07 pm

HPD wrote:xen haven't you found IS' headquarters yet in Japan so you can bug them about it directly?
I don't think my Japanese is quite good enough to convey "hey can I speak with the dudes who programmed AW1/AW2 and ask them specific questions about wtf they were smoking?"
IST wrote:Even the worst individual needs to discover the joys of a chicken statue that is also a pregnant blonde housewife.

User avatar
MysteriousLad
Rank: Mysterious President
Location: In your computer.

Re: (AW2) Campaign mode mission unlock order editing

Post by MysteriousLad » Sun Apr 12, 2015 10:41 pm

Well you could always ask to lead a new team to make a new one, fudge that would be insane. Xen leading a few programmers to make a new AW.
"i put on my robe and wizard hat" ~Pkdragon
"rocks fall everyone dies" ~HPD
Welcome to the optimistic world of WWN :D

And logic doesn't work on MysteriousLad... ~Kireato
Wait, wait, wait.

Organized crime is selling bagels on television? Since when? ~Dragon Fogel

User avatar
Satel

Re: (AW2) Campaign mode mission unlock order editing

Post by Satel » Sun Apr 12, 2015 10:43 pm

Ask them in English. They probably have someone who can speak English. Haha.

Also, we're totally not getting out of subject.
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
HPD
Tri-Star CO
Tri-Star CO
Rank: Mentat
Location: The Mountain
Contact:

Re: (AW2) Campaign mode mission unlock order editing

Post by HPD » Sun Apr 12, 2015 10:57 pm

show them your hacks

apply for a job
"So when I say the fudge shaman flies he goddamn well flies and that's that." - Narts
"My motto is that there are far too many women in the world to waste time with men." - thefalman
"It's just that I'm not really aware of how a common conversation goes." - Imano Ob, talking on MSN about talking on MSN
"As for FE8, that was IS' variant of Man Spam - Dudes with Swords edition." - Xenesis

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest