Mod Component Requests Thread

No, its all contained in the CvUnit.cpp file. You basically need to add the same experience code found in the code I previously sent you to the airStrike method. So after the following line:
Code:
pDefender->setDamage(iUnitDamage, getOwnerINLINE());

you need to add this:

Code:
	int iExperience = pDefender->defenseXPValue();
	iExperience = range(iExperience, GC.getDefineINT("MIN_EXPERIENCE_PER_COMBAT"), GC.getDefineINT("MAX_EXPERIENCE_PER_COMBAT"));
	changeExperience(iExperience, pDefender->maxXPValue(), true, pPlot->getOwnerINLINE() == getOwnerINLINE(), !pDefender->isBarbarian());

Huh, one last part... you will need to add code to get experience from air bombing cities too...
So in airBomb you need add after the line:

Code:
gDLL->getInterfaceIFace()->addMessage(getOwnerINLINE(), true, GC.getEVENT_MESSAGE_TIME(), szBuffer, "AS2D_BOMBARD", MESSAGE_TYPE_INFO, NULL, (ColorTypes)GC.getInfoTypeForString("COLOR_GREEN"), pCity->getX_INLINE(), pCity->getY_INLINE());

you need to add this:
Code:
		int iExperience = attackXPValue();
		iExperience = range(iExperience, GC.getDefineINT("MIN_EXPERIENCE_PER_COMBAT"), GC.getDefineINT("MAX_EXPERIENCE_PER_COMBAT"));
		changeExperience(iExperience, maxXPValue(), true, pPlot->getOwnerINLINE() == getOwnerINLINE(), !pCity->isBarbarian());

Its dirty but it should work
Thanks, i've made the changes you showed here, i'll have to test it tomorrow night now as it's getting late.

Thanks again.
 
I would love the following new tags

PHP:
			<UnitCombatAttackMods/>
			<UnitCombatDefenseMods/>

in CIV4UnitInfos.xml. :mischief:
 
I would love the following new tags

PHP:
			<UnitCombatAttackMods/>
			<UnitCombatDefenseMods/>

in CIV4UnitInfos.xml. :mischief:

And what would those tags do?
 
Hi, i've been looking through the building infos and i cannot find any building that gives a commerce modifier for having access to a specific Bonus. These are the Bonus tags at the moment.
Code:
			<BonusHealthChanges/>
			<BonusHappinessChanges/>
			<BonusProductionModifiers/>
Is it possible to add a tag as shown.
Code:
			<BonusHealthChanges/>
			<BonusHappinessChanges/>
			<BonusProductionModifiers/>
			[B]<BonusCommerceModifiers/>[/B]
I would expect to have to add something to a DLL as a result of the additional tag but all i need to know is can it be done without too much difficulty?

My reason for asking this is in the B5 mod we have the Bonus_Crystals which in our mod isn't gemstones but Data Crystals. Thus having access to Data Crystals would give a bonus either to Espionage or to Research. I hope this isn't a dumb request and someone has already done it or it already exists and i'm just blind.
 
heres some mod comp suggestions:

maybe add some more tags for projects - some stuff from buildings.

also, add a tag fro buildings:
exp for a unit class.
plot in area of city change (all grass - +1 food for instance)

:)

I have extra tags for projects in my mod.

Code:
			<iGlobalHealth>2</iGlobalHealth>
			<iGlobalHappiness>1</iGlobalHappiness>
			<iWorldHappiness>0</iWorldHappiness>
			<iWorldHealth>2</iWorldHealth>
			<CommerceModifiers>
				<iCommerce>10</iCommerce>
				<iCommerce>0</iCommerce>
				<iCommerce>0</iCommerce>
				<iCommerce>0</iCommerce>
			</CommerceModifiers>

It would be pretty easy to extract them, happy to help. ;)
 
And what would those tags do?

Instead of combat bonus for attack AND defense, you can give attack bonus only vs armored units and defense bonus vs gunpowder units (without the need to set a bonus for every single unitcombatclass) for example.

Pikemen got +100% Combat vs Mounted Units. With those suggested new tags, you can change it to +150% Defense vs Mounted Units and +50% Attack vs Mounted Units for example. You see?

If you wanted +50% Attack Combat vs Mounted Units atm, you would have to set +50% Attack Combat vs chariot, horse archer, knight, cavalry, ..... every single unitclass.



Bah, my English is bad, I hope you understand. :D
 
Instead of combat bonus for attack AND defense, you can give attack bonus only vs armored units and defense bonus vs gunpowder units (without the need to set a bonus for every single unitcombatclass) for example.

Pikemen got +100% Combat vs Mounted Units. With those suggested new tags, you can change it to +150% Defense vs Mounted Units and +50% Attack vs Mounted Units for example. You see?

If you wanted +50% Attack Combat vs Mounted Units atm, you would have to set +50% Attack Combat vs chariot, horse archer, knight, cavalry, ..... every single unitclass.



Bah, my English is bad, I hope you understand. :D

Yep, perfectly understand. Working on the mod right now... should be pretty straight forward to implement. I'll drop you a line when its ready.
 
Thanks, i've made the changes you showed here, i'll have to test it tomorrow night now as it's getting late.

Thanks again.

No, its all contained in the CvUnit.cpp file. You basically need to add the same experience code found in the code I previously sent you to the airStrike method. So after the following line:
Code:
pDefender->setDamage(iUnitDamage, getOwnerINLINE());

you need to add this:

Code:
	int iExperience = pDefender->defenseXPValue();
	iExperience = range(iExperience, GC.getDefineINT("MIN_EXPERIENCE_PER_COMBAT"), GC.getDefineINT("MAX_EXPERIENCE_PER_COMBAT"));
	changeExperience(iExperience, pDefender->maxXPValue(), true, pPlot->getOwnerINLINE() == getOwnerINLINE(), !pDefender->isBarbarian());

Huh, one last part... you will need to add code to get experience from air bombing cities too...
So in airBomb you need add after the line:

Code:
gDLL->getInterfaceIFace()->addMessage(getOwnerINLINE(), true, GC.getEVENT_MESSAGE_TIME(), szBuffer, "AS2D_BOMBARD", MESSAGE_TYPE_INFO, NULL, (ColorTypes)GC.getInfoTypeForString("COLOR_GREEN"), pCity->getX_INLINE(), pCity->getY_INLINE());

you need to add this:
Code:
		int iExperience = attackXPValue();
		iExperience = range(iExperience, GC.getDefineINT("MIN_EXPERIENCE_PER_COMBAT"), GC.getDefineINT("MAX_EXPERIENCE_PER_COMBAT"));
		changeExperience(iExperience, maxXPValue(), true, pPlot->getOwnerINLINE() == getOwnerINLINE(), !pCity->isBarbarian());

Its dirty but it should work
Unfortunately Air units are still not gaining experience/prestige from attacking units. I've only been able to test this once since the original post.
 
Unfortunately Air units are still not gaining experience/prestige from attacking units. I've only been able to test this once since the original post.

Let me wrap up some stuff and I'll make a proper mod comp out of it.
 
A helptxt-tag for projects would be useful, just like buildings, wonders and units.

I'll have something ready in 30 minutes... almost there
 
I've got a probably difficult request. TheLopez? :D

My dream are unitcombattype specific collateral damage settings:

PHP:
			<iCollateralDamage>0</iCollateralDamage>
			<iCollateralDamageLimit>0</iCollateralDamageLimit>
			<iCollateralDamageMaxUnits>0</iCollateralDamageMaxUnits>

Something like:
PHP:
			<UnitCombatCollateralDamageMods>

			<UnitCombatCollateralDamageLimitMods>

			<UnitCombatCollateralDamageMaxUnitsMods>

If a cannon attacks, melee units should get hit with 100% of the set collateral damage, mounted units with 75% and armored units with 0% for example.

Or 6 melee units would get hit, 3 mounted units and 1 armored unit for example.

Or melee units can get killed by collateral damage, mounted units can receive up to 75% damage and armored units only up to 25%.

Is this possible? :) This would lead us too much more realistic and better siege unit balancing.

It's just not realistic that I can damage 6 tanks with a small cannon.
 
I've got a probably difficult request. TheLopez? :D

My dream are unitcombattype specific collateral damage settings:

PHP:
			<iCollateralDamage>0</iCollateralDamage>
			<iCollateralDamageLimit>0</iCollateralDamageLimit>
			<iCollateralDamageMaxUnits>0</iCollateralDamageMaxUnits>

Something like:
PHP:
			<UnitCombatCollateralDamageMods>

			<UnitCombatCollateralDamageLimitMods>

			<UnitCombatCollateralDamageMaxUnitsMods>

If a cannon attacks, melee units should get hit with 100% of the set collateral damage, mounted units with 75% and armored units with 0% for example.

Or 6 melee units would get hit, 3 mounted units and 1 armored unit for example.

Or melee units can get killed by collateral damage, mounted units can receive up to 75% damage and armored units only up to 25%.

Is this possible? :) This would lead us too much more realistic and better siege unit balancing.

It's just not realistic that I can damage 6 tanks with a small cannon.
Huh, no promises but I'll see what I can do... There are 3 mod comps ahead of you though.
 
Back
Top Bottom