[v8] DIY Mod: Add an *unlimited* amount of maps to play on

Post here your released mods

[v8] DIY Mod: Add an *unlimited* amount of maps to play on

Postby City Builder » Mon Apr 02, 2012 12:43 am

Have you wanted to have let's say 5 normal maps to play on, but the game only offers you one normal map?

If you are anything even remotely like me, you would want to be able to jump between maps of the same type (type: Normal, Jungle, Mixed etc) without having to move your saved games around. For example wouldn't it be nice to have 2, 3, 5 or even 10 "normal" maps to play on? By following this mod instructions you now can!

Below I will try to give you simple instructions for how to create multiple maps of each type that you can play on.

Step 1. Go to your \Towns\data\campaigns\c1 folder and make 4 new folders. Name them normal1, normal2, normal3, normal4

Update:
In version 0.50 and NEWER versions you must copy the contents from the 'normal' folder into your 4 new folders.

For example you make
normal1
normal2
normal3
normal4

Copy the 4 following files from the 'normal' folder and paste a copy of them into all 4 of the above named folders else the game will exit without warning.
The 4 files are
gen_dungeons.xml
gen_items.xml
gen_livingentities.xml
gen_map.xml

The reason for this is that with 0.50 (maybe earlier, I can't remember) the 'normal' files for map generation used to be someplace else but now in 0.50 they are inside of the "/Towns/data/campaigns/c1/normal" folder.


Step 2. Go to your \Towns\data\ folder and open the campaigns.xml file in your favorite text editor (I support Notepad ++ and it's free) and find the following:
Code: Select all
<mission>
         <id>normal</id>
         <name esES="Mapa normal">Normal map</name>
      </mission>


and replace it with: (after making a backup of the original campaigns.xml file)
Code: Select all
   <mission>
         <id>normal</id>
         <name esES="Mapa normal">Normal map</name>
      </mission>
             <mission>
         <id>normal1</id>
         <name esES="Mapa normal">Normal map 1</name>
      </mission>
      <mission>
         <id>normal2</id>
         <name esES="Mapa normal">Normal map 2</name>
      </mission>
      <mission>
         <id>normal3</id>
         <name esES="Mapa normal">Normal map 3</name>
      </mission>
      <mission>
         <id>normal4</id>
         <name esES="Mapa normal">Normal map 4</name>
      </mission>


Save the file and start the game.
When you start the game you should now see:
Image

You should now see the extra normal map slots that you can play on, and more importantly the files will be saved as their own saves, thus allowing you to have up to 5 extra maps to play on without having to manually move files around.

You can of course, add as many extra folders as you like, and add as many extra bits of coding to the above to accomodate the new folders and thus the new saved games.

Hope this helps,


OPTIONAL:
Having multiple maps of the same type with generic names (i.e. Normal Map 10) can get confusing as to what that maps holds, other than you know that it's a normal map and it takes up slot 10. For such occasions all you need to do is to edit the campaigns.xml file with any (text editor) and find the name of the map (i.e. Normal Map 10) and rename it. So what would happen is you would take this coding found in the campaigns.xml file:

Code: Select all
<mission>
         <id>normal10</id>
         <name esES="Mapa normal">Normal map 10</name>
      </mission>


And simply change it to something such as this :


Code: Select all
<mission>
         <id>normal10</id>
         <name esES="Mapa normal">Your own custom map name</name>
      </mission>


With the example changes above, when you load up the game you will see one of the maps is actually showing a name of "Your own custom map name". So just choose whatever name you find will help you to remember that map.

/OPTIONAL

FAQ:

Q. Can I do this for any of the other maps like the snow or desert maps?
A. Yes you can, you simply make additional folders such as snow1, snow2 etc and then change the code in the above example for the campaigns.xml file to add in the extra snow maps, or desert maps or any maps that you want. Just make sure that you copy the original 4 files from the original folder (for example the snow map & those 4 files listed above from it) into the new snow folders that you created. Make sure that you copy the correct folders contents to the correct new folders. For example, don't copy the 4 files from the original desert folder into your new snow folders else your game will play desert maps when the menu says snow 1, snow 2 etc.

Q. Can't this be automated?
A. Yes it can. Tom K on this forum came up with a program to do just that.
Update: Unfortunately Tom misplaced the source code to his program so it won't be updated beyond 0.47b any longer so you'll need to use this guide to add more maps to the more current versions of Towns.
Last edited by City Builder on Thu Nov 15, 2012 6:33 am, edited 19 times in total.
burningpet wrote:And yeah, the Majesty reference is correct, towns will eventually aim to be a much more advanced Majesty rather than a dumbed down dwarf fortress.

Play Towns on an unlimited amount of maps: viewtopic.php?f=13&t=1659
User avatar
City Builder
 
Posts: 1950
Joined: Fri Mar 02, 2012 5:32 am
Location: Check your Mom's basement.

Re: Multiple maps of the same type (aka 5 or more normal map

Postby City Builder » Mon Apr 02, 2012 1:00 am

If you go to start the game and it exits, then there is probably a syntax error in your campaigns.xml file that you did the editing to.

Check it, double check it and look for the mistake. I've seen people paste in the wrong places, and I've seen people not paste what they should paste and cut out what they should not cut out.

When all else fails and your beyond frustrated, simply replace the campaigns.xml file with the backup you made originally and go play the game and try again later when you're maybe not so tired and definitely not so frustrated.
Last edited by City Builder on Sat Aug 18, 2012 2:42 am, edited 1 time in total.
burningpet wrote:And yeah, the Majesty reference is correct, towns will eventually aim to be a much more advanced Majesty rather than a dumbed down dwarf fortress.

Play Towns on an unlimited amount of maps: viewtopic.php?f=13&t=1659
User avatar
City Builder
 
Posts: 1950
Joined: Fri Mar 02, 2012 5:32 am
Location: Check your Mom's basement.

Re: 0.42b Mod: 5 Normal maps to play on

Postby tom k. » Mon Apr 02, 2012 8:16 am

I might make a .net apllication to do this automatically :)
Tom K.
Former Community Moderator


Please read the FAQs before posting.
Image
Towns' Official Modding Partner Site - Townsmods.net
tom k.
 
Posts: 1598
Joined: Wed Mar 28, 2012 7:22 pm
Location: Lincoln, UK

Re: 0.42b Mod: 5 Normal maps to play on

Postby tom k. » Mon Apr 02, 2012 12:37 pm

As a quesiton, is there any way to make deserts for example? Or jus tnormal maps?
Tom K.
Former Community Moderator


Please read the FAQs before posting.
Image
Towns' Official Modding Partner Site - Townsmods.net
tom k.
 
Posts: 1598
Joined: Wed Mar 28, 2012 7:22 pm
Location: Lincoln, UK

Re: 0.42b Mod: 5 Normal maps to play on

Postby City Builder » Mon Apr 02, 2012 1:04 pm

Yes, same as I showed above, the only difference is that you will copy out the files from the original desert folder and paste them into each of the new desert folders & of course to change the naming of the folders and other bits in the campaigns.xml file to accommodate the extra desert maps

While I've not done this specifically for desert maps (since I don't like desert maps, so why would I want 5 of them :lol: ), however I did do it for the mixed maps and have 10 mixed maps that seemingly are working just fine.
burningpet wrote:And yeah, the Majesty reference is correct, towns will eventually aim to be a much more advanced Majesty rather than a dumbed down dwarf fortress.

Play Towns on an unlimited amount of maps: viewtopic.php?f=13&t=1659
User avatar
City Builder
 
Posts: 1950
Joined: Fri Mar 02, 2012 5:32 am
Location: Check your Mom's basement.

Re: 0.42b Mod: 5 Normal maps to play on

Postby Sinovera » Tue Apr 03, 2012 1:59 am

This is great! Thanks City Builder.
Sinovera
 
Posts: 18
Joined: Tue Apr 03, 2012 1:35 am

Re: 0.42b Mod: 5 Normal maps to play on

Postby tom k. » Tue Apr 03, 2012 7:27 am

Sinovera wrote:This is great! Thanks City Builder.

If you don't want to do this manually, I wrote an application to do it for you :)

viewtopic.php?f=13&t=1672
Tom K.
Former Community Moderator


Please read the FAQs before posting.
Image
Towns' Official Modding Partner Site - Townsmods.net
tom k.
 
Posts: 1598
Joined: Wed Mar 28, 2012 7:22 pm
Location: Lincoln, UK

Re: 0.42b Mod: 5 Normal maps to play on

Postby City Builder » Tue Apr 03, 2012 8:10 am

tom k. wrote:
Sinovera wrote:This is great! Thanks City Builder.

If you don't want to do this manually, I wrote an application to do it for you :)

viewtopic.php?f=13&t=1672


Does your save manager pick up on any maps that I've created manually using the method that I listed in the first post?

I'm pretty sure that it won't as I just tried it but it doesn't seem to see that I've already created 10 new normal maps and 10 new mixed maps as they are listed in the campaigns.xml file and I wonder why that would be. I'm guessing that maybe it doesn't read the campaigns.xml file to see what is already there, or maybe it will only read the standard coding that comes in a clean campaigns.xml file?
burningpet wrote:And yeah, the Majesty reference is correct, towns will eventually aim to be a much more advanced Majesty rather than a dumbed down dwarf fortress.

Play Towns on an unlimited amount of maps: viewtopic.php?f=13&t=1659
User avatar
City Builder
 
Posts: 1950
Joined: Fri Mar 02, 2012 5:32 am
Location: Check your Mom's basement.

Re: 0.42b Mod: 5 Normal maps to play on

Postby tom k. » Tue Apr 03, 2012 8:14 am

It should read it perfectly fine :) can you paste your campaigns.xml? There must be a syntax error or something.
Tom K.
Former Community Moderator


Please read the FAQs before posting.
Image
Towns' Official Modding Partner Site - Townsmods.net
tom k.
 
Posts: 1598
Joined: Wed Mar 28, 2012 7:22 pm
Location: Lincoln, UK

Re: 0.42b Mod: 5 Normal maps to play on

Postby City Builder » Tue Apr 03, 2012 8:16 am

This is the parts of my campaign file that I've altered, so I've only pasted what is below:

Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<campaigns>
   <campaign>
      <id>c1</id>
      <name esES="Mapas">Maps</name>
      <mission>
         <id>normal</id>
         <name esES="Mapa normal">Normal map</name>
      </mission>
      <mission>
         <id>normal1</id>
         <name esES="Mapa normal">Normal map 1</name>
      </mission>
      <mission>
         <id>normal2</id>
         <name esES="Mapa normal">Normal map 2</name>
      </mission>
      <mission>
         <id>normal3</id>
         <name esES="Mapa normal">Normal map 3</name>
      </mission>
      <mission>
         <id>normal4</id>
         <name esES="Mapa normal">Normal map 4</name>
      </mission>
      <mission>
         <id>normal4</id>
         <name esES="Mapa normal">Normal map 5</name>
      </mission>
      <mission>
         <id>normal5</id>
         <name esES="Mapa normal">Normal map 6</name>
      </mission>
      <mission>
         <id>normal6</id>
         <name esES="Mapa normal">Normal map 7</name>
      </mission>
      <mission>
         <id>normal7</id>
         <name esES="Mapa normal">Normal map 8</name>
      </mission>
      <mission>
         <id>normal8</id>
         <name esES="Mapa normal">Normal map 9</name>
      </mission>
      <mission>
         <id>desert</id>
         <name esES="Desierto">Desert</name>
      </mission>
      <mission>
         <id>jungle</id>
         <name esES="Jungla">Jungle</name>
      </mission>
      <mission>
         <id>mixed</id>
         <name esES="Mezclado">Mixed</name>
      </mission>
      <mission>
         <id>mixed2</id>
         <name esES="Mezclado">Mixed 2</name>
      </mission>
      <mission>
         <id>mixed3</id>
         <name esES="Mezclado">Mixed 3</name>
      </mission>
      <mission>
         <id>mixed4</id>
         <name esES="Mezclado">Mixed 4</name>
      </mission>
      <mission>
         <id>mixed5</id>
         <name esES="Mezclado">Mixed 5</name>
      </mission>
      <mission>
         <id>mixed6</id>
         <name esES="Mezclado">Mixed 6</name>
      </mission>
      <mission>
         <id>mixed7</id>
         <name esES="Mezclado">Mixed 7</name>
      </mission>
      <mission>
         <id>mixed8</id>
         <name esES="Mezclado">Mixed 8</name>
      </mission>
      <mission>
         <id>mixed9</id>
         <name esES="Mezclado">Mixed 9</name>
      </mission>
      <mission>
         <id>snow</id>
         <name esES="Nieve">Snow</name>
      </mission>
   </campaign>
burningpet wrote:And yeah, the Majesty reference is correct, towns will eventually aim to be a much more advanced Majesty rather than a dumbed down dwarf fortress.

Play Towns on an unlimited amount of maps: viewtopic.php?f=13&t=1659
User avatar
City Builder
 
Posts: 1950
Joined: Fri Mar 02, 2012 5:32 am
Location: Check your Mom's basement.

Next

Return to Released mods

Who is online

Users browsing this forum: No registered users and 0 guests