Log in

View Full Version : New Campaign Map: my problems



Monkwarrior
12-12-2004, 09:34
Hi.
I have read the excellent tutorial about new campaign maps, and there is said that problems must be posted in this forum. So here they are.
My interest is to do a map of Hispania, including Italy, south of France and north of Africa.

First of all I copied the folder Data\world\maps\campaign\imperial_campaign
and renamed it as Hispania. I copied also in this new folder all the files of
Data\world\maps\base. I eliminated the files for factions description and included the maps and leader_pics of the factions to be included in the map (I took them from the RTRealims mod). The txt files finally included in this folder were:
descr_disasters, descr_events, descr_mercenaries, descr_regions, descr_regions_and_settlements, descr_strat, and descr_terrain
I copied also in Data\text the file imperial_campaign_regions_and_settlements_names and renamed it as Hispania_regions_and_settlements_names.

Using Adobe PhotoShop 7.0 and ImageReady 7.0 I divided the original map in two slices (left and right) having the following dimensions:
W 123 H 156 ----> disasters.tga, map_features.tga, map_regions.tga, map_trade_routes.tga, and radar_map1 (in the map_regions I eliminated the rests of the eliminated regions by painting them with the colors of the neighbour regions.)
W 186 H 237 ----> maps of the different factions (britons, brutii, carthage, gaul, german, illyria, julii, numidia, scipii)
W 246 H 312 ----> map_roughness.tga, and radar_map2
W 247 H 313 ----> map_climates.tga, map_ground_types.tga, and map_heights.tga
These are examples of the result.
http://img47.exs.cx/img47/6262/mapregions17og.jpg http://img47.exs.cx/img47/6951/mapgroundtypes13bx.th.jpg (http://img47.exs.cx/my.php?loc=img47&image=mapgroundtypes13bx.jpg)
With water_surface it was more difficult. I cut it in width aproximately in the same proportion and resized the result to 256X256.

Next step was to change the dimensions of the map in descr_terrain.txt (W 123 H 156). I eliminated from the other txt files all the references to events or things situated at X coordinate higher than 123. I eliminated all the regions and cities names laying out of this new map.
The harder work was with descr_strat, as it was necessary to completely eliminate some factions (egypt, macedon, seleucid, parthia...) but in case of numidians and mainly greek_cities they preserve part of their land and it is necessary to be careful to fit all the parameters (number of armies, faction leader, sons and their ages...).

But my idea was to keep only the south part of this new map, and I did the same to reduce
the dimensions to:
W 123 H 109 (in map_regions, the same work as above)
W 186 H 164
W 246 H 218
W 247 H 219
In water_surface I did the same as above.
http://img47.exs.cx/img47/2860/mapregions21zn.jpg
I eliminated the corresponding regions and the britons and germans factions.
I did the same work in descr_strat.

The Hispania provincial campaign at this stage loads and it is possible to play the first turn.
http://img14.exs.cx/img14/1830/hispania77jd.th.jpg (http://img14.exs.cx/my.php?loc=img14&image=hispania77jd.jpg)
But at the end of the first turn the program detects a problem (not reported in mode
-show_err) and it is necessary to close.

HELP IS NEEDED TO SOLVE THIS PROBLEM!!! :help:

(sorry for such a long post)

anti_strunt
12-13-2004, 22:59
I think there is a minimum required number of provinces for every campaign, perhaps if you tried adding some...? Sorry that I can't be anymore helpful.

Monkwarrior
12-14-2004, 09:26
I think there is a minimum required number of provinces for every campaign, perhaps if you tried adding some...? Sorry that I can't be anymore helpful.

Thanks for your answer.
Yeah, I was thinking on something similar. But...how does the sons_of_mars campaign work?
Perhaps it would be necessary to change the victory conditions, (it is impossible to gain 50 provinces in a map with 36) but I don't know how.
Cheers.

Myrddraal
12-14-2004, 09:40
You could add more provinces...

eadingas
12-14-2004, 12:38
Have you checked disasters and events files?

Duke John
12-14-2004, 13:25
People have made working campaigns with only 4 provinces.

Have you edited the mercenary text file? In there are also references to provinces. Since it also works when it's completely empty just erase everything inside it.

After ending the first turn, the engine will place new mercenaries in each province according to descr_mercenaries.txt. If it finds an unknown region, CTD!

Myrddraal
12-14-2004, 13:34
I made that mistake, but the game wouldn't load, it said error in descr_mercenaries. It didn't even get to the end of the first turn. Still, that might be it.

It could be that in my case another error caused the game to fail to load and so the merc file error was displayed. have a look.

eadingas
12-14-2004, 13:39
It actually should crash even at starting campaign if the merc file is wrong - it usually does for me... but yeah, this might be it.
Finding out all the little bugs is a pain. It's never as easy as it seems, and the game never gives any clue about really serious bugs... I've found that going the map through the Campaign Map Editor is helpful, it's good at finding out bugs with the map files themselves. But if there's something wrong with armies, mercs, disasters or something like that, then it's just a guesswork from then on.
I'm fighting with a CTD-ing map right now, and I have found all sorts of bugs in the files by only guessing what can be wrong.

Duke John
12-14-2004, 13:59
Well, actually I have no idea what might be causing the CTD. IMO MonkWarrior has done far too much at once. After all the modding I have done I have learned the best way to progress fast is by progressing in very small steps.

I first edited the descr_strat to the bare minimum with 2 faction and 2 settlements. Then I edited the campaign map by removing regions a small batch at a time. Then move the provinces to small blocks on the side of the map so that you have the space to make a large blob that resembled Japan. Then I moved the regions back in (in small batches). Once that worked I started to edit height/boundaries/groundtypes (small changes). At lastly I added the factions back in. Since the changes were so small I could very easily pinpoint the error. And of course backup! I had 60+ backups that allowed me to return to an older version if I just couldn't find the problem. Since I only make small changes I had only lost 10-30 minutes.

eadingas
12-14-2004, 14:03
BTW, is it possible to have a faction without any characters, family tree, etc, and when the map works, add them in? Or is it necessary to have at least faction leader somewhere? I found that I have most problems with placing armies on tiles they shouldn't be...

Myrddraal
12-14-2004, 14:04
You know what (sorry about going off topic), sombody should make a template map. With say... Ten square shaped regions and some sea.

Anyone could download it and start from there. I would do it, if only I had managed to make my map work.

Duke John
12-14-2004, 14:10
I was thinking about that too. I already have it semi-finished as part of my Japan progress. The big question is how many regions it should have. All the originals (that will give me some work) or whatever is present now at the Japan map (less work for me) or the bare minimum (4 or so and work for me).

I am thinking of doing whatever I have now at the Japan map: 80 provinces or so, 2 factions (briton and senate), and descr_strat + map_...tga's that are stripped to the bare minimum.

We would only need to write some guidelines for how to add a faction/province and how to edit the campaignmap.

I guess I will have the files ready tomorrow.

Myrddraal
12-14-2004, 14:18
It should be a very basic map, so that people don't have to undo anything to customise it. People should be able to build on it as it is, so I think a small number of provinces is best. Maybe 3 factions (not many mods will want only 1).

The ideal would be to have the text for having more than three faction commented out. That way to have an extra faction would take a minimum amount of work. But thats probably to complicated, best to keep it simple.

If your doing this DJ, thats great news. :)

Monkwarrior
12-14-2004, 16:34
Thanks for all the answers. :bow:
I will check again all the txt files to search for any small mistake.
In principle all the coordinates out of the new dimensions were erased (events, resources, characters), together with all the references to factions and provinces eliminated.
I will report my findings if I finallly succed.

Cheers.

Callatian
12-14-2004, 21:18
Guys !...Guys !....... why all this old style work when doing a campaign map ?!......just take a look at the Strategic RTW 3D Map Editor...it will ease your work if you don't want to do it in the masochist old way. See the latest news at www.twcenter.net

Hmmm to bad that we don't have the TTO Forum here to to stop us from jumping in and out of the two main RTW Forums....ehhhh....to find news and downloads and to keep the moders world conected and stable....anyway this is life....

eadingas
12-14-2004, 21:54
The Map Editor doesn't solve all the problems... the game still CTDs even if everything looks ok in the editor. And frankly, I find paintshop gives me more freedom and ease of work, but maybe I'm just old-fashioned :)

Callatian
12-14-2004, 22:56
The Map Editor doesn't solve all the problems... the game still CTDs even if everything looks ok in the editor. And frankly, I find paintshop gives me more freedom and ease of work, but maybe I'm just old-fashioned :)

it was a small problem with the new version that was fixed two minutes ago...yup I know the feeling I am also to used to the old and difficult style....but we will change eventualy.

Now that I am here let me see how the TTO & EB merging is going here....

eadingas
12-14-2004, 23:31
BTW, why is the sea in the editor shown as being above the land? Or is it just me?
I might switch to the editor once it gets the armies and characters in, as it's what gives me most headaches with campaign editing. That, and resources.

Monkwarrior
12-15-2004, 00:46
I agree. The editor is an awesome tool, but it does not solve all the problems. My hand-made maps are correctly open by the editor and it cannot find any problem in them. However, the CTD persists. ~:confused:

Monkwarrior
12-15-2004, 00:54
I first edited the descr_strat to the bare minimum with 2 faction and 2 settlements.

Is there any restriction about those two factions? I mean, it is needed that one faction is SPQR and the other one a roman faction?

I wonder about the senate missions. How are they assigned? This comes to me because the missions for the Brutii, for example, are assigned to regions that have been eliminated in the new map.

About victory conditions. In the imperial campaign there are two possibilities (50 prov+Rome, or 15 prov+faction destroyed). Where are they coded? In descr_strat of the imperial_campaign the victory conditions are the same as in the provincial campaigns but the option of short campaign does not appear.

Sorry. Too many questions and no one answer.

Edit: The victory conditions are locked by the imperial campaign. I started an egyptian short campaign (15 prov. + destroy seleucids and armenia) and after exit the objectives for ALL the factions in the provincial campaign were the same (15+seleuc+armenia).
I deleted all the events, disasters and mercenaries, but no solution.
I removed greek_cities and brutii as factions: no solution.
I eliminated the imperial campaign and renamed the Hispania campaign as imperial_campaign. It loads as imperial campaign and the objectives for the different factions are correct (even if macedonians are not among the factions): but again CTD. :furious3:

Duke John
12-15-2004, 10:10
I have uploaded a template campaign that is stripped to the bare minimum. And to spoil you even further I have made a little guide on how to use it: link, post #2. (https://forums.totalwar.org/vb/showthread.php?t=39773)

Have fun and good luck,
Duke John

Myrddraal
12-15-2004, 10:18
Great, Thx DJ.

Duke John
12-15-2004, 10:33
Is there any restriction about those two factions?
Senate and the Latium region are needed. The second faction can be anything.


I wonder about the senate missions. How are they assigned? This comes to me because the missions for the Brutii, for example, are assigned to regions that have been eliminated in the new map.
That is interesting. I have also heard about assumptions of the AI being programmed to always attack certain regions/factions at the start of the campaign. I hope that removing regions doesn't affect the game too much.


In descr_strat of the imperial_campaign the victory conditions are the same as in the provincial campaigns but the option of short campaign does not appear.
Victory conditions are hardcoded. The entries in the beginning of descr_strat.txt are worthless. The short campaign conditions might be hardcoded to be limited to the Imperial campaign. ...oops, I have now read your edit. So when you overwrite the Imperial Campaign, all the factions should be present to use Short Victory Conditions?


why is the sea in the editor shown as being above the land?
Hmm, when I edited the campmap the custom battles were sometimes flawed as all units drowned since the sea level was above ground. Perhaps it has to do with the maximum height in map_heights.tga. Should be worthwhile to look into.

Monkwarrior
12-15-2004, 10:56
Victory conditions are hardcoded. The entries in the beginning of descr_strat.txt are worthless. The short campaign conditions might be hardcoded to be limited to the Imperial campaign. ...oops, I have now read your edit. So when you overwrite the Imperial Campaign, all the factions should be present to use Short Victory Conditions?


Perhaps my English is not good enough to explain this point. :embarassed:

I mean that when you start the custom campaign (in my case Hispania) the victory conditions for all the factions are set as the victory conditions for the last imperial campaign played.
When I overwrite the imperial campaign with Hispania, the short victory conditions for a present faction, let's say Brutii, are the same independently from the other factions present in the campaign. It is stated that Brutii must destroy Macedons even if they are not present.

With regard to hardcoded. I was searching for some txt file for victory conditions and in Data\text\strat I found this:

{SMT_VICTORY_CONDITION_IMPERATOR_TITLE} Imperator:
{SMT_VICTORY_CONDITION_IMPERATOR_DESCR} Become the supreme ruler of Rome
{SMT_VICTORY_CONDITION_LAND_OWNER_TITLE} Domination:
{SMT_VICTORY_CONDITION_LAND_OWNER_DESCR} Capture %d more regions
{SMT_VICTORY_CONDITION_TYCOON_TITLE} Tycoon:
{SMT_VICTORY_CONDITION_TYCOON_DESCR} Build your empire up such that %d denarii is generated per turn
{SMT_VICTORY_CONDITION_TIME_LIMIT_TITLE} Timed:
{SMT_VICTORY_CONDITION_TIME_LIMIT_DESCR} Become the most powerful faction in %d turns
{SMT_VICTORY_CONDITION_OUTLIVE_FACTIONS_TITLE} Survivor:
{SMT_VICTORY_CONDITION_OUTLIVE_FACTIONS_DESCR} Survive longer than the following factions:
{SMT_CAMPAIGN_VICTORY_CONDITIONS} Victory Condition
{SMT_CAMPAIGN_VICTORY_CONDITIONS_COMPLETE} Completed

Moreover, in Data\text\shortcut:
{victory_conditions_tool} Edit Victory Conditions Dialog

It seems as CA had previewed an editor for victory conditions, with several possibilities: income, time limit, different number of regions taken...
Perhaps in the next patch? ~D

eadingas
12-15-2004, 11:42
About Latium... does the province HAVE to be called 'Latium' and the settlement 'Rome' in the descr_regions.txt? I know it's not a big constraint considering these are then renamed in the localisation file, but this might just be the reason my map CTDs...and also it should be included in the Map Editor, a routine to check if such region exist.

Duke John
12-15-2004, 11:58
Latium and Rome need to exist. If you rename them they no longer exist (except if you only rename them in the Loc files). Is that an answer?

eadingas
12-15-2004, 12:08
Yep. I'll let MrHide know that, it should be something that gets checked in his Map Editor.

Monkwarrior
12-16-2004, 01:55
Well, actually I have no idea what might be causing the CTD. IMO MonkWarrior has done far too much at once. After all the modding I have done I have learned the best way to progress fast is by progressing in very small steps.

You were right Duke John. I followed your advise and now I HAVE A CAMPAIGN THAT WORKS. :pleased:
Using the same maps, I painted in map_regions just to have five provinces: Lusitania, Latium, Central Gaul, Africa and Sardinia. Each province had one owner faction: spain, SPQR, gauls, carthage and greek_cities. I reduced to the maximum the characters of each faction: only the leader, his wife and 2-3 children.
It was only necessary to eliminate all the other regions in all the text files (mercs, regions, regions_and_settlement...) and the campaign seems to work at least 10 turns.
I'll begin to include more provinces and factions step by step.

Many thanks. ~:cheers:

(Last thing: I believe that the senate missions play some role in CTD. With the precedent configuration I was able to start the campaign with the Julii, first mission Segesta, but not with the Brutii. I imagine that it is due to the fact that the game cannot find the first objective.)

Monkwarrior
12-19-2004, 09:04
Just to continue with the history, I resized the maps in order to have room for more regions. The radar map must not exceed 255 width 156 heigth or part of the map won't be visible in the radar window. With this limitation the beginning of the campaign would be:
http://img157.exs.cx/img157/6664/factionmenu1wj.th.jpg (http://img157.exs.cx/my.php?loc=img157&image=factionmenu1wj.jpg)

But now I have found three small problems:

1-Beaches: I think Duke John posted something about it. I will look for that post. In any case this is a minor problem, because I am able to load boats.
http://img157.exs.cx/img157/9204/beaches5we.th.jpg (http://img157.exs.cx/my.php?loc=img157&image=beaches5we.jpg)

2-Roads: sometimes they are not visible on the map, as in this case:
http://img157.exs.cx/img157/839/roadsnotvisible8mp.th.jpg (http://img157.exs.cx/my.php?loc=img157&image=roadsnotvisible8mp.jpg)
However in other zones of the map they are clearly visible. Problem with textures?

3-weird problem near the border:
http://img157.exs.cx/img157/3791/problem19cy.th.jpg (http://img157.exs.cx/my.php?loc=img157&image=problem19cy.jpg)http://img157.exs.cx/img157/6601/problem27kl.th.jpg (http://img157.exs.cx/my.php?loc=img157&image=problem27kl.jpg)
This problem happened before in the bottom border, but now it is in the upper one. Any advise?

My next steps will be including all the regions and the needed factions to complete the map.
Cheers. ~:cheers:

Dead Moroz
12-19-2004, 21:21
2-Roads: sometimes they are not visible on the map, as in this case:
http://img157.exs.cx/img157/839/roadsnotvisible8mp.th.jpg (http://img157.exs.cx/my.php?loc=img157&image=roadsnotvisible8mp.jpg)
However in other zones of the map they are clearly visible. Problem with textures?
I expanded vanilla map and noticed the same problem - in some regions roads just don't appears.

I have question about related bug (sorry for a bit offtopic). Some regions "don't see" some other adjoining regions: don't trade with them and don't lead roads to them. Outwardly everything is ok: there are regions of one faction, different trade resources in regions, no any natural barriers. Does anybody know the cause of this problem (or at least have the same)?

eadingas
12-19-2004, 22:33
Have you tried investigating the trade routes map for this? Maybe it's not as useless as it seems...

Dead Moroz
12-20-2004, 09:52
Have you tried investigating the trade routes map for this? Maybe it's not as useless as it seems...
Tried. It's useless. ~:)

Monkwarrior
12-21-2004, 01:54
OK, let's continue the story (in fact this thread is more and more like a developer diary ~:) ).
I am doing the map more complicated, by adding at the same time one region and one new owner faction. I started with only five regions for spain, gaul, carthage, greek cities (4 playable) and senate (non playable).
I have succeded in adding three more provinces for parthia, german and dacia, all the three playable, with no difficulty (only some silly mistake in coordinates or age of some child, reported with show_err).
However, when I tried to do the same with the julii, the game CTD with no error message. ~:confused:
It comes again the idea of the problem with senate missions when the map is not complete.
I'll report new findings.
Cheers.

Dead Moroz
12-21-2004, 09:25
2-Roads: sometimes they are not visible on the map, as in this case:
http://img157.exs.cx/img157/839/roadsnotvisible8mp.th.jpg (http://img157.exs.cx/my.php?loc=img157&image=roadsnotvisible8mp.jpg)
However in other zones of the map they are clearly visible. Problem with textures?
I just noticed - your port is in sea. Try to move it on better place.