PDA

View Full Version : Putting features on the Campaign map (custom tiles)



Myrddraal
02-06-2005, 12:12
As I did the directory mapper, I worked through all the files in the world folder and came across the following files and folders in sons of mars:

custom_tiles_db.txt
and the folder custom_tiles
with a map.rmw in it.

After some playing around, success: This battle took place just inside gaulish territory to the north of Rome....
http://img226.exs.cx/img226/3760/cutomtiles9jm.jpg

You can see the possiblities, with this, you can now make ports villages wonders and mines appear on the map...

How to do it:

1 Using the latest patch: use the battle editor to select the area of the map you want to edit. Edit the terrain and save it as temp. It doesn't matter if you don't place any armies, it will come up with an error but it will still save the map.

2 Go to data\world\maps\battle\custom\temp and copy the map.wfc file.

3 Go to data\world\maps\campaign\campaign
where campaign is the campaign you want to edit and make a new folder called cutom_tiles. Paste the map.wfc file in there.

4 Make a new text file called custom_tiles_db.txt in data\world\maps\campaign\campaign. Write the following text:


map.wfc x y map.wfc

Where x and y are the co-ordinates on the map you want your new tile to be applied to.

Delete map.rmw and launch.

I haven't finished working out the syntax yet, I don't know if both bits there need to read map.wfc, but I think the first one definately does because I got an error when I changed it. I do know that the above format definately works.

I don't know about you guys but I'm very happy about this, its going to be a huge help for my Wheel of Time mod for making the isle of tar valon and shayol ghul.

But for realism mods, you can now make wonders appear on the tile below the wonder or something, and you can now make maps for ports and villages. :bow:

Lord Adherbal
02-06-2005, 12:19
excellent, this is very usefull :D

eadingas
02-07-2005, 17:49
So THAT's what it does! I've always thought it's the other way around (ie. it takes the data from campaign map and makes a battle based on that), so I never bothered to check if it can be changed...
Cool. That should stop the constant 'To Wonder or not to Wonder' debate at EB :)

Myrddraal
02-08-2005, 21:08
I'm surprised more people haven't picked up on this, I'm going to find it really useful, but then, I already said that.

Simetrical
02-10-2005, 05:28
Wow, this is great!

-Simetrical

Myrddraal
03-09-2005, 13:44
I realised that this had slipped to the abyiss of page 6 and it contains some usefull info.

eadingas
03-20-2005, 14:16
One thing noticed in testing: custom tiles override settlements. So if you put a custom tile where there is a settlement, it disappears (unless you put a settlement in the editor, but it will never change shape or grow)

Myrddraal
03-20-2005, 14:59
Hm, thats a pain, so if you place a custom tile on top of a settlement it dissapears of the campaign map as well? Even if you place a settlement on the map? Thats very odd, because the way I worked this out was in an out of date file for the prologue where they had a custom tile for a settlement...

Epistolary Richard
03-20-2005, 15:03
This looks dead good. One question, are the buildings (such as the Colossus of Rhodes in your example) solid or insubstantial?

Myrddraal
03-20-2005, 15:12
Well I haven't tested with the wonder models, but I'm guessing they are solid, from what I've seen of them, they have a battle and non battle version, from looks they appear the same, I guess one might be buggy, I haven't tested it though...

eadingas
03-20-2005, 15:27
No, it stays on campaign map. Just in battle map, it's whatever you put in custom tile, not the dynamic city...

Myrddraal
03-20-2005, 16:06
Hm, I would have though that placing a city on the map would avoid that...

eadingas
03-20-2005, 16:09
But you can only put a city of certain type and level in the editor, can't you? And I'm not sure if it'd be tied to anything that's done to the city in campaign (growth, buildings, etc.)

Myrddraal
03-21-2005, 11:46
I don't know, I haven't used the editor in quite a bit. Have you actually tested it? Like placing a village in the battle editor and a city on the campaign map?

Badger1815
03-21-2005, 21:12
That's indeed what's happend.

The campaing seems to keep the underlay from the custom tile & puts the dynamic city over it.

I've tried putting the Tarquinii tile from the sons of mars where Alexandria is located & I got an egytian style city with a Roman underlay.

Not putting a city on the custom tile seems to crash the game...

grtz
Badger

Myrddraal
03-22-2005, 09:38
Excellent, so you can make custom maps with cities on them in campaign... The historical cities mod people will be happy. Have you tried placing other models on the map at the same time? Like the wonders which are meant to be in cities??

eadingas
03-22-2005, 10:18
http://img57.exs.cx/img57/4711/arminum9on.jpg
- Ariminum (don't mind the weird light, I'm playing with palette :)
It does seem possible after all...
The underlay is a bit of a problem. I see only solution is to make cities have the same plan through all their development, so they never grow (or shrink) in battlemap, or change plans as they change culture. This may not be a lot of drawback, but still can for some.
Also, I got an interesting bug: there is a "window into space" in the side of the hill, where roadjoiners are. I wonder what can be the cause of that? Through that window I can see the city from below (upskirt of pretty roman females etc.) - seems like there is a texture missing somewhere...
Oh, and the roads don't show unless you put them there in the editor.

Badger1815
03-22-2005, 12:40
That's probably a problem with the road-joiner item.
Don't know if these can be omitted from the settlement plan to solve this problem.

Giving a city a specific plan set is possible, zo the underlay can remain the same through an evolution. For historic cities, this should be acceptable.

Myrddraal
03-22-2005, 17:19
Hm, the roads are a bit of a problem, as this means that they won't appear when you build them. I guess the solution is to put the highest level roads in to start with, you can understand that there would be better roads around a city than in the countryside...

eadingas
03-22-2005, 17:26
This solution is anyway only good for cities which are well developed by the time the mod starts. Since the city plan can't change, it's no good for settlements that we'd like to have natural surroundings but start out as village and grow to huge... OTOH, this means we can have a decent net of roads coming out of a big, rich city, not just the four poor roads that we have to deal with in vanilla...

BTW, have you (or anyone) tried playing a battle in a tile _next to_ custom one? Do all the features remain as you look outside the battlefield?

Myrddraal
03-22-2005, 23:17
No I haven't, thats a good point.

I have another question though, has anyone had any wierd effects at the borders of maps. I know that the map only goes so far, it doesn't save whats in the distance, it only saves the battlefield, the rest is generated from the campaign map, so what I mean it, does the edge of the battlefield fit smootly with the rest of the world, or is it sudden... I think it does it smoothly, but I've only tested with fairly flat maps in flat areas.

Simetrical
03-23-2005, 04:51
The entire 2 km × 2 km area of the battle map is visually continuous.

By the way, what's up with the plan names listed in descr_strat? Could we use those?

-Simetrical

PROMETHEUS
03-25-2005, 22:34
I have folowed the tutorial on the letter but it didn't work I tried to place hte real piramids in the 181 13 and it wasn't there , was still always the strategical map piramid....

Epistolary Richard
03-26-2005, 19:00
EDIT: I've now got it to work so I've removed the pictures to make the page easier to view (though I've kept the one with the problem).

I've spent most of the day trying this and unfortunately I'm doing something wrong as well. Can anyone tell me what my mistake is?


Step 1) I picked a campaign tile as a base, welcome to 243, 53

snip

Step 2) I put a distinctive feature there
snip

Step 3) I saved it as "test", this created a new file called "test" which contained a map.wfc, which I put in my test_campaign folder (note the absence of a map.rwm

http://www.geocities.com/epistolaryrichard/m06.jpg

snip

Step 4) I added a custom_tiles_db.txt copied from the Sons of Mars campaign and altered for the new coordinates

snip

Step 5) To see if it had any effect I moved a convenient rebel, Captain Caspar, to 243, 53

snip

Step 6) I launched the game and went to the test campaign, Captain Caspar had moved. I sent an army to attack him, however on the battle map the 'distinctive feature' does not appear.

snip
snip

I don't think it's a problem with the campaign as Caspar has been moved. I could be placing it somewhere else, but AFAICT the co-ordinates match. It could be a problem with the map.wfc file, however I've tried it with the .wfc in the Sons of Mars campaign and the Teutonberg forest with no difference in results.

So I'm stumped... ~:confused:

Myrddraal
03-26-2005, 19:15
Wierd...

Try sending me the files I will try to work out what you did wrong... Or maybe what I did wrong from my description.

Send me a PM when you send them

eadingas
03-26-2005, 20:37
Do you have -show_err on? I noticed sometimes there's a problem with these custom tiles that doesn't show up any way unless you have -show_err and quit the game.

Epistolary Richard
03-26-2005, 21:20
Unfortunately, there's no error message.

PROMETHEUS
03-27-2005, 14:04
I had right the same problem , I tried to substituite the piramids with the correct ones but didn't work , may be there something else that we should delete or edit?

Myrddraal
03-27-2005, 19:36
Hm, maybe it would help if I uploaded a sort of demo, one which you know works and can base urs on....

eadingas
03-27-2005, 20:07
Hmm other than problems with formatting in custom_tiles_db.txt (tabs instead of spaces? unicode instead of ansi?) I can't think of anything wrong with this. I got perfect results without any problems.
Do you remember removing map.rwm from base and campaign folders?

PROMETHEUS
03-27-2005, 23:10
yes , I followed it step by step , but the old piramids are still there and the new ones not...... ~:confused:

Epistolary Richard
03-28-2005, 06:37
Thanks for taking the time to go through this, guys. Maybe I've not done something or got a setting somewhere or there's an 'r' in the month or something... but wait... what's this?

snip

Forests? Watchtowers? It's a whole new look for 244, 53!

Yes, after your replies I gave it one last go and it finally worked. Wahoo. I'm sorry, I'm tired, I mean WAHOOOO! :laugh3:

I found out what I was doing wrong as well. You have to laugh otherwise you'd cry.

When I made the custom_tiles_db text file, I called it custom_tiles_db.txt (mad, I know). I noticed the Sons of Mars file was just called custom_tiles_db, so I figured what the hell and I removed the letters .txt from the filename and... it worked.

Just to make sure, I went back and put the .txt back in and it didn't work. I removed it and it was fine. :rolleyes3:

So, now we've actually got it working let's go back to why I started with it in the first place...


BTW, have you (or anyone) tried playing a battle in a tile _next to_ custom one? Do all the features remain as you look outside the battlefield?

Right, so for this one, as well as the doubty Captain Caspar I enrolled a Brutii general, setting them up in 243, 53 and 244, 54 (the custom map) respectively.

This is the view from 243, 53 to 244, 54. If it was displaying the custom map then it should look like the picture above.

snip

Nope, not even close.

Just to make sure, I then attacked the Brutii general in the custom map to see whether it was actually working.

snip

And there it is.

So, it's clear that custom tiles are _not_ viewable from adjacent tiles.


I have another question though, has anyone had any wierd effects at the borders of maps. I know that the map only goes so far, it doesn't save whats in the distance, it only saves the battlefield, the rest is generated from the campaign map, so what I mean it, does the edge of the battlefield fit smootly with the rest of the world, or is it sudden... I think it does it smoothly, but I've only tested with fairly flat maps in flat areas.

For this, I took a northern cousin 243, 152 where it is pretty much as flat as you can get and placed it on 244, 54 (which as you may have noticed has a few hills). The result looked pretty smooth, though you can perhaps make out a hint of the join where the cursor is pointing.

snip

It looks like it stretches to just beyond the minimap's range.

(I also placed a small kop in each corner just inside the red line on the battle editor. These then fell outside the playable area in the game, but I assume the battle editor uses the larger playable areas used in sieges.)

For a clearer comparison I made a custom tile from 160, 43 - the southern beach of Rhodes. I placed a series of watchtowers to mark the beach (note that this had the effect of adding land on top of the sea to make the right angles on the coast).

snip

This was then moved to the now infamous 244, 54 with the following result.

snip
snip

There are a few items of note here. One, it's still a sea! So this is in effect a very odd lake. Two, though it's quite obvious where the join between the tiles are, the adjacent tiles are smoothing down into the sea rather than making cliffs. Three, in the second shot the cavalry are walking on land that was risen from the sea by the creation of the watchtowers (though they were rather reluctant to do so, indeed the game didn't like this map much at all).

I hope you don't mind but I've devised a fitting tribute for your help over the last few days. ~D

snip

Myrddraal
03-28-2005, 23:35
I hope you don't mind but I've devised a fitting tribute for your help over the last few days. ~D

http://www.geocities.com/epistolaryrichard/myrddraal.jpg

:laugh4: - :grin2: - :beam:

Brilliant... You've got to laugh, or else you'd cry...

And thats good news about getting it to work. I guess we'll just have to make the custom features not too noticable from distance, so that you can't tell that their not there...

Epistolary Richard
03-29-2005, 11:11
I think it's just going to be about striking a balance between the changes you make on the campaign map and the changes you make through the battle editor. If you want to put in something big and obvious, eg, a mountain range or a settlement then they have to be done through the campaign map, leaving smaller changes that wouldn't be noticeable from a distance to the battle map.

But perhaps it's possible to fake it, so for example if you want to put a really big tower in the campaign you could place it on the battle map as normal, but alter the heights in the campaign map so that even from adjacent tiles there appears to be "an object" in the distance (though maybe the camp map would automatically smooth it into a hill?).

But hang on, aren't we missing a trick here? AFAIK the vanilla campaign doesn't use custom tiles, so aren't the wonders that appear on the battle map sourced from the campaign map?

eadingas
03-29-2005, 11:17
Wonders are hardcoded to use off-map models. If you look closely, what you see on horizon for wonders are the same models that are used for campaign map (same goes for settlements and ports). I don't think we can duplicate that.

We can always cover the features with hills and forests, so they wouldn't be visible anyway :)

PROMETHEUS
03-29-2005, 15:28
well I was saving as text too , may be i will try , tough I was actually tring to replace the pyramids with the actual real models , anyone knows how we can substituite them in the way that when playing near , close or above that square u play always with the real pyramid and not the blocky one?

Myrddraal
03-29-2005, 19:03
Well you could make a custom tile and use it for all the squares around the wonder. For this purpose its convenient that they don't appear from neighboring tiles...

PROMETHEUS
03-29-2005, 19:11
How can this be done?

Myrddraal
03-29-2005, 22:53
Hm, are you still having trouble getting it to work?
When you say you saved it as a txt file, I thank that ER meant that he doesn't have the setting on to show the extensions, so he saved it as .txt.txt instead of .txt.

Maybe you might want to send me the files you've got?
PM me if you send them...

eadingas
03-31-2005, 18:29
BTW, this is why there are no steep cliffs in vanilla battles :)
http://img189.exs.cx/img189/3327/cliff10ub.jpg
http://img189.exs.cx/img189/3488/cliff21bb.jpg
http://img189.exs.cx/img189/3978/cliff34sj.jpg
http://img189.exs.cx/img189/1669/cliff42pz.jpg
http://img189.exs.cx/img189/2520/cliff54jx.jpg

Myrddraal
03-31-2005, 22:05
I know that someone had the same problem when making spartan historical battle. You have to use the cliff features... Which of course aren't big enough ~;)

Epistolary Richard
04-24-2005, 16:39
Just in case this wasn't commonly known - the background models for strat models is referenced through descr_offmap_models.txt

This is where you can find the references to strat map models that appear on the battle map such as ships, settlements, wonders etc.

Duke John
02-14-2006, 10:54
If you wish to use custom tiles in the imperial_campaign then put the custom_tiles directory and custom_tiles_db file in the base directory. And remember to delete the map.rwm file when adding custom tiles.

And could a mod please move this to the Scriptorium? It's valuable information for anyone wishing to use custom tiles.

:bow:

eadingas
02-14-2006, 16:18
I think it was discussed in scriptorium.. when it was fresh news, about a year ago ;)

Epistolary Richard
02-14-2006, 17:16
As it is actually a tutorial, DJ's correct in that it should live in the Scriptorium. So moved...

In the base folder? I put them in the imperial_campaign folder in 1.2 and it works for me. Or are you saying you need to put them in the base folder for 1.5?

Duke John
02-22-2006, 17:50
With 1.5 it didn't appear to work when placed in the imperial_campaign folder. It did when placed in the base folder.

Spartan198
02-02-2008, 13:30
Would it be possible to create custom sandbox battlemaps (like,say,Thermopylae) with the instructions here? I'm only curious...:inquisitive: