Gedemon's Civilization, development thread

That's a good question, but the moment I release it, it will be a new start for the project. As in only the pre-city gameplay will be available, everything after will work in alone sandbox as there isn't any diplomatic code done yet, and as I have neutralized the current diplomacy (one of the part of civ6 modding that's quite easy to do is to remove a "game capabilities" when it's predefined, using a simple line of SQL/XML).

I'll wait for the April patch to see if nothing's broken, then mark the current github release as "preview .2" then, even if it doesn't have the scope I'd like it to have. And push the Tribe gameplay release to public testing after that.

In my opinion the current publicly available version of the mod should not be played past the mid-medieval era as it is now, for those who have tried it, what do you think ?
 
I've pushed a small update of the Assets mod for the April patch compatibility, I've not tested the gameplay.
 
I've uploaded the test version for the Tribe gameplay.

You'll need the updated Assets.

Steam version of YnAMP should work, just in case my local version is pushed on gitHub

Be warned that this version is a sandbox, there is no AI coded for the other Civilizations, no diplomacy is possible, it's just about testing how long you'll need to gather enough population to create a Settler/City. There is no point to continue playing after reaching that goal with this version.

Please note that a few actions for tribal settlements are not coded yet ("specialization" and "abandon" for external villages)

Diplomacy and AI will come later.

Change log:
Code:
- implement the Tribe mechanism, a pre-city game play loop for the human player
- add a new UI file for handling Tribe Settlement actions
- add various independent Tribes on the map
- add Culture Groups for Tribes, thanks to Boris Gudenuf, Gedemo
- add AI initialization framework, should be able to handle different AI for each computer players, using different Lua scripts in the mod or from modmods
- add minimal defensive AI for the Tribe mechanism
- add a "no movement" unit ability to set Garrison units for the AI
- add new simple AI operations (not used yet)
- add Caravan and Worker units for the Tribe mechanism
- add Title background
- add improvements for the Tribe game play ("Fortified Village", "Hunter Village", "Farmer Village")
- remove vanilla Barbarians and GoodyHuts generation, replaced by the Tribe mechanism
- add the Harbor as a Building in the City Center
- add Population requirement for Settlers and Builders
- add a "Renew Mercenary Contract" option to keep a mercenary under contract at a lower price for more turns
- mercenaries recruitment cost is relative to a Civilization treasury
- add Deer as a base resources for "dense" and "normal" forests
- add Shipyard, Lighthouse, Seaport to the visual representation of the Harbor adjacent to a coastal City when they are build
- rework placement of the Harbor representation (try to get a water plot with at least 2 consecutive adjacent land plots)
- show Harbors only on revealed plots
- remove "CAPABILITY_DIPLOMACY" from <GameCapabilities>, no contact are possible with other Civilizations at the moment, new Diplomacy will be implemented in steps (starting with Tribal diplomacy)
- allow Plantation on Forest
- allow Mines on Plains and Desert
- remove Food yield from Marsh and Jungle (to lower their high Pull values for Population Migration)
- tweak Migration values in relation with Tribal Villages
- handle Culture Group values in units, in relation with personnel/population exchange from cities, improvements, plots
- the mod player config should handle color changes for borders
- rework path finding for supply lines, with cost, trying to follow Rivers to the source of supply (Cities or improvements)
- add route placement path finding with limited spaghetti
- bug fix: can make Deal with a mercenary unit on the same plot of another of your units
- bug fix: some issues with the TSL table (Korea, Siam, Arabia, Babylon, Russia, China, Egypt
- bug fix: add leader fall back for England
- bug fix: remove all game modes from the setup screen
- bug fix: fix or add Civilizations.artdef for Kongo, Nubia, Ottoman, Rome, Siam, Sumeria
- bug fix: fix or add Civilization icons for Babylon, China, Egypt, England, Greece, Kongo, Japan, Norway, Nubia (use Ethiopia as placeholder), Ottoman, Rome, Siam, Sumeria
- bug fix: restore the <UnitAiInfos> table
- bug fix: unlock Governments from fake civics, instead of directly unlocking them with pPlayer:GetCulture() as the AI wasn't picking Governments unlocked this way

I've updated the installation instruction for those who want to try the previous "full" mod, it's now tagged as "preview .2"
 
Gave the tribal game-play a spin using the Large Europe map with true start locations, and here's how it went:

First attempt, as France, with no particular strategy. Conquered two villages, built one, with only one set of barbarians being somewhat of a threat. Used early assimilation, and it took 51 turns to found Paris.

Second attempt, as Rome, with the goal to beat my city time. Conquered two villages, and built three workers for resource gathering. Barbs were too far to pose a threat, so didn't build military beyond scouts. Waited too long to assimilate, so it took 44 turns to found Rome (although I had the material to build a settler several turns earlier).

Third attempt/s (6 in total), as Egypt... where I found out that floodplains are way too attractive for migration (especially with resources on them). TLDR; floodplains are borked for migration, long story:
  1. Take one, the population drained away so fast I couldn't build a scout by turn 4, and there were 11 people left by turn 17... RIP.
  2. Take two, I migrated west and attempted to force immigrate other villages to the main village, but most people just bailed into the countryside. Population eventually stagnated around 300ish.
  3. Attempted to simply smash the surrounding villages. No luck, population drain.
  4. Migrated east, northeast to floodplains. Initially successful. Smashed and rebuilt villages. Had the same issue of population drain and stagnation.
  5. Same migration as above, smacked villages, didn't rebuild. Had over 3500 population by turn 4. Made 2 workers. Population drain turns 6-12, then tapered off. Stagnated around 2100ish people.
  6. Same story as above until turn 15. Built a village to the south. By turn 21 the population was growing again. Started assimilating turn 28, and had Cairo founded by turn 36.
Cursed_Egypt_Start.jpg

Overall, I learned the following:
  • Using scouts to lure away threats is more material efficient than making armies to defend villages.
  • Timing assimilation relative to your material build up is key to achieving the earliest city.
  • If a scout can't make a return trip with loot, it generally isn't worth exploring that far.
  • Other civ village centres are balanced in the respect that they are way too expensive to invade prior to having a proper city (and units being temporary means invasions generally run out of momentum before conquest is achieved).
  • Although maybe not true for the final build, having workers built prior to founding a city will give you a serious leg up compared to waiting after the city is founded.
And most important, migration values on floodplains need tweaking. Other than that, I enjoyed myself. Great work as always!
 
Thanks for the report, I'll see what I can do for migration. I don't want to neutralize it completely, but as your objective is to gather population on a plot, it better not be impossible in some conditions.

I'll set the base "Pull" parameters of villages to be the best of all the plots it works on (the central plot an all adjacent plots), I think it makes sense that it should not be lower than any of them.
 
Update:
Code:
- balance: village "Pull" parameters for migration can't be lower than any of the adjacent plot (put the "Pull" value itself can be lower, as it's population-dependent), lack of Food still prioritize the "Push" value
- balance: remove "Sugar" from the "Food" resources list
- balance: all villages start with a minimal stock of Food
- balance: village get some Food from all adjacent plots, not just their own plot (but food may be to easy to get now, I may re-balance this)
- balance: allows Major Civilization AI players to use the "Tribe AI" when they don't have a City (they should spawn recon and defensive units now)
- balance: slower conversion of "Independent" culture in Village
- balance: "normalize" the initial population of Major Civilization villages (start with a population between 900 to 1100)
- add "Pillaged Turns Left" counter to tribe banners Tooltip
- bug fix: does not launch a turn on all Tribal villages for Major Civilizations players on each reload, only for the initialization turn
- bug fix: remove all villages ownership when starting a Migration
 
Thanks for the quick patch.
After giving the updated version a quick test, I can confirm that it works; it is now possible to set up Cairo in its default start position without population drain issues.

Quick question, how important are raw materials (stone/wood/clay/etc) for building materiel as a village (or is it just dependent on population)?
 
Thanks for the quick patch.
After giving the updated version a quick test, I can confirm that it works; it is now possible to set up Cairo in its default start position without population drain issues.

Quick question, how important are raw materials (stone/wood/clay/etc) for building materiel as a village (or is it just dependent on population)?
equally important, base number is 20 raw (stone/wood/clay) to produce 10 materiel, and population/slaves numbers affect the production factor (applied to the base number of raw resources used per turn)

the production ratio and base numbers are in GamePlay.xml
Spoiler :

Code:
    <TribalVillageResourcesConverted>
      
        <Row ImprovementType="IMPROVEMENT_BARBARIAN_CAMP_GCO"    ResourceType="RESOURCE_RICE"         MaxConverted="20"     ResourceCreated="RESOURCE_GRAIN"             Ratio="0.25"    />
        <Row ImprovementType="IMPROVEMENT_BARBARIAN_CAMP_GCO"    ResourceType="RESOURCE_WHEAT"         MaxConverted="20"     ResourceCreated="RESOURCE_GRAIN"             Ratio="0.25"    />
        <Row ImprovementType="IMPROVEMENT_BARBARIAN_CAMP_GCO"    ResourceType="RESOURCE_CATTLE"         MaxConverted="20"     ResourceCreated="RESOURCE_SMOKED_MEAT"         Ratio="0.25"    />
        <Row ImprovementType="IMPROVEMENT_BARBARIAN_CAMP_GCO"    ResourceType="RESOURCE_DEER"         MaxConverted="20"     ResourceCreated="RESOURCE_SMOKED_MEAT"         Ratio="0.25"    />
        <Row ImprovementType="IMPROVEMENT_BARBARIAN_CAMP_GCO"    ResourceType="RESOURCE_SHEEP"         MaxConverted="20"     ResourceCreated="RESOURCE_SMOKED_MEAT"         Ratio="0.25"    />
        <Row ImprovementType="IMPROVEMENT_BARBARIAN_CAMP_GCO"    ResourceType="RESOURCE_BANANAS"     MaxConverted="20"     ResourceCreated="RESOURCE_FRUITS"             Ratio="0.25"    />
        <Row ImprovementType="IMPROVEMENT_BARBARIAN_CAMP_GCO"    ResourceType="RESOURCE_FISH"         MaxConverted="20"     ResourceCreated="RESOURCE_SMOKED_MEAT"         Ratio="0.25"    />
        <Row ImprovementType="IMPROVEMENT_BARBARIAN_CAMP_GCO"    ResourceType="RESOURCE_CRABS"         MaxConverted="20"     ResourceCreated="RESOURCE_SMOKED_MEAT"         Ratio="0.25"    />
        <Row ImprovementType="IMPROVEMENT_BARBARIAN_CAMP_GCO"    ResourceType="RESOURCE_CLAY"         MaxConverted="20"     ResourceCreated="RESOURCE_MATERIEL"         Ratio="0.5"                         ProductionType="PRODUCTION_MATERIEL"    />
        <Row ImprovementType="IMPROVEMENT_BARBARIAN_CAMP_GCO"    ResourceType="RESOURCE_STONE"         MaxConverted="20"     ResourceCreated="EQUIPMENT_STONE_AXES"         Ratio="4"    Era="ERA_ANCIENT"        ProductionType="PRODUCTION_EQUIPMENT"    />
        <Row ImprovementType="IMPROVEMENT_BARBARIAN_CAMP_GCO"    ResourceType="RESOURCE_STONE"         MaxConverted="20"     ResourceCreated="EQUIPMENT_STONE_SPEARS"     Ratio="4"     Era="ERA_CLASSICAL"        ProductionType="PRODUCTION_EQUIPMENT"    />
        <Row ImprovementType="IMPROVEMENT_BARBARIAN_CAMP_GCO"    ResourceType="RESOURCE_STONE"         MaxConverted="20"     ResourceCreated="RESOURCE_MATERIEL"         Ratio="0.5"                            ProductionType="PRODUCTION_MATERIEL"    />
        <Row ImprovementType="IMPROVEMENT_BARBARIAN_CAMP_GCO"    ResourceType="RESOURCE_WOOD"         MaxConverted="20"     ResourceCreated="RESOURCE_MATERIEL"         Ratio="0.5"                            ProductionType="PRODUCTION_MATERIEL"    />
        <Row ImprovementType="IMPROVEMENT_BARBARIAN_CAMP_GCO"    ResourceType="RESOURCE_WOOD"         MaxConverted="20"     ResourceCreated="EQUIPMENT_WOODEN_CLUB"     Ratio="4"    Era="ERA_ANCIENT"        ProductionType="PRODUCTION_EQUIPMENT"    />
        <Row ImprovementType="IMPROVEMENT_BARBARIAN_CAMP_GCO"    ResourceType="RESOURCE_WOOD"         MaxConverted="20"     ResourceCreated="EQUIPMENT_WOODEN_SPEARS"     Ratio="4"     Era="ERA_CLASSICAL"        ProductionType="PRODUCTION_EQUIPMENT"    />
        <Row ImprovementType="IMPROVEMENT_BARBARIAN_CAMP_GCO"    ResourceType="RESOURCE_WOOD"         MaxConverted="20"     ResourceCreated="EQUIPMENT_WOODEN_BOWS"     Ratio="2"     Era="ERA_CLASSICAL"        ProductionType="PRODUCTION_EQUIPMENT"    />
        <Row ImprovementType="IMPROVEMENT_BARBARIAN_CAMP_GCO"    ResourceType="RESOURCE_COPPER"         MaxConverted="20"     ResourceCreated="EQUIPMENT_BRONZE_SPEARS"     Ratio="4"     RequiredTech="TECH_BRONZE_WORKING"    ProductionType="PRODUCTION_EQUIPMENT"    />
        <Row ImprovementType="IMPROVEMENT_BARBARIAN_CAMP_GCO"    ResourceType="RESOURCE_COPPER"         MaxConverted="20"     ResourceCreated="EQUIPMENT_BRONZE_SWORDS"     Ratio="4"     RequiredTech="TECH_BRONZE_WORKING"    ProductionType="PRODUCTION_EQUIPMENT"    />
        <Row ImprovementType="IMPROVEMENT_BARBARIAN_CAMP_GCO"    ResourceType="RESOURCE_COPPER"         MaxConverted="20"     ResourceCreated="EQUIPMENT_BRONZE_SPEARS"     Ratio="4"     Era="ERA_ANCIENT"        ProductionType="PRODUCTION_EQUIPMENT"    IsBarbarian="1"/>
        <Row ImprovementType="IMPROVEMENT_BARBARIAN_CAMP_GCO"    ResourceType="RESOURCE_COPPER"         MaxConverted="20"     ResourceCreated="EQUIPMENT_BRONZE_SWORDS"     Ratio="4"     Era="ERA_ANCIENT"        ProductionType="PRODUCTION_EQUIPMENT"    IsBarbarian="1"/>
        <Row ImprovementType="IMPROVEMENT_BARBARIAN_CAMP_GCO"    ResourceType="RESOURCE_COPPER"         MaxConverted="20"     ResourceCreated="RESOURCE_MATERIEL"         Ratio="0.5"                            ProductionType="PRODUCTION_MATERIEL"    />
        <Row ImprovementType="IMPROVEMENT_BARBARIAN_CAMP_GCO"    ResourceType="RESOURCE_IRON"         MaxConverted="20"     ResourceCreated="EQUIPMENT_IRON_SPEARS"     Ratio="4"     Era="ERA_CLASSICAL"        ProductionType="PRODUCTION_EQUIPMENT"    />
        <Row ImprovementType="IMPROVEMENT_BARBARIAN_CAMP_GCO"    ResourceType="RESOURCE_IRON"         MaxConverted="20"     ResourceCreated="EQUIPMENT_IRON_SWORDS"     Ratio="4"     Era="ERA_CLASSICAL"        ProductionType="PRODUCTION_EQUIPMENT"    IsBarbarian="1"/>
        <Row ImprovementType="IMPROVEMENT_BARBARIAN_CAMP_GCO"    ResourceType="RESOURCE_IRON"         MaxConverted="20"     ResourceCreated="RESOURCE_MATERIEL"         Ratio="0.5" Era="ERA_CLASSICAL"        ProductionType="PRODUCTION_MATERIEL"/>
        <Row ImprovementType="IMPROVEMENT_BARBARIAN_CAMP_GCO"    ResourceType="RESOURCE_MATERIEL"     MaxConverted="5"     ResourceCreated="EQUIPMENT_SLINGS"             Ratio="10"                            ProductionType="PRODUCTION_EQUIPMENT"/>
      
      
        <Row ImprovementType="IMPROVEMENT_GOODY_HUT_GCO"        ResourceType="RESOURCE_RICE"         MaxConverted="20"     ResourceCreated="RESOURCE_GRAIN"             Ratio="0.25"    />
        <Row ImprovementType="IMPROVEMENT_GOODY_HUT_GCO"        ResourceType="RESOURCE_WHEAT"         MaxConverted="20"     ResourceCreated="RESOURCE_GRAIN"             Ratio="0.25"    />
        <Row ImprovementType="IMPROVEMENT_GOODY_HUT_GCO"        ResourceType="RESOURCE_CATTLE"         MaxConverted="20"     ResourceCreated="RESOURCE_SMOKED_MEAT"         Ratio="0.25"    />
        <Row ImprovementType="IMPROVEMENT_GOODY_HUT_GCO"        ResourceType="RESOURCE_DEER"         MaxConverted="20"     ResourceCreated="RESOURCE_SMOKED_MEAT"         Ratio="0.25"    />
        <Row ImprovementType="IMPROVEMENT_GOODY_HUT_GCO"        ResourceType="RESOURCE_SHEEP"         MaxConverted="20"     ResourceCreated="RESOURCE_SMOKED_MEAT"         Ratio="0.25"    />
        <Row ImprovementType="IMPROVEMENT_GOODY_HUT_GCO"        ResourceType="RESOURCE_BANANAS"     MaxConverted="20"     ResourceCreated="RESOURCE_FRUITS"             Ratio="0.25"    />
        <Row ImprovementType="IMPROVEMENT_GOODY_HUT_GCO"        ResourceType="RESOURCE_FISH"         MaxConverted="20"     ResourceCreated="RESOURCE_SMOKED_MEAT"         Ratio="0.25"    />
        <Row ImprovementType="IMPROVEMENT_GOODY_HUT_GCO"        ResourceType="RESOURCE_CRABS"         MaxConverted="20"     ResourceCreated="RESOURCE_SMOKED_MEAT"         Ratio="0.25"    />
      
        <Row ImprovementType="IMPROVEMENT_GOODY_HUT_HUNT"        ResourceType="RESOURCE_RICE"         MaxConverted="20"     ResourceCreated="RESOURCE_GRAIN"             Ratio="0.25"    />
        <Row ImprovementType="IMPROVEMENT_GOODY_HUT_HUNT"        ResourceType="RESOURCE_WHEAT"         MaxConverted="20"     ResourceCreated="RESOURCE_GRAIN"             Ratio="0.25"    />
        <Row ImprovementType="IMPROVEMENT_GOODY_HUT_HUNT"        ResourceType="RESOURCE_CATTLE"         MaxConverted="20"     ResourceCreated="RESOURCE_SMOKED_MEAT"         Ratio="0.25"    />
        <Row ImprovementType="IMPROVEMENT_GOODY_HUT_HUNT"        ResourceType="RESOURCE_DEER"         MaxConverted="20"     ResourceCreated="RESOURCE_SMOKED_MEAT"         Ratio="0.75"    />
        <Row ImprovementType="IMPROVEMENT_GOODY_HUT_HUNT"        ResourceType="RESOURCE_SHEEP"         MaxConverted="20"     ResourceCreated="RESOURCE_SMOKED_MEAT"         Ratio="0.25"    />
        <Row ImprovementType="IMPROVEMENT_GOODY_HUT_HUNT"        ResourceType="RESOURCE_BANANAS"     MaxConverted="20"     ResourceCreated="RESOURCE_FRUITS"             Ratio="0.25"    />
        <Row ImprovementType="IMPROVEMENT_GOODY_HUT_HUNT"        ResourceType="RESOURCE_FISH"         MaxConverted="20"     ResourceCreated="RESOURCE_SMOKED_MEAT"         Ratio="0.25"    />
        <Row ImprovementType="IMPROVEMENT_GOODY_HUT_HUNT"        ResourceType="RESOURCE_CRABS"         MaxConverted="20"     ResourceCreated="RESOURCE_SMOKED_MEAT"         Ratio="0.25"    />
      
        <Row ImprovementType="IMPROVEMENT_GOODY_HUT_FARM"        ResourceType="RESOURCE_RICE"         MaxConverted="20"     ResourceCreated="RESOURCE_GRAIN"             Ratio="0.75"    />
        <Row ImprovementType="IMPROVEMENT_GOODY_HUT_FARM"        ResourceType="RESOURCE_WHEAT"         MaxConverted="20"     ResourceCreated="RESOURCE_GRAIN"             Ratio="0.75"    />
        <Row ImprovementType="IMPROVEMENT_GOODY_HUT_FARM"        ResourceType="RESOURCE_CATTLE"         MaxConverted="20"     ResourceCreated="RESOURCE_SMOKED_MEAT"         Ratio="0.75"    />
        <Row ImprovementType="IMPROVEMENT_GOODY_HUT_FARM"        ResourceType="RESOURCE_DEER"         MaxConverted="20"     ResourceCreated="RESOURCE_SMOKED_MEAT"         Ratio="0.25"    />
        <Row ImprovementType="IMPROVEMENT_GOODY_HUT_FARM"        ResourceType="RESOURCE_SHEEP"         MaxConverted="20"     ResourceCreated="RESOURCE_SMOKED_MEAT"         Ratio="0.75"    />
        <Row ImprovementType="IMPROVEMENT_GOODY_HUT_FARM"        ResourceType="RESOURCE_BANANAS"     MaxConverted="20"     ResourceCreated="RESOURCE_FRUITS"             Ratio="0.25"    />
        <Row ImprovementType="IMPROVEMENT_GOODY_HUT_FARM"        ResourceType="RESOURCE_FISH"         MaxConverted="20"     ResourceCreated="RESOURCE_SMOKED_MEAT"         Ratio="0.25"    />
        <Row ImprovementType="IMPROVEMENT_GOODY_HUT_FARM"        ResourceType="RESOURCE_CRABS"         MaxConverted="20"     ResourceCreated="RESOURCE_SMOKED_MEAT"         Ratio="0.25"    />
      
    </TribalVillageResourcesConverted>

"IMPROVEMENT_BARBARIAN_CAMP_GCO" is the "central/fortified village" where materiel is created.

I'm currently testing the operation function
Code:
pPlayer:GetAi_Military():StartScriptedOperationWithTargetAndRally(sOperationType, opponentPlayerID, targetPlotID, rallyPlotID)
to set some objectives to the AI (capture nearby villages, going back home before disbanding, ...), but it generates a lot of crashes/freeze so I'm trying to figure if there are limitations.

and as there is no in game methods to control running operations (thankfully there are AI logs), I have to code something to prevent adding the same units to multiple operations and figure out other stuff like that (maybe limit the number of operation set per turn, or one type of operation per civ, or one type of operation in game per turn, or one type of operation active in game at the same time...)
 
Update, introducing two custom AI Operations in the mod. A decisive step if it doesn't generate issues.

Code:
- add framework to handle AI operations for units
- add small offensive decision to Strategic AI: the AI may send a few units to try to capture a neutral or enemy Village close of the location of one of their Fortified village
- add "go home" decision to strategic AI, the AI may try to send back disbanding (or about to start disbanding) units to the closest Fortified Village (and get the resources that may have been collected by the unit)
- add "Create Garrison" action in "Fortified Villages". Garrisoned units can't move but do not disband.
- bug fix: the AI only weight enemy strength in their village area from their visible plots
- bug fix: do not add population from pillaged Villages on "Start Migration" action
- bug fix: try to prevent spawning of new units over a Garrisoned AI unit as GameCore will want to move the garrisoned unit to respect 1UPT, won't be able to (as it's immobile) and will then destroy it without bothering to try to move the spawned unit instead... Surely Firaxis way to tell modders that they really, really like 1UPT and would prefer us to not try to mod it.
- less spam in Lua.log, for easier debugging of the AI decisions there

The game seems to allow only one instance of each operation type active per AI player, I may need to add multiple copy of some types so that the mod's AI handling the original Barbarians tribe (aka "player 63") could launch an operation type on multiple locations at the same time.
 
Last edited:
Looks very promising I had few "issues" that I noticed or maybe some are features:
- If I created Garrisoned unit in Village I was no longer able to build new temp Conscript Melee units, other temp units were OK.
- When I selected start migration it created Caravan unit which didn't seem to have any action items available and just also abended the original village.
- In one game computer player managed to create city before me and their permanent melee unit just passed though my village like it was my own unit.
- After you create a City using Settler village's seem to still stay active and keeps collecting resources from other villages but they are not for the city.
- After creating a City I started to get loads of "Improvement owner is not the Village owner at ..." errors
- I was able to create more Settler from the Village while having a City already in place (seems to be much easier to build more Cities than trying to build a Settler in a City).

Included a pic to show Villages still active and not assimilated even if within Citi limits and creating new Settlers from the original Village.
 

Attachments

  • Norway_04.png
    Norway_04.png
    7.2 MB · Views: 129
Thanks for the report !

Anything past the first city creation will most likely fail, as I've not coded the transition yet.

You should be able to conscript an unit even if there is a garrisoned melee unit in the village (the conscript would spawn on an adjacent plot ,but you should not be able to create a garrison of there is already a melee unit), if possible I'd like to see the mouse over tooltip in your case

It's a UI bug I need to fix for Caravans, for now you need to unselect the Caravan then select it again by clicking on its flag directly (which may be tricky if there is another unit on the tile) to show the settlement menu.

ATM other civilization are at peace with you at start (that will change), in that case their units don't pillage your village (and your units don't pillage their villages)

And yes, I know it's not easy to figure out what's a bug and what's a feature, for now assume a bug and report. If it's a feature then it means the UI may need some work, I'm trying to keep note on that.
 
Last edited:
Looks like that when playing as Germany, if I have garrisoned unit in the Village, I can keep creating new melee units, but they do not appear anywhere but population goes down.
When I played as different nation (Egypt) I didn't have the problem.
 

Attachments

  • German_01.png
    German_01.png
    961.2 KB · Views: 127
  • German_02.png
    German_02.png
    2.1 MB · Views: 119
Just noticed that disbanding worker unit does not increase slave population in Village (disbanded inside the village).
Also noticed that in this game as Germany I can now create melee units. Very odd and not sure what's causing it to fail in some games.
 
Looks like that when playing as Germany, if I have garrisoned unit in the Village, I can keep creating new melee units, but they do not appear anywhere but population goes down.
When I played as different nation (Egypt) I didn't have the problem.
If it happens again, I'd like to see the lua log from that turn.
Just noticed that disbanding worker unit does not increase slave population in Village (disbanded inside the village).
Also noticed that in this game as Germany I can now create melee units. Very odd and not sure what's causing it to fail in some games.
disbanded units send back population/resource to the "Fortified village", not "satellite villages"
 
I've played 2 Games with the recent version of the Mod, both on default Settings (standard Map/Speed, Prince Level..etc):

In my 1st Game: As I wasn't completely familiar with how the Tribes in your Mod work (long time since I've read about it, but since I haven't played it, I forgot most of it), I decided to not read here about it, but jump right into the Game and see how it will be without knowing anything about it.
I managed to pillage some other Tribes till my Skirmisher disbanded. Since I had some "Satellite Villages" around my "Fortified Village", I decided to migrate it's population to another Satellite Village that was on a better Position and far away from Barbarians (that didn't attack me, but I didn't want to lose the Fortified Village due to a possible Barbarian attack). I got the Caravane Unit but I couldn't do anything with it. I moved it to unowned tiles, my "satellite villages" and back to the "fortified village" but there was no option to do anything with it. some Turns Later the "Fortified Village" vanished and I couldn't do any action with the "satellite villages" (The UI was working but when trying to choose an action I just get Errors). I couldn't continue the Game so I quit it.
I think Caravanes should only get built when you have a Settler Unit, right?

In the second run (after getting educated): (I don't know if it's a Feature or a Bug, but) I noticed that the Food Yield that get gathered, fluctuate a lot between Turns (not each turn, sometimes it takes some more turns to change for a village). One turn it's +2, in the next one -1 (just an example). I decided to put some more Turns just testing how my actions affect that, but it isn't tied to that. I spent some turns just hitting next without doing anything else, but the Food Yields of each Village where changing despite that.
Usinge the Immigration Lense I noticed that when the Population Immigration (not the Village action) of a Village to/from other tiles changes, the Food Yield generation also changes with it (but not always). And Changing The Position of a Worker also had Effect on Food generation (I'm not sure though, could also come from Immigration).
Because I spent lots of Turns without focusing on gathering resources for a City efficiently, I didn't manage to settle a city till turn 64.
What happens when there is 2 tiles between 2 Villages and you place a Worker in that only Tile between the two villages? Do the worker just double the Yields and the two Villages get equal shares of that?

Some Notes:
- I think Units that pillage a Village should get a +1 Turn to the usual disbanding Time, so they can stay a bit longer on the Map, because they were successful. And/or:
- After Individual Units get dispanded, there could be a coul down (3-4 Turns) specifically for them in their original City, till you can train them again (but being able to create more of the same Type), and when you do, they could get a +1 Turn (or more dependant on how far they got from the original City last time active). (or get the +1 from each pillaged Village from the last time active, if the above note doesn't make it).
- As you can't repair pillaged Villages 4 Tiles further away from the Central Village, what if each "Satellite Village" between the "Fortified Village" and the "pillaged Village" could increase that radius by 1. So if there is 5 Tiles between a "pillaged Village" and a "fortified village", but there is a "Satellite Village" between them, then it can still get repaired.

Some other Notes:
- You can disable the Unit Actions/Operations that don't play a role in the tribal start (such as Pillage Action) with "MODIFIER_ALL_UNITS_DISABLE_OPERATION".
- About the Issue (I'm not sure if it's really one or a feature) of Units that move to/through a Village and this latter getting Pillaged: You can use lua to change the TerrainType under a Village (In Touhmas' Mod, the Terrains didn't change appearance when reloading the save file, so you don't need an Artdefs for the terrains) to something like "TERRAIN_GRASS_ENGLAND" if the Villages belong to England, while already having that TerrainType Movement Cost set to something like +6 in the database, Units with lower movement points can't move to those tiles, and using "MODIFIER_PLAYER_UNITS_ADJUST_MOVEMENT" with requirement "PLOT_IS_TERRAIN_GRASS_ENGLAND" with "REQUIREMENT_PLOT_TERRAIN_TYPE_MATCHES" to give back +5 Movement to your Units on that Terrain, they will be the only ones who can enter your villages.*(additions below)

Although I just played 2 Games yet and the Tribe System is in it's early dev stage and there is no AI coded for that, I still wanted to give this Feedback, as I really liked The Idea and I see lots of Potential in it (in your Tribe Systeme I mean):
While Playing those Games, I noticed that the whole Tribal Game was mostly about sending Scouts to explore surrounding Tiles (not very far from the central village), creating Mili/Garisoned Units to defend a Tribe and ignore them when there is nothing to do with them and watching for Numbers and clicking next till you can settle a City. And Pillaging is way to easy. There is no much interaction between the Player and the Map, and at some point, you just want to get that City ASAP. So I have 2 Ideas that could improve the Tribal start (although there are better ones, or you can expand on them):

- *Other Units could still pillage a Village with an Action similar to range Attack (maybe just that). The Villages could have similar Tribe Bannars as in Barbarian Clans Mode, but with the conversion bar changed to act as a Health/Defense Bar. So in order to Pillage a Village you have to decrease its health/defense till 0, when you can finally enter that Village (using lua again to revert its TerrainType). This could be more engaging if Pillaging those Villages is very protable for the Player. (Lot of work to code this for AI, so take it with some salt). (if it's possible to give a tile to a Player even if he doesn't have settled a city yet, then you don't need to change Terrains of villages, but give their tiles directly to the player - when coding this with lua you just need the argument of the Player ID, so perhaps it's possible, but I haven't tested it yet without cities already settled)

- There could be some Animal Units that can be Hunted. They could have a Max of 1 MP or immobile on their own (like the garrisoned Units) but have their movement hardcoded based on requirements (like only between 3-4 Turns , and then only to a tile not adjacent to a "Human" Unit), so while they are slow, Units could easy catsh/hunt them. You can look at the Herdsman Mod to see how the Author made those Animal Resources movable as Units.

Some Database Error Logs:
Spoiler Database.log: :
Code:
[1303296.853] [Localization] ERROR: UNIQUE constraint failed: LocalizedText.Language, LocalizedText.Tag
[1303296.853] [Localization]: While executing - 'insert into LocalizedText('Tag', 'Language', 'Text') values (?, ?, ?);'
[1303296.853] [Localization]: In XMLSerializer while inserting row into table insert into LocalizedText('Tag', 'Language', 'Text') with  values (LOC_UNIT_LINE_INFANTRY_NAME, en_US, Line Infantry, ).
[1303296.853] [Localization]: In XMLSerializer while updating table LocalizedText from file ExternalText.xml.
[1303296.853] [Localization] ERROR: UNIQUE constraint failed: LocalizedText.Language, LocalizedText.Tag
[1303304.636] [Gameplay]: Validating Foreign Key Constraints...
[1303304.706] [Gameplay]: Passed Validation.
[1303315.242] [Database] ERROR: UNIQUE constraint failed: IconTextureAtlases.Name, IconTextureAtlases.IconSize
[1303315.242] [Database]: While executing - 'insert into IconTextureAtlases('Name', 'IconSize', 'IconsPerRow', 'IconsPerColumn', 'Filename') values (?, ?, ?, ?, ?);'
[1303315.242] [Database]: In XMLSerializer while inserting row into table insert into IconTextureAtlases('Name', 'IconSize', 'IconsPerRow', 'IconsPerColumn', 'Filename') with  values (ICON_ATLAS_MISSING_UNITS_PORTRAITS, 256, 10, 10, MissingUnitsPortraits_256, ).
[1303315.242] [Database]: In XMLSerializer while updating table IconTextureAtlases from file C:/Users/1/Documents/My Games/Sid Meier's Civilization VI/Mods/GCOAssets-master/Data/WarfareExpanded_Icons_UnitPortraits.xml.
[1303315.242] [Database] ERROR: UNIQUE constraint failed: IconTextureAtlases.Name, IconTextureAtlases.IconSize
[1303315.321] [Database] ERROR: UNIQUE constraint failed: IconTextureAtlases.Name, IconTextureAtlases.IconSize
[1303315.322] [Database]: While executing - 'insert into IconTextureAtlases('Name', 'IconSize', 'IconsPerRow', 'IconsPerColumn', 'Filename') values (?, ?, ?, ?, ?);'
[1303315.322] [Database]: In XMLSerializer while inserting row into table insert into IconTextureAtlases('Name', 'IconSize', 'IconsPerRow', 'IconsPerColumn', 'Filename') with  values (ICON_ATLAS_MISSING_UNITS, 32, 10, 5, MissingUnitsFlags_32, ).
[1303315.322] [Database]: In XMLSerializer while updating table IconTextureAtlases from file C:/Users/1/Documents/My Games/Sid Meier's Civilization VI/Mods/GCOAssets-master/Data/WarfareExpanded_Icons_Units.xml.
[1303315.322] [Database] ERROR: UNIQUE constraint failed: IconTextureAtlases.Name, IconTextureAtlases.IconSize

Spoiler Modding Log: :
Code:
[1303283.511] LocalizedText - Loading Gameplay/GamePlayText_it_IT.xml
[1303283.527] Warning: Unable to load C:/Users/1/Documents/My Games/Sid Meier's Civilization VI/Mods/871861883_yet_not_another_maps_pack/Gameplay/GamePlayText_it_IT.xml
[1303283.527] Warning: LocalizedText - Failed loading XML.
[1303283.527] LocalizedText - Loading Gameplay/GamePlayText_ja_JP.xml


[1303291.956] Applying Component - YNAMP_USER_CUSTOMIZATION (UpdateDatabase)
[1303291.970] UpdateDatabase - Loading custom.sql
[1303291.971] Warning: UpdateDatabase - Error Loading SQL.
[1303291.983] UpdateDatabase - Loading custom.xml
[1303291.983] Warning: UpdateDatabase - Error Loading XML.
[1303291.984] Applying Component - GCO_DEFAULT_COMPONENT (UpdateDatabase)


[1303296.310] UpdateDatabase - Loading Data/CityNames.xml
[1303296.626] UpdateDatabase - Loading custom.sql
[1303296.626] Warning: UpdateDatabase - Error Loading SQL.
[1303296.637] UpdateDatabase - Loading custom.xml
[1303296.638] Warning: UpdateDatabase - Error Loading XML.
[1303296.645] Applying Component - GCO_DEFAULT_LOC (UpdateText)
[1303296.646] Creating database save point.
[1303296.646] LocalizedText - Loading Data/CivilizationTable.sql
[1303296.659] LocalizedText - Loading Text/ExternalText.xml
[1303296.853] Error parsing C:/Users/1/Documents/My Games/Sid Meier's Civilization VI/Mods/Civ6-GCO-master/Text/ExternalText.xml
[1303296.853] Warning: LocalizedText - Failed loading XML.
[1303296.853] LocalizedText - Loading Text/CityNamesText.xml
[1303297.195] LocalizedText - Loading Text/GameText.xml
[1303297.456] LocalizedText - Loading Text/NameText.xml
[1303297.531] LocalizedText - Loading customText.xml
[1303297.547] Warning: Unable to load C:/Users/1/Documents/My Games/Sid Meier's Civilization VI/Mods/Civ6-GCO-master/customText.xml
[1303297.547] Warning: LocalizedText - Failed loading XML.
[1303297.547] LocalizedText - Loading Text/CivilizationsText.sql


[1303313.802] Reloading icons.
[1303315.392] Reloading colors.
[1303320.751] Successfully reconfigured game.
 
Last edited:
Thanks for the report !

The next version should fix the UI bug with the Caravan (currently you may have to unselect it then reselect it by clicking on the flag, not the tile for the menu to be shown)

I'll have a look at the Food yield, the current UI lacks the details available when you have a city on its panel (ie what's produced or from where you get it), but I'll keep work on that part minimal as long as it's not decided if the Tribe state is something we want the human to be able to play or not.

All village collect (a portion of) food from its tiles (the one they're on, and the adjacent tiles) base "Food" yield, but also convert some raw resources (wheat, rice, ...) to food resources, half the stock from satellite villages (like the other type of resources) is also transferred to the central/fortified village, but using an integer to prevent rounding error, so it's not exactly half the food if the collected value is an odd number, which could explain a 1-2 food variation each turn. Workers also transfert any collected raw food resources to the central village.

Resources are collected at full yield even on shared tiles at the moment, assuming at the scale of the game there is no way 300 slaves or a few thousand people will manage to exploit all its resources yield each game turn, that would be a question for later eras.

Thanks for pointing the modifier for operations, i don't know if I can use it the way I'd like, I'll see when I get there.

Not sure what you mean by the second issue (if you don't know if it's a bug or a feature, it's worth reporting, either it's really a bug, or the UI need clarification), but I thought the adjust movement modifiers with a plot requirement only apply on the starting plot ? (for pathfinder processing time I suppose)
 
The second Issue: Is it possible that AI Units could just pillage a Village unintentionally (pathfinding) ? and the Human Player could also Pillage one by accident.

nvm. I got so used to the hardcoded stuff in Civ VI, that I forgot that it's actually your code (and you can easily change how it works)... :hammer2:

Haven't thought it out. I'm not sure if the Pathfinding calculates movement modifiers for units' adjacent Terrains as well.
 
Last edited:
yep as it seems I can't code the AI behavior tree to pillage outside territory. We can't own territory without cities BTW (or we couldn't last time I tried)

I've pushed an update yesterday to test some issues in MP, with some more debug output in the lua.log, but with a few bugfix too:

Code:
- bug fix : always show Settlement action screen when selecting a Caravan unit during a Migration
- bug fix : update info on the settlement action screen when moving the Caravan to another plot
- bug fix : the Caravan need a movement point to create a settlement
- bug fix : always show Diplomacy action screen when selecting a Mercenary unit
- bug fix : some issues when updating Village ownership
- bug fix : reset migration values each turn, to try to prevent possible cases where the Food Pull value was still >1  without starvation, resulting in high migration without motivation
- bug fix : prevent an error with garrisoned units when the AI tribe was iterating its units to check which ones to sent back home
 
Another small update
Code:
- bug fix : Caravan and Worker can be captured
- balance : other players can now capture the Villages abandoned by a player on Migration
- AI : Create Ranged units if possible for small offensive operations
- AI : Calculate Ranged strength when checking for threats and try to create Ranged units if needed for defense
 
Back
Top Bottom