[Tutorial] Modding 101 - Adding Jobs/Priorities

Post your mods and custom content here

[Tutorial] Modding 101 - Adding Jobs/Priorities

Postby JackPS9 » Mon Mar 11, 2013 3:40 pm

Yay jack is back on towns!
This will probably be one of easier tutorials for modding towns!

File to be edited: priorities.xml

There is only 4 lines that you be changing/adding to the priorities in order to add or change to increase the control you have over your townies.

basic priority (Already in game)
Code: Select all
<priority>
      <id>foodmaking</id>
      <name esES="Cocinar">Baking and cooking</name>
      <icon>ui_rfood</icon>
</priority>


I know some of you will know what the tags do but for newer modders here is the info for you. (I do this every tutorial)
Code: Select all
<priority></priority>

These are a must without these it wont be seen as a priority so remember the rest of your custom priority must be within these tags.
Code: Select all
<id></id>

The id is how the game tells what actions use what priority, its like how the government IDs you as a number.
You just put in what you want the ID to be in here, and when you have a action you want to use this priority you will use the ID of this priority.
Code: Select all
<name esES="(Spanish version)"></name)

This is required by like everything you edit in towns, esES="(Spanish version)" is where you put your spanish translation of the name. The name goes between the name tags.
Code: Select all
<icon></icon>

The image you will see inside the game will end up here.


Personaly fishing should be a priority all to itself, reason being it takes a total of 440 turns to get 1 fish, which as some of you know from my older tutorials that comes out being 110/73.3/55 seconds.

So what we are going to do it copy the foodmaking priority and paste it at the bottom of the file, just above
Code: Select all
</priorities>


just have to change the id of it to "fishing"
and the name to "Fishing" (translate fishing into spanish if you so wish)
now just change the icon to be what you want it to be.

should look like this.
Code: Select all
   <priority>
      <id>fishing</id>
      <name esES="Pesca">Fishing</name>
      <icon>ui_rfood</icon>
   </priority>


Save the file, play towns and now you have a job/priority for fishing, if you wish to make fishing part of this priority you just go to actions search for
Code: Select all
<id>qfishing</id>
and change its priority to fishing!
JackPS9
 
Posts: 1088
Joined: Mon Sep 03, 2012 4:15 pm

Re: [Tutorial] Modding 101 - Adding Jobs/Priorities

Postby GreyFalcon » Sat Mar 16, 2013 9:51 am

Could modding tutorials like this one get stickied for easier reference for those modders like me who still are a bit wet behind the ears? :ugeek:
It's not if we win or lose that matters, it's how we stood and faced it.

Check out some of my writing at: http://Writing.Com/authors/greyfalcon
User avatar
GreyFalcon
 
Posts: 218
Joined: Thu Nov 15, 2012 7:45 am

Re: [Tutorial] Modding 101 - Adding Jobs/Priorities

Postby JackPS9 » Sat Mar 16, 2013 3:07 pm

I think all my tutorials are listed in the wiki
http://www.townswiki.com/wiki/Modding_Tutorials
JackPS9
 
Posts: 1088
Joined: Mon Sep 03, 2012 4:15 pm

Re: [Tutorial] Modding 101 - Adding Jobs/Priorities

Postby GreyFalcon » Sat Mar 16, 2013 5:16 pm

Oh cool and good to know. Didn't know that the modding tutorials were there!

Thank you
It's not if we win or lose that matters, it's how we stood and faced it.

Check out some of my writing at: http://Writing.Com/authors/greyfalcon
User avatar
GreyFalcon
 
Posts: 218
Joined: Thu Nov 15, 2012 7:45 am


Return to Modding

Who is online

Users browsing this forum: No registered users and 2 guests

cron