AW2: Unlock Conditions for the Campaign

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

AW2: Unlock Conditions for the Campaign

Post by Xenesis » Sun Apr 10, 2016 10:32 pm

So. Finally figured out the bulk of how this works. It's way more complex than it probably need to be. :P

There's a pointer list at 0x0861500C, with an entry of two pointers per map (with the exception of Liberation HC, but I'll get to that).

Code: Select all

0x0861500C - Table of unlock conditions for mission.
	+0x0:	Pointer to Unlock List
	+0x4:	Pointer to Clear requirements
So, two pointers for each mission, NC and HC Orange Star are different missions.

The unlock list is an 0xFF terminated list. For example, the one for "Flak Attack", which unlocks "Lash Out", "Orange Dawn" and "Andy's Time" is as follows:

Code: Select all

0x3 0x4 0x5 0xFF
The second item is "clear requirements". This is used by the game to open up a mission when a specific number of missions on the clear requirements list is cleared. It's in the format as follows:

Code: Select all

Clear Requirements Format:
Pointer (4 Bytes)
Number of Maps to be cleared (1 Byte)
0xFF (1 Byte)
The pointer is to another list, which is a list of missions that need to be cleared to unlock, while the number of maps to be cleared byte is how many maps. For example, for "Lash Out", the maps "Andy's Time", "Orange Dawn" and "Test Of Time" need to be cleared before "Liberation" is unlocked.

e.g:

Code: Select all

0x08614D82 0x4 0xFF
and the list at that pointer:

Code: Select all

0x03 0x04 0x05 0x06 0xFF
So, of those four maps, four need to be cleared.

Only things I haven't quite deciphered is how the Lab Maps work but that shouldn't take too much more work. Will update when I work it out.

When you clear a Factory mission (or any mission), the list at 0x0861515C is checked. If it matches a map ID, it'll clear the 8 missions on its list if they're open. I've bolded all the IDs of the factory mission.
0x0861515C wrote:07000102 03040506 0F08090A 0B0C0D0E 17101112 13141516 1F18191A 1B1C1D1E 21FEFEFE FEFEFEFE 29222324 25262728 FF
One final thing is the unlocks for "Liberation" HC/NC, they're called from special scripts which activate the 'new country' thing and ignore the normal unlock list they have. I'll add a list below.

Now, a list of things.

First number is the Campaign Map ID (e.g. which mission in the Campaign it is)
Mission Name
Pointer 1 is the Unlock List
Pointer 2 is the Required Missions Clear Data
Pointer 3 in brackets is the location of the required missions Clear list

Code: Select all

00	Cleanup NC
0x08614D4C	0x08614D50 (0x08614D4E)
01	Border Skirmish NC
0x08614D58	0x08614D5C (0x08615D5A)
02	Orange Dawn NC
0x08614D64	0x08614D6C (0x08614D68)
03	Flak Attack NC
0x08614D74	0x08614D78 (0x08614D76)
04	Lash Out! NC
0x08614D80	0x08614D88 (0x08614D82)
05	Andy's Time NC
0x08614D90	0x08614D98 (0x08614D92)
06	Test of Time NC
0x08614DA0	0x08614DA8 (0x08614DA2)
07	Liberation NC
0x08614DB0	0x08614DBC (0x08614DB7)
08	Toy Box
0x08614DC4	0x08614DD0 (0x08614DC8)
09	Tanks!!!
0x08614DD8	0x08614DE4 (0x08614DDC)
0A	Reclamation
0x08614DEC	0x08614DF8 (0x08614DF0)
0B	T Minus 15
0x08614E00	0x08614E0C (0x08614E02)
0C	Two Week Test
0x08614E14	0x08614E20 (0x08614E16)
0D	Nature Walk
0x08614E28	0x08614E34 (0x08614E2A)
0E	Neotanks!?
0x08614E3C	0x08614E40 (0x08614E3E)
0F	Factory Blues
0x08614E48	0x08614E50 (0x08614E4C)
10	Silo Scramble
0x08614E58	0x08614E64 (0x08614E5C)
11	Show Stopper
0x08614E6C	0x08614E78 (0x08614E70)
12	Sensei Returns
0x08614E80	0x08614E8C (0x08614E84)
13	Duty and Honor
0x08614E94	0x08614EA0 (0x08614E96)
14	A Mirror Darkly
0x08614EA8	0x08614EB4 (0x08614EAA)
15	Foul Play
0x08614EBC	0x08614EC8 (0x08614EBE)
16	Sea of Hope
0x08614ED0	0x08614ED4 (0x08614ED2)
17	The Hunt's End
0x08614EDC	0x08614EE4 (0x08614EE0)
18	Sea Fortress
0x08614EEC	0x08614EF8 (0x08614EF0)
19	Drake's Dilemma
0x08614F00	0x08614F0C (0x08614F04)
1A	Sinking Feeling
0x08614F14	0x08614F20 (0x08614F18)
1B	To the Rescue
0x08614F28	0x08614F34 (0x08614F2A)
1C	Navy Vs Air
0x08614F3C	0x08614F48 (0x08614F3E)
1D	Rain of Fire
0x08614F50	0x08614F5C (0x08614F52)
1E	Danger X9
0x08614F64	0x08614F68 (0x08614F66)
1F	Great Sea Battle
0x08614F70	0x08614F74 (0x08614F72)
20	Hot Pursuit
0x08614F7C	0x08614F80 (0x08614F7E)
21	Final Front
0x08614F88	0x08614F8C (0x08614F8A)
22	Border Skirmish HC
0x08614F94	0x08614F98 (0x08614F96)
23	Orange Dawn HC
0x08614FA0	0x08614FA4 (0x08614FA2)
24	Andy's Time HC
0x08614FAC	0x08614FB4 (0x08614FB0)
25	Mountain Ops
0x08614FBC	0x08614FC4 (0x08614FBE)
26	Sea for All
0x08614FCC	0x08614FD4 (0x08614FCE)
27	POW Rescue
0x08614FDC	0x08614FE4 (0x08614FDE)
28	Test of Time HC
0x08614FEC	0x08614FF0 (0x08614FEE)
29	Liberation HC
0x08614FF8

Code: Select all

Blue Moon Initial
0x08078450	(0x08615984)
Yellow Comet Initial
0x08078464	(0x08615988)
IST wrote:Even the worst individual needs to discover the joys of a chicken statue that is also a pregnant blonde housewife.

NaturalSky

Re: AW2: Unlock Conditions for the Campaign

Post by NaturalSky » Mon Apr 11, 2016 5:32 pm

Some interesting things going on here.

If you increase the size of the list of new missions available over about 10-15, the cursor disappears. Add more and the game simply grows to a crawl. Also it seems to reject having more then one factory mission up at any one time.

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

Re: AW2: Unlock Conditions for the Campaign

Post by Xenesis » Mon Apr 11, 2016 5:38 pm

Yeah, the largest amount of missions normally visible would be 10, which is Toy Box & Show Stopper cleared with Lab Maps collected, plus a second YC/BM mission cleared to reveal the second set. No doubt the game isn't coded to handle more than that visually.

As for Factory missions, it's possible to have Factory Blues and Hunt's End available at the same time through normal gameplay, so I don't know about that one. I did have a thought though, if you set them manually or there's too many flags, it's quite possible that the flag is just invisible, because factory missions use a separate graphic.
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

Re: AW2: Unlock Conditions for the Campaign

Post by Xenesis » Tue Apr 12, 2016 12:02 am

Alright, figured out how the lab missions work. They're unlocked by running an event command (command 0x44) and setting specific bits in the unlock RAM at 0x02028030.

If the following global bits are set upon mission completion, a subroutine checks it and then unlocks the lab map.

Code: Select all

0x61	Andy's Time HC (Lab Map Obtained)
0x62	Toy Box (Lab Map Obtained)
0x63	Show Stopper (Lab Map Obtained)
0x64	Sinking Feeling (Lab Map Obtained)
These are the global flag IDs. These set the bits:

Code: Select all

0x02028038:	
					0x2 = Unlock OS Lab (Hard Only)
					0x4 = Unlock BM Lab
					0x8	= Unlock YC Lab
					0x10 = Unlock GE Lab
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: Kim Jong-un [Bot], Multivac [Bot] and 0 guests