YnAMP - Yet (not) Another Maps Pack

YnAMP - Development thread Civ6

I'm going to remove the override of AdvancedSetup.xml from YnAMP, but the AdvancedSetup.lua is a requirement.

Maybe a simple solution would be a compatibility mod requiring both YnAMP and Sukritact's Civ Selection Screen with a single merged AdvancedSetup.lua with a load order higher than both mods... My change there is just one block of code (+ one print to log line), it should not be too difficult to maintain it.
 
Small update (GitHub & Steam)
Code:
- move back all scenario and CS options to the default section an remove custom sections to fix some of the issues with compatibility and when setting MP games (including the Play By Cloud error)
- implement international road placement, all available options for scenario in the setup screen should work now
 
@sukritact : we may be able to use that (not just here, but for a lot of mods compatibility)

from ToolTipHelper.lua
Code:
-- Load all lua scripts prefixed with ToolTip_  so that they can hook into tooltip
-- creation.
include ("ToolTip_", true);

Maybe we could add an identical AdvancedSetup.lua to both our mod, which would be the vanilla game file with that code near the end, just before the call to Initialize():
Code:
-- Compatibility <<<<<
include("AdvancedSetup_", true);
-- Compatibility >>>>>

Then we could add a new file in each of your mod (for example AdvancedSetup_SukCSS.lua and AdvancedSetup_YnAMP.lua) with only the functions from AdvancedSetup.lua we're replacing, adding or modifying.

I'll do some tests.
 
Well that started well:
Clipboard-1.jpg


Best of both world:
Code:
DebugHotloadCache: GameDebug initialized!
MainMenu: Loading MainMenu.lua for YnAMP...
MainMenu: Game version : 1.0.0.317 (416354)
MainMenu: Checking Mods status for MainMenu Media...
MainMenu: - Enabled : DLC: Aztec Civilization Pack      
MainMenu: - Enabled : Expansion: Gathering Storm      
MainMenu: - Enabled : DLC: Poland Civilization Pack      
MainMenu: - Enabled : Zoom      
MainMenu: - Enabled : Terra Mirabilis      
MainMenu: - Enabled : Yet (not) Another Maps Pack      
MainMenu: - Enabled : Sukritact's Civ Selection Screen      
Test: Test.LUA loaded!
MainMenu: Checking Mods status for MainMenu Media...
JoiningRoom: OnFinishedGameplayContentConfigure() g_waitingForContentConfigure=true
AdvancedSetup: loading AdvancedSetup with include for mods... (from Yet (not) Another Maps Pack)
AdvancedSetup: Including AdvancedSetup_* files...
AdvancedSetup: loading AdvancedSetup Add-on for Yet (not) Another Maps Pack...
AdvancedSetup: loading AdvancedSetup Add-on for Sukritact's Civ Selection Screen...
AdvancedSetup: There are 6 participating players.
AdvancedSetup: Building Game Setup
AdvancedSetup: Player Count Changed
AdvancedSetup: There are 6 participating players.
AdvancedSetup: Player Count Changed
AdvancedSetup: There are 6 participating players.
MainMenu: Checking Mods status for MainMenu Media...
JoiningRoom: OnFinishedGameplayContentConfigure() g_waitingForContentConfigure=true
AdvancedSetup: YnAMP checking for number of players limit on Start...
AdvancedSetup: num. players = 6, num. CS = 9
AdvancedSetup: YnAMP setting specific CS slots...
AdvancedSetup: free slots = 9
AdvancedSetup:  - Reserving player slot#6 for Amsterdam
AdvancedSetup:  - Reserving player slot#7 for Brussels
AdvancedSetup:  - Reserving player slot#8 for Buenos Aires
AdvancedSetup:  - Reserving player slot#9 for Geneva
AdvancedSetup:  - Reserving player slot#10 for Hattusa
AdvancedSetup:  - Reserving player slot#11 for Hong Kong
AdvancedSetup:  - Reserving player slot#12 for Bandar Brunei
AdvancedSetup:  - Reserving player slot#13 for Jerusalem
AdvancedSetup:  - Reserving player slot#14 for Kabul
AdvancedSetup:  - Free slots left for random CS = 0

But when going back to main menu for another test, setup screen is broken, and from the lua.log:
Code:
AdvancedSetup: loading AdvancedSetup with include for mods... (from Yet (not) Another Maps Pack)
AdvancedSetup: Including AdvancedSetup_* files...
Runtime Error: E:\Users\Gedemon\Documents\My Games\Sid Meier's Civilization VI\Mods\Yet (not) Another Maps Pack\Override\AdvancedSetup.lua:661: attempt to index a nil value
stack traceback:
    E:\Users\Gedemon\Documents\My Games\Sid Meier's Civilization VI\Mods\Yet (not) Another Maps Pack\Override\AdvancedSetup.lua:661: in function 'OnShow'
Lua callstack:
It seems the addon files are not loaded back into the VFS for FrontEnd, you have to quit and relaunch the game, the compatibility fix is a one shot... I'll post a bug report...

But this method should work fine for all InGame UI files.
 
Unrelated update (Steam/GitHub)
Code:
- hotfix for CS selection broken by previous update
 
I was just about to inform you about a previous success by @Sejick to allow our mutual uses of the WorldRanking.LUA/XML files (his ASV & my Sco_R_ow mods). I feel the solution we opted for has intuitive logic that could be adapted for your front-end hooking "problem". GreyTiger's Additional-Victories for R&F was also integrated within that custom schema. So, it's a triple shot at once that works.
Check it out.. might help, i guess.
 
Quite easy.. direct compatibility checks (currently made within Sejick's ASV.lua init process) & wrapping up common logic found in multi-mods (manually adapting my local GS copy & still waiting on GreyTiger's updates).
Nothing better to judge such solutions by scrutinizing the actual code files... soooo, here's the essentials for your experienced mind.
 

Attachments

  • GSco_R_ow(Local).zip
    25.7 KB · Views: 140
  • 1277839848(ASV).zip
    13.1 KB · Views: 157
Thought of that, but it requires common updates if you don't include, no?
 
Yes.. indirectly, we must "coordinate" any mutual changes & how they impact each unique conditions found wherever.
By default, it's always like that anyway with official updating of most C6+DLC codes -- but at least.. it allows formal validation status at all times when our mods are used simultaneously.

@Sejick mentionned that (eventually) a core mod should be declared as the "centralized updater cycle" (right now that's what his ASV does in LUA component/functions) while the others would identify new changes & thus, develop shared(-able) solutions for further processing by the selected *X* code structure.

I have to admit it's a bit hacky. As long as it worked (still does with a few tiny revisions as shown within the above two zipped files).. we just agreed on that method at the time.

PS; I'd like to suggest something for your City-States drop-down list in the SG-Menu options -- color-coding the ID strings to match their types (Magenta=Cultural, Red=Military, etc)? Possible & easy to implement? If Civitas (ever) updates their own extensive CS system.. that list will become larger -- so faster detection might be welcomed!
 
Last edited:
Yep, thanks, I see that you need to do it that way because you change the same functions / UI elements, the "include all" method can't work in your case.

Small update:
Code:
- deactivate WB override in prevision of the June patch

Don't want to mess with the World Builder when the patch is released, I will reactivate YnAMP options in WB (like export to logs) later. It's still possible to export a map to log from in game until then.
 
Small update (gitHub/Steam)
Code:
- no more automatic random placement for missing strategic resources on a map, it's now an option when you select "Import" for resources placement
- "Coastal Lowland" placement option is now available for all maps, including non-YnAMP
- add an "Empty" entry to the "Coastal Lowland" placement option, to prevent sea rising
- bug fix: don't place Coastal Lowland near lakes
 
Im running into an issue if anyone can offer advice it would be appreciated.

The maps included in the mod only appear when I select the standard rules from the Choose Rule set drop down list at the top of the Create Game menu. I would like to use the mod's maps with the Gathering Storm rule set.

I've searched through some post and have nothing about this issue.
 
I have not played Civ 6 for about a year.
I updated yesterday to version 1.0.0.328 (426563). I have all dlcs and addons installed. Mods are mostly outdated and deactivated. Activating and starting an YnAMP game did not work for me since the game setup menu vanished. I had to deactivate the mod and restart the game to be able to get the setup back. (Maybe I used a wrong version since I have several old ones in my folder.)

So here I have some general questions.
- How stable is Civ6 GS on Giant Earth Map? Will it crash in modern times (like Civ4 and Civ5 (?) before) or can you play until you conquered/settled the complete planet and reached future tech?
- Is there already an actual version of YnAMP compatible with Civ6 v1.0.0.328 or should I wait for an update?
- Is it possible to optionally use a Worldbuilder map instead of a map script for Giant Earth? During Civ5 I played Giant Earth with an individually modified map with handplaced rivers and resources to strengthen TSL and real world city positions. (I do have a Giant Earth Map for Civ6 WorldBuilder, probably imported from a Civ5 map or a Civ6 save game, I don't remember. It is a good help when looking up terrain details and coordinates to do changes in the map script.) The benefit of a map besides a map script is that everybody easily can adjust the map with the editor if the editor supports all features. (Placement of TSL and CS still could be done via scripts since they require only a few lines compared to the thousands of lines of a map script.)
 
Last edited:
As I had another report of game failing to launch, I quickly updated and tried myself, no launching issue on my end with 1.0.0.328 so I need all your logs in a post in the bug report section please, I'll look at it this WE.
 
Top Bottom