RAR modmod: global colonization

Marla_Singer

United in diversity
Joined
Oct 24, 2001
Messages
13,323
Location
Paris, west side (92).
The idea of the modmod would be about enlarging the RAR experience at a global scale. I believe this could potentially be done mostly with pure XML and Art modding.


Enlarge map


Here is the basic: instead of depicting only a continent, the mod would be based on a full earth map. That means that it would necessarily include Europe, but here we are somewhat helped by "nature". Europe being relatively small, the 7 European powers (excluding Russia) would only have 1 to 4 cities in their homeland with no room to expand further, and the player (both AI or Human) would be naturally pressured to move out of the continent and found colonies elsewhere.

In order to simulate more interesting sea trade routes, "access to Europe" would only be limited to a single tile: the capital port (London, Lisbon or Amsterdam). I've tested that with the AI and it works. The only thing which may be needed to make distant colonies profitable may be faster boats. The Europe screen could be renamed "Royal market" for atmospheric reasons. As a matter of fact, chariots may also have easily access to it, it would only needs minor graphical tweeks.

The good thing about Civ4Col is that we can operate in truely giant maps with no pressure to colonize it all, neither for the Human player, nor for the AI. As such, I've been thinking that for such a mod to be really great, it would require a very large map.

On such a map, we could explore RAR potential even further. We could imagine new civilizations (ported from Civ4) which would have "European status" such as Ottomans, China, Japan and fill in the map with many other nations having "native status" (Tibetans, Mongols, Zulus, Kongos). Maybe some yields could be replaced as well so that we could add tea, porcelain or ivory. Maybe there could be interesting ways to depict the silk route as well.

Anyway, all this seems that could be potentially done. However, it would still require a lot of work. That's why I'm posting this thread. Would you actually be interested in such a variation of RAR or do you dislike even the concept in the first place? If you have other ideas on how it could work out, don't hesitate to share. :)

I actually need to know now, because a global earth map would take a lot of time to create. My prototype has a size of 300x150 tiles. That makes a total of 45,000 tiles, of which about 14,000 are land.
 
This is a really cool project! :thumbsup: I highly commend you for even considering this! :goodjob:

However, I anticipate that achieving satisfactory performance will be difficult. To get to the point where RaR can comfortably handle gigantic+ maps will require:

- Multithreading. I have an uncommited branch that uses Intel TBB for parallelizing several subsystems. Need to clean it up before I push it.
- Memory optimization. No effort invested in this yet, but I think we can borrow from C2C since they've apparently put in quite a bit of effort in this area.
- Improved AI algorithms for decision making. Working on merging in K-mod, which is far more efficient in most evaluations. In particular, the pathfinder is a significant improvement compared to what we have now.
 
Last edited:
Alright, just to do some update on the project, I'm working mainly on the earth map currently. I've done continents shapes, climates and relief. There's no forestry, ice and river at this stage, but here's a new screen anyway:


Click to enlarge
 
This is a really cool project! :thumbsup: I highly commend you for even considering this! :goodjob:

However, I anticipate that achieving satisfactory performance will be difficult. To get to the point where RaR can comfortably handle gigantic+ maps will require:

- Multithreading. I have an uncommited branch that uses Intel TBB for parallelizing several subsystems. Need to clean it up before I push it.
- Memory optimization. No effort invested in this yet, but I think we can borrow from C2C since they've apparently put in quite a bit of effort in this area.
- Improved AI algorithms for decision making. Working on merging in K-mod, which is far more efficient in most evaluations. In particular, the pathfinder is a significant improvement compared to what we have now.
That's awesome!

Despite the map being twice larger that a generated gigantic map, it has only 14,482 tiles of land (32%). Amog those, only 6,863 are irrigable (grassland, prairie and savannah) and 8,019 are non-irrigable (permafrost, tundra, desert, marsh). That makes actually a similar number of irrigable land than in a standard generated map, considering those will generally have very limited non-irrigable lands in comparison.

Anyway, all this to say that I don't believe the player should grow really bigger here than what he usually does. This doesn't change the fact a better optimization of the code would be appreciated (for this map as much as for RAR in general), especially in the very last turns which are usually rather long.
 
I think it is possible, actually... I recall doing something of that sort years ago. It needed some DLL changes though.
I've found that old thread about a similar concept of global colonization, but based on AOD2 instead of RAR:
https://forums.civfanatics.com/threads/worldwide-colonization-aod2.463244/

Apparently, several colonies with the same king work over there. I don't know if it plays well. I just tried to do the same on my current project and it made the game crash. This needs to get further investigated.
 
I've found that old thread about a similar concept of global colonization, but based on AOD2 instead of RAR:
https://forums.civfanatics.com/threads/worldwide-colonization-aod2.463244/

Apparently, several colonies with the same king work over there. I don't know if it plays well. I just tried to do the same on my current project and it made the game crash. This needs to get further investigated.

It has been many years, but I had a similar problem. IIRC the EXE itself tries to access the "ParentCivilization" XML field for civs, or (more likely) its C++ counterpart. I remember being able to solve the issue back then, but I don't recall exactly how. Did you change the name of that variable? That could be the issue.
 
Alright, I've done a lot of testing since last week-end, and to my great disappointment, things are far from getting as expected. :(

Apparently, the game doesn't really appreciate to have "European king" cities in the game. I''ve attempted many different solutions but up untill now I haven't even been able to have both European king cities on the map and church/wild animals actually working. The alternative would be for European cities to belong to the colonists, but then the AI develop really poorly as it's programmed to devellop around the first city and if that one is in "small Europe" then it won't expand well.

I have no clue how to solve that. I'm actually really sad as I've spent many hours trying to make it work properly... There are so many things that goes wrong that I feel totally washed out about it. I hate to say this, but I'll need to give up on this one. :cry:
 
Alright, I've done a lot of testing since last week-end, and to my great disappointment, things are far from getting as expected. :(

Apparently, the game doesn't really appreciate to have "European king" cities in the game. I''ve attempted many different solutions but up untill now I haven't even been able to have both European king cities on the map and church/wild animals actually working. The alternative would be for European cities to belong to the colonists, but then the AI develop really poorly as it's programmed to devellop around the first city and if that one is in "small Europe" then it won't expand well.

I have no clue how to solve that. I'm actually really sad as I've spent many hours trying to make it work properly... There are so many things that goes wrong that I feel totally washed out about it. I hate to say this, but I'll need to give up on this one. :cry:

Yes, it is complicated, since the base game wasn't made with that possibility in mind at all. Having kings on the map is nevertheless possible, though. A lot of it depends, of course, on changing the pieces of code that make special cases with the "isEurope" function. Though some pieces of code perhaps only check if they have a child civilization instead?

In any case, what do you mean by the church and wild animals not working? What actually happens with them when the king is on the map?
 
Yes, it is complicated, since the base game wasn't made with that possibility in mind at all. Having kings on the map is nevertheless possible, though.
Yes it is possible, but if the colonial player doesn't have a city, then it triggers the independence victory at next screen. That's not necessarily a problem to give a first city to all colonial players though.

A lot of it depends, of course, on changing the pieces of code that make special cases with the "isEurope" function. Though some pieces of code perhaps only check if they have a child civilization instead?
Yes, I can mention for instance that pirates are programmed to spawn on was tiles with access to Europe belonging to no one. If there's none it makes the game crash. So the function would need to be changed. For what it matters, I used to know how to compile the dll, I have my Visual Studio installed and everything, but when I start the build, I get an error message saying "can't find access to boost and python" or something along that line. The problem maybe comes from the path being badly configured on the Makefile. Anyway, it's true that if I was able to do that, things would probably be easier.

The key question to me is: if a European King has 3 cities with routes, carts and colonists and so on, what is the AI programmed to do ? Colonial powers are programmed to trade with Europe and grow, Natives are programmed to spawn braves, but what about the European King?

In any case, what do you mean by the church and wild animals not working? What actually happens with them when the king is on the map?
The problem probably comes from me editing badly the ColonizationWBSave file. I'll give another shot on this.

There could be another solution though which might be more stable for the game then adding European kings on the map. That would be to create a new native tribe called "Europeans" with its port cities giving access to Europe. Granted this may be a problem as all European settlers could go in any European port, but maybe the result would be more stable.
 
Last edited:
After multiple tests, I've finally succeeded to get a prototype that does work! :goodjob:

Here's how the set up works:
- European kings are in Europe
- Europe tiles surrounders Europe shores
- Colonial powers have all their first cities established (otherwise it won't work)
- All ships move 4 times faster (so a caravel will have 20 moves instead of 5), and the travel time to Europe (on the European screen) has been reduced to zero.

The scenario map is only a prototype so there's no yield bonus, no goody huts, no river, and I've quickly added forestry and natives a bit random, just to get a full test.

I've established the English in Virginia, the French in Quebec, the Spanish in Mexico, the Portuguese in Brazil, the Danes in Senegal, the Swedes in South Africa and the Dutch in Indonesia. Then I've launched the game in autoplay for 200 turns. Here's some screenshots of the result:

North America

Click to enlarge


Eastern Atlantic

Click to enlarge


South Africa

Click to enlarge


In a nutshell, all colonial powers have grown from 8 to 10 colonies, which is what the AI does normally in RAR 2.7 after 200 turns. So the AI finds its way! The only exception is the Dutch settlers in Indonesia. Apparently, it's just too far away and the AI can't find its way to Europe. I've taken control of it (Ctrl+Alt+Z), hitting the "go to Europe" button, it didn't go anywhere despite the fact the whole path to Europe was known. Last thing, the Spaniards develloped well in Mexico untill they randomly founded a colony in the Azores. Then it made grow that colony instead of Mexico, which is now their larger city.

If anyone's interested, I'm adding to this post the save file after 200 turns as well as the scenario prototype and the modified XML files in the assets folder.

Don't hesitate to give me your feedback about it. Do you like it this way?
I won't be at home for the week-end, so I won't be able to work on this before next tuesday.
 

Attachments

  • Earth TEST scenario.zip
    147.3 KB · Views: 189
  • Assets.zip
    28 KB · Views: 236
  • Earth test 1662 AD.ColonizationSave
    1.5 MB · Views: 206
What happened to this?
At first I was really ambitious as I was thinking about importing Civs from Civ4 and so on, even creating new yields like tea or ivory, but after repeated playtesting I realized that my whole idea to make acccess to "Europe" only on European city tiles didn't work so well, especially with the AI. So I dropped it all.

Maybe I should have set my ambitions lower to something more compatible with Vanilla RAR, with access to Europe from the world oceans, but losing the concept about physically bringing the boats to Europe killed the fun to me. :(
 
At first I was really ambitious as I was thinking about importing Civs from Civ4 and so on, even creating new yields like tea or ivory, but after repeated playtesting I realized that my whole idea to make acccess to "Europe" only on European city tiles didn't work so well, especially with the AI. So I dropped it all.

What problems did you encounter with that? Also, did you consider having ocean tiles adjacent to the European city give access to "Europe" as well?
 
Hi Marla, do you use Slack? (It is a communication platform similar to discord or skype) (we have a little modding group there that works with RaR and Medieval Conquest) Nightingale and Kailric are a part of it. We have talked about ideas like this also (We began looking at a Civ4 in Col concept) among other things. There is a lot of brain power there that may be able to help you with some of these challenges (RAR is still quite an active group of modders) M:C Also has power civs on the map such as the pope and the Byzantium Empire., it also has 'land starting' civs.

EDIT: It's not RaR anymore, the team/mod is "We The People"
 
Last edited:
As already mentioned, RaR died and a new team took over, naming the new mod "We the People". It's based on the same code as RaR, developed further with various bugfixes, yet is intentionally backward compatible with savegames from RaR and presumably also compatible with this project.

The benefit from switching to WTP is that you will get a team of active DLL modders, meaning DLL limitations can be fixed.
 
Hey guys!

I'm currently working on something else but "We the people" looks awesome! I'll try finding the time to get into it more seriously this weekend and see if I can't help in any way. :)
 
Top Bottom