Defeated ranged unit still has unit shield visible?

Knasp

Warlord
Joined
Sep 10, 2011
Messages
266
Encountered this weird (graphical?) bug today. After defeating a barbarian Peltast band and clearing the Barbarian outpost, their unit shield was still visible on the plot. Maybe it has to do with the possibility to stack melee units and ranged.

Anyway, attached is a screenshot from 1-2 turns later (when I noticed it) and the save file. Also attached are the log files.

Another thing that's not a bug but still an issue. It seems to me that Material is being used first and foremost to make weapons, instead of being prioritized for the City production. For example, a builder unit seems to be produced with low efficiency due to Materiel being used to make weapons, in the beginning. Until weapons are fully stocked.

//Also Algerian Civ doesn't have City names, but I guess that's another issue. The city is called LOC_... or something.
 

Attachments

Thanks !

I will replace some of the asset files to use the latest releases of @Deliverator and @Wolfdog's mods, so I'm not going to look at any artdef compatibility issues on my side before that, as I may have to update them too.

We need a way to select what you want to prioritize in cities. Could be possible with fake buildings available to the human players only (because in another case you will want the resources to be affected to buildings conversion before units production else production may be slowed by lack of equipment)

(and I've reached the point where I have trouble understanding my own code there, no way I'm going to make it more complex to allow prioritization on context)

The simplified civs are placeholders, we'll edit them (and their cities lists) as we decide which ones to keep in the mod, ATM I'm trying to identify which parts of the UI we can mod to allow dynamic change of names, colors and other civ-related properties.
 
We need a way to select what you want to prioritize in cities. Could be possible with fake buildings available to the human players only (because in another case you will want the resources to be affected to buildings conversion before units production else production may be slowed by lack of equipment)
Hmmm. I do think City production should be prioritized over war materiel, in all cases. But if it's to complicated to write the code to prioritize according to the current city production, then we need some other solution.

How about capping the share of Materiel production that goes to war production every turn? Maybe 66-95% of Materiel could be reserved for City production?
Then you could add a city project like: "Stock war materiel", which allows the City to use more of its Materiel for forging weapons and armour.

You could even have policy cards to regulate how big the share of Materiel going to weapons should be. The default could be a low share, like 2-5%, while policy cards could bump this up to a larger share. That would make sense, since requisitioning materials for making weapons and armour and organising the logistics of such an operation would require instituting reforms.
 
Now that I think of it, there may be a bug somewhere because what's you are describing shouldn't happen, Materiel is not used for equipment production, except Slings (and the temporary Uniform resource) at a ratio that shouldn't affect your stock.

Try to check the city panel to see how much you get and how much you use, and from/by what:
Spoiler :
Clipboard-7.jpg


You could also edit GCO_CityScript.lua by replacing this (line 6599 in current version)
Code:
function DoTurnFirstPass(self)
    --local DEBUG_CITY_SCRIPT = "debug"
    Dlog("DoTurnFirstPass ".. Locale.Lookup(self:GetName()).." /START")

by
Code:
function DoTurnFirstPass(self)
    local DEBUG_CITY_SCRIPT = "debug"
    Dlog("DoTurnFirstPass ".. Locale.Lookup(self:GetName()).." /START")

and then examine the lua.log for materiel production/use

To output just your own city debug text, you can change the line
Code:
    --local DEBUG_CITY_SCRIPT = "debug"

to
Code:
    local DEBUG_CITY_SCRIPT        = DEBUG_CITY_SCRIPT
    if Game.GetLocalPlayer()     == self:GetOwner() then DEBUG_CITY_SCRIPT = "debug" end

or for a specific city only (Urumqi in this case)
Code:
    local DEBUG_CITY_SCRIPT        = DEBUG_CITY_SCRIPT
    if Locale.Lookup(self:GetName()) =="Urumqi" then DEBUG_CITY_SCRIPT = "debug" end
 
Last edited:
You're completely right, my bad. What I mean is rather the base resources, like Wood and Stone, being converted to other things rather than what is needed for Construction (usually Materiel). In screenshot below, Baghdad produces Wooden clubs and Timber amongst other things, while efficiency of Builder production is low.

Spoiler Screenshot :
Mcxa9A2.jpg


  • Another thing I've noticed just now is that Builders and Settlers keep appearing on and disappearing from the list of production choices. Some turns I can see them and pick them in the list, other times they are completely missing. In the screenshot game above, where I started with a Carpenter, Builders appeared early. But in another game where I started with a Stonemason instead, the Builder and Settler rarely appeared in my list.
  • When I'm producing buildings, and other units, the "Resources required per construction turn" stays the same, regardless of efficiency. But when I'm producing Builders, the Materiel required per turn fluctuates every turn. Is it supposed to work like that?

Moderator Action: This post was copied from the current thread to create this one (Gedemon)
 
Last edited by a moderator:
Most buildings that convert a resource use a base common amount for multiple production. IE a Stonemason use X stones to build Y materiel and Z stone-tipped spears, if you don't need spears it will still use the X stones to build Y materiel, that's done to prevent a resource to always be used for one thing and not the others in a building. When multiple buildings require the same resources, its shared between them based on their respective demand (if building A is requesting 100 stones for its production will B requires only 50, A will get more Stones than B if you have less than 150 stones available. for example if you have 100 stones, A should get 66 stones and B should get 33 stones)

IIRC units for which you don't have enough resource to a few turns of production are not shown, I do plan to make them visible like the units you have the tech for but miss a requirement to build in the base game.

I don't know for builders, I think the amount should vary for each production you don't have enough resources for. Analyzing the logs would be required, I'll try to make the debug output for the capital shown each turn in a future release, as any of you can help searching for inconsistency in the resource usage from that.
 
Back
Top Bottom