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 10:28 pm
All times are UTC + 0
How to simulate CellSpread in TS
Moderators: Global Moderators, Tiberian Sun Moderators
Post new topic   Reply to topic Page 1 of 1 [16 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Wed Jun 06, 2012 10:35 am    Post subject:  How to simulate CellSpread in TS Reply with quote  Mark this post and the followings unread

This Tutorial will show you a simple way to simulate the RA2 CellSpread key in the TS engine.

The key to this is the Web logic.

1. Create a new ParticleSystem and Particle. This will deal the damage on each of the cells.

the particlesystem
Code:
[CellSpreadSys]
HoldsWhat=CellSpreadPart
Spawns=yes
SpawnFrames=1   ;spawn every frame a particle
SpawnRadius=0   ;spawn the particle on the cell where the particlesystem is created
Slowdown=0
ParticleCap=1   ;don't spawn more than 1 particle
SpawnCutoff=1
SpawnTranslucencyCutoff=100
BehavesLike=Smoke
Lifetime=1      ;spawn only for one frame particles, thus in total only one particle


Don't forget to add this to the ParticleSystems list.
Code:
[ParticleSystems]
xx=CellSpreadSys   ;xx= free number



the particle
Code:
[CellSpreadPart]
Image=none   ;don't show any anim. this also reduces lags
MaxDC=1      ;do every n-th frame damage (in this case do damage only 1 time)
MaxEC=1      ;play the particle only for 1 frame
Translucency=0
Velocity=0.0
Deacc=.05
WindEffect=0
Damage=100   ;the damage that each cell should get
Warhead=HE   ;use here the warhead
BehavesLike=Fire   ;this makes it use correctly the warhead verses (unlike Gas)


again make sure you've added the particle to the appropriate list
Code:
[Particles]
xx=CellSpreadPart   ;xx= free number



2. Now the magic starts. To get the CellSpread area effect we use the Web logic
Add to your warhead the following keys
Code:
Webby=true         ;use the web logic
WebDuration=0      ;don't web infantry (unfortunately infantry is still showing once the web anim)
WebDurationVariation=0
WebRadius=5      ;create on each cell in this radius the particlesystem
Particle=CellSpreadSys   ;the particlesystem which deals the damage


And you're done.
Now you only have to adjust the damage and warhead on the particle (CellSpreadPart) to suit your needs.


Pros and Cons of this workaround
Pros
+easy ini coding
+perfect distribution of the damage over the cells (no cell is hit twice unlike art.ini debris which are randomly hitting cells)
+works also on water (unlike art.ini debris which show there the splash animation and in some cases also don't do any damage)

Cons
-webanim is played once on infantry (in case of a nuke no big deal, as the infantry is dying in the flames instantly)
-a huge radius can cause lags (WebRadius above 20 will cause severe lags)
-art.ini debris can't use this, because the special web logic keys are ignored when the warhead is used on a debris (just like EMEffect which isn't working on art.ini debris too)


Thanks to Bittah, for making me aware of the web logic and doing some research there.


\EDIT
due to the Web logic, the weapon using this warhead has issues at targeting anything else than infantry.
To avoid that you should use the reaper split logic and add an intermediate state dummy weapon, which is used for the targeting.

Code:

[MyUnit]
Primary=CellSpreadTarget ;use this for targeting, the real weapon is used on the second stage

;the weapon which should use the cellspread
;use the range and ROF of the actual weapon
[CellSpreadTarget]
Damage=0
ROF=80
Range=20
ProjectileRange=0 ;make the first split-logic stage only a dummy
Projectile=CSTargetProj ;special reaper split projectile
Speed=20
Warhead=Super ;used for targeting only

;special CellSpread targeting projectile
[CSTargetProj]
High=no
Shadow=no
Proximity=no
Cluster=1
Ranged=yes
Range=0
AA=yes
AG=yes
Image=none
ROT=100
Splits=yes
AirburstWeapon=CellSpreadWeapon ;this is the true weapon which is then also used against the enemy
IgnoresFirestorm=yes
Acceleration=10


Exclamation Make sure you gave a unit (e.g. dummy infantry) the AirburstWeapon Exclamation


Key Words: #Tutorials #Modding #TiberianSun #Firestorm #Rules.INI 

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Last edited by Lin Kuei Ominae on Thu Jun 07, 2012 9:38 am; edited 4 times in total

Back to top
View user's profile Send private message
Bittah Commander
Defense Minister


Joined: 21 May 2003
Location: The Netherlands

PostPosted: Wed Jun 06, 2012 8:28 pm    Post subject: Reply with quote  Mark this post and the followings unread

Here's some images with it in action #Tongue



WebRadius.gif
 Description:
 Filesize:  877.76 KB
 Viewed:  23942 Time(s)

WebRadius.gif



_________________

Back to top
View user's profile Send private message Send e-mail ModDB Profile ID YouTube User URL Facebook Profile URL
Allied General
General


Joined: 19 Mar 2004
Location: United Kingdom

PostPosted: Wed Jun 06, 2012 8:35 pm    Post subject: Reply with quote  Mark this post and the followings unread

Well good workaround but one more con - can't gain experience if unit ability

_________________

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID Facebook Profile URL Twitter Channel URL
Bittah Commander
Defense Minister


Joined: 21 May 2003
Location: The Netherlands

PostPosted: Wed Jun 06, 2012 8:41 pm    Post subject: Reply with quote  Mark this post and the followings unread

Well, it's better than the alternative... Which is... nothing.

_________________

Back to top
View user's profile Send private message Send e-mail ModDB Profile ID YouTube User URL Facebook Profile URL
Exley
Commander


Joined: 09 May 2011
Location: Approaching the Great Pyramid

PostPosted: Wed Jun 06, 2012 10:23 pm    Post subject: Reply with quote  Mark this post and the followings unread

this looks good for nuke missile

_________________
Quote:

how did we end up here ?

this place is horrible ...

smells like balls ...


Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Wed Jun 06, 2012 10:39 pm    Post subject: Reply with quote  Mark this post and the followings unread

Nuke, ioncannon, hunterseeker, basically every superweapon could profit from this.
Also demolition trucks and other special units (e.g. a shield unit which heals everything inside the field).

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
SMIFFGIG
General


Joined: 03 Mar 2003
Location: Great Britain

PostPosted: Wed Jun 06, 2012 11:29 pm    Post subject: Reply with quote  Mark this post and the followings unread

very interesting

so essentially works just like RA2 cellspread tag?

_________________

Back to top
View user's profile Send private message Send e-mail Skype Account
Bittah Commander
Defense Minister


Joined: 21 May 2003
Location: The Netherlands

PostPosted: Wed Jun 06, 2012 11:49 pm    Post subject: Reply with quote  Mark this post and the followings unread

Essentially, yes. With the downsides that it's necessary for the damage to be inflicted via a particle system, it causes infantry to get "webbed" for 1 frame and the warhead can only be used by weapons (and not by debris and animations).

_________________

Back to top
View user's profile Send private message Send e-mail ModDB Profile ID YouTube User URL Facebook Profile URL
Exley
Commander


Joined: 09 May 2011
Location: Approaching the Great Pyramid

PostPosted: Thu Jun 07, 2012 12:24 am    Post subject: Reply with quote  Mark this post and the followings unread

pimp the ion storm
let everyone die hrhrhrhr

_________________
Quote:

how did we end up here ?

this place is horrible ...

smells like balls ...


Back to top
View user's profile Send private message
Bittah Commander
Defense Minister


Joined: 21 May 2003
Location: The Netherlands

PostPosted: Thu Jun 07, 2012 12:28 am    Post subject: Reply with quote  Mark this post and the followings unread

That most likely won't work (for the reason specified in my last post).

_________________

Back to top
View user's profile Send private message Send e-mail ModDB Profile ID YouTube User URL Facebook Profile URL
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Thu Jun 07, 2012 6:26 am    Post subject: Reply with quote  Mark this post and the followings unread

sure, just add the Webby keys to IonWH.
It's not very different to the approach i've used, to give the DTA ionstorm a wide area uncloaking effect.

art.ini debris and animations can't use it for sure, but there might be a chance that rules.ini voxel debris can use it.

SMIFFGIG wrote:
so essentially works just like RA2 cellspread tag?
Beside the things Bittah mentioned, another difference is, that the RA2 cellspread works iirc in a square pattern (5x5,8x8 etc), while this is really using a radius and thus used in a circular area (which is actually preferable).

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Starkku
Cyborg Commando


Joined: 28 Dec 2007
Location: Finland

PostPosted: Thu Jun 07, 2012 8:06 am    Post subject: Reply with quote  Mark this post and the followings unread


_________________

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID Twitter Channel URL
SuperJoe
Commander


Joined: 03 Sep 2009

PostPosted: Thu Jun 07, 2012 8:10 am    Post subject: Reply with quote  Mark this post and the followings unread

Heh tried to do the same here but could never find a way to attach damage to the large web spread. Nice job.

Think you could get rid of the web appearing over infantry issue by changing WebbedInfantry= ;WEBGUY in firestrm.ini, add the web frames to every infantry shp, and change the Struggle= in their sequence to point to those webbed frames. Make the 1st (and possibly 2nd) frame of the struggling sequence into the infantry just standing still. This way the superweapon will never get to display the struggling web animation, but the actual webs do, just with a 1-2 frame delay.

EDIT: You'd need to add alot of new frames into those SHPs though since you can't make it loop only the struggling in web frames, those 1-2 standing still frames would keep popping up in the middle of the sequence. So the sequence would have to be quite long... dunno if there would be a way to make it loop just the struggling frames.

_________________

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Thu Jun 07, 2012 9:44 am    Post subject: Reply with quote  Mark this post and the followings unread

It's doing one complete web anim and not only the first frames. So i doubt this would solve the problem, as the infantry are still webbed like on any other web weapon.
I think best is to simply set the anti-infantry damage high enough to kill those annoying little bastards. Twisted Evil


Tutorial updated, due to targeting issues with warheads using the web logic.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

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


Joined: 30 Jan 2010
Location: Malaysia

PostPosted: Thu Jun 07, 2012 9:55 am    Post subject: Reply with quote  Mark this post and the followings unread

LKO wrote:
I think best is to simply set the anti-infantry damage high enough to kill those annoying little bastards. Twisted Evil

_________________
Team Black wrote:
interesting seeing your voxel work. They're still better than Aro's!

Back to top
View user's profile Send private message
Bittah Commander
Defense Minister


Joined: 21 May 2003
Location: The Netherlands

PostPosted: Thu Jun 07, 2012 2:25 pm    Post subject: Re: How to simulate CellSpread in TS Reply with quote  Mark this post and the followings unread

Concerning the Ion Cannon; I tried adding the webby keys and a particle system to it, but it didn't work. The particle was only spawned in the center and the WebRadius was ignored.

So as I already mentioned above, this won't work with the Ion Cannon. The reason for this is that the Ion Cannon isn't fired by an existing weapon, unlike other super weapons which do make use of an actual weapon (such as the multi missile, chemical missile, hunter seeker EMP cannon and drop pods). So aside from the firestorm wall SW, all other superweapons should be able to work with this perfectly fine.

This doesn't include a meteor SW however. Although I haven't tested it, the fact that the damage inflicted by a meteor storm comes from debris (the meteors themselves) which have the warhead specified, the related warhead isn't specified by the weapon itself, but rather by the meteors that are spawned by this weapon.
So the the only thing that'd be possible is make a lot of meteors appear in a wide radius using WebRadius, but the meteors themselves can't be coded to cause a wide-area effect with this.
Lin Kuei Ominae wrote:

[CellSpreadTarget]
Warhead=Super ;used for targeting only

I see you kept my comment and just changed the warhead Razz

The reason I added that comment is because I initially gave it a warhead of which the first Verses= value was 0% (meaning it inflicts 0% damage against infantry) and it turned out that the weapon wouldn't fire anymore. Any warhead where none of the Verses= values are 0% seems to work fine though.

_________________

Back to top
View user's profile Send private message Send e-mail ModDB Profile ID YouTube User URL Facebook Profile URL
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [16 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.1990s ][ Queries: 14 (0.0106s) ][ Debug on ]