Posted: Thu Jun 04, 2020 11:18 am Post subject:
Help making "upgrades" for units.
I was trying to do something similar to Generals.
At first, what I usually do is to create a super weapon that has "infinite" CellSpread warhead plus AttachEffect and its super weapon timer is set to shortest time possible.
However, the problem here is, I'm not sure if this applies on all maps or only on certain maps but despite it has 9999 CellSpread, for some unknown reason, the buff will apply on the unit only if it enters at the "certain point" of the map(Usually at the near center of the map) so it's not really a "full map effect". By that, this method is getting really unreliable at times.
Another method is to give a building a weapon that has infinite range and infinite CellSpread warhead plus AttachEffect.
Now my issue is AI doesn't really use this. Similar on AI will not use an AoE repair ring weapon. Therefore, this method is also unreliable.
As I have stated my issues on my two methods, is there a better way for making upgrades on units? Or at least, is there a mistake on my coding? QUICK_EDIT
You can use similar codes my (sorry I mean Mental Omega's) Time Freeze SW.
Rules.ini
[SuperWeaponTypes] ;add to the list
+=TimeFreezeSW
[BuildingTypes] ;add to the list
+=TimeFreezeSWBuilding
[Warheads] ;add to the list
+=TimeFreezeWH
[TimeFreezeSWBuilding] ;whatever it is
EMPulseCannon=yes
Primary=TimeFreezeWeapon
BuildLimit=1
SuperWeapons=TimeFreezeSW
[WeaponTypes] ;maybe not necessary,but I put here,anyway..
+=TimeFreezeWeapon
[TimeFreezeSpecial] ;SW tags
UIName=NOSTR:TimeFreeze
Name=Time Freeze
IsPowered=true
RechargeTime=.1 ; for testing use larger times like 25 minutes,it is unbalanced
Type=EMPulse
Action=Custom
;SidebarImage=FREEZEICON
SidebarPCX=digitaltime.pcx
ShowTimer=no
DisableableFromShell=no
Range=1.4
LineMultiplier=1
SW.FireIntoShroud=yes
SW.AITargeting= ; you can arange it.Use Ares Documantation please.
EMPulse.TargetSelf=yes
FlashSidebarTabFrames=0
SW.AffectsHouse= ; just blank
SW.CreateRadarEvent=no
SW.AllowAI=no ;this was for testing,change it to yes and make AI can use it
EMPulse.Cannons=TimeFreezeSWBuilding ;put here whatever it is...
SW.VirtualCharge=yes ; just in case, I wanted use this tag,too ...
SW.MaxCount=-1 ; I think it is default to -1 but anyway,I write it here..
[TimeFreezeWH] ;the T.F. Warhead
Verses=3%,3%,3%,3%,3%,3%,3%,3%,3%,3%,3%
CellSpread=255 ; enough Thanks to ARES
EMP.Duration=1600
EMP.Cap=0
PercentAtMax=1
AffectsAllies=yes ; It is balanceful my allies are also affected,but not me.
AffectsOwner=no ;yes, not me..
Conventional=no
AffectsEnemies=yes
PreventScatter=yes
AttachEffect.Duration=1600
AttachEffect.Animation=CHRONOSK
AttachEffect.ForceDecloak=yes
AttachEffect.SpeedMultiplier=0 ;make them freeze
AttachEffect.FirepowerMultiplier=0 ;make them weaponless
DamageAirThreshold=-1 ;Affects air units ,too.
yes you can use a similar code Using EMPCannon= tag. this will help you more about your Upg.SW.
Woah I never knew EMPulse works like that. Thanks, that totally solves my issue.
As I want to try using the EMPulseCannon logic on my other "upgrades" too, I have another question. I have multiple "upgrades" on a single building and that means, each different "upgrade" has their own weapon as well but that's impossible to define a lot of weapons in a single building. So is this not possible for a lot of different "upgrades" on a single building using EMPulseCannon logic? QUICK_EDIT
Woah I never knew EMPulse works like that. Thanks, that totally solves my issue.
As I want to try using the EMPulseCannon logic on my other "upgrades" too, I have another question. I have multiple "upgrades" on a single building and that means, each different "upgrade" has their own weapon as well but that's impossible to define a lot of weapons in a single building. So is this not possible for a lot of different "upgrades" on a single building using EMPulseCannon logic?
I don't know,if every upgrade fire its primary that belongs to one building?
AFAIK,game engine doesn't allow that. I understand what you mean,EMP cannon building will fire its primary weapon at desigtated point.(AFAIK,one upgrade can have one weapon,also one building can have one weapon only at a time.) I don't mean primary and secondary.I mean using multiple weapons at the same time...(this was another feature request when ARES engine had not been released yet.)
You will have to arrange all upgrades that you will unleash, one by one to each building(EMP cannon) (one by one for every upgrade SW)...or ;
?EMPulse.Cannons= (for SW itself, not SW building) tag can be multiple buildings by list,but they will be the same super weapon's unleashers.I mean, you will develop multiple long range and cellspread weapons for every EMP cannon (for every upgrade),but they will have only one SW, when you tick the cameo,all will be activated at same time. QUICK_EDIT
You can use it to have multiples attached to the same building too.
As far as I know, the only real drawback to this is an interferance with the submarine logic (which I imagine happens with empulse cannons too) QUICK_EDIT
You can use it to have multiples attached to the same building too.
As far as I know, the only real drawback to this is an interferance with the submarine logic (which I imagine happens with empulse cannons too)
As you can see in my first code, I am already using the GenericWarhead super weapon and that is my main code for my "upgrades". I have already stated my issue with it, which is it's not actually affecting the whole map, despite the huge CellSpread amount, unlike the EMPulse super weapon. QUICK_EDIT
DistributedWeaponFire is not valid and DistributedFire should be used on the firer's code instead.
I've been using EMPulse for upgrades for a long time and I would recommend to stay away from it because it causes a lot of lag, I would suggest going down the weapon path but if you want the AI to use it, give it a weapon that attacks enemies but detonates on the spot with an airburst weapon that only affects allies, this way the AI will use the upgrade as well.
I'll post a comprehensive upgrade tutorial soon. _________________
ayylmao on Discord QUICK_EDIT
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum