1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Gedemon's Civilization, development thread

Discussion in 'Gedemon's Civilization, a total overhaul project' started by Gedemon, May 7, 2017.

  1. Knasp

    Knasp Warlord

    Joined:
    Sep 10, 2011
    Messages:
    266
    My game seems to be crashing when I end the first turn, on any Speed setting other than Standard. It loads for a few seconds before crashing.

    I'm not good at finding errors but Lua.log says:
    Code:
    GCO_GameScript: ---------------------------------------------------------------------------
    GCO_GameScript: - Updating Data on new turn for Barbarians
    GCO_PlotScript: - Culture Diffusion timer = 0.036999940872192 seconds
    GCO_UnitScript: - WARNING: unit is nil for GetUnitFromKey(65536,6), unit type = UNIT_SETTLER
    GCO_UnitScript: - WARNING: unit is nil for GetUnitFromKey(65536,0), unit type = UNIT_SETTLER
    GCO_UnitScript: - WARNING: unit is nil for GetUnitFromKey(65536,5), unit type = UNIT_SETTLER
    GCO_UnitScript: - WARNING: unit is nil for GetUnitFromKey(65536,2), unit type = UNIT_SETTLER
    GCO_UnitScript: - WARNING: unit is nil for GetUnitFromKey(65536,4), unit type = UNIT_SETTLER
    GCO_UnitScript: - WARNING: unit is nil for GetUnitFromKey(65536,7), unit type = UNIT_SETTLER
    GCO_UnitScript: - WARNING: unit is nil for GetUnitFromKey(65536,1), unit type = UNIT_SETTLER
    I'll stick to Standard speed for testing.

    UPDATE: Got some thoughts after playing a few short games, testing various features. I'm not expecting to see these things adressed atm, just making a note of it, in case people agree/disagree
    Spoiler Current state of mod - thoughts :

    • Science is still too quick compared to build times. You hardly have time to build a weapons-related building, when there's so much else you need to construct.
    • Equipment capture seems to work fine, including transferring of those captured resources to the city.
    • Additional personnel acquired from Goody huts are lost atm, unless you have room in your stock.Or are the personnel converted to regular population when you lack stock?
    • The current system of army recruitment is limiting, for example:
      You can't finish recruiting a Swordsmen unit because you're lacking like 100 swords. My suggestion is to let the recruitment finish, and that the unit's personnel who are lacking Swords instead get a backup (lower quality weapon), or simply stay in the Reserves.
    • Copper and resource placement? Right now I think Copper is counted as a bonus resource, and it seems that the map generation doesn't place much Copper. I'm not saying there should be Copper deposits everywhere, but Copper deposits should be easier to find and exploit than say Iron
    • Right now gold doesn't have any use. Maybe we can introduce some temporary use for it, until later redesign?
      • Maybe conversion of resources into utilities could cost some Gold? (I.e. Copper --> Bronze swords, etc.).
      • Maybe all city-buildings should cost gold to maintain, especially military ones
      • Maybe increase Unit upkeep?
      • Maybe repairing plundered tiles could cost Gold?
     
    Last edited: Oct 17, 2017
  2. Gedemon

    Gedemon Modder Super Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,566
    Location:
    France
    I'll have a look, i may need to define all speeds, ATM only standard is set. (the warnings are related to the city states units that have been removed on start)

    Agree with science, but there is a complete rework planned on that side. I'll balance a bit the speed for now.

    Personnel surplus is converted to population, need UI feedback I think.

    There is Copper almost everywhere, more than Iron, but I've not changed the deposit yet. We need to think of some fractal layer for resources.

    Recruitment will have to be adapted to the upgrade system.

    You're going to need that gold *soon*.

    Looking at the function available in the firetuner, it seems possible to loop through the item of an unit (and so maybe select which one to display), and maybe the member's type (not sure about the last one)

    question is: how many different item/members can we assign to an unit ?

    there is also the possibility to add an intermediate unit between 2 units type, with mixed members.
     
  3. Knasp

    Knasp Warlord

    Joined:
    Sep 10, 2011
    Messages:
    266
    Sounds good!

    Also I do have some questions about Units' "stats-boxes": what does the Materiel in the Frontlines do? Materiel reserves? Food in the Rear?

    Anyway, I wrote some comments and suggestions about the UI below, if you're interested.
    Spoiler :

    I would suggest changing the disposition of the info. Particularly removing some numbers/integers, using percentages instead. Maybe limiting the info available to the player, using categories and estimations. Also clarify some info that is easily misinterpreted.

    Or maybe just add a summary on the top of the box, with the most important data? Some exact numerical data could be kept in the bottom, and more useful numbers/percentages could stay up top.

    A crude example of how the layout could look:

    All rates in the example are made up.
    Basically, morale could be shown as either: high (67-100%), medium (34-66%) or low (1-33%), instead of giving the player the exact percentage/number.
    Same could go for other info because it will be easier for a player to comprehend (and more interesting) if you're only shown a limited representation of the data. I.e. 3 categories giving a hint of morale, rather than exact numbers.
     
    Last edited: Oct 17, 2017
  4. Gedemon

    Gedemon Modder Super Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,566
    Location:
    France
    I'm actually doing a lot of test on autoplay, I'm unsure, but some events may have changed their order, I have some trouble identifying new bugs related to handling damage change and healing, sometimes the damage from a combat at the beginning of a AI turn seems to occurs before the custom healing function could fire, meaning the mod try to heal an unit using data (personnel, equipment values) based on the health of the unit before the new combat, but comparing it to the data required for an unit of its type at the health it will have after the combat, leading to data corruption.

    nasty stuff, hours lost, I can't wait for the DLL source code, just so we can document ourselves the changes done in a patch...
     
  5. Gedemon

    Gedemon Modder Super Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,566
    Location:
    France
    Made a custom event to detect players turn start before it computes combat, seems to work, but now the event to detect city placement on the map is firing too late relatively to the custom turn start event (surely because it's meant to be used with UI elements, which are cached and called later than game core event...), and sometime the player #2 is trying to trade with cities of player #1 that are not yet initialized by the mod...

    *heavy sight*
     
  6. Knasp

    Knasp Warlord

    Joined:
    Sep 10, 2011
    Messages:
    266
    That sucks. Can we assist you somehow in finding/locating the problems? I'm afraid I don't know much about coding.
     
  7. Gedemon

    Gedemon Modder Super Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,566
    Location:
    France
    I'm coding and testing some workarounds, but this mod starts to become more and more complex code-side, and is assuming a specific calling order in events that may change with patches, so I've added more custom checks & debugging tools, hopping it doesn't slow down the whole thing too much.

    So if you're seeing messages like that after the next release, please quit the game and immediately post your lua.log before starting the game again (and try to keep a copy of the last 2-3 autosaves in a folder in case I'd like to see them):
    error.jpg

    On a side note, the change in the order in which the event are called is something to expect when Firaxis update the game core code, I can't blame them for that.

    But the desync between the UI functions and the game core functions are not helping for the "calling order" I'm talking about as the lack of some methods core-side is forcing us to use UI methods to get some objects (units, cities) properties...

    Hopefully with the base game looking finally almost in a "release" state after the last patch (that one was out precisely one year too early, I don't really remember how Civ6 ranks compared to the previous versions on that special ladder...), they may give us modders some love in the form of GameEvents similar to Civ5 or, maybe, even the DLL source code, who knows...

    Not even speaking of opening a new level of modding, the source code would also be a big help just for debugging and documenting the current methods available to us. And of course controlling what has changed between patches.

    I mean, I'm not even sure that the bugs I've found recently were caused by the last patch or just something I've not really paid attention to until I added new debug checks...
     
    Knasp likes this.
  8. Gedemon

    Gedemon Modder Super Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,566
    Location:
    France
    Updated on gitHub
    Code:
    - temporary remove city healing (again) as it also heals garrisoned units outside the mod's control, causing desyncs and corruption in units data
    - add on screen debug/warning/error messages
    - compatibility with Fall patch
    - some bug fixes
    Time for me to start thinking on how to implement the upgrade mechanism and its compatibility with the construction mechanism.
     
    Knasp likes this.
  9. Gedemon

    Gedemon Modder Super Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,566
    Location:
    France
    small fix
    Code:
    - add delayed healing for units involved in combat too early for the mod to handle them in the first pass.
     
    Knasp likes this.
  10. Knasp

    Knasp Warlord

    Joined:
    Sep 10, 2011
    Messages:
    266
    Played a couple of turns and noticed something really odd with the barbarians. Maybe it's the new patch? A barbarian Swordsmen unit spawned but was then transformed into a Warrior following my attack. But when I reloaded the auto-save and moved my Warrior on turn 15, the Swordsmen unit remained.

    See pictures below. I'm playing with all other mods and content disabled.
    Spoiler Weird barbarians :

    When I end turn 14 I get attacked by the barb Warrior and the Swordsmen unit spawns:
    If I attack the barb Warrior on turn 15, the Swordsmen transform into a Warrior:
    But if I instead move the Warrior south on turn 15, the Swordsmen stay unchanged:
    And on turn 16 or 17 another unit spawns:


    Attaching the savefile:
     

    Attached Files:

  11. Gedemon

    Gedemon Modder Super Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,566
    Location:
    France
    Surely a bug with the function to replace barbarian units to prevent too many swordsman in ancient era, but it shouldn't fire after the unit's first spawn, I'll have a look.
     
  12. Gedemon

    Gedemon Modder Super Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,566
    Location:
    France
    Small update, took me a lot of time to identify a kind of bug with the values returned by the game engine during combat, but I've finally implemented a tracker for all units HP as a workaround for the Events desynchronized calling order...
    Code:
    - use a virtual health value for units to remove any dependency to the core GetDamage() function that is not synchronized with the available events to track combats and custom healing.
     
    Last edited: Oct 27, 2017
    Knasp likes this.
  13. Gedemon

    Gedemon Modder Super Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,566
    Location:
    France
    Thanks to Leif, the mod has now its own subforum, I've started to copy some posts in their own threads, I'll finish when back from work.
     
    Knasp likes this.
  14. Gedemon

    Gedemon Modder Super Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,566
    Location:
    France
    Done, I've copied some posts of the first 15 pages (and moved some of the last page) to separate threads in the mod's forum

    This thread is now more about the core development (updates) and general questions, you can use the other threads (or create new ones) for questions or ideas about specific mechanisms of the mod.

    Still no suggestion of independent features please, but feel free to propose new features that could fit in the global scope of the mod.
     
  15. Gedemon

    Gedemon Modder Super Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,566
    Location:
    France
    Updated on GitHub
    Code:
    - add "War Horses" (Equipment) trained in stable from "Horses" (resource)
    - set Materiel to be used as "Equipment" for units
    - all equipment number are now relative to Personnel
    - change to UI: "Reserve" renamed "Camp", "Frontline" renamed "Ready for Battle", "Rear" renamed "Supply Train"
    - Reserve is now limited to what's needed in Frontline (unit's organization level will allow more reserve, when coded)
    - more materiel required by units, added materiel and food to plundering Barbarian Camps
     
  16. Gedemon

    Gedemon Modder Super Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,566
    Location:
    France
    Small bug fix on GitHub:
    Code:
    - bug fix : materiel wasn't detected as an equipment for supply line between cities and units and wasn't send, blocking healing.
    - clean code in GCO_UnitScript
     
  17. Gedemon

    Gedemon Modder Super Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,566
    Location:
    France
    Small update
    Code:
    - reactivate all game speed, "standard" still use the Marathon timeline with standard production speed.
    - add tables for Military Organization Levels
     
    Knasp likes this.
  18. stimprunk

    stimprunk Chieftain

    Joined:
    Oct 30, 2017
    Messages:
    4
    Hello!

    I'd found your mod at last weeken and think it so interesting. I know that it pre-alpha and not full playable now.

    There is my view on it.
    Fisrt, there are many resourse in game. And all of this you should be using. Try do not add more and more resourse, because it excessive load the game. Lategame more. When you try to understand what you have at late game you found bronse swords, wooden clubs, iron pikes. I think you can drop it to wooden/stone/bronse/iron weapon/supply. Until late game. when you should use tank, airplanes, guns. Also should be good to make obsolate not using resource.
    Luxury resource dont use now but I think that city population can use it to raise helth and efficient. Also some resource can be used to produce more science and culture. Forexample upper class can use 1 mercury to make 0.1 science.

    Same thinks about buildings. It's too many buildings in early game. Ancient society produce all goods artisanal method. Without specifical buildings. When you open archery you should bulding specific building to start build archers. It's delayed game. It better that bronse weapons city start produce when Bronse working technology dicovered. Another sight that weapons can producing at building which already in-game: armory, workshop. tanks and airplane may be produce at factory.

    City grow. You can't grow city without food producing buldings. My city has size 3. Demand food 22. I cant make so much food at city tiles. It's strange that peole cann't butchering cows without specifical building. My opinion that using all resource city population can without any buildings. But specifical building could increase efficiency. People can produse 1 food per 1 cow. Building can produce 2 food per 1 cow.
    Housing. Now all housing (else mod buildings) not work.I think it pre-alpha versions and it should be release at future. I can build city at desert and it have same housing as city at river with aqueduct and neighborhood.

    Worker. Now not itresting build any improvements at tile without resource. 3 farm give me +3 food, granary with wheat give me +15 food.

    Material. I have deficiency of material only at start of the game. When I have 3 or more cities I fogget about this resource. It may be when wood and stone is everywhere and builings that use it cheap and give 1 production.

    Units. Ranged unit is overpower now. Melee unit each attack use resource (personel, material equipment) but ranged unit dont use anything. Maybe ranged units use some supply each attack and cannot attack without supply. also melle units after mushketman also shoud use supply (niter) per attack.

    It's only my view on this mod. Anyway I will glad to play at full version, because found this mod very interesting.
     
  19. Gedemon

    Gedemon Modder Super Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,566
    Location:
    France
    Thanks for the feedback, always welcome, and there are some good points I'd like to answer.

    Yes, IMO there are too many resources, but on the UI, not in the mod.

    I'll try to hide obsolete resources, separate primary resources from products, and make also a separate screen for equipment.

    Equipment could also be grouped by type on some screen.

    But I do want to have many resources, there is a lot to do with the mod's framework, for example, what about plundering a barbarian camp near a lake and get a sword named Excalibur in the loot ? (well one sword in an unit equipped by thousands would/should not make a big difference in combat stats, but hey, that would give a nice background story to an unit... or the one killing it to stole the sword !)

    Or some unique buildings (kind of world wonders) making unique equipment in a class (like a blacksmith producing Damascus Steel Swords, or a Masamune workshop...)

    In later age, if we reintroduce some kind of corporation, we could use the mechanism to spread factories producing some modern unique equipment.

    Yes, but we need to define how we're going to represent population first.

    I agree, but it's already partially in the mod: each city has a "city center" building that represent the small artisans, that building produce a bit of everything (food from cows, sheep, grain, fish, etc... and some weapons from wood and stone), I need to add more (like bows and bronze weapons), and the specific buildings use/produce more resources or better equipment.

    Yes, there will be a health mechanism for that.

    True, but you may need that farm if we introduce rural population, an it may also be a prerequisite to resource spawning using project in cities.

    That will have to be balanced, yes.

    That's an interesting point, I plan to add some specific optional equipment used like ammo in late game (ie torpedoes for attack aircraft for example), and representing the supply lines for arrows may be too much, but we could have ranged units using "materiel" for each attack to represent that.
     
  20. Knasp

    Knasp Warlord

    Joined:
    Sep 10, 2011
    Messages:
    266
    I agree, having a lot of (secondary) resources opens up for more complexity, dynamic gameplay and interesting possibilities.

    Like smartphone factories, or automobile factories in order to produce cars for citizens (increasing trade/tourism and pollution).

    Actually having to produce and bring arrows is a really good idea. The main benefit of a sling was that you could find "ammo", i.e. pebbles just about everywhere. So, having a "Fletcher" building in order to produce arrows, would be just fine. But I can understand the need to reduce the overall building count. So maybe combine the Bowyer (Bowmaker) with the Fletcher (Arrowmaker) into one building? Although I guess representing arrow/ammo-making through Materiel is also acceptable, unless you want to keep track of flint arrows, bronze arrows, iron arrows, crossbow bolts, etc. I suppose they brought fletchers along in the Baggage train, who produced new arrows inbetween battles (if possible). There should be a cost to shooting (or possibility to run out of ammo temporarily), at least when attacking several turns in a row, imo.
     

Share This Page