Plans for DoC 1.17

Leoreth

Bofurin
Retired Moderator
Joined
Aug 23, 2009
Messages
38,060
Location
風鈴高等学校
As is tradition, I'm going to give a quick overview about what my current plans for 1.17 are, this is of course subject to change as I am developing. On a very high level, most of this version will be about preparing things to come in future versions. This can have the unfortunate side effect of not offering as much straight up content as usual, in particular compared to 1.16 which added so much in terms of units, wonders etc.

I have spent a lot of time thinking through how to enable some of the big milestones further down the line, such as additional civilisations, the new map, more scenarios (or different ways of creating maps) etc. (all of which will not be in 1.17) and how to keep the codebase manageable with such an expansion of features. DoC 1.17 will be primarily about laying the groundwork for these things and cleaning the existing codebase to make it easier to maintain and get rid of some annoying holdovers from initial implementations in RFC and DoC.

1. Ongoing preparations for the new map

Status: city name suggestions being collected

This is technically not really part of 1.17, because development of the new map will continue in an isolated branch and I have no plans of merging it before 1.17 releases. However, this is likely where I will focus my efforts first.

Firstly, I will go through the feedback and the suggestions that have accumulated over time to bring the branch up to date with them.

Then, I plan to lay some groundwork to enable the community to make further contributions. As far as I can see now, this is a) a new city name manager that will operate from one global city name map instead of many individual language based maps, and b) a new implementation of stability and settler maps. In each case this will let people work on the new CNM and settler maps so I want to enable that as soon as possible.

2. Rise and Fall reimplementation

The idea here is to implement the entire content of the Rise and Fall module again from scratch, which handles everything around how civilisations spawn and respawn, and all the rules around that. From a code perspective, this is one of the major elements of the mod that is still using code largely written by Rhye, and I am pretty sure there is a lot of opportunity to streamline it. In the process of rewriting it I will also gain a better understanding of how everything works exactly, which is important for features I have in mind further down the line.

From a gameplay perspective, it gives me the opportunity to change how spawns and flips work to be less luck dependent and less frustrating, specifically by removing unit defections and replacing them with different mechanics to ensure that recently spawned civilisations can establish and defend themselves.

In addition to that, I have some further ideas on how different civilisations could spawn according to different rules depending on how they emerged historically (e.g. through conquest or through independence from an existing civilisation). This can include aspects discussed previously such as starting as a vassal (e.g. Canada) and can represent existing special cases like the Ottoman spawn more organically within the system.

3. Use civilisations instead of players in implementation

Status: complete

Right now, most game rules rely on the player ID (also referred to as its "slot") instead of the civilisation they actually are. This needs to be changed in the future to enable reusing slots for multiple civilisations so we can add additional civs later on in development (so the abilities, modifiers etc. of a given player depends on the civilisation they actually are). This is nothing special in itself, but requires a thorough change of the code throughout the mod and may take some time, but if complete we are a major step closer to adding more civs to the mod.

4. Change how scenario files work

Right now, the different start dates in the mod are implemented as scenarios, which are essentially equivalent to saved games in a certain situation. I would like to transition from scenarios to a map script (i.e. the "Play Now" button). This is a necessity to uncouple civilisations from slots, as for scenarios the civilisation for each slot needs to be set at the beginning, and no more civilisations than slots are possible. Instead the player will be able to choose their civilisation just like at the beginning of a custom game.

In addition, this will also enable additional game options for various things. In particular, I want to explore this possibility to turn the start date into a game option, instead of having different scenarios for each start date. This would have the significant advantage that there is only one file to maintain for all scenarios. Right now, even having only three scenarios makes it hard to make changes to the map etc. because these changes have to be kept consistent between all scenarios. If shared elements (e.g. the basic terrain) were kept in the same file, it would reduce the workload significantly, and make additional scenarios much more likely.

DoC has some unique requirements for this approach because custom maps are usually randomly created, while DoC has a predetermined map. I need to figure out how to solve this, but I am fairly certain it is possible. The advantage of this approach is that it brings us much closer to adding different maps (including randomly generated ones like in RAND) to the mod.

5. Overall code cleanup and refactoring

Status: mostly complete

Besides all of this, there are other aspects of the codebase that I want to clean up and improve. For example, I have noticed that the RFCUtils module has grown quite large, and when tracking down some bugs in 1.16 I also discovered that specific functionalities have been implemented multiple times with slightly different use cases but completely different code (I think there are at least three functions to push out units somewhere else). On the other hand there are some common tasks (e.g. collecting and interacting with lists of players, cities, units ...) that barely have helper methods or are somewhat clunky, so I hope to improve on that front as well to make existing code easier to read and easier to develop new code in the future.

There is other stuff that needs cleanup in my opinion, for example Python event handlers. This has barely any implication on the gameplay itself besides maybe eliminating some yet undiscovered bugs.


Unlike the development of 1.16, most of this cannot be separated into neat features that can be worked on and then rolled out one by one. For example, when entirely rewriting the rise and fall code I will already make sure to keep the new code up to the improved standards and use civilisation IDs instead of player IDs. It's also entirely possible that like remodeling a house, the mod will not really be playable or at the very least kind of buggy while I am rewriting everything. So that could mean that a lot will happen in separate branches that won't be merged back into develop for quite some time. But on the other hand I want playtesting and feedback on these changes, so let's see what I can figure out.


I hope that gives some insight into what I am trying to do right now. Due to the nature of the goals I have, everything is a bit more technical than usual. Please let me know if you have questions or ideas. Of course as before I will open up threads to go into more detail once I actually start working on one of these items.
 
Last edited:
DoC has some unique requirements for this approach because custom maps are usually randomly created, while DoC has a predetermined map. I need to figure out how to solve this, but I am fairly certain it is possible. The advantage of this approach is that it brings us much closer to adding different maps (including randomly generated ones like in RAND) to the mod.
What about just straight-up "randomly generating" the map, with conditions like "if the tile is X, Y, then make it this type of tile"?
 
Man, this looks so promising. Point 3 and 4 seems like such good solutions
 
Spoiler :
In addition, this will also enable additional game options for various things. In particular, I want to explore this possibility to turn the start date into a game option, instead of having different scenarios for each start date. This would have the significant advantage that there is only one file to maintain for all scenarios. Right now, even having only three scenarios makes it hard to make changes to the map etc. because these changes have to be kept consistent between all scenarios. If shared elements (e.g. the basic terrain) were kept in the same file, it would reduce the workload significantly, and make additional scenarios much more likely.

You mean, something like Europa Universalis? In EU you can choose any month in history to begin the game.
 
As is tradition, I'm going to give a quick overview about what my current plans for 1.17 are, this is of course subject to change as I am developing. On a very high level, most of this version will be about preparing things to come in future versions. This can have the unfortunate side effect of not offering as much straight up content as usual, in particular compared to 1.16 which added so much in terms of units, wonders etc.

I have spent a lot of time thinking through how to enable some of the big milestones further down the line, such as additional civilisations, the new map, more scenarios (or different ways of creating maps) etc. (all of which will not be in 1.17) and how to keep the codebase manageable with such an expansion of features. DoC 1.17 will be primarily about laying the groundwork for these things and cleaning the existing codebase to make it easier to maintain and get rid of some annoying holdovers from initial implementations in RFC and DoC.

Releasing the plans was the thing I was looking forward to the most about the release of 1.16.

Personally, I don't mind that is mostly code based. But that is probably because I'm also modding and like digging in the code.

1. Ongoing preparations for the new map

This is technically not really part of 1.17, because development of the new map will continue in an isolated branch and I have no plans of merging it before 1.17 releases. However, this is likely where I will focus my efforts first.

Firstly, I will go through the feedback and the suggestions that have accumulated over time to bring the branch up to date with them.

Then, I plan to lay some groundwork to enable the community to make further contributions. As far as I can see now, this is a) a new city name manager that will operate from one global city name map instead of many individual language based maps, and b) a new implementation of stability and settler maps. In each case this will let people work on the new CNM and settler maps so I want to enable that as soon as possible.

I will update the WB editors to handle the new implementation when the implementation is ready, so people can use them to develop those maps.

4. Change how scenario files work

Right now, the different start dates in the mod are implemented as scenarios, which are essentially equivalent to saved games in a certain situation. I would like to transition from scenarios to a map script (i.e. the "Play Now" button). This is a necessity to uncouple civilisations from slots, as for scenarios the civilisation for each slot needs to be set at the beginning, and no more civilisations than slots are possible. Instead the player will be able to choose their civilisation just like at the beginning of a custom game.

In addition, this will also enable additional game options for various things. In particular, I want to explore this possibility to turn the start date into a game option, instead of having different scenarios for each start date. This would have the significant advantage that there is only one file to maintain for all scenarios. Right now, even having only three scenarios makes it hard to make changes to the map etc. because these changes have to be kept consistent between all scenarios. If shared elements (e.g. the basic terrain) were kept in the same file, it would reduce the workload significantly, and make additional scenarios much more likely.

DoC has some unique requirements for this approach because custom maps are usually randomly created, while DoC has a predetermined map. I need to figure out how to solve this, but I am fairly certain it is possible. The advantage of this approach is that it brings us much closer to adding different maps (including randomly generated ones like in RAND) to the mod.

You could look how HR has done their worldmap. It is a pre-made map and you can select any civ from the beginning. But not every civ is loaded on gamestart.
 
What about just straight-up "randomly generating" the map, with conditions like "if the tile is X, Y, then make it this type of tile"?
That's basically the solution. There's no reason to not make the algorithm that usually randomly generates the map just deterministically create the map we want. It just comes down to implementation details.

Spoiler :
In addition, this will also enable additional game options for various things. In particular, I want to explore this possibility to turn the start date into a game option, instead of having different scenarios for each start date. This would have the significant advantage that there is only one file to maintain for all scenarios. Right now, even having only three scenarios makes it hard to make changes to the map etc. because these changes have to be kept consistent between all scenarios. If shared elements (e.g. the basic terrain) were kept in the same file, it would reduce the workload significantly, and make additional scenarios much more likely.

You mean, something like Europa Universalis? In EU you can choose any month in history to begin the game.
Not to that degree, but I could see a couple more significant starting dates.

You could look how HR has done their worldmap. It is a pre-made map and you can select any civ from the beginning. But not every civ is loaded on gamestart.
Yeah, I have a couple of examples on hand that I will look up when doing this.
 
Not to that degree, but I could see a couple more significant starting dates.
It will be a huge project, if need something related on Chinese history (history maps in certain years/important history events/change of dynasties/change of landform and resourses), I could help on it.
 
Not to that degree, but I could see a couple more significant starting dates.

I hope this leads to realistic scenarios for the spawn dates of late-game civs.
 
My long-held dream of a 1950 start option filled with modern civs like Israel, Modern India, the PRC, Pakistan and others inches ever closer...
Maybe 1946 is a better start year for cold war, East and West Germany, North and South Korea, most important, an epic civil war between CCP and KMT.
 
specifically by removing unit defections and replacing them with different mechanics to ensure that recently spawned civilisations can establish and defend themselves.

Awesome! :goodjob:
 
Wow, it's still alive! I'm really impressed. Recently I've seen some Let's plays on youtube with DoC and it was great. I decided to try it myself, so here I am.

As I understand, your plans regarding points 2, 4 and 5 are three aspects of the same thing - making the engine better. That's fantastic, but it's hard to discuss it. I am not a big fan of the stability system of the original RFC but I understand you are not going to modify the concept.

Point 1, as you've mentioned, is a part of different project - I'm glad to see it grow but I don't think I'm the target audience.

And point 3 is something I've dreamed of a long time. I really hope you can make it.

On the points not mentioned, I understand that the ending date is 2020. Do you plan to extend it? Merging the future mod from BtS seems quite easy so I guess you don't want to go in that direction but it's the one feature I miss in your mod.

Anyway, congratulations! Your mod really stands the test of time!
 
Anyway, congratulations! Your mod really stands the test of time!
Yay, thanks!

As for your points, the stability system has already been changed quite significantly in DoC compared to RFC, although if you would like a completely different approach it might not be enough. About the end date, I don't really see the mod as a speculative fiction setting, and the content that goes in that direction is specifically meant to be challenging to even reach before the end date. With the real world finally catching up to it there may be a reason to somewhat extend it, I don't know. However I don't think it's as easy as just merging another mod, because it must also fit with the general theme and progression of the existing tech tree, not to mention if you are speaking about the speculative fiction mod I looked up once it wasn't that substantial and I didn't like most of it.
 
b) a new implementation of stability and settler maps

Hi, Leo! I'm wondering if you already have initial plans on how to reimplement the stability, settler, and war maps? Not necessarily the code itself, just an overview of how it should work compared to the current implementation.
 
I have some but they're really vague. It's mostly about changing what the maps mean and not how the maps themselves look, but I also want to bring the values per tile down for the settler map. Some stuff depends on implementation and experimentation so I don't really know enough right now to say anything specific.
 
I see. I don't have an eye for improving the map in large areas so I can only spot tiny differences at a time, but I can help with other aspects during my free time, especially code-related. Excited and looking forward to the future development of 1.17!

By the way, a few months back, I pondered on your plans to refactor the Rise and Fall code, and I figured out that the unit spawn code could use dictionaries of lists, instead. The spawn dicts can be placed in a separate file if you want to keep RiseAndFall.py short. One obstacle I see in this method is that the spawns use one of two methods, depending on some attributes such as starting experience and AI mode. Another is the spawn of water units. Idk if you've already looked into this specific part, but I think you can at least consider this idea. :D
 
Yeah, I thought the same, but the devil is in the details like all the special cases you mentioned.
 
Back
Top Bottom