Communitu_79

Yes. That's weird. What you say can happen if the script breaks at resource placement, but you should not see even normal resources.

What settings did you use? Could you try creating another game? My settings are: Settling in Continents, 2 random oceans, Circumnavigation on, and override resources on (though it doesn't change anything in this last iteration).

I just tried a bunch of games - couldn't get strategics or ruins to show up. At first, I thought it might be because I had the Really Advanced Setup mod on, but turning it off didn't seem to make a difference.

Here's the settings:

upload_2020-9-7_17-14-27.png


And the game settings (not sure if those matter):
upload_2020-9-7_17-15-1.png
 
There's a reported issue with the Oval map. Azum4roll is checking it.
Maybe it's related.

That could definitely be it. Continents works with the Really Advanced Setup Screen. I'm using it now.
 
Last edited:
Can't debug without the Lua.log
 
Can't debug without the Lua.log

Is this what you need? Is it this?

[624065.593] Runtime Error: C:\Users\henry\Documents\My Games\Sid Meier's Civilization 5\MODS\(1) Community Patch\Mapscripts/Communitu_79a.lua:1319: attempt to concatenate field 'resDensity' (a nil value)
stack traceback:
C:\Users\henry\Documents\My Games\Sid Meier's Civilization 5\MODS\(1) Community Patch\Mapscripts/Communitu_79a.lua:1319: in function 'PlaceStrategicAndBonusResources'
C:\Users\henry\Documents\My Games\Sid Meier's Civilization 5\MODS\(1) Community Patch\Mapscripts/Communitu_79a.lua:1810: in function 'PlaceResourcesAndCityStates'
C:\Users\henry\Documents\My Games\Sid Meier's Civilization 5\MODS\(1) Community Patch\Mapscripts/Communitu_79a.lua:2470: in function 'StartPlotSystem'
Assets\DLC\Expansion2\Gameplay\Lua\MapGenerator.lua:815: in function <Assets\DLC\Expansion2\Gameplay\Lua\MapGenerator.lua:779>
 

Attachments

Still no idea how self.resDensity can be nil when it was assigned a default value of 2 in AssignStartingPlots.Create() called at line 2436. I'll need to test it later.
 
Maybe comparing with the original file might give the answer.
Problem is I wasn't getting any problems with the same setting. v1.18.0 resDensity belonged to the mapscript (mg), which won't work with AssignStartingPlots.
 
Sorry, I really can't get it to happen using the exact same settings. Everything works fine for me. Maybe try deleting cache?
 
Here's something I don't understand.
In Communitu_79a.lua there are 4 CustomOptions without sort priority, and 13 with sort priority.
1. World age (no sort priority)
2. Temperature
3. Rainfall
4. Sea level
5. resDensity (sort priority 1)
6. StrategicSize (sort priority 2, sfsf)
7. StrategicBalance
8. bonusDensity
9. Legendary
10. luxDensity
11. Terra
12. Oceans
13. Rift Width
14. Circumnavigation
15. Scattering
16. Override
17. Force coastal (sort priority 14)

It is then called by a Map function. For example:
Code:
    if Map.GetCustomOption(11) == 2 then
        -- Enlarge terra-style maps 30% to create expansion room on the new world
But how does it go from CustomOptions to Map.GetCustomOption() ?
Maybe there lies the clue as to why the defaults are not working for options over 11.
 
Currently the map is not working properly. It is mixing assingstartingplots from the base game with the owned by the map. We have to wait until the former file is debugged.

Also, map needs some simplification in these so many options. I don't think we need to pick the luxury resource density, for example.
I'd just leave:
1 Terra / Continents
2 Oceans style
3 Rift width
4 Circumnavigation
5 Scattering
6 Resource map density (including both strategics and bonus resources) for having more or less spare space,
7 Resource deposit amount for getting more or less strategics from the same resource tile,

Legendary or strategic starts can be tweaked with these option, besides there's already a guaranteed horse and forest around capital.
That's more than enough.
 
Some people want more luxuries, normal bonus and scarce strategics. Why not let them?

Anyway, here's v2.0.1 which fixes default options (by swapping the options around) and some rare issues regarding resource settings. Tested to work with latest AssignStartingPlots and the other version I posted in the other thread.
 

Attachments

Some people want more luxuries, normal bonus and scarce strategics. Why not let them?
Because it bloats the menu. It's ok to have some popular options, but I don't see the point in having one option for every people out there.

About how to integrate Communitu_79a for base game without VP, I am thinking about the following:
1. Copy the current AssignStartingPlots from VP.
2. Set a conditional that runs the copy of this library only when CBP is not present. This way it won't repeat itself in case VP is loaded, and will behave the same as VP for base game.
3. Remove the override option.

EDIT
I've been looking at resDensity, resBalance and legStart variables. Strategic is map option 7, legendary is map option 9. They activate binary variables, resBalance and legStart, which add respectively, more strategics and more food and luxuries to the starting point. They can be joined in a single query.
Option 7
"Normal start"
"More strategics around capitals"
"More bonuses around capitals"
"Truly Legendary Start" (activates both resBalance and legStart)

resDensity controls the frequency of strategics, while bonusDensity controls the frequency of bonus resources. There's too much granularity here. They could be just this
Option 8
"Normal worlwide resources"
"More worldwide strategic deposits" (increases resDensity)
"More worldwide bonus resources" (increases bonusDensity)
"More resources of both types" (increases both, leaving little room for farms)

And finally one option for the total amount of strategics, controlling how much strategics can fill each deposit and the guaranteed amount of strategics per player.
Option 9
"Sparse strategic amounts"
"Normal"
"Abundant strategic amounts"

I think this is giving plenty of options for the average player while not bloating the menu. The advanced player can always dive into the code and set the preferred values.

There a typo in AssignStartingPlots, by the way, in line 209, it says "bonusDensiy = 2,"
 
Last edited:
Strategic Balance and Legendary Start are vanilla options that will be asked about if not present in the options.

Merging bonus density, strategic density and luxury density leaves no place for the random options.
There a typo in AssignStartingPlots, by the way, in line 209, it says "bonusDensiy = 2,"
Ouch. That'll be problematic for people who pick Strategic Balance or Legendary Start in non-communitu_79a maps. Since no one has reported such an error, does this mean no one picks these options?
 
Merging bonus density, strategic density and luxury density leaves no place for the random options.
I disagree.
Let's start with luxuries. I don't remember anyone asking for a different luxury density, so I guess luxuries could be left as vanilla.
Then strategics and bonus can be asked in the following:
Resources Density:
1. Spacey (increases resMultiplier for both strategics and bonus)
2. Normal
3. Jammed (reduces resMultiplier for both strategics and bonus)
4. Just more tiles with strategics
5. Just more extra resources
6. Random

That's plenty of options, in my opinion.

PS. I'm reordering your mapscript options, placing first the options that don't need any changes, plus copying the current values you set for AssignStartingPlots.lua in base VP.

Edit. Here's the reordering
Spoiler :

Communitu options.jpg


 

Attachments

Last edited:
DefaultValue = 1 won't work properly, so the default for Resources in Starting Location became "Add some strategics".

I feel like leaving Circumnavigation off by default. It's been chopping continents too small. Unless you can improve it by NOT chopping if there's already a path between the two oceans through the targeted continent?

There are both "Add some extra bonus" and "Legendary start". I can see that you changed "Legendary start" to include both "extra strategics" and "extra bonus", but people won't know.

Since VP supports the map's resource options, we can remove the part in line 2408.
 
It's been chopping continents too small
It usually only chopps one continent. The method first looks for the row with fewer altitude, so it passes through the already there separation of the first continent, then it chopps the second. I guess I could forbid the circumnavigation path between -45º and 45º.

If "legendary" has some connotation, maybe we could call it "Amazing start". :D
 
I have no problems with the map, so although I like the idea of many options, I only use the shape and ocean options at this time. I also like the idea of usefulness. So regarding circumnavigation, I would take it off if you can get around it invisibly.
 
Just started a new game with the 2.03, absolutely love the new menu. Jut perfect. Now, let me try how it rolls out.

EDIT1: On my setup, very few Bonus R although I selected Abundant, No Strategic R at all and no ruins.
I'll try with fewer mods (3rd/4th comp - More wonders) and edit here to report.

EDIT2: Removed various mods and played with the settings: Everything works when selecting "No" to Override AssignStartingPlots. This the culprit 100%.
 
Last edited:
Just started a new game with the 2.03, absolutely love the new menu. Jut perfect. Now, let me try how it rolls out.

EDIT1: On my setup, very few Bonus R although I selected Abundant, No Strategic R at all and no ruins.
I'll try with fewer mods (3rd/4th comp - More wonders) and edit here to report.

EDIT2: Removed various mods and played with the settings: Everything works when selecting "No" to Override AssignStartingPlots. This the culprit 100%.
Sounds like an error! Can you put your Lua.log here?
 
Back
Top Bottom