Log in

View Full Version : Map Modding



Servius
01-23-2004, 05:26
How does the game decide which map will be used for each battle?

How/when does the game choose to use winter maps?

Why, if a border between two provinces has a River, which is displayed on the info parchment (sometimes because I tweeked it), do battled between those two zones not actually use a river map?

My example:

I decided that battles faught between Wessex and Flanders should be fought on a river map. I went into the Early.txt file and in the border entries between Wessex and Flanders I changed both to RIVER. This is displayed when you right-click on one of those provinces and move the cursor over the other, it says there is a River Waterway. However, England just attacked me (France) in flanders, and the battle was faught on a map without a river.

Also, I found, further down in the Early.txt file, another set of data on what kind of map and terrain battles within each province will be faught on, though this time the game didn't seem to care from which direction the attacker came.

Do certain territories use river maps no matter from which other territory they are attacked from, or does the game actually take into account whether or not a river actually exists between the attacking and defending provinces?

If the game does differentiate, where do I need to make the changes such that, say, battles between Wessex and Flanders are fought on river maps but battles between Flanders and Lorraine are not?

Antalis::
01-23-2004, 08:41
That´s not very difficult:


Yes, the direction from were the ATTACKER attacks in the campaignmap is the key point:

So if you want that a battle is fought on a rivermap, if you (or your enemy) attacks FROM Wessex to Flanders, then change this in the early txt:

from:
SetBorderInfo:: ID_WESSEX ID_FLANDERS 9208 8568 0 LUSH AT_WESTERN_EUROPEAN COAST PLAINS NO_RIVER


to:
SetBorderInfo:: ID_WESSEX ID_FLANDERS 9208 8568 0 LUSH AT_WESTERN_EUROPEAN INLAND PLAINS RIVER


REMEMBER, you´ll only have a riverbattlemap, if you also have such a map in your map-folder with the right name
So for INLAND PLAINS you need a map with the name: "plainsinlandriver01" (or following numbers).

When you want that it doesn´t matter, if you attack from WESSEX OR from FLANDERS to get a river map, then change ALSO this:

from:
SetBorderInfo:: ID_FLANDERS ID_WESSEX 8600 8184 0 LUSH AT_WESTERN_EUROPEAN COAST FLAT NO_RIVER

to (as example):
SetBorderInfo:: ID_FLANDERS ID_WESSEX 8600 8184 0 LUSH AT_WESTERN_EUROPEAN INLAND PLAINS RIVER



The normal MTW has this rivermapnames in the maps-folder:
flatinlandriver, plainsinlandriver and hillyinlandriver.

So:
INLAND FLAT RIVER

INLAND PLAINS RIVER

INLAND HILLY RIVER


But MTW is very flexible with such names, so you could also use INLAND MOUNTAIN RIVER (again as example), BUT you´ll also need a map with that name in your maps folder (so "mountaininlandriver01")


Winter maps: I don´t know exactly when the game uses such maps, but I think after some battles that are thought before in the same turn (I guess the 4th battle).



Zitat[/b] ]Also, I found, further down in the Early.txt file, another set of data on what kind of map and terrain battles within each province will be faught on, though this time the game didn't seem to care from which direction the attacker came.

Thats the castle definitions: There is defined what names the castleseries should have to appear.

So:
SetAttributes:: ID_CRIMEA "Crimea" 0 PAGAN_CULTURE LUSH AT_EASTERN_EUROPEAN -1 240 "Crimea Castle_xzy" INLAND HILLY NO_RIVER TRUE


For that castle you need a map with the name: "castlehilly01_1_1 (as example) (number is another story. It depends on the upgrades of the castle from your map)".



cheers:

Antalis

*Ringo*
01-23-2004, 16:53
Quote[/b] (Antalis:: @ Jan. 23 2004,07:41)]Winter maps: I don´t know exactly when the game uses such maps, but I think after some battles that are thought before in the same turn (I guess the 4th battle).
I think the game uses a winter map if there are several battles in one turn, I've noticed I never seem to get the winter maps on the first battle in a turn http://www.totalwar.org/forum/non-cgi/emoticons/gc-no.gif I'm sure that there is a post about this somewhere??? (Anyone?)

Thanks for the info btw Antalis most useful, gonna have to start tinkering with that aswell now http://www.totalwar.org/forum/non-cgi/emoticons/gc-2thumbsup.gif

Ahh... so much to mod and so little time... http://www.totalwar.org/forum/non-cgi/emoticons/bigthumb.gif

*Ringo*

Servius
01-23-2004, 20:41
crap, I made a new post with basically this same problem because I didn't see any responses to my first post. Then, when I just went to see if I could delete this, I saw a MOVED button, which I have never seen before, and poof, Now I'm in a different forum and I have an answer now. Cool.

Well, lemme tell ya, I have changed the data lines for the Wessex->Flanders and Flanders->Wessex to RIVER, but a battle occured between them (England, from Wessex, invaded me/France in Flanders) and there was no river.

So you're telling me that the problem must be that there was no map associated with such terrain combinations? It's an interesting idea because the battle that occured was on a completely flat LUSH map with NOTHING on it, no buildings, no hills, no trees, no birds... That must have been the game's default map when someone like me screws something like this up :-)

Lemme go reread your reply and see if I can't figure out what else I need to change. Thanks.

>>>>>>>>>>>>>>

Okay, I've reread your post and I'm still confused. I had previously made the changes to both of the SetBorderInfo:: lines (the one from Flanders to Wessex and vice versa), but I got the above-mentioned flat blank map.

What else, exactly, do I need to change when I want a battle from province x to province y be on a river map, and where is the folder with all the map files?.

Lastly, I too have only had winter maps when I fight several battles in a year. There was one year where like 12 of my provinces had minor rebellions, and I had to send a few detachments ALL OVER the place to defend. That year I fought 12+ small battles, all on winter maps, and it was the most fun I have ever had with this game so far. I love the winter maps (they're so pretty) and I like battles with fewer units to manage, so it was great.

Antalis::
01-23-2004, 21:04
ok, your maps are in "Battle/Maps".


If you have made everything right in the startpos.txt definitions it should work.

Remember that if you change the definitions in early.txt (campmap/startpos) you can only use this changes in early-campaign (but that is common).


Again if you have changed the defitions to this (as example) it should work:

SetBorderInfo:: ID_FLANDERS ID_WESSEX 8600 8184 0 LUSH AT_WESTERN_EUROPEAN INLAND PLAINS RIVER

In your normal MTW maps folder is already a "plainsinlandrivermap" and such a map should appear, if you have defined it right.

Maybe you can copy your definitions and paste it here in that thread?


Antalis

Servius
01-23-2004, 21:13
all my "modding" ammounted too was using Notepad to open up Early.txt, going to both of the entries for each border crossing I wanted to have a river, and changing NO_RIVER to RIVER. So, like you said, it SHOULD have worked just fine for that Wessex to Flanders battle.

Here are the two lines from the Early.txt file I'm currently using, the one I fiddled with...

SetBorderInfo:: ID_FLANDERS ID_WESSEX 8600 8184 0 LUSH AT_WESTERN_EUROPEAN COAST FLAT RIVER

SetBorderInfo:: ID_WESSEX ID_FLANDERS 9208 8568 0 LUSH AT_WESTERN_EUROPEAN COAST PLAINS RIVER

Antalis::
01-23-2004, 21:13
Step by step:


open your early.txt:

Search WESSEX to FLANDERS:
.
.
.
SetBorderInfo:: ID_SAXONY ID_FREISLAND 11840 7280 0 LUSH AT_WESTERN_EUROPEAN INLAND PLAINS NO_RIVER
SetBorderInfo:: ID_NORTH_SEA ID_FREISLAND 11520 6680 0 LUSH AT_WESTERN_EUROPEAN COAST PLAINS NO_RIVER
SetBorderInfo:: ID_ENGLISH_CHANNEL ID_FREISLAND 10992 7016 0 LUSH AT_WESTERN_EUROPEAN COAST FLAT NO_RIVER
SetBorderInfo:: ID_WESSEX ID_FLANDERS 9208 8568 0 LUSH AT_WESTERN_EUROPEAN COAST PLAINS NO_RIVER
SetBorderInfo:: ID_NORMANDY ID_FLANDERS 8888 9328 0 LUSH AT_WESTERN_EUROPEAN INLAND PLAINS NO_RIVER
.
.
.
Change this part: COAST PLAINS NO_RIVER to INLAND PLAINS RIVER

Now you get a plainsrivermap iy you (or your enemy) attacks FROM WESSEX to Flandern in early-period.


Antalis

Servius
01-23-2004, 21:14
yeah, see, that's what I did, but still no river map

Antalis::
01-23-2004, 21:15
Zitat[/b] (Servius1234 @ Jan. 23 2004,14:13)]all my "modding" ammounted too was using Notepad to open up Early.txt, going to both of the entries for each border crossing I wanted to have a river, and changing NO_RIVER to RIVER. So, like you said, it SHOULD have worked just fine for that Wessex to Flanders battle.

Here are the two lines from the Early.txt file I'm currently using, the one I fiddled with...

SetBorderInfo:: ID_FLANDERS ID_WESSEX 8600 8184 0 LUSH AT_WESTERN_EUROPEAN COAST FLAT RIVER

SetBorderInfo:: ID_WESSEX ID_FLANDERS 9208 8568 0 LUSH AT_WESTERN_EUROPEAN COAST PLAINS RIVER
You have forgotten to change the COAST to INLAND.


btw: If you want the same terraintype for both attacking directions then change also the flat to plains or vice versa (so that both definititions are the same: plains or flat).

Servius
01-23-2004, 21:16
bah, you are too fast for me, I was just about to make a note of my oversight.

So, the problem is that there are no river maps that also have a coast on them, and both Flanders and Wessex are tagged as coastal maps.

Damn.

Antalis::
01-23-2004, 21:19
Right.


There is no map with the name "flatcoastalriver01".

But you could rename a rivermap, but thats not nessasary.
Use another definition: So INLAND and FLAT (or PLAINS, that doesn´t matter) RIVER.

Servius
01-23-2004, 23:44
actually, we're both wrong, there are 3 coastal river maps called...

flatcoastalriver01.LBM
flatcoastalriver02.LBM
flatcoastalriver03.LBM

I found these in the Battle/MapImage/Lush folder.

Is this not the folder where battle maps are? Also in this folder are different files that have a "castle" prefix, like...

castleflat05_5_1.LBM

...so I doubt this folder only hold siege maps.

Could it be that the Early.txt file only said Coast and yet the map files say 'coastal'?

By the way, I found this when trying to turn all the provinces I had marked for RIVER into INLAND, when I came across this entry...

SetBorderInfo:: ID_BLACK_SEA ID_KIEV 24960 11432 0 LUSH AT_EASTERN_EUROPEAN COAST FLAT RIVER

This seems to say that if you are making an amphibious attack on Kiev from the Black Sea, then there will also be a river on that battle map. Neat if it's true, but it messes up our hypothesis.

Lastly, in the Battle/MapImage folder is one called Winter. At least the maps are found, now if I could only find the coding that decides when they get used.

Antalis::
01-23-2004, 23:48
Yeah you´re right, how could I oversee this?
oops http://www.totalwar.org/forum/non-cgi/emoticons/gc-surprised.gif

Servius
01-23-2004, 23:50
well crap, what now?

Antalis::
01-24-2004, 00:08
I´ve tested it with this definitions:

SetBorderInfo:: ID_FLANDERS ID_WESSEX 8600 8184 0 LUSH AT_WESTERN_EUROPEAN COAST FLAT RIVER

and:

SetBorderInfo:: ID_WESSEX ID_FLANDERS 9208 8568 0 LUSH AT_WESTERN_EUROPEAN COAST FLAT RIVER

and it works.


And btw thats no hypothesis, what I´ve said http://www.totalwar.org/forum/non-cgi/emoticons/wink.gif


I guess you have made a space were it isnt good (if that has an effect).



Try it: early txt file with added rivers (http://max45.250free.com/Early.zip)


Antalis

Servius
01-25-2004, 07:09
works, thanks bud.

Antalis::
01-25-2004, 22:29
No problem http://www.totalwar.org/forum/non-cgi/emoticons/smile.gif


Antalis http://www.totalwar.org/forum/non-cgi/emoticons/cheers.gif