Idea for a clearer transfer type #1251
Replies: 1 comment 3 replies
-
The main reason why the old implementations were scrapped was complexity AND tag clutter which is also the case with your implementation. Thanks for the suggestion, though. A solution I stopped at was integrating transfer type directly into warhead (read values from warhead and weapon, e.g. Damage is from weapon/animation, Versus from warhead, etc.) and dividing into multiple small parts that are not directly connected to each other: stat damage, percentage damage, damage limit, individual veterancy multiplier, and, finally, transfer. It has less features, but does the main job. Tags shown below: [WARHEAD]
; -- STAT DAMAGE --
Resource = health ; health/hp | money | experience/exp | ammo | gatrate/rate
Experience.PreventDemote = false ; boolean
GatlingRate.LimitStageChange = -1 ; -1 = no limit
Health.PreventKill = false ; boolean
; -- % DAMAGE --
Factor.Type = flat ; flat | current | missing | total
Factor.Resource = health ; health/hp | money | experience/exp | ammo | gatrate/rate
Factor.FromSource = false ; boolean
; -- DAMAGE LIMIT --
FlatLimits = 0,0 ; minimum and maximum, 0 = no limit
; -- INDIVIDUAL VETERANCY MULTIPLIER --
VetMultiplier.SourceOverTarget = 100%, 100%, 100% ; rookie, veteran, elite respectively
VetMultiplier.SourceOverSource = 100%, 100%, 100% ; rookie, veteran, elite respectively
; ^ this tag is for transfer purposes, though
VetMultiplier.TargetOverTarget = 100%, 100%, 100% ; rookie, veteran, elite respectively
; -- TRANSFER --
Transfer.Direction = s2t ; s2t | t2s | t2t, s = source, 2 = to, t = target
Transfer.Warhead = ; WARHEAD2 to read receive info from
Transfer.Factor = 100% ; float
Transfer.Send.Overlimit = false ; boolean
Transfer.Receive.Divide = false ; boolean If you want to use multiple stats/transfers in one damage there is an extra warhead, critical damage feature or animation/warhead trick. I doubt this gets used like that much though. I have my hands full doing IRL stuff which is why it is taking long. This solution doesn't have much stuff left to implement, so it might be finished this month (hopefully). If you have any ideas or objections, be my guest. |
Beta Was this translation helpful? Give feedback.
-
Description
So far we have several unfinished transfer type pull requests, but all of them are too complex to be implemented or used:
#834
#836
#849
After looking into them deeply, I have the following considerations:
1 - We want to make stats transfer from some technos to others. If we don't need to care about values inheritance, it'll just be setting stats on techno group A, and then setting stats on group B. Hence, we could just make such inheritance an option of it, instead of a thing that always active.
2 - there's this complex system in the old draft
Let's see if we can abstract it: it'll firstly select a group of technos as the sender, then another group as the receiver. When choosing them, it can simply pick the firer and its target only, or select a group of units around them, with
Extra.Warhead
to determine its CellSpread.Actually, we don't have to care about the 'A to B' like relationship, but just select variable targets for sender and receiver independently. And in order to cover all cases between source and target, single and multiple, we can simply make them into 2 warheads:
3 - Then we look at this part of the draft:
Well, if we're using warheads to pick targets, then these are not really needed. We can just let it follow the versus and AffectsX (Allies, Enemies, Owner) of
SourceWarhead
andTargetWarhead
, instead of using a lot of tags to define it.4 - about the stats being transfered, I think that it should be treated case by case, cuz they have different properties:
Hence, I think we should divide these stats to different sets of tags, instead of using a same set which catagorized by enums. These different sets should have a generic rule for easier understanding and coding
X could be: Money, Strength, Experience, SWTimer, Ammo, Reload, GatlingStage, GatlingRateUp and anything we want to modify
So to sum up, the new transfer type would be like this:
Tags for target filter
SourceWarhead
determines the affected technos around the firer, by CellSpread, AffectHouses and Versus of this warheadTargetWarhead
works similarly but is for technos around the detonate coordinateAffectTargets
adds an extra selection of which technos would be vulnerableIgnoreTargets
adds an extra selection of which technos wouldn't be vulnerableIgnoreSelf
, if set to true, will keep firer out of the affected listGeneric tags for stat setting, already explained above. Notice that Receiver's calculation will not rely on these, but'll only plus the actual changed values of the sender (processed by send factors first) instead, for the sake of simplicity
X.SetToFixedAmount
X.Value
X.AbsolutePercent
X.RelativePercent
X.MaxValue
X.MinValue
X.MaxPercent
X.MinPercent
Special tags for each stat, so far I could think of these
Money.MaxAffectPerHouse
, explained aboveMoney.Display
,Money.Display.Houses
,Money.Display.AtFirer
,Money.Display.Offset
, explained aboveSWTimer.Types
determines which SW's timer will be affectedSWTimer.MaxAffectPerHouse
is similar toMoney.MaxAffectPerHouse
. This could be a generic rule for transfering something about HouseTags for receiver transfer type. These tags are defined under sender for better flexibility (multiple senders could use the same receiver)
Receiver
, as written above, is the toggle of the whole Receiver logicReceiver.SourceWarhead
,Receiver.TargetWarhead
,Receiver.AffectTargets
,Receiver.IgnoreTargets
andReceiver.IgnoreSelf
are filters for Receiver, default to sender's valuesReceiver.X.SendFactor
works like the draft proposed, which determines whether receiver's transfer value is influenced by sent transfer value. Can be set tosum, highest, lowest, average and count
with sum as default valueReceiver.X.SendRate
will multiply the sent values by this rate. Default value should be -1.0 given the most common usage of this is stealing health/moneyReceiver.X.SendSplit
works like the draft proposed, which divides each receivers transfer value by receivers' count if set to trueReceiver.X.MaxValue
,Receiver.X.MinValue
,Receiver.X.MaxPercent
,Receiver.X.MinPercent
are kept in case we don't want the targets affected by receiver has a stat beyond certain value/percentageReceiver.SWTimer.Types
,Receiver.Money.Display
,Receiver.Money.MaxAffectPerHouse
etc are the same tags to control extra options for certain stat, default to sender's valuesAn example of its usage is written below
INI code
Additional context
No response
Checklist
Beta Was this translation helpful? Give feedback.
All reactions