PDA

View Full Version : Creative Assembly Problem with editing the campmap



Duke John
10-21-2004, 13:43
I made this:
http://chronicles.metw.net/sj/map_heights_1.jpg
http://chronicles.metw.net/sj/map_regions_1.jpg

No problem whatsover. The game runs for several turns. Note that the big pink area is part of northern britain. So it's just an extra island. Nothing wrong with that, I have done this before.

Now I change it to:
http://chronicles.metw.net/sj/map_heights_2.jpg
http://chronicles.metw.net/sj/map_regions_2.jpg

And it crashes before loading! Why? The only change I made was removing some landmass. I've done this quite a few times before and there was no problem. Does anyone have the same problem?

I can only come up with either one of the following:
1. The landmass of western europe is hardcoded to be there. Not very likely but possible.

2. The map needs a certain amount of landmass. Not enough landmass and the game will crash. Perhaps it's a percentage of the total area. So a smaller area needs lesser landmass. Perhaps the game engine requires a certain amount of landtiles?

Any ideas?

Marshal Murat
10-21-2004, 13:52
Add Korea Pen.
It would provide some signifigant landmass.

Duke John
10-21-2004, 13:59
I tested it with the south-eastern corner:

http://chronicles.metw.net/sj/map_regions_3.jpg

http://chronicles.metw.net/sj/map_regions_4.jpg

Again a crash when the testing with less landmass. I think there is indeed a certain amount of landmass needed. But your idea might work very well MM! Thanks for that, I can add cliffs to the coast so that it's impossible to land armies on that region. Hmmm, might work. Let this be a warning for all modders who work on the campmap.

Duke John
10-21-2004, 14:13
Ok, I tested wether the required landmass is absolute or relative to the size of the map. I cropped the right landmass and sea of the image. It now worked without problems.

I got a CTD after ending the first turn when the radar_map images were not also cropped. Once they were the campaign ran for several turns.

Conclusion:
The engine requires a certain amount of landmass that is relative to the size of the campaign map.

Thoros of Myr
10-21-2004, 14:14
Yes, the Korean pen. would actually make a nice addition. This may not be preferable but If required to remove any useless placeholder landmass the scale of Japan could be increased aswell.


The engine requires a certain amount of landmass that is relative to the size of the campaign map.

Ah, good find.

Good work on the map so far DJ. It's difficult work :)

JeromeGrasdyke
10-21-2004, 14:22
Again a crash when the testing without less landmass. I think there is indeed a certain amount of landmass needed.

As far as I know, the engine is not reliant on having any limited amount of landmass, and none of the map layout is hardcoded. Even the AI works only on data which is derived from the map layout. What's more likely is that some thing is still present on one of the other maps which shouldn't be - say a port on a sea tile, or a river in the sea, or resources.

A few other caveats about regions:
- they should be 'convex' (one landmass, no inaccessible areas)*
- they should have only one settlement and only one port
- all land tiles should be part of a known region
- each non-sea region should contain at least some fertile tiles
- continuous sea surfaces should form one region
- the maximum number of regions supported is 200
- the distance between the centers of any two adjacent regions should not exceed 50 tiles*

*: not doing these things shouldn't cause a crash, but it may cause the AI to break (and yes, the problems which result can be seen in some places on the Imperial Campaign - the Balearics or Greek Isles for example).

Duke John
10-21-2004, 14:29
I am 100% sure that I didn't leave out any pixel. I tested it multiple times and the sole difference was eliminating a landmass by changing map_height.tga and map_regions.tga.

I did so before (otherwise I wouldn't been able to create the present map) and it always worked. But now I seem eliminate too much landmass and somehow the engine is not able to cope with that.

But thanks for the other pointers :grin:

MonocerosDragon
10-21-2004, 17:02
Duke John,

I'm sure you missed this on your post - but the obvious problem is you didn't say anything about editing map_ground_types.tga which would cause a CTD if there is a particular ground type where the other map_heights.tga thinks there is sea.

Duke John
10-21-2004, 18:31
No that is not a problem. I've tested this multiple times before I realised that to make the campmap work for several turns you only need to edit map_height and map_regions. All the other images can be left blank; most of them black, 1 pink and another green.

But it doesn't matter... it's working! I've erased all left over provinces and now I've got just Japan on the campmap with only the necessary provinces. I'm now starting to add the heights, ground types and such.

MonocerosDragon
10-21-2004, 20:51
That's interesting - I knew the others could be left as a single colour while you got the regions correct - but I had assumed that map_regions, map_heights and map_ground_types had to be edited together and kept in sync. I've even created landmasses (by editing map_heights and map_ground_types but not map_region) that aren't part of a region which has appeared to work ok - apart from the fact you can't move an army over those areas. ~:)
What colour is your map_ground_types then?

Duke John
10-22-2004, 08:11
map_regions.tga
Size: x, y
Edit using the RGB values as assigned in descr_regions.txt.
Each province must at least a city. This pixel may not touch or corner a different province.
single pixel with R:0 G:0 B:0

Ports are not necessary, even for coast provinces.
single pixel with R:255 G:255 B:255

map_heights.tga
Size: 2x+1, 2y+1
Start with only editing landmass:
R:1 G:1 B:1

And sea:
R:0 G:0 B:253

map_ground_type.tga
Size: 2x+1, 2y+1
R:101 G:124 B:0

map_climates.tga
Size: 2x+1, 2y+1
R:237 G:20 B:91

map_roughness.tga
Size: 2x, 2y
R:0 G:0 B:0

map_disasters.tga
Size: x, y
R:3 G:3 B:3

map_features.tga
Size: x, y
R:0 G:0 B:0

map_trade_routes.tga
Size: x, y
R:0 G:0 B:0

water_surface.tga
Size: 256, 256
R:60 G:132 B:159

radar_map1.tga
Size: x, y
This is the minimap for the campaign.

radar_map2.tga
Size: 2x, 2y
This is the minimap for campaignselection. Don't know yet if it's used.

MonocerosDragon
10-22-2004, 12:33
Looks pretty much where I'd got to - apart from the fact I hadn't figured that you didn't need to edit ground_types - tried making it totally black last night and everything still worked.

Noticed one mistake you might want to edit in your post - should be disasters.tga, not map_disasters.tga - I currently have this one totally black too (R:0 G:0 B:0)

map_trade_routes can be totally missing and it will still work.

Also, you miight want to make it clear that disasters.tga, map_radar1.tga, map_radar2.tga and water_surface aren't used to make the map.rwm.

Duke John
10-22-2004, 13:28
If you don't edit the radar maps after resizing/cropping the size of the campmap then the game will crash when ending the first turn.

Bacchon
11-12-2004, 01:56
I've been attempting to build a scratch-made campmap, but have so far unsuccessful to get it past the campaign loading bar. My current attempt is 150x100 (majority landmass), with three provinces, one faction (gauls) and the rebels owning the other two settlements, although I've tested with the senate and one, two and all three roman factions. My map is just a bunch on conjoined squares, and they're all saved at 24bit tgas in Photoshop.

I'm almost positive that there are no errors in the txt files, as I've made them as simplistic as possible, and get no messages from -show_err.

I've tried making the various images that are larger sized than map_regions by resizing them right to 2x+1, 2y+1 and by resizing them 2x, 2y and then increasing the canvas size to the top and left, and bottom and left. I've even tried just redrawing them at x2 scale.

I can add new provinces, landmasses, armies, etc to the existing maps with ease, so this is vastly frustrating. As far as I can see, there should be nothing wrong with the image files or the txt files, and would greatly appreciate some advice or suggestions. I've been through all the threads and guides here on the org and followed them to the letter after my own attempts met with failure.

Thanks,

Bacchon