Heavenfall, Parrotmath, and others, I need to pick your brains a sec...
1) First off, is there any way to 'overwrite' a quest, by using the same name in the mods folder, or will it retain the .xml of the core file regardless of the overwrite? I've changed a couple of values in a quest (unit sizes), but I dislike the idea of having someone agonize over replacing the original quest file... So far, I ended up making 'duplicate' quests, which of course might mean you'd have the 'same quest' twice with slightly different results, as I pissed off the .xml gods when I simply tried to override the original values with a new quest file of the same name...
I can certainly have them replace the core .xml quest file, but is there another way?
2) Secondly, I've been trying to modify production values of a city, based on the level of the Unit, or Champ/Sov with the new ability.
This works, and will add production points to whatever city the Unit/Champ/Sov which has this ability/trait is in:
<GameModifier>
<ModType>Resource</ModType>
<Attribute>Production</Attribute>
<Value>10</Value>
<Provides>Adds 10 points to the production of the city it is stationed in each turn.</Provides>
</GameModifier>
However, trying to tie this to the unit's level has not worked. I've tried this:
<GameModifier>
<ModType>Resource</ModType>
<Attribute>Production</Attribute>
<Value>2</Value>
<PerLevel>1</PerLevel>
</GameModifier>
Which simply adds 2 to the production, regardless of unit level (intention) or city level for that matter...
I've also tried this elaborate spelldefl:
Code: xml
- <SpellDef InternalName="BoostProduction">
- <DisplayName>Boost Production</DisplayName>
- <Description>Adds 2 points per unit member per level to city production.</Description>
- <FormattedDescription>Adds %d to a city's production.</FormattedDescription>
- <IconFG>Ability_Civics_Icon.png</IconFG>
- <SpellBookSortCategory>Unit</SpellBookSortCategory>
- <SpellBookSortSubCategory>UnitEnchantment</SpellBookSortSubCategory>
- <SpellType>Strategic</SpellType>
- <SpellClass>ImpResourceBooster</SpellClass>
- <SpellSubClass>Other</SpellSubClass>
- <SpellTargetType>Self</SpellTargetType>
- <AlwaysPromptForCaster>1</AlwaysPromptForCaster>
- <IsCastable>0</IsCastable>
- <IsSpecialAbility>1</IsSpecialAbility>
- <SpellResourceCost>
- <Resource>Mana</Resource>
- <Amount>0</Amount>
- </SpellResourceCost>
- <GameModifier>
- <GameModifier>
- <ModType>Resource</ModType>
- <Attribute>Production</Attribute>
- <Duration>-1</Duration>
- <HasUpgradableValue>1</HasUpgradableValue>
- <PerTurn>1</PerTurn>
- <IsForFormattedDescription>1</IsForFormattedDescription>
- <Calculate InternalName="Calc" ValueOwner="CastingUnit">
- <Expression><![CDATA[[Unit_GetLevel]*2]]></Expression>
- </Calculate>
- <Calculate InternalName="Calc2" ValueOwner="CastingUnit">
- <Expression><![CDATA[[Unit_GetTroopCount]]]></Expression>
- </Calculate>
- <Calculate InternalName="Value">
- <Expression><![CDATA[[Calc] * [Calc2]]]></Expression>
- </Calculate>
- <Calculate InternalName="ValueForFormattedDescription">
- <Expression><![CDATA[[Calc] * [Calc2]]]></Expression>
- </Calculate>
- </GameModifier>
- <HitSoundFX>Spell_Alchemy_01</HitSoundFX>
- <SpellDefEffect>
- <EffectName>S_Alchemy_Particle</EffectName>
- <LocalPosition>0,0,0</LocalPosition>
- <EffectScale>.75</EffectScale>
- <EffectDelay>0</EffectDelay>
- <SnapToTerrain>1</SnapToTerrain>
- <AIData AIPersonality="AI_General">
- <AIPriority>10</AIPriority>
- </AIData>
- </SpellDef>
And of course assigning the BoostProduction attribute/spell to the unit, again no dice.
I've tried manipulating the above values a few ways, but have hit a brick wall on this one. Any suggestions on how to make a level bonus, or a level bonus and unit size bonus for production work?
Also, I didn't specifically try a unit size production bonus on it's own outside of a spelldef (not sure how to code that .xml outside of a spell), any suggestions?
I did successfully create a related spell that boosts production when cast along these lines, which I will release with the mod, which is pretty much ready to go other than this issue, which I'm hoping we can figure out. I was just really hoping to incorporate unit level into this before I zip the updated mod for general use - I can live with the general production boost, but what I REALLY want is a unit level bonus...
3) Finally (I'm here to amuse you), any way to get a unit to modify and/or create an Outpost WITHOUT being consumed in the process? This request is not a high priority, but what originally sent me down this path was a request from the community to make an 'engineer' unit that could stack on an outpost and upgrade it without tying up the city build cue... I'm guessing no, but had to ask anyways...
Maaaaaybe down the summoning route, tied to that specific unit? I dislike this approach because of the number of spells required (create outpost with stables, create outpost with tower, etc. create outpost with stables and tower, etc. etc. etc.), but maybe I'm overthinking this...
And I'm thinking that there is no way to divorce outposts from cities entirely at this point (short of the Arcane Monument route), but it's worth asking at least.