Visual Entertainment and Technologies Forum

Full Version: Adding more than six districts (regions) - possible?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I've been doing some more modding, figuring out how to change more things, and I recently figured out how to change district names.  I came up with a nice list:

Code:
<RegionNames>
<region id="1" localized="0">British Isles</region>
<region id="2" localized="0">Italy/Switzerland</region>
<region id="3" localized="0">The Balkans/Yugoslavia</region>
<region id="4" localized="0">Scandinavia</region>
<region id="5" localized="0">Russia</region>
<region id="6" localized="0">Anatolia and the Caucuses</region>
<region id="7" localized="0">Iberia</region>
<region id="8" localized="0">France/Belgium</region>
<region id="9" localized="0">Germany/Netherlands/Austria</region>
<region id="10" localized="0">Italy/Switzerland</region>
<region id="11" localized="0">Poland/Czechoslovakia</region>
<region id="12" localized="0">Romania/Hungary/Moldova</region>
<region id="13" localized="0">Ukraine/Belarus</region>
<region id="14" localized="0">The Baltics</region>
</RegionNames>


However, only the first six show up in game.  I'm guessing that means there's a hard-coded limit?

I'm also reminded of the sub-districts feature bounty (https://www.ventdev.com/forums/showthread.php?tid=3871), and while it would be cool to be able to break things down more in reports (Asia -> Middle East -> Jordan, for instance), I'm wondering if being able to have more districts would solve half the annoyance with a tenth of the effort?  E.g. in the traditional world map, splitting Asia into two or three top-level districts would both help with the autopopulation shipping costs (#95) and allowing popularity to be set a bit more granularly (#90).

I'm also not really sure if it's a bug or a missing feature that there seems to be a limit of 6 regions.  Not a big problem for me, I had a list of six regions before having the idea to just add more in the XML, but maybe an alternative way to go about that bounty.

(Also a full disclaimer, while it would be nice there are probably about 20 items I'll be voting for before we get to the ones mentioned here... secondary disclaimer for anyone reading, no, I don't have a mod-in-progress with all those regions [yet])
(08-22-2022, 09:14 PM)JC_Denton Wrote: [ -> ]I've been doing some more modding, figuring out how to change more things, and I recently figured out how to change district names.  I came up with a nice list:


However, only the first six show up in game.  I'm guessing that means there's a hard-coded limit?

You are correct. There is a hard-coded limit, as it's designed to work one for each continent.

Quote:I'm also reminded of the sub-districts feature bounty (https://www.ventdev.com/forums/showthread.php?tid=3871), and while it would be cool to be able to break things down more in reports (Asia -> Middle East -> Jordan, for instance), I'm wondering if being able to have more districts would solve half the annoyance with a tenth of the effort?  E.g. in the traditional world map, splitting Asia into two or three top-level districts would both help with the autopopulation shipping costs (#95) and allowing popularity to be set a bit more granularly (#90).

Discussion of bounties should remain on the bounty pages. That's one of the perks of contributing.

But in short, the sub-regions bounty removes the hard-coded limits to the districting system, thus allowing for more premade districts defined in the xml files. Case in point, you already described sub-regions in your example, "splitting Asia into two or three top-level districts." If you're splitting a continent into three, you're making sub-regions of that greater region...

So you pretty much just described sub-regions and how they'll be implemented in the game.

Quote:I'm also not really sure if it's a bug or a missing feature that there seems to be a limit of 6 regions.  Not a big problem for me, I had a list of six regions before having the idea to just add more in the XML, but maybe an alternative way to go about that bounty.

Continents were hard-coded into the game. They were moved to XML at some point in the last 6 years so translators could translate them. I did not originally design the game for translating, nor was it designed to add more than 6 continents. As a side effect of that, I started allowing people to change the names of them for regional maps.

The sub-region system simply allows for more districts in the game. Instead just a predefined Asia group (id=5), we'll have a predefined Middle East (id=7), South East Asia (id=8), and North Asia (id=9), and all of those will still be a part of the current Asia group (id=5). This will likely be done by adding a sub-region variable to the city.xml file. In game, it'll work like any other district. Work wise, it's practically the same amount of effort as adding additional regions to the system, except now we'll be able to support 2 regions per city listing... And then of course, we'll have a few more reports generated based off sub-regions.
I forgot to mention in typing all that, Vehicle type popularity is specifically hard-coded to the 6 continents. And that is why the system is hard-coded to begin with. If it were dynamic, you would have problems with missing vehicle popularity in the database and in the xml.

That in turn is also another good reason to have sub-regions a separate variable for cities. It allows for all the benefits of being able to add more predefined districts, without breaking the game database... At least until the bounties to break that data is funded.
Awesome, thanks for the response! You even anticipated my follow-up question from the past week, which is whether it was possible to change the popularities for regions that have been custom-named. Looks like it isn't, which means I shouldn't split up countries into renamed regions in my new mod, that would throw off the popularities, which isn't worth being able to see the split in the reports. Which is fine as I hadn't yet procured sub-regional popularity data for Europe anyway...

Good point about the bounty pages. I hope it's okay if I quote most of your posts on that page, it's helpful info.
(08-31-2022, 01:52 PM)JC_Denton Wrote: [ -> ]Awesome, thanks for the response!  You even anticipated my follow-up question from the past week, which is whether it was possible to change the popularities for regions that have been custom-named.  Looks like it isn't, which means I shouldn't split up countries into renamed regions in my new mod, that would throw off the popularities, which isn't worth being able to see the split in the reports.  Which is fine as I hadn't yet procured sub-regional popularity data for Europe anyway...
Quite welcome. Sadly I decided to squeeze in map modding support well toward the last moment and without redesigning everything around world maps.

Quote:Good point about the bounty pages.  I hope it's okay if I quote most of your posts on that page, it's helpful info.

It's not a problem. The whole forum is getting a little less traffic than I expected. I guess between the economy and the uncertainty with how FBS works, most users are sitting on their hands to see what the first milestone brings.