Does anyone know where I can edit the Barbarians so that they'll give >10XP and provide GG-points? Or is it hardcoded?
Announcement
Collapse
No announcement yet.
Mod barbarians to give >10XP and GG-points
Collapse
X
-
It's fairly simple to mod the max XP level. It's in /assets/xml/globaldefines.xml towards the bottom. Search for:
BARBARIAN_MAX_XP_VALUE
and change the next number from 10 to something bigger. If you change it to 1000 you'll be quite safe.
Indeed it will help the AI somewhat, though I think it'll help the human player more; the AI isn't going to take its most powerful unit and go after a barbarian with it just for the free XP. (That's why the limit is there, to prevent us from just racking up the XP on barbarians, particularly in MP where this was in Civ3 a problem.)
I'm fairly sure the GG stuff is in python; i'll hunt around a bit for it. I remember when I was testing Genghis that some of the GG stuff was in there, as it was somewhat different. If nothing else you could manually write a python trigger that worked out to
ON_BARBARIAN_KILLED -> GIVE_GG_POINTS
but I think it might be there already (the opposite of it, essentially).<Reverend> IRC is just multiplayer notepad.
I like your SNOOPY POSTER! - While you Wait quote.
Comment
-
Hmm, it's not directly in python ... here's where it's defined in the code:
Code:if (isDead() || pDefender->isDead()) { if (isDead()) { iExperience = defenseXPValue(); iExperience = ((iExperience * iAttackerStrength) / iDefenderStrength); iExperience = range(iExperience, GC.getDefineINT("MIN_EXPERIENCE_PER_COMBAT"), GC.getDefineINT("MAX_EXPERIENCE_PER_COMBAT")); pDefender->changeExperience(iExperience, maxXPValue(), !isBarbarian(), pPlot->getOwnerINLINE() == pDefender->getOwnerINLINE()); } else { iExperience = pDefender->attackXPValue(); iExperience = ((iExperience * iDefenderStrength) / iAttackerStrength); iExperience = range(iExperience, GC.getDefineINT("MIN_EXPERIENCE_PER_COMBAT"), GC.getDefineINT("MAX_EXPERIENCE_PER_COMBAT")); changeExperience(iExperience, pDefender->maxXPValue(), !pDefender->isBarbarian(), pPlot->getOwnerINLINE() == getOwnerINLINE()); } break; }
If you were to change the !pDefender->isBarbarian (and the !isBarbarian) to TRUE or 1 or whatever, it would always give GG experience. This is separate from the max XP issue which is easier to fix in the XML. As a side note, it looks like setting the max XP to -1 will make it maxint automatically, according to setExperience() later on.
The changeExperience is exposed to python:Code:CyUnit::changeExperience(int iChange, int iMax, bool bFromCombat, bool bInBorders)
More directly, you have:
Code:void CyPlayer::changeCombatExperience(int iChange) void CyPlayer::setCombatExperience(int iExperience)
<Reverend> IRC is just multiplayer notepad.
I like your SNOOPY POSTER! - While you Wait quote.
Comment
-
Originally posted by snoopy369
Indeed it will help the AI somewhat, though I think it'll help the human player more; the AI isn't going to take its most powerful unit and go after a barbarian with it just for the free XP. (That's why the limit is there, to prevent us from just racking up the XP on barbarians, particularly in MP where this was in Civ3 a problem.)
As it stands now, you can definitely see when you go to attack the AI during your first war, that a good number of units are sitting pretty with just 1 or 2 promotins. Now, imagine how your Combat2 Swordsmen will fare if they have to face axes and fortified archer each with 3-4 promotions. It will have significance, definitely.
Now, to be true, the human can "milk" barbs for XP a lot better than the AI. OTOH, the human does fast and intelligent city expansion and tends to eliminate available fog quickly. But, certainly, if your goal is to leave some fog out there for XP milking (heck you could do this the whole friggin' game!!) you could do so. Some little peninsula of desert or something would be ideal.
Honestly, the whole milking mechanic just seems to be a lot of micromanagement. Look at it this way: the 10XP cap is to prevent you from going insane from minutae, not so much some game balance thing.
As for GGs, the AI having an early GG may prove a big surprise when he goes whomping through your lands. Other than that, the AI usually pisses away their GGs... they put them into combat with the primary goal of winning battles, not with the primary goal of intelligently using the GG and preserving it to live and fight another day.
Wodan
Comment
-
Fairly simple, says Snoopy369! Then he fills my screen with barely comprensible code.No matter where you go, there you are. - Buckaroo Banzai
"I played it [Civilization] for three months and then realised I hadn't done any work. In the end, I had to delete all the saved files and smash the CD." Iain Banks, author
Comment
-
I say thank you Great! It's not for milking I want this, but the fact that fighting barbarians is simply just an other battle. And it's a bit frustrating that you fight a lot of barbarians off your land (e.g. when you are close to a lot of tundra/ ice) and gain almost nothing from it compared to all the military units you must build.
Comment
Comment