New Affinity Mechanic

Valkrionn

The Hamster King
Joined
May 23, 2008
Messages
14,450
Location
Crestview FL
Posting this here as well just to make sure it's seen; It'll be in 1.4, but it's available now via the SVN (check the RifE Beta forum on our official website for more info on that!).

I've added an entirely new Affinity mechanic, which is open to 40 or so different stats (technically; Several don't work yet, as they don't exist :mischief:) and can even add promotions to account for literally every other unit stat.

Valkrionn said:
That's right, the new Affinity setup is fully integrated, tested, and working perfectly. We have a new AffinityInfos file, within the Units folder; You can think of them as a new type of promotion, more or less. Units and Promotions can have a list of affinities (currently, no units use the new setup, but the D'teshi and Mechanos affinities have been moved over to it), and items in this list can be clicked, taking you to their page in the pedia.

Affinities have various AffinityTypes, or requirements. Each individual affinity can reference any resource (and multiple affinities can use the same resource!), but there are four new types as well; Number of Cities, Capital Population, Total Population, and Number of Vassals.

Affinities have a wide array of potential effects to choose from; Aside from the D'teshi Entropy Affinity (which was a post-combat effect, and now on the core D'teshi Affinity promotion), all D'teshi and Mechanos Affinity effects are easily possible in pure xml now. Even the Greater Shadow Affinity which granted 1 First Strike per 5 Shadow mana; Each and every single tag accepts Float values, so the tag simply reads 0.20 and both Shadow affects are on the same affinity. :mrgreen:

Affinities are even capable of granting promotions for niche effects (though these are a list, so no float support at this time, sorry; I'll turn it into an array later, so you can grant promotions for every X resource :mrgreen:). Assuming these promotions are stackable, you can duplicate the old D'teshi/Mechanos Affinity setups in promotion form with absolutely no python. This helps, as some tags were too underutilized for me to add them. :mrgreen:

There are a few Affinity tags which are loaded into the game, and displayed, but do not yet have an effect on the unit; These will be added as we add the necessary tags.

And now, here's a picture of the D'teshi Shadow Affinity (one of four affinities in existence atm :mrgreen:). I'm fairly happy with the way it's organized, and think it's easy to understand; If there's anything we can do to make it better, let me know. ;)



Finally, for those of you interested in the specific capabilities... Here are all the Effect tags (all Requirement/Type tags were mentioned above, just the 5 of them). There may or may not be some surprises in them, but they're in the XML regardless so oh well. :p :
Code:
--Working Properly--
<fStrength/>
<fStrengthMod/>
<fAttackStrength/>
<fDefenseStrength/>
<fMovement/>
<fMovementDiscount/>
<fVisibility/>
<fPerception/>
<fRangedStrength/>
<fRange/>
<fRangedLimit/>
<fFirstStrikes/>
<fFirstStrikeChance/>
<fDefensiveStrikes/>
<fWithdrawal/>
<fXPRate/>
<fCommandRange/>
<fCommandLimit/>
<fWorkRate/>
<fCollateral/>
<fCollateralLimit/>
<fCollateralTargets/>
<fVictoryInfluenceModifier/>
<fDefeatInfluenceModifier/>
<fPillageInfluenceModifier/>
<fSlaveChance/>
<fCombatHealPercent/>
<fEnemyHealChange/>
<fNeutralHealChange/>
<fFriendlyHealChange/>

<AffinityPromotions/>
<AffinityDamageTypes/>
<AffinityDamageResists/>


--Not Yet Implemented--
<fAttackStrengthMod/>
<fDefenseStrengthMod/>
<fRangedStrengthMod/>
<fAntiFirstStrikes/>
<fAntiDefensiveStrikes/>
<fCapacity/>
<fWillpower/>
<fAntiWithdrawal/>
<fHealRate/>
<fXPFromCombat/>
 
And now xUPT is uploaded to the SVN. Still no real interface, but I've got a keycombo set (shift-u) which launches a popup, enabling you to set the limit. Default in the popup is 8 (default in game is 0, or off); That's the value I would suggest, but I haven't playtested yet. Just gutfeeling thus far. :p

It may be changed at any time, is consistent across save games, and applies to cities as well as tiles (units will be bumped out to another tile, unless all tiles are full; Will never be killed). Basically, exactly as it works in AND atm, simply to get it in. We may allow units/promotions to modify their value in the count, may grant cities/forts bonuses, etc, but as yet that's not been done.

I'll be working on a nifty little icon, but I have no idea how long that will take. Interface work on Civ4 isn't my strong suit. :lol:
 
... Default in the popup is 8 (default in game is 0, or off); That's the value I would suggest, but I haven't playtested yet. Just gutfeeling thus far. :p...

Just a feeling, but 8 might be a little short of what's needed in some battles. With some of the powerful heroes and their defenses, one might need a bit more to take a city. In my last game I was pounding Maros in the head, over and over, trying to take a Dorf city... Without being able to stack my buffers, healers, artillery and throwaway units together, I wouldn't have had a chance even if Maros's co-defenders had a unit cap.

I'll experiment with it. I'm thinking a dozen or so might be more manageable.

(Note: But, having more than one stack attacking a city does help - The more you have, the more likely they won't pick your offensive stack for a volley of arrow and catapult fire.)
 
Part of the plan is to add in a "Surround and Conquer" mechanic (IE, combat bonuses for surrounding an enemy on at least three plots). Additionally, we may have units which take up fewer (or more) "slots" on a tile.

The point though is to make you have to consider stack makeup, rather than toss them all in together. That'll be important post-1.4, with the new units.

Edit: Also, the icon is working atm. Just need to get it positioned correctly, and then add some mouseover text. Maybe. :p
 
Part of the plan is to add in a "Surround and Conquer" mechanic (IE, combat bonuses for surrounding an enemy on at least three plots). Additionally, we may have units which take up fewer (or more) "slots" on a tile...

Working on a post for that with some ideas on how to make it "more better." :)
 
Part of the plan is to add in a "Surround and Conquer" mechanic (IE, combat bonuses for surrounding an enemy on at least three plots). Additionally, we may have units which take up fewer (or more) "slots" on a tile.
...

like it :goodjob:
isnt something similar (xUPT and surround bonus) in RoM (or RoM+AND)?
 
Top Bottom