Jagger2013
General of the Army
Posts: 641
Joined: Sat Apr 27, 2013 2:14 am

Modding region files and definitions

Thu Sep 11, 2014 5:56 pm

Is there a source anywhere that defines the purpose of each of the various lines of a region file? I am particularly curious what lines determine where a town or a unit is placed within the region. I am also wondering whether you can mod information within a region file or if you must use the map editor? And last, when will we have access to the map editor again?

Sample region file:

UID = 1603
Name = Murmansk
Kind = 0
x = 1226
y = 246
xc = 1328
yc = 368
DisplayNb = 4
Coo0 = 1300|265|0
Coo1 = 1260|370|0
Coo2 = 1280|340|0
Coo3 = 1255|380|0
Bitmap = 1603Murmansk.bmp
WinterBmp = Winter_1603Murmansk.bmp
TerrainType = 0
SprFacing = 0
DisplaceOffset0 = 0|0
Adjacency0 = -1
Adjacency1 = -1
Adjacency2 = 1605
Adjacency3 = 1605
Adjacency4 = 1605
Adjacency5 = 1605
Adjacency6 = 1606
Adjacency7 = 1606
Adjacency8 = 1606
Adjacency9 = 1606
Adjacency10 = 1606
Adjacency11 = 1604
JumpLink0 = 945|28
JumpLink1 = 947|28
JumpLink2 = 1604|17
TransLink0 = 945|1
StraitBlock = 0
FixedSprite = 0
PolyMinX = 1226
PolyMinY = 246
PolyMaxX = 1434
PolyMaxY = 484
Poly0 = 1230|480|0|
Poly1 = 1348|480|0|
Poly2 = 1430|480|0|
Poly3 = 1430|380|0|
Poly4 = 1410|290|0|
Poly5 = 1390|260|0|
Poly6 = 1350|250|0|
Poly7 = 1340|290|0|
Poly8 = 1300|310|0|
Poly9 = 1240|350|0|
Poly10 = 1240|410|0|
Poly11 = 1230|440|0|
Triangle0 = 1390.000|260.000|0.000|1350.000|250.000|0.000|1340.000|290.000|0.000|
Triangle1 = 1410.000|290.000|0.000|1390.000|260.000|0.000|1340.000|290.000|0.000|
Triangle2 = 1240.000|410.000|0.000|1230.000|440.000|0.000|1230.000|480.000|0.000|
Triangle3 = 1410.000|290.000|0.000|1340.000|290.000|0.000|1300.000|310.000|0.000|
Triangle4 = 1300.000|310.000|0.000|1240.000|350.000|0.000|1240.000|410.000|0.000|
Triangle5 = 1240.000|410.000|0.000|1230.000|480.000|0.000|1348.000|480.000|0.000|
Triangle6 = 1348.000|480.000|0.000|1430.000|480.000|0.000|1430.000|380.000|0.000|

User avatar
Pocus
Posts: 25673
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

Fri Sep 12, 2014 8:53 am

Hi,

You can edit directly the rgn file, no need to go with the editor.

City and units of the owner of the region go to Coo0
Enemies go to Coo1

Harbour is Coo2 IIRC

You can also move around the sprites graphically within the game with the console command regionsprite. it only works for CW2 and EAW though. I used it routinely to recalibrate the icons in a region without editing anything in a file.
Image


Hofstadter's Law: "It always takes longer than you expect, even when you take into account Hofstadter's law."

User avatar
Franciscus
Posts: 4571
Joined: Fri Apr 20, 2007 8:31 pm
Location: Portugal

Fri Sep 12, 2014 10:24 am

Hi

The console command Regionsprite works also in the AJE games series

Regards
[SIGPIC][/SIGPIC]

Jagger2013
General of the Army
Posts: 641
Joined: Sat Apr 27, 2013 2:14 am

Fri Sep 12, 2014 3:02 pm

You can also move around the sprites graphically within the game


Yes, that is my intention. Some units and towns are displaced so far from the center of regions that it is difficult to tell which region they belong to. So I wanted to change the centering coordinates for some specific regions.

Thanks all.

Jagger2013
General of the Army
Posts: 641
Joined: Sat Apr 27, 2013 2:14 am

Thu Sep 18, 2014 7:18 pm

One tip, you can adjust the positioning of regions by simply changing coordinates in the region file. Cities will appear with the new coordinates the next time you start the game. However to change positioning of startup units requires changing coordinates and then running the setup scenario file through the splitter to have the changes take effect.

Return to “Modding AGE engine games”

Who is online

Users browsing this forum: No registered users and 15 guests