Start from Play Now testing phase

Leoreth

Blue Period
Moderator
Joined
Aug 23, 2009
Messages
37,053
Location
東京藝術大学
Hey,

as I have been posting about in the development thread, I have been working at transitioning from multiple scenario files for each starting data to a single custom map file that you can start from with the Play Now option.

You can find more details about what that means there. But the bottom line is that this will allow handling multiple scenarios, additional map settings, transitioning to the new map, and having multiple civilizations while using less slots and performance in the future.

My work on that is now almost complete. I have uploaded the current state of it on a new branch named custommap. It would help me out a lot if you can play from this branch to see if everything works. The goal is to have the same supported scenarios as before, with everything working as before, only accessed differently. As usual, you can get the branch by using git fetch and git checkout.

To start a game, now follow these steps:
  • Click PLAY NOW. (The "Scenarios" button should now be grayed out.)
  • Do NOT use "Custom Game". It is mostly functional, but not moddable so I could not prevent it from offering options that will break the game. I could also not disable it. But it is unsupported.
  • Afterwards, you will be given some non-options about map size, climate, and sea level. You can simply proceed.
  • Now you can pick the scenario: 3000 BC, 600 AD or 1700 AD.
  • After that, you can choose your civilization and its leader. Note that the available civilizations and leaders match the scenario. It is possible to start as Iran, Mexico and Colombia in every scenario.
  • Like before, you can select your game speed and difficulty level.
After that, the game should behave like it did previously. If it doesn't, or if you encounter any errors, please let me know.

Also: this branch is not savegame compatible with the develop branch, so you have to start a new game and play it entirely on this branch.

As I mentioned above, I am not done with this feature yet. But I think at this point things are stable enough to collect additional feedback and bug reports while working on the remaining tasks. What is still left to do?
  • Most importantly, collect metrics about how many civilizations are active at the same time at the maximum, and then reduce the number of slots to match that. I already set up logging for that, which I shared a few months ago. This should bring an immediate performance gain.
  • In combination with that, make sure that slots can be shared and reassigned. Especially, if no free slot is available, deciding if it should be freed by collapsing an existing civilization, for example.
  • Demographics graphs need to be civ based: currently they are still slot based, i.e. would not respond to a new civ being assigned to a slot
  • Scenario starting visibility: this is the most significant difference to the initial situation in the scenarios compared to before. Right now, every civ only starts with its territory revealed. In the current setup, the initially revealed area for each civ is carefully defined, which is not sustainable and not even done very well right now. I want a more generalised approach where you do not have to define every single revealed tile for every civilization.
As usual, you can ask questions and discuss here, and report issues either here or in the bug reports thread (in the latter case please make it clear you are referring to this branch). Again, thanks to everyone who gives this a try.
 
Checking it out:

-Some leaders are missing from the 3000 BCE selection screen, is that because they're respawns/ideological leaders?
-Default difficulty is Heir.

e: Tried a game as Cleopatra, I get Python errors and map is an endless plain:

PythonErr.log said:
Traceback (most recent call last):

File "Dawn_of_Civilization", line 69, in getGridSize

File "Dawn_of_Civilization", line 59, in prepareMap

File "Parsers", line 15, in parseScenarioMap

File "MapParser", line 42, in read

IOError: [Errno 22] Invalid argument
ERR: Python function getGridSize failed, module Dawn_of_Civilization
Traceback (most recent call last):

File "Dawn_of_Civilization", line 76, in beforeGeneration

NameError: global name 'PARSER' is not defined
ERR: Python function beforeGeneration failed, module Dawn_of_Civilization
Traceback (most recent call last):

File "Dawn_of_Civilization", line 79, in generateRandomMap

NameError: global name 'PARSER' is not defined
ERR: Python function generateRandomMap failed, module Dawn_of_Civilization
Traceback (most recent call last):

File "Dawn_of_Civilization", line 89, in addRivers

NameError: global name 'PARSER' is not defined
ERR: Python function addRivers failed, module Dawn_of_Civilization
Traceback (most recent call last):

File "Dawn_of_Civilization", line 83, in addFeatures

NameError: global name 'PARSER' is not defined
ERR: Python function addFeatures failed, module Dawn_of_Civilization
Traceback (most recent call last):

File "Dawn_of_Civilization", line 86, in addBonuses

NameError: global name 'PARSER' is not defined
ERR: Python function addBonuses failed, module Dawn_of_Civilization
Traceback (most recent call last):

File "Dawn_of_Civilization", line 96, in afterGeneration

NameError: global name 'PARSER' is not defined
ERR: Python function afterGeneration failed, module Dawn_of_Civilization
 

Attachments

  • Cleopatra Stone Age Turn 0.CivBeyondSwordSave
    168 KB · Views: 26
Last edited:
Some leaders are missing from the 3000 BCE selection screen, is that because they're respawns/ideological leaders?
Correct. I decided to exclude leaders whose appearance is strongly conditional except just time based.
 
Tried a game as Cleopatra, I get Python errors and map is an endless plain:
Does this file exist for you, at this exact path: "Mods\RFC Dawn of Civilization\PrivateMaps\RFC_3000BC.txt"? Can you open it?
 
Started a 600 AD game on Epic. The game starts at 530 AD, and I only have 208 turns left.


Spoiler :
upload_2022-3-3_2-4-54.png
upload_2022-3-3_2-5-9.png

upload_2022-3-3_2-5-43.png
 
Does this file exist for you, at this exact path: "Mods\RFC Dawn of Civilization\PrivateMaps\RFC_3000BC.txt"? Can you open it?
Sure, here it is:

RFC_3000BC.txt said:
Platy Builder
Version=11
BeginGame
Calendar=CALENDAR_DEFAULT
Option=GAMEOPTION_AGGRESSIVE_AI
Option=GAMEOPTION_NO_TECH_BROKERING
GameTurn=0
StartYear=-3000
Description=TXT_KEY_RHYES_WB_DESC
ModPath=Mods\RFC Dawn of Civilization
EndGame

BeginMap
EndMap

BeginPlot
x=69,y=33
BeginUnit
UnitType=UNIT_MILITIA
UnitOwner=CIVILIZATION_EGYPT
EndUnit
BeginUnit
UnitType=UNIT_SETTLER
UnitOwner=CIVILIZATION_EGYPT
EndUnit
EndPlot
BeginPlot
x=76,y=40
BeginUnit
UnitType=UNIT_MILITIA
UnitOwner=CIVILIZATION_BABYLONIA
EndUnit
BeginUnit
UnitType=UNIT_SETTLER
UnitOwner=CIVILIZATION_BABYLONIA
EndUnit
EndPlot
BeginPlot
x=87,y=40
BeginUnit
UnitType=UNIT_MILITIA
UnitOwner=CIVILIZATION_HARAPPANS
EndUnit
BeginUnit
UnitType=UNIT_HARAPPAN_CITY_BUILDER
UnitOwner=CIVILIZATION_HARAPPANS
EndUnit
EndPlot

The other files seem to have the Begin Map - End Map part as normal.
 
Prussia 1700 AD on Normal speed.

The estimated loading times for Mexico, Colombia, and Canada are off. Mexico and Colombia say 0 minutes and Canada's loading time is shorter than Brazil's despite spawning later.

The dawn of man text for Prussia says the year is 1701 AD not 1700 AD.

The independent cities are spawn protected at the start

Python exceptions occur when the stability map mode button is clicked

Turkey won a time victory on the eleventh turn of the game

Spoiler :
Civ4ScreenShot0353.JPG


America was somehow destroyed before they were supposed to spawn, but then spawned as normal in 1775
Spoiler :
Civ4ScreenShot0356.JPG
Civ4ScreenShot0357.JPG
 
Sure, here it is:
The other files seem to have the Begin Map - End Map part as normal.
The contents are correct, I was wondering if you do not have file permissions to read it. Are you acting as administrator? Is DoC running as administrator?

Default difficulty is Heir.
It's Regent on my end. I think it remembers the previously chosen difficulty, once you pick one.
 
The contents are correct, I was wondering if you do not have file permissions to read it. Are you acting as administrator? Is DoC running as administrator?
Yeah I can read it no problem without administrator permission. For DoC I'm not sure, launching from the shortcut as adminstrator leads to the same result.

It's Regent on my end. I think it remembers the previously chosen difficulty, once you pick one.
Strange, I always play Regent.
 
Yeah I can read it no problem without administrator permission. For DoC I'm not sure, launching from the shortcut as adminstrator leads to the same result.
Thanks for looking into this. I did some more research and apparently the reason is slashes in the file path. I had been using backslashes as above, but apparently Windows prefers forward slashes. Strangely, it seems to work for me and other people. I will push a change to forward slashes soon, hopefully that will work for you.

Strange, I always play Regent.
I think it only happens for custom games, and since this was your first custom game with these difficulty options, it probably defaulted to Heir. The next game should remember the choice, if I'm not mistaken.
 
New update:
- fixed a bug where scenarios could not be loaded for certain configurations of Windows
- fixed scenario starting turns for different game speeds

I am aware that there are further issues with game speeds, i.e. the game length/end turn. More updates to follow.
 
Here are the saves.
Thanks. I have to repeat my question though. In 1700 AD, what makes you say the independents are birth protected? Your inability to declare war on them? That's not a new feature.
 
Thanks. I have to repeat my question though. In 1700 AD, what makes you say the independents are birth protected? Your inability to declare war on them? That's not a new feature.

It's the inability to declare war on them, I guess I've just never tried to attack them before their immunity has expired.
 
Okay. That's a scenario specific thing. You can't declare war for the first few turns after a scenario starts.
 
Byzantine first goal not triggering (marked as "not yet"). I do not have the save before 1000AD, unfortunately.
 

Attachments

  • Justinian I AD-1005 Turn 329.CivBeyondSwordSave
    502.3 KB · Views: 21
That is probably unrelated to the changes in this branch, but I will look into it.
 
Thank you!
In this one Python exception appears after Egyptian victory - on Hall of Fame screen. Save file before victory.
Also I have noticed that shortly before civilization X appears, I get notification "Civilization X has collapsed!"
 

Attachments

  • Cleopatra AD-0160 Turn 234.CivBeyondSwordSave
    515.5 KB · Views: 19
  • 20220304114529_1.jpg
    20220304114529_1.jpg
    272.1 KB · Views: 46
Top Bottom