C2C - Units

I was only talking about when Unlimited AP is off so none of what I suggested would be active when it is on. Both choices on or off are very bad implementations of reality when upgrading a unit is concerned and finding a more realistic solution to that is a different project entirely.

These limits ANIMAL_MAX_XP_VALUE and BARBARIAN_MAX_XP_VALUE are about how much can a person learn about their job by defeating animals, barbarians, and units with equivalent martial traditions. Animals do not fight the way "humans" do and so are of limited help in training someone. Barbarians are better but are less organized etc. They tend not to use the latest tactics and so on.

These limits are OK to be applied to normal combat units and this is how Civ does it. (They are ignored in C2C if you have Unlimited XP on.) However not all units in C2C are combat units so differing rules need to be applied. I am just suggesting that the Explorer Class is one of these where the limits are not valid. Explorer Class includes the three lines Explorer, Recon and Hunter. The Hunter line is about hunting animals it should be limited in how many XP it gets from combat with humans both barbarians and other. The Recon line is about finding out military intelligence, combat of any type, except sneak attacks, should not be their main source of XP but we don't have a way of simulating that yet. The Explorer line is about finding new lands, new animals and new nations. Currently the Recon and Explorer lines start out as one line before splitting into two.

We should probably change the Natural Wonders so that they return full value if discovered by an Explorer, half value if by a Recon and quarter value by any other unit. Also award XP likewise.
 
We should probably change the Natural Wonders so that they return full value if discovered by an Explorer, half value if by a Recon and quarter value by any other unit. Also award XP likewise.
I'd like that quite a bit - and giving XP to recon for goody hut reveals would be good, as well as something like .1 per plot revealed would be cool. All makes up for them not being able to attack.
 
I'd like that quite a bit - and giving XP to recon for goody hut reveals would be good, as well as something like .1 per plot revealed would be cool. All makes up for them not being able to attack.
I was thinking the same thing. I would have gone for (1xp per plot revealed / speed of unit) adjusted for map size. With smaller maps giving more than larger maps for balance. The speed of unit adjustment is just so that it is not too overpowered. Recon units (and spies?) revealing plots in other nations should probably get more XP again.
 
The Hunter line is about hunting animals it should be limited in how many XP it gets from combat with humans both barbarians and other.
Yeah, that makes sense, I'll make it so.
I guess I should make an exception for units like trained dogs/felines, but not for mounted units.

Latest version of the XP limit code:
Code:
int CvUnit::maxXPValue(const CvUnit* pVictim, bool bBarb) const
{
    if (GC.getGameINLINE().isOption(GAMEOPTION_INFINITE_XP) || isNPC())
    {
        return -1;
    }
    int iMaxValue = -1;

    if (pVictim != NULL && pVictim->isAnimal())
    {
        if (!isHasUnitCombat((UnitCombatTypes)GC.getInfoTypeForString("UNITCOMBAT_EXPLORER"))
        && !isHasPromotion((PromotionTypes)GC.getInfoTypeForString("PROMOTION_ANIMAL_HUNTER")))
        {
            iMaxValue = GC.getDefineINT("ANIMAL_MAX_XP_VALUE");
        }
    }
    else if (pVictim != NULL && pVictim->isHominid() || bBarb)
    {
        if (!isHasUnitCombat((UnitCombatTypes)GC.getInfoTypeForString("UNITCOMBAT_RECON"))
        && !isHasPromotion((PromotionTypes)GC.getInfoTypeForString("PROMOTION_BARBARIAN_HUNTER")))
        {
            iMaxValue = GC.getDefineINT("BARBARIAN_MAX_XP_VALUE");
        }
    }
    else if (pVictim != NULL && getUnitCombatType() == (UnitCombatTypes)GC.getInfoTypeForString("UNITCOMBAT_HUNTER"))
    {
        if (!isHasPromotion((PromotionTypes)GC.getInfoTypeForString("PROMOTION_BARBARIAN_HUNTER"))
        && pVictim->getUnitCombatType() != (UnitCombatTypes)GC.getInfoTypeForString("UNITCOMBAT_ANIMAL"))
        {
            iMaxValue = GC.getDefineINT("BARBARIAN_MAX_XP_VALUE");
        }
    }
    if (iMaxValue > 0 && GC.getGameINLINE().isOption(GAMEOPTION_MORE_XP_TO_LEVEL))
    {
        iMaxValue *= GC.getDefineINT("MORE_XP_TO_LEVEL_MODIFIER");
        iMaxValue /= 100;
    }
    return iMaxValue;
}
 
Last edited:
if (GC.getGameINLINE().isOption(GAMEOPTION_INFINITE_XP) || isNPC())
{
return -1;
}
int iMaxValue = -1;
Should default not be MAX_INT? I'm not looking at the whole code here - on the receiving end of this function it may use -1 as no limit, so just asking.
 
Hey, about neanderthal criminals...

I would almost like to say we shouldn't have any. It would help to explain a bit if we suggested that one of the competitive differences between Human and Neanderthal was a tendency towards duplicity on the part of the Human, casting the Neanderthal as a little naive and trusting, perhaps too much so.

Just a thought. What do you think on that?
 
Just a thought. What do you think on that?
I agree, I had the same though earlier which is why I haven't given them criminal units yet, even though we now have the button art for them.
I gave them watchers and enforcers which means they are the strongest to combat criminals in the prehistoric. (their units have 1 more strength), and I like the idea to counter this by not allowing them to get any criminal units. They already have the hidden nationality neanderthal warrior which is extremely strong. The easiest way to make the human criminal units untrainable for wrub would be to add neanderthal gatherer as a forceObsoleteUnit for those prehistoric criminal units. The neanderthal gatherer is available from start to sedentary lifestyle. so that would bar those crim units until sedentary lifestyle is researched.

Another little thing I've done is to reduce the base amount of XP neanderthal units get per win as compared to their sapien counterparts. Which I thought was a nice little touch to balance things and keeping to the common idea that sapiens were more adaptable than neanderthals.
 
Last edited:
The easiest way to make the human criminal units untrainable for wrub would be to add neanderthal gatherer as a forceObsoleteUnit for those prehistoric criminal units. The neanderthal gatherer is available from start to sedentary lifestyle. so that would bar those crim units until sedentary lifestyle is researched.
Good idea on how to implement that.
Another little thing I've done is to reduce the base amount of XP neanderthal units get per win as compared to their sapien counterparts. Which I thought was a nice little touch to balance things and keeping to the common idea that sapiens were more adaptable than neanderthals.
Been considering your concept on that and I totally support the change and I like how you thought this through in particular.

Now... what about throwing units... they weren't supposed to be able to throw according to some sources but I know that's in conflict now. You gave them slingers, which are basically just enhanced throwing and I would think that would require the ability to throw to sling. Thoughts?
 
A thought I had yesterday was to turn the maxXPvalue system on its head, to convert it to a minXPvalue system.
Where instead of hunters being able to get XP above a hard limit when winning against animals, they would get a minimum of let's say 0.5 XP against animals while other units would have a minimum value of 0 XP from such fights.
Though it would only work well with dynamic XP, and I would remove hard XP limits and the related promotions to complement it.
Edit: Heh, I posted this same thing in another thread, I thought I forgot to post it and lost what I wrote so I wrote it again here. ( ͡° ͜ʖ ͡° )
Now... what about throwing units... they weren't supposed to be able to throw according to some sources but I know that's in conflict now. You gave them slingers, which are basically just enhanced throwing and I would think that would require the ability to throw to sling. Thoughts?
Neanderthals most likely made and used slings. they are simple concepts and their physiology would not stop them from using it quite efficiently.
 
Last edited:
Neanderthals most likely made and used slings. they are simple concepts and their physiology would not stop them from using it quite efficiently.
If their shoulder bones wouldn't allow them to throw, how could they sling?

I'm not sure where the paleos have landed on whether they could or couldn't throw though.
 
If their shoulder bones wouldn't allow them to throw, how could they sling?

I'm not sure where the paleos have landed on whether they could or couldn't throw though.
Nothing proves they were incapable of throwing, only thing we know for sure is that they didn't throw as much overhead throws as humans as the asymmetrical shoulders found in those who do a lot of overhead throws with one specific throwing arm gets a slightly upward bend in their dominant arm shoulder. Assymetrical shoulder bones has not been found in neanderthal skeletons, who had bigger stronger shoulder bones. Though that does not prove they didn't know how to throw or make it a hard throw at that.

Edit: article that indicate some neanderthals did throw projectiles often, another article that hypothize that they didn't throw very much based on the lack of findings like the first article is about.
Though the second article does state "Anthropologists agree, Neanderthal could throw spears short distances, but never graduated to the use of bow and arrows or spear-throwing technologies.".

EditEdit: We know chimpanzees can throw rocks real hard, but they don't have a dominant shoulder bone that is asymmetrical from the other because they rarely do overhead throws.
Even if neanderthals had a couple meter less average range on stone throwing than humans, it wouldn't stop them from setting up short range ambushes where they surprise the intruder with a bunch of thrown rocks and/or spears, perhaps even from a high point to gain extra range and force to the projectiles.
 
Last edited:
Update:
Finished mapping out the withdrawal, early withdrawal, pursuit and combat limit stats for the unit review.


Nothing proves they were incapable of throwing, only thing we know for sure is that they didn't throw as much overhead throws as humans as the asymmetrical shoulders found in those who do a lot of overhead throws with one specific throwing arm gets a slightly upward bend in their dominant arm shoulder. Assymetrical shoulder bones has not been found in neanderthal skeletons, who had bigger stronger shoulder bones. Though that does not prove they didn't know how to throw or make it a hard throw at that.

Edit: article that indicate some neanderthals did throw projectiles often, another article that hypothize that they didn't throw very much based on the lack of findings like the first article is about.
Though the second article does state "Anthropologists agree, Neanderthal could throw spears short distances, but never graduated to the use of bow and arrows or spear-throwing technologies.".

EditEdit: We know chimpanzees can throw rocks real hard, but they don't have a dominant shoulder bone that is asymmetrical from the other because they rarely do overhead throws.
Even if neanderthals had a couple meter less average range on stone throwing than humans, it wouldn't stop them from setting up short range ambushes where they surprise the intruder with a bunch of thrown rocks and/or spears, perhaps even from a high point to gain extra range and force to the projectiles.
This could be interesting to consider to allow them the greater strength they usually have but to reduce their accuracy. I'll have to work that into the plan when I go back through and look at Neander units against the newly redesigned ones.
 
Next project on the unit review is costing. Most of this is going to be straightforward, an act of copying and pasting formulas once they have been defined on the sheet. Should go pretty quick. HOWEVER, we need to have a talk about some things that have been ignored for a very very long time...

iHurryCostModifier: Are there good reasons for or against this tag's use? It looks like the few units that have it are given 25 or 50. Why? What's the situational logic we should apply to the use of this tag? Is it even necessary to HAVE this tag? Doesn't the cost itself consider all the reasoning (or will eventually anyhow?)

iAdvancedStartCost: This has not been very deeply considered by any previous modder. Are there some kind of rules we can establish for this, like a flat cost for all units by era or something? Or should it be somehow calculated like the base production cost?

iAdvancedStartCostIncrease: Why is this? Seriously... why?

I'll be looking into the code to get some clues and hints on these but if you have opinions or thoughts, please, let's have 'em.
 
A question I have had. but forget to ask, is if we are having formulae for units and building costs why do we have iCost? I can see it as useful for overwriting the default costs in some rare circumstances but wouldn't it be better to have the XML loader(?) do the calculation. That way if things are moved around they are automatically recosted.
 
iHurryCostModifier: Are there good reasons for or against this tag's use? It looks like the few units that have it are given 25 or 50. Why? What's the situational logic we should apply to the use of this tag? Is it even necessary to HAVE this tag? Doesn't the cost itself consider all the reasoning (or will eventually anyhow?)
It was mostly meant for settlers/workers, and for wonders. Stuff that should be expensive to outright buy but may not take as long time to train/construct as the hurry cost indicates that it would. Settlers and workers are supposed to stop your city from growing for a while and therefore there should perhaps be an extra price to avoid the lost food by hurrying the production.
iAdvancedStartCost: This has not been very deeply considered by any previous modder. Are there some kind of rules we can establish for this, like a flat cost for all units by era or something? Or should it be somehow calculated like the base production cost?
I see no need for having this tag for units, if it can be trained, why bar it from being a starting unit for the nation at game start.
For buildings the tag makes a lot of sense mostly when it is used with the value -1. Meaning that all wonders are invalid to be chosen as prebuilt in cities at game start; this is a reasonable rule. But I think we should just hardcode this as part of the world wonder designation. A value of 100, meaning no modification to the units/buildings normal cost is in most cases the only reasonable value for this tag.
iAdvancedStartCostIncrease: Why is this? Seriously... why?
For each you have the price goes up this much. I agree, it's kinda pointless and could easily be removed without any tears from anyone.
 
A question I have had. but forget to ask, is if we are having formulae for units and building costs why do we have iCost? I can see it as useful for overwriting the default costs in some rare circumstances but wouldn't it be better to have the XML loader(?) do the calculation. That way if things are moved around they are automatically recosted.
I'd love to do this but it will take a project to do it. I'll need a couple of new tags in unitcombatinfos to help reshape things with modifiers and so on. Then units with duplicate types might need some consideration on how we need to manage that. It's certainly an end result I'd like to see but for now it would be its own whole new effort and I'm not wanting to stop the momentum on the planning right now to get that done. It may be easier to see how we can more easily do this once we have determined proper costs for all units in the game and given further consideration to what an automatic costing mechanism would need to consider.
It was mostly meant for settlers/workers, and for wonders. Stuff that should be expensive to outright buy but may not take as long time to train/construct as the hurry cost indicates that it would. Settlers and workers are supposed to stop your city from growing for a while and therefore there should perhaps be an extra price to avoid the lost food by hurrying the production.
Settlers and workers... hmm... we have some strange applications on this right now as I looked through where it has been applied so far. It makes sense to have on those kinds of units though so I'll take that into consideration moving forward. Also seems to make sense applied to merchants I think, just to provide extra insurance that it's impossible to production profit overall on them.

I see no need for having this tag for units, if it can be trained, why bar it from being a starting unit for the nation at game start.
For buildings the tag makes a lot of sense mostly when it is used with the value -1. Meaning that all wonders are invalid to be chosen as prebuilt in cities at game start; this is a reasonable rule. But I think we should just hardcode this as part of the world wonder designation. A value of 100, meaning no modification to the units/buildings normal cost is in most cases the only reasonable value for this tag.
OH, so 100 is the percent of their iCost that they cost in advanced start points... duh... now I get it. I'll have to review the unit list to see if any are set to -1 or anything other than 100 because I'm curious why the person that included this tag (maybe firaxis?) considered it important to include and where it was originally applied. This helps to know that it's a % tag!

For each you have the price goes up this much. I agree, it's kinda pointless and could easily be removed without any tears from anyone.
I guess it makes sense to have it, particularly for settlers and workers? Should it be applied to cultural units to make them much more painful to flood your starting setup with?
 
I guess it makes sense to have it, particularly for settlers and workers? Should it be applied to cultural units to make them much more painful to flood your starting setup with?
Cultural units require a wonder to be built which is impossible to start with through advanced start as all wonders are barred from advanced start selection through having iAdvancedSartCost = -1.
Advanced start unit selection does respect requirements is what I mean.

I would personally remove this tag. Cultural units does increase their hammer cost for each one that exist already, so this would in those cases just be double taxation.
 
Cultural units require a wonder to be built which is impossible to start with through advanced start as all wonders are barred from advanced start selection through having iAdvancedSartCost = -1.
Advanced start unit selection does respect requirements is what I mean.

I would personally remove this tag. Cultural units does increase their hammer cost for each one that exist already, so this would in those cases just be double taxation.
In what application was it given in vanilla? Do you know? I can look later...
 
Back
Top Bottom