Population Size

Discuss maps, trains and other modding topics
Post Reply
Damian
Posts: 2
Joined: Tue Feb 27, 2007 9:58 pm

Population Size

Post by Damian » Thu Mar 08, 2007 2:11 pm

Does anybody know if there is an XML tweak I can do to increase the population size limit of a city? It seems I've hit a ceiling on a cities growth but I want to see just how big these things will get.

User avatar
Warll
Posts: 928
Joined: Fri Oct 27, 2006 10:31 pm
Location: Tokyo, Japan
Contact:

Post by Warll » Thu Mar 08, 2007 4:14 pm

Well yes and no. GeForce found out that there are city sizes above 4 they do not change the name of a city.
Image

blizzard
Posts: 13
Joined: Tue Mar 06, 2007 6:36 am

Post by blizzard » Thu Mar 08, 2007 8:07 pm

Damian, I found the following workable. It's the entire <RRTCitiesTypes> section of the global RRT_Cities.xml file I use. As you can see, I added two larger city sizes and they work just fine. I limit what goods would cause the city to grow or should I say, what the city demands and those can easily be changed to whatever good you think the city needs to grow. Just make sure you added the good into your RRT_Goods_CUSTOM.xml beforehand as the map will crash if the reference to the good is not there before referencing the industry that makes it. I found that out the hard way. I have comments in the xml code to keep myself sane when I work with these scenarios. Good thing .xml code for this game is straight forward. Not like Caesar IV. Very advanced xml coding in that game. Though I did get one complete scenario working in that game. Cut-and-paste-and pray it worked was the way I went with that one.

Here's the code I use in my global cities.xml file. That way any map I make I can just reference to the szName for each city size I want. fe If I only want the cities to grow to a city, I leave the Metropolis, City-State and Empire tags out. AND don't forget to add the demands for goods in each type or the cities grow but won't demand anything other than passengers and mail. I have a comment before each city size reference with what that size city demands. Not to mention you get the "Growth is awesome" saying when your city grows instead of the "cityname demands whatever goods". Sorry for the long post but I thought it best to show you the whole RRTCityType code. In fact you could just copy and paste this into your global RRT_Cities.xml and then reference the szName in your RRT_Cities_CUSTOM.xml file. The main things to change is the number of buildings for each city type. NumLargeBuildings, NumMediumBuildings, and NumSmallBuildings control that. Notice that those numbers get larger with each city increase. Also the <Size> must be unique for each city type! Just for ha-has, after I'm finished with my currect map, I'm gonna add like 10 city sizes and see where that gets me. Maybe just one good demand for each level up.

Code: Select all

<RRTCityTypes>
    <CityType>
      <!-- add demands for medicine and gold-->
      <szName>Empire</szName>
      <Size>5</Size>
      <NumLargeBuildings>45</NumLargeBuildings>
      <NumMediumBuildings>90</NumMediumBuildings>
      <NumSmallBuildings>135</NumSmallBuildings>
      <ProductionModifiers>
        <!-- add demand for food -->
        <Resource>
          <Input>Food</Input>
          <Output>None</Output>
          <InputOutputRatio>0.0</InputOutputRatio>
          <MaxStorage>0.0</MaxStorage>
        </Resource>
        <!-- add demand for passengers -->
        <Resource>
          <Input>Passengers</Input>
          <Output>None</Output>
          <InputOutputRatio>0.0</InputOutputRatio>
          <MaxStorage>0.0</MaxStorage>
        </Resource>
        <!-- add demand for mail -->
        <Resource>
          <Input>Mail</Input>
          <Output>None</Output>
          <InputOutputRatio>0.0</InputOutputRatio>
          <MaxStorage>0.0</MaxStorage>
        </Resource>
        <!-- add demand for manufactured goods -->
        <Resource>
          <Input>Manufactured Goods</Input>
          <Output>None</Output>
          <InputOutputRatio>0.0</InputOutputRatio>
          <MaxStorage>0.0</MaxStorage>
        </Resource>
        <!-- add demand for textiles-->
        <Resource>
          <Input>Textiles</Input>
          <Output>None</Output>
          <InputOutputRatio>0.0</InputOutputRatio>
          <MaxStorage>0.0</MaxStorage>
        </Resource>
        <!-- add demand for automobiles -->
        <Resource>
          <Input>Automobiles</Input>
          <Output>None</Output>
          <InputOutputRatio>0.0</InputOutputRatio>
          <MaxStorage>0.0</MaxStorage>
        </Resource>
        <!-- add demand for beer-->
        <Resource>
          <Input>Beer</Input>
          <Output>None</Output>
          <InputOutputRatio>0.0</InputOutputRatio>
          <MaxStorage>0.0</MaxStorage>
        </Resource>
        <!-- add demand for wine-->
        <Resource>
          <Input>Wine</Input>
          <Output>None</Output>
          <InputOutputRatio>0.0</InputOutputRatio>
          <MaxStorage>0.0</MaxStorage>
        </Resource>
        <!-- add demand for medicine-->
        <Resource>
          <Input>Medicine</Input>
          <Output>None</Output>
          <InputOutputRatio>0.0</InputOutputRatio>
          <MaxStorage>0.0</MaxStorage>
        </Resource>
        <!-- add demand for gold-->
        <Resource>
          <Input>Gold</Input>
          <Output>None</Output>
          <InputOutputRatio>0.0</InputOutputRatio>
          <MaxStorage>0.0</MaxStorage>
        </Resource>
        <!-- creates up to 12 passengers -->
        <Resource>
          <Input>None</Input>
          <Output>Passengers</Output>
          <InputOutputRatio>0.75</InputOutputRatio>
          <MaxStorage>12.0</MaxStorage>
        </Resource>
        <!-- creates up to 8 mail -->
        <Resource>
          <Input>None</Input>
          <Output>Mail</Output>
          <InputOutputRatio>0.66</InputOutputRatio>
          <MaxStorage>8.0</MaxStorage>
        </Resource>
      </ProductionModifiers>
    </CityType>
    <CityType>
      <!-- add demands for beer and wine-->
      <szName>City-State</szName>
      <Size>4</Size>
      <NumLargeBuildings>30</NumLargeBuildings>
      <NumMediumBuildings>60</NumMediumBuildings>
      <NumSmallBuildings>90</NumSmallBuildings>
      <ProductionModifiers>
        <!-- add demand for food -->
        <Resource>
          <Input>Food</Input>
          <Output>None</Output>
          <InputOutputRatio>0.0</InputOutputRatio>
          <MaxStorage>0.0</MaxStorage>
        </Resource>
        <!-- add demand for passengers -->
        <Resource>
          <Input>Passengers</Input>
          <Output>None</Output>
          <InputOutputRatio>0.0</InputOutputRatio>
          <MaxStorage>0.0</MaxStorage>
        </Resource>
        <!-- add demand for mail -->
        <Resource>
          <Input>Mail</Input>
          <Output>None</Output>
          <InputOutputRatio>0.0</InputOutputRatio>
          <MaxStorage>0.0</MaxStorage>
        </Resource>
        <!-- add demand for manufactured goods -->
        <Resource>
          <Input>Manufactured Goods</Input>
          <Output>None</Output>
          <InputOutputRatio>0.0</InputOutputRatio>
          <MaxStorage>0.0</MaxStorage>
        </Resource>
        <!-- add demand for textiles-->
        <Resource>
          <Input>Textiles</Input>
          <Output>None</Output>
          <InputOutputRatio>0.0</InputOutputRatio>
          <MaxStorage>0.0</MaxStorage>
        </Resource>
        <!-- add demand for automobiles -->
        <Resource>
          <Input>Automobiles</Input>
          <Output>None</Output>
          <InputOutputRatio>0.0</InputOutputRatio>
          <MaxStorage>0.0</MaxStorage>
        </Resource>
        <!-- add demand for beer-->
        <Resource>
          <Input>Beer</Input>
          <Output>None</Output>
          <InputOutputRatio>0.0</InputOutputRatio>
          <MaxStorage>0.0</MaxStorage>
        </Resource>
        <!-- add demand for wine-->
        <Resource>
          <Input>Wine</Input>
          <Output>None</Output>
          <InputOutputRatio>0.0</InputOutputRatio>
          <MaxStorage>0.0</MaxStorage>
        </Resource>
        <!-- creates up to 8 passengers -->
        <Resource>
          <Input>None</Input>
          <Output>Passengers</Output>
          <InputOutputRatio>0.66</InputOutputRatio>
          <MaxStorage>8.0</MaxStorage>
        </Resource>
        <!-- creates up to 6 mail -->
        <Resource>
          <Input>None</Input>
          <Output>Mail</Output>
          <InputOutputRatio>0.5</InputOutputRatio>
          <MaxStorage>6.0</MaxStorage>
        </Resource>
      </ProductionModifiers>
    </CityType>
    <CityType>
      <!-- add demands for automobiles-->
      <szName>Metropolis</szName>
      <Size>3</Size>
      <NumLargeBuildings>10</NumLargeBuildings>
      <NumMediumBuildings>40</NumMediumBuildings>
      <NumSmallBuildings>70</NumSmallBuildings>
      <ProductionModifiers>
        <!-- add demand for food -->
        <Resource>
          <Input>Food</Input>
          <Output>None</Output>
          <InputOutputRatio>0.0</InputOutputRatio>
          <MaxStorage>0.0</MaxStorage>
        </Resource>
        <!-- add demand for passengers -->
        <Resource>
          <Input>Passengers</Input>
          <Output>None</Output>
          <InputOutputRatio>0.0</InputOutputRatio>
          <MaxStorage>0.0</MaxStorage>
        </Resource>
        <!-- add demand for mail -->
        <Resource>
          <Input>Mail</Input>
          <Output>None</Output>
          <InputOutputRatio>0.0</InputOutputRatio>
          <MaxStorage>0.0</MaxStorage>
        </Resource>
        <!-- add demand for manufactured goods -->
        <Resource>
          <Input>Manufactured Goods</Input>
          <Output>None</Output>
          <InputOutputRatio>0.0</InputOutputRatio>
          <MaxStorage>0.0</MaxStorage>
        </Resource>
        <!-- add demand for textiles-->
        <Resource>
          <Input>Textiles</Input>
          <Output>None</Output>
          <InputOutputRatio>0.0</InputOutputRatio>
          <MaxStorage>0.0</MaxStorage>
        </Resource>
        <!-- add demand for automobiles -->
        <Resource>
          <Input>Automobiles</Input>
          <Output>None</Output>
          <InputOutputRatio>0.0</InputOutputRatio>
          <MaxStorage>0.0</MaxStorage>
        </Resource>
        <!-- creates up to 6 passengers -->
        <Resource>
          <Input>None</Input>
          <Output>Passengers</Output>
          <InputOutputRatio>0.5</InputOutputRatio>
          <MaxStorage>6.0</MaxStorage>
        </Resource>
        <!-- creates up to 4 mail -->
        <Resource>
          <Input>None</Input>
          <Output>Mail</Output>
          <InputOutputRatio>0.33</InputOutputRatio>
          <MaxStorage>4.0</MaxStorage>
        </Resource>
      </ProductionModifiers>
    </CityType>
    <CityType>
      <!-- add demands for manufactured goods and textiles-->
      <szName>City</szName>
      <Size>2</Size>
      <NumLargeBuildings>1</NumLargeBuildings>
      <NumMediumBuildings>20</NumMediumBuildings>
      <NumSmallBuildings>50</NumSmallBuildings>
      <ProductionModifiers>
        <!-- add demand for food -->
        <Resource>
          <Input>Food</Input>
          <Output>None</Output>
          <InputOutputRatio>0.0</InputOutputRatio>
          <MaxStorage>0.0</MaxStorage>
        </Resource>
        <!-- add demand for passengers -->
        <Resource>
          <Input>Passengers</Input>
          <Output>None</Output>
          <InputOutputRatio>0.0</InputOutputRatio>
          <MaxStorage>0.0</MaxStorage>
        </Resource>
        <!-- add demand for mail -->
        <Resource>
          <Input>Mail</Input>
          <Output>None</Output>
          <InputOutputRatio>0.0</InputOutputRatio>
          <MaxStorage>0.0</MaxStorage>
        </Resource>
        <!-- add demand for manufactured goods -->
        <Resource>
          <Input>Manufactured Goods</Input>
          <Output>None</Output>
          <InputOutputRatio>0.0</InputOutputRatio>
          <MaxStorage>0.0</MaxStorage>
        </Resource>
        <!-- add demand for textiles-->
        <Resource>
          <Input>Textiles</Input>
          <Output>None</Output>
          <InputOutputRatio>0.0</InputOutputRatio>
          <MaxStorage>0.0</MaxStorage>
        </Resource>
        <!-- creates up to 4 passengers -->
        <Resource>
          <Input>None</Input>
          <Output>Passengers</Output>
          <InputOutputRatio>0.33</InputOutputRatio>
          <MaxStorage>4.0</MaxStorage>
        </Resource>
        <!-- creates up to 2 mail -->
        <Resource>
          <Input>None</Input>
          <Output>Mail</Output>
          <InputOutputRatio>0.2</InputOutputRatio>
          <MaxStorage>2.0</MaxStorage>
        </Resource>
      </ProductionModifiers>
    </CityType>
    <CityType>
      <szName>Town</szName>
      <Size>1</Size>
      <NumLargeBuildings>0</NumLargeBuildings>
      <NumMediumBuildings>10</NumMediumBuildings>
      <NumSmallBuildings>20</NumSmallBuildings>
      <ProductionModifiers>
        <!-- add demand for food -->
        <Resource>
          <Input>Food</Input>
          <Output>None</Output>
          <InputOutputRatio>0.0</InputOutputRatio>
          <MaxStorage>0.0</MaxStorage>
        </Resource>
        <!-- add demand for passengers -->
        <Resource>
          <Input>Passengers</Input>
          <Output>None</Output>
          <InputOutputRatio>0.0</InputOutputRatio>
          <MaxStorage>0.0</MaxStorage>
        </Resource>
        <!-- add demand for mail -->
        <Resource>
          <Input>Mail</Input>
          <Output>None</Output>
          <InputOutputRatio>0.0</InputOutputRatio>
          <MaxStorage>0.0</MaxStorage>
        </Resource>
        <!-- creates up to 2 passengers -->
        <Resource>
          <Input>None</Input>
          <Output>Passengers</Output>
          <InputOutputRatio>0.16</InputOutputRatio>
          <MaxStorage>2.0</MaxStorage>
        </Resource>
        <!-- creates up to 1 mail -->
        <Resource>
          <Input>None</Input>
          <Output>Mail</Output>
          <InputOutputRatio>0.1</InputOutputRatio>
          <MaxStorage>1.0</MaxStorage>
        </Resource>
      </ProductionModifiers>
    </CityType>
    <CityType>
      <szName>Village</szName>
      <Size>0</Size>
      <NumLargeBuildings>0</NumLargeBuildings>
      <NumMediumBuildings>0</NumMediumBuildings>
      <NumSmallBuildings>15</NumSmallBuildings>
    </CityType>
  </RRTCityTypes>
Hope this helps out a little bit. I am by no means proficient with xml coding but this game seems to use less advanced code than say Caesar IV.If you do cut-and-paste, make a backup of your RRT_Cities.xml first. I usually rename mine to RRT_Cities.xml.org. I just put a .org (For original) on the end of the original files and create copies I work with in my CustomAssets folder. That way I can whack a specific file I changed if things get wonky.

Post back if you have any other issues and I hope this helps as I think it pertains to your quest for knowledge. Now I just need to figure out why my alpha layer is not working on my custom goods icons.

~Blizzard

User avatar
Warll
Posts: 928
Joined: Fri Oct 27, 2006 10:31 pm
Location: Tokyo, Japan
Contact:

Post by Warll » Thu Mar 08, 2007 8:36 pm

If you would like I can Alpha them for you. All you need to do is PM them to me.
Image

blizzard
Posts: 13
Joined: Tue Mar 06, 2007 6:36 am

Post by blizzard » Thu Mar 08, 2007 10:39 pm

WarII, I got it figured out as far as the icons go. Corel Photo-Paint is being mean and not saving the alpha channel for the .tga files. So I used GIMP and all is well, but thanx for the invite for help. Appreciate it.

User avatar
G3mInI
Posts: 16
Joined: Thu Feb 15, 2007 3:10 am

Post by G3mInI » Fri Mar 09, 2007 3:02 am

For the alpha channel to remain it must be 32bit. 24bit tga files will not retain the alpha channel, this is true for any graphics program. Corel (formerly Paint Shop Pro, has a nasty habit of defaulting to save tga's as 24bit, thus the alpha is dropped when saving. When saving a tga file in Photoshop a prompt comes up every time asking you to choose either 24bit or 32bit. Have not used The Gimp personally (though heard a lot about it) but I assume that, that particular program is smart enough to know that if there is an alpha channel present, it will save it as a 32bit image knowing the alpha will be dropped at anything less.

snoopy55
Posts: 1962
Joined: Mon Nov 06, 2006 5:13 am
Location: Centralia, Ill, USA

Post by snoopy55 » Fri Mar 09, 2007 4:49 am

G3mInI, Blizzard ans Warll (got it right!), have you 3 thought to put any of your vast knowledge of these graphics onto the WIKI? Searching these forums to put it all together is hair-raising. I think your on 3 different threads right now :shock:
I'm correct 97% of the time..... who cares about the other 4%....

blizzard
Posts: 13
Joined: Tue Mar 06, 2007 6:36 am

Post by blizzard » Fri Mar 09, 2007 5:37 am

Hey G3, the really strange thing about that was the files I was creating (saving) were listed as 32bit and NOT 24bit. So that was telling me the .tga files did have the alpha layer but was not activating it outside of Photo-Paint. It is really weird to say the least. But like I said, I figured it out in GIMP and am good to go. The bad thing is, can I do it again if I need to create more custom icons? Time will time to quote an old Fifth Angel song.

Snoop, if and when I get proficient at adding the alpha layer with the graphic tools I have, I'd be glad to post to the Wiki but for now, I'm just not proficient enough to put out an end-all document, so to say. But that's not to say it won't happen in the near future!

~Blizzard

snoopy55
Posts: 1962
Joined: Mon Nov 06, 2006 5:13 am
Location: Centralia, Ill, USA

Post by snoopy55 » Fri Mar 09, 2007 7:23 am

I myself would like to see it. I see talk of it around the forum, the things about the alpha and such, but it needs to be gathered, tested and put in one place. Then maybe I'll attempt to play with it. Once I can understand the programs used........
I'm correct 97% of the time..... who cares about the other 4%....

gforce
Posts: 234
Joined: Thu Nov 09, 2006 3:24 am
Location: Belgium, Brussels

Post by gforce » Fri Mar 09, 2007 7:58 pm

i've already created custom icons without a problem,
if you need still some help on it, ask me,
i good start is to unpack the superbowl fpk and see the example there...
on remark of city-sizes, i've got size 5 working fine, the city does grow and change in name (city-type-name), the amount of goods stored in the city-types can be easily addapted in the xmls, the amount in wich they will be generated as well

snoopy55
Posts: 1962
Joined: Mon Nov 06, 2006 5:13 am
Location: Centralia, Ill, USA

Post by snoopy55 » Mon Mar 12, 2007 3:46 pm

blizzard - on your choice of city names, tomasvicente38 used the titles of Large City for size 4 and Conglomerate for size 5. What is your mind on that. I'm working on a tut for creating cities next and those, in my humble opinion, seem a little more..... realistic (?) I'm just trying to get the Railroads world into a bit of a set course.

Thoughts?
I'm correct 97% of the time..... who cares about the other 4%....

Post Reply