C2C - Units

Wood and bone tech reveal and tech enable should be moved to gathering and scavenging then.
Yeah definitely should make sure they are. Wood already is but I think Bone might need to be moved.
 
I completely agree. The purposes should be different at both checkpoints.
1) Buildings - need to know if by providing this bonus they can actually make a highly significant contribution and thus be more important to build
2) Units - When checked to see if they can be trained, if they can't due to a bonus (or perhaps specific building) but are otherwise qualified, need to give a value to the player level to track to help the player level decisions that may lead to gaining access.
I was planning to do it a bit more completely but then got stuck in all the redundant copies of more or less the same code and I won't get to much more in the next weeks as I will be away from my computer.
So I have attached the changes as far as I got as a patch file.
This means:
- The code in BoolExpr to make What If evaluations (so you give it a list of changes and ask if this changes the result of the BoolExpr
- That applied to the the building value evaluation of a building enabling another building to be built
- And applied to the building value evaluation of a building enabling to train a unit

I have not actually tested it as I do not have any savegames to do that in.

The same kind of code should probably also be applied to the resource value evaluation that currently checks if a bonus enables a building or unit.
 

Attachments

  • BoolExprAICode.zip
    5.1 KB · Views: 43
I was planning to do it a bit more completely but then got stuck in all the redundant copies of more or less the same code and I won't get to much more in the next weeks as I will be away from my computer.
So I have attached the changes as far as I got as a patch file.
This means:
- The code in BoolExpr to make What If evaluations (so you give it a list of changes and ask if this changes the result of the BoolExpr
- That applied to the the building value evaluation of a building enabling another building to be built
- And applied to the building value evaluation of a building enabling to train a unit

I have not actually tested it as I do not have any savegames to do that in.

The same kind of code should probably also be applied to the resource value evaluation that currently checks if a bonus enables a building or unit.
You are a godsend good sir!

@Blazenclaw or @MattCA : Either of you guys wanna take the reigns from here on this?
 
I noticed @MattCA started on it. Thanks! @Toffer90 feel free to review as well and see if you can give it a look over
The same kind of code should probably also be applied to the resource value evaluation that currently checks if a bonus enables a building or unit.
I'm curious if we are looking at implementing the concept here as well. Would be helpful of course.

Again thanks AIAndy!
 
Hi, I have just seen that notification on Discord. (Those are a mess...)

Perhaps we need to consider WHAT resources are more a representation of a 'large amount of access but everyone has it' vs WHAT resources represent 'if you don't have it, you really DON'T have it'.
Yeah, you've nailed it !

You might be interested in the story of Indian "wootz" steel, used in the famous "Damascus blades", which seems to have been the best steel in the world from earlier than ~500 BC to ~1857 AD (when the British shut down the Indian industry and invented the Bessemer process :
https://acoup.blog/2020/11/06/colle...ake-it-addendum-crucible-steel-and-cast-iron/

So a hoplite is a spearman with a bronze weapon, bronze armor and a bronze shield as its' equipment - there is no/limited opportunity to upgrade these properties.
I wouldn't be so sure about that, AFAIK, while the material obviously played a role, hoplites were *mostly* about a very specific kind of formation and training ?
Compare to the very different but way superior Macedonian phalanxes, or to the somewhat superior Roman shield formations (here too, it looks like formation and training had a bigger role than the materials ?)

Should there be a "formation shieldman" (sub)line of units ?

General rule of thumb could be that if a unit requires a raw, non-living(maybe?) map resource - stone, saltpepper, etc - then it can be done without, albeit with the +100% cost per requirement missing or some such. Reasoning behind this is that a "Stone" resource represents a vein of easily accessed, high quality stone for instance, such that the lack thereof merely means lacking a high quality/quantity access of it rather than the somewhat nonsensical complete and utter lack of any stone whatsoever (and the lack of quality/quantity being that which drives up the cost of units requiring it).
Yeah, the resource names kind of give it away : for instance "Stone" is a generic name for lots of different stones (technically obsidian and marble are stones too !), so I guess that there would be an abundance of it in most places ?
(Which makes even weirder the rarity of stone in C2C in the prehistoric era...)
Consider for instance the hand"axe" (not an actual axe, but still a cutting tool) :
Used from ~1,760,000 to ~40,000 years ago :
https://tauromachy.org/2018/07/18/the-handaxe-the-thunderstone-the-ouroboros/
I don't think that you can make those from *any* kind of stone, and the stones good for buildings might not be necessarily good for tools ? (And vice-versa ?)
Maybe it needs to be separated into building-grade and weapons-grade stone ?

I think you mean Saltpeter / saltpetre aka potassium nitrate aka niter / nitre ? And/or I guess also the other nitrate salts ?
I might be wrong, but they don't seem to be very abundant ?
Well, it's like Uranium, technically you *could* extract it from seawater, but not without some science-fictional tech ?

(Also, it looks like saltpeter was occasionally made from animal waste (bat guano, human pee/poop...), for instance by Confederates during the Civil War ?)
 
Ok, so I'm evaluating bonus prerequisites for units now and there's a few things I need in terms of buildings.

I might have to make these buildings myself I suppose. So I guess I need to know if the concepts conflict with anything else in the mod design.

1) Wood: I brought this up elsewhere earlier today but got no response and that's fine but now that I'm looking closer, there's another consideration that goes beyond what I originally stated AND this is more on topic in this thread anyhow.

Wood, as a resource, is useful as a unit prerequisite, particularly for spears and clubs and such. However, I can't currently USE it as one, despite how beneficial it would be to have access to, because although we have the
BUILDING_GATHERER_DRIFTWOOD at Gathering, we have no OTHER way to get wood that early. Which is just frustrating.

What I need is a simple Stick Gatherer building that comes in at Gathering that comes from having any kind of wooded, even bamboo, feature in city vicinity that gives wood as a resource. I can think of ways to go further with this when equipment mod starts coming closer in on the horizon but for now this would suit the basic need for assuring that there's cause for spears and clubs. I know you might say - oh but what if you actually don't HAVE ANY wood in the region (which of course is quite rare) - I say then it should be interesting working more with stone throwers and such for a while longer.

At the moment, it's quite odd that the only way we can get wood so early is if we're on a ... a beach?

2) Bone: the obvious alternative to me here would be to use heavy bones as clubs. However, strangely, bones aren't opened up until cooking. What... you can't pick them from a carcass, particularly after leaving the carcass to sit for a while? I mean what's left of a carcass when it runs its course but bone? I don't think we should have to know how to cook before we could use it as an alternative to wood for clubs.

So I would also like to have a 'Bone Collector' building that requires access to Carcass, which is common at Scavenging. Carcasses are usually larger animals for the sake of this mod so that works pretty well here. If we can get carcasses out of rabbits, this might not fit as well as hoped on just a Carcass prerequisite.

Interestingly, between both buildings, Scavenging and Gathering would both give a new building with +1 Production and access to a resource as a base I think, which would make an even more interesting x2 grid selection divide.
I added wood gatherer at Gathering - gives wood, this resource already had tech enable/reveal. Requires Forest features. It acts as inland version of Driftwood Gatherer.
I used Carrion Gatherer building to provide Bone, was providing Carcass already. Requires any land animal in vicinity (no need for improvement), act as primitive version of Slaughterhouse
I had to move tech enable/reveal of bone to Scavenging.
 
I added wood gatherer at Gathering - gives wood, this resource already had tech enable/reveal. Requires Forest features. It acts as inland version of Driftwood Gatherer.
I used Carrion Gatherer building to provide Bone, was providing Carcass already. Requires any land animal in vicinity (no need for improvement), act as primitive version of Slaughterhouse
I had to move tech enable/reveal of bone to Scavenging.
Awesome thanks! I remember seeing that with the wood there actually was a building or two that came up earlier that should actually be providing it... stick gatherer or something. Maybe look into that as well please.
 
Awesome thanks! I remember seeing that with the wood there actually was a building or two that came up earlier that should actually be providing it... stick gatherer or something. Maybe look into that as well please.
Its unlocked at Gathering too, and doesn't provide or require wood.
Spoiler :

Civ4BeyondSword 2021-07-01 19-41-22-16.png



I already fixed all buildings, where they provided bonus before its tech enable.
I also fixed all buildings and units, that required earliest needed bonus, that had its tech requirement after latest tech unlock of building.
So Bonus and Vicinity Bonus - Tech Enable
Raw Vicinity Bonus - Tech Reveal
OrBonus, VicinityOrBonus (RawVivinityOrBonus) - Tech Enable (Reveal) of earliest bonus requirement
 
Its unlocked at Gathering too, and doesn't provide or require wood.


I already fixed all buildings, where they provided bonus before its tech enable.
I also fixed all buildings and units, that required earliest needed bonus, that had its tech requirement after latest tech unlock of building.
So Bonus and Vicinity Bonus - Tech Enable
Raw Vicinity Bonus - Tech Reveal
OrBonus, VicinityOrBonus (RawVivinityOrBonus) - Tech Enable (Reveal) of earliest bonus requirement
It requires the raw vicinity bonuses I'd expect wood to usually require so it seems it would be the perfect building for providing wood, no?

EDIT: there seem to be other forest types, like the burnt out and young versions that should also be vicinity OR prereqs...
 
It requires the raw vicinity bonuses I'd expect wood to usually require so it seems it would be the perfect building for providing wood, no?

EDIT: there seem to be other forest types, like the burnt out and young versions that should also be vicinity OR prereqs...
So stick gatherer also could provide wood then?
It could require Bamboo, Savanna, Jungle, and other ones too.

Also buildings now require one of four forest types - change is now on github.
Now they won't get disabled if city has only one tile with forest and it changes.
 
Last edited:
So stick gatherer also could provide wood then?
Yeah - lumber gatherer sounds like an upgrade later.
It could require Bamboo, Savanna, Jungle, and other ones too.
Yep, now you're onto it.
Also buildings now require one of four forest types - change is now on github.
Now they won't get disabled if city has only one tile with forest and it changes.
Something we've been needing to do for a while. Even burnt out forest areas still have a lot of wood to collect, though it if must be high quality wood then maybe not so much.
 
Top Bottom