Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Thu Mar 28, 2024 11:51 am
All times are UTC + 0
Help making "upgrades" for units.
Moderators: Ares Support Team at PPM, Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [7 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
chr0nicz420
Jumpjet Infantry


Joined: 10 Feb 2016

PostPosted: Thu Jun 04, 2020 11:18 am    Post subject:  Help making "upgrades" for units. Reply with quote  Mark this post and the followings unread

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.

Example:
Code:

; Warhead
[UpgradeWarhead]
Wall=no
Wood=no
Verses=0%,0%,0%,0%,0%,0%,0%,0%,0%,0%,0%
Versus.brute=-100%
CellSpread=9999
PercentAtMax=1
AffectsAllies=no
AffectsEnemies=no
AffectsOwner=yes
AttachEffect.Animation=UPANIM
AttachEffect.ArmorMultiplier=1.25
AttachEffect.FirepowerMultiplier=1.5
AttachEffect.SpeedMultiplier=1.25
AttachEffect.Duration=150
Malicious=no
PreventScatter=yes
;AllowZeroDamage=yes

; Super weapon
[UpgradeSpecial]
UIName=Name:Upgrade
Name=Upgrade
IsPowered=false
RechargeTime=.001
Type=GenericWarhead
Action=Custom
SidebarImage=icon
ShowTimer=no
DisableableFromShell=no
Range=4
LineMultiplier=1
Cursor=Attack
NoCursor=NoCanDo
SW.Animation=INVISO
SW.Warhead=UpgradeWarhead
SW.Damage=0
SW.ShowCameo=no
SW.AutoFire=yes
SW.ManualFire=no
SW.AITargeting=NoTarget
SW.AIRequiresTarget=land,water,empty


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.

Example:
Code:

; Building
[YAPSYA2]
Primary=UpgradeWeapon

; Weapon
[UpgradeWeapon]
Damage=0
ROF=80
Range=-2
Projectile=InvisibleMedium
Speed=100
Warhead=UpgradeWeaponWH
;IsRadEruption=yes
FireOnce=no
AreaFire=yes
OmniFire=yes
DecloakToFire=yes

; Warhead
[UpgradeWeaponWH]
Wall=no
Wood=no
Verses=0%,0%,0%,0%,0%,0%,0%,0%,0%,0%,0%
Versus.brute=-100%
CellSpread=9999
PercentAtMax=1
AffectsAllies=no
AffectsEnemies=no
AffectsOwner=yes
AttachEffect.Animation=UPANIM
AttachEffect.ArmorMultiplier=1.25
AttachEffect.FirepowerMultiplier=1.5
AttachEffect.SpeedMultiplier=1.25
AttachEffect.Duration=150
Malicious=no
PreventScatter=yes
AllowZeroDamage=yes



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?

Back to top
View user's profile Send private message
maestro21
Soldier


Joined: 25 Feb 2008
Location: Philippines

PostPosted: Thu Jun 04, 2020 1:08 pm    Post subject: Reply with quote  Mark this post and the followings unread

You can use similar codes my (sorry I mean Mental Omega's)  Very Happy  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  Wink
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 ...  Wink
SW.MaxCount=-1  ; I think it is default to -1 but anyway,I write it here..

and lastly, the warhead  and weapon itself...





[TimeFreezeWeapon] ;weapon that affects whole battlefield.
Damage=1
Range=255 ; enough
ROF=450
Projectile=WorldWide
Speed=100
Warhead=TimeFreezeWH
AreaFire=yes
Anim=
OmniFire=yes
FireOnce=yes
Report=
DistributedWeaponFire=yes

[WorldWide]    ;projectile
Inviso=yes
Image=none
Vertical=yes
DetonationAltitude=0

[TimeFreezeWH]    ;the T.F. Warhead
Verses=3%,3%,3%,3%,3%,3%,3%,3%,3%,3%,3%
CellSpread=255   ; enough Thanks to ARES  Wink
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.

[/u]

Back to top
View user's profile Send private message Send e-mail YouTube User URL Facebook Profile URL Twitter Channel URL AIM Address
chr0nicz420
Jumpjet Infantry


Joined: 10 Feb 2016

PostPosted: Thu Jun 04, 2020 2:17 pm    Post subject: Reply with quote  Mark this post and the followings unread

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?

Back to top
View user's profile Send private message
maestro21
Soldier


Joined: 25 Feb 2008
Location: Philippines

PostPosted: Thu Jun 04, 2020 4:04 pm    Post subject: Reply with quote  Mark this post and the followings unread

chr0nicz420 wrote:
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.

Back to top
View user's profile Send private message Send e-mail YouTube User URL Facebook Profile URL Twitter Channel URL AIM Address
silverwind
Cyborg Firebomber


Joined: 11 Jun 2016

PostPosted: Tue Jun 09, 2020 7:50 am    Post subject: Reply with quote  Mark this post and the followings unread


Back to top
View user's profile Send private message
chr0nicz420
Jumpjet Infantry


Joined: 10 Feb 2016

PostPosted: Tue Jun 09, 2020 5:44 pm    Post subject: Reply with quote  Mark this post and the followings unread

silverwind wrote:
wouldn't it be simplier to just use a GenericWarhead superweapon instead?
http://ares-developers.github.io/Ares-docs/new/superweapons/types/genericwarhead.html

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.

Back to top
View user's profile Send private message
XxpeddyxX
Commander


Joined: 03 Sep 2004

PostPosted: Tue Jun 09, 2020 10:52 pm    Post subject: Reply with quote  Mark this post and the followings unread

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

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [7 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
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


Powered by phpBB © phpBB Group

[ Time: 0.1536s ][ Queries: 11 (0.0098s) ][ Debug on ]