Affinity?

I asked that you be able to assign the damage type that affinity grants separately in the unit/promotion xml instead of having it always be set to the same type for a particular resource. I also asked that you be able to grant different amounts of affinity strength through attack and defense (for example, a unit could get +1 attack and -1 defense per each body mans owned), and maybe even affinity that grants not strength, but movement points. (I was also wanting the ability to change things like the percentage bonus against other unitcombats/promotions, the chances a unit would turn barbarian, the changes a promotion would expire, and the ability to grant fractional affinity (rounded or truncated before actually applied, or course. Granting, say, 1/3 affinity would be nice, but wouldn't be noticed until you had at least 3 of a particular resource), etc. I think that all but the part about being able to assign a fractional affinity is likely more trouble than its worth). I suggested the idea, and CXDamian came wrote an example of the possible xml:


@IEATCRAYONS: do you need more elaboration on this?

@Magister
Changing it to something like this?
Code:
            <BonusAffinities>
                <BonusAffinity>
                    <BonusType>BONUS_MANA_AIR</BonusType>
                    <DamageType>DAMAGE_COLD</DamageType>
                    <iAffinityCombat>1</iAffinityCombat>
                    <iAffinityCombatDefense>0</iAffinityCombatDefense>
                    <iAffinityCombatChange>0</iAffinityCombatChange>
                    <iAffinityCombatDefenseChange>-10</iAffinityCombatDefenseChange>
                    <iAffinityMovement>1</iAffinityMovement>
                    <iAffinityMovementChange>25</iAffinityMovementChange>
                </BonusAffinity>
            </BonusAffinities>
Where 'Change' are percentages of the base value(-100 or higher). So for two air mana and a melee unit with 10/10(just to keep it simple) and 2 movement would change the unit to 10 melee +2 cold damage offense / 8 defense and 5 movement. movement: ((.25*2)*2)+(1*2) +2 ((movementChange*mana)*base)+(affinity*mana)+base

Modifying the % chances in the promotions(barbarian, miscast, etc) is a bit beyond me atm. I think it will take far more effort then the benefits though.
 
Probably not. Under the covers the affinity mechanic is a pain in the butt. I have no desire to make it more complex. In fact Im pretty sure we have an issue with affinity as it is, its not an easy mechanic to troubleshoot.
 
Probably not. Under the covers the affinity mechanic is a pain in the butt. I have no desire to make it more complex. In fact Im pretty sure we have an issue with affinity as it is, its not an easy mechanic to troubleshoot.

are the ai's trading mana back and forth?
 
I assume he either means the runaway Yvian/Druid strength from .25 which still may be unsolved (thought it was fixed, could easily be wrong), or he means a new issue in Shadow currently. And from a previous post it sounded like he has made it possible to have Affinity to any resource now, so mana alone isn't the issue.
 
I assume he either means the runaway Yvian/Druid strength from .25 which still may be unsolved (thought it was fixed, could easily be wrong), or he means a new issue in Shadow currently. And from a previous post it sounded like he has made it possible to have Affinity to any resource now, so mana alone isn't the issue.

i mean the ai's trading magic rescources might cause runaway yvain strength
 
Well, most people who have noticed it have been the ones with the unit with the runaway strength. Im not sure how the AI trading resources would effect their units so.
 
if each mana was traded back and forth (if the ai will tradeaway it's last)
then i was thinking infinitely traded
 
Well, that one is plausible for an AI affinity runaway, but it does violate the intention of how the Affinity works. You are only supposed to have affinity for the resources which would show in your capitol "Zoom" info.
 
Also, I just though I'd note here like I did in the bug thread a whie ago that the Barbs are no longer getting access to everyone's mana. This makes barb heroes with affinity (like Ars Moriendi) much weaker.
 
I assume he either means the runaway Yvian/Druid strength from .25 which still may be unsolved (thought it was fixed, could easily be wrong), or he means a new issue in Shadow currently. And from a previous post it sounded like he has made it possible to have Affinity to any resource now, so mana alone isn't the issue.

I just stumbled on this affinity bug in a multiplayer game tonight, and I think I know the cause: reloading the game. I made Yvian yesterday with 2 nature mana so he had 13 strength; loaded up the game tonight and he had 17, but I didn't notice it then. Our game crashed, we reloaded an autosave, and I certainly noticed the 21 strength woodelf I then had.
 
I just stumbled on this affinity bug in a multiplayer game tonight, and I think I know the cause: reloading the game. I made Yvian yesterday with 2 nature mana so he had 13 strength; loaded up the game tonight and he had 17, but I didn't notice it then. Our game crashed, we reloaded an autosave, and I certainly noticed the 21 strength woodelf I then had.

Sounds as simple as not subtracting the bonus from Affinity when the game is saved. So in your case, it was reporting your base strength as 13 when you first saved (9 + 2 Nature). When you reloaded, it added another 2 Nature nodes, etc, etc...

Would it be better/easier for Affinity to simply add +x(physical damage) instead of just adding it to the base? If nothing has an immunity or resistance to the (physical damage) subtype, it's the same as adding it in the first place. And it wouldn't get saved as base strength.

edit: It would also be easier to add negative Affinity, since you could assume 3 (-5 physical) is 0 or 1, while I'm sure -2 base strength would cause problems
 
Sounds as simple as not subtracting the bonus from Affinity when the game is saved. So in your case, it was reporting your base strength as 13 when you first saved (9 + 2 Nature). When you reloaded, it added another 2 Nature nodes, etc, etc...

Would it be better/easier for Affinity to simply add +x(physical damage) instead of just adding it to the base? If nothing has an immunity or resistance to the (physical damage) subtype, it's the same as adding it in the first place. And it wouldn't get saved as base strength.

edit: It would also be easier to add negative Affinity, since you could assume 3 (-5 physical) is 0 or 1, while I'm sure -2 base strength would cause problems

shouldn nature affinity give poison strength?
 
shouldn nature affinity give poison strength?

Thats just an xml change to make. But currently its not set for that because the units that I see as being more powerful the more nature mana you have (like Druids and Treants) wouldn't nesesarily be poison users.

It would also make nature mana weaker since poison damage doesn't effect non-living creatures.
 
It would make sense for nature to have poison damage, but it might fit even better for shadow. And poison would make more sense for some units than others. That is one reason why I really think that the damage type each mana gives shouldn't be defined by the resource, but by the unit/promotion granting the affinity. This is a change I care about much more than allowing split attack/defense affinity, movement affinity, or percentage bonus/chances affinities (although I would like them too)

(I realize it will never get in, since for some reason you don't want to make the affinity system any more complicated, but I would also really like it if you could set affinity for having multiple resource types; I don't mean having different affinities for different mana types, that is already possible. I mean something like getting extra strength is you control both life and death (not either or), or for having all the mana types unlocked by a particular tech.)
 
Are you allowed mathematical functions in the XML to declare what the affinity is linked to? If you are, there are some convoluted logic/math functions you could design to ensure that they have both mana types.

i.e. - Life + Death Requirement: (Round_Up([Life * Death]/100)

This would return a 1 if they have both Life and Death, but a 0 if they are missing either one. If you want to base it on the sum of the total Life & Death they contain, then just multiply the above by that sum.
 
Back
Top Bottom