Transplanting Properties of the Factory Tile to create Reinforcement Tiles?

Discussion of hacking, editing and developments in Advance Wars games.
Remember, no Rom Requests
User avatar
Luke Herzen

Transplanting Properties of the Factory Tile to create Reinforcement Tiles?

Post by Luke Herzen » Fri May 25, 2018 4:50 am

Hey guys, I'm here to ask a question regarding the properties of the tiles for Mapmaking:

Does someone know where the tile properties (graphics, movement data, spawning units/shooting/etc.) are stored in a Rom of AW2 and how to change those?
Because it would be pretty rad if you could take an unused tile, give it the appearance of a Plain/Mt./whatever and allow it to spit out units on the squares below. I'd hope it's something like [Graphic ID, Movement data ID, Affect a larger area?, More Stuff, ASM Pointer to special abilities].
Thanks in advance (wars)
Luke Herzen.

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

Re: Transplanting Properties of the Factory Tile to create Reinforcement Tiles?

Post by Xenesis » Mon May 28, 2018 5:50 pm

Well, first off that'd be a large project.
All the Black Hole inventions are basically special-cased.
The game has multiple tables that has this information - you'll need the following:

Code: Select all

4x4 Tile Allocation - 4x4 Graphic used for a tile
Used for the Minimap/Map Preview
0x0849D3DC
Each entry is 16 bits long. One entry for each terrain type.

8x8 Tile Allocation - Assembly of 8x8 tile graphics used to show a complete tile.
Used for the game play field
0x080BFBC4
Each tile is made up of four 16 bit entries. There is one for every single tile arrangement in the game (0x400 tiles). Properties (HQ, city, etc.) are given a plains graphic and handled separately.

16x16 Tile Allocation - What type of terrain each tile is
Used for gameplay
0x080C1BC4
One entry for each Tile. Each entry is 1 byte/8 bits long. 0x400 entries.

Property Tile Allocation - Which tiles correspond to a specific property
Used for Capturable/etc. properties (e.g. HQ, Cities, Labs, etc.)
0x08499B0C
One entry for each property + property variant. Each entry is 16 bits long. Order is: Neutral Property, P1 Property, P2 Property, P3 Property, P4 Property.

Terrain Class Info Table - Miscellaneous stats/Terrain info
Used for gameplay effects (terrain stars), battle scenes and the R-Info Window
0x085D583C
Table with format (example):
;01_TerrainInfoPlain.asm

;Terrain Graphic (R-Info Window)
	.dw	0x0811B818

;Terrain Graphic Palette (R-Info Window)
	.dw	0x0811BC4C
	
;Terrain Graphic TSA (R-Info Window)
	.dw	0x0811BBFC
	
;Name Text Index (R-Info Window)
	.dh	2348
	
;Terrain Description Text Index (R-Info Window)
	.dh	2372
	
;Terrain Defence in Stars
	.dw	1

Property OAM, effects, etc. - A whole bunch of code handles this, but I've got a few pointers.
0x0803FA44 - Controls what sprites are used as OAM tiles
0x0803E464 - Table for what code to run for specific BH Invention Setup at the start of the map
Other stuff is in my notes.
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