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 Wed Apr 24, 2024 12:09 pm
All times are UTC + 0
Do animations give a damn about warhead?
Moderators: Global Moderators, Tiberian Sun Moderators
Post new topic   Reply to topic Page 1 of 1 [10 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
SuperJoe
Commander


Joined: 03 Sep 2009

PostPosted: Tue Dec 08, 2009 7:02 pm    Post subject:  Do animations give a damn about warhead? Reply with quote  Mark this post and the followings unread

I have a unit that uses an animation in its weapon to self-destruct. The animation uses a specific warhead i have defined that should damage only armor type Concrete and has InfDeath=1 (twirl die). However the animation seems to damage everything equally much, and infantry end up with the "run-around-burning" death instead of the one i defined in the warhead. This leads me to believe warhead simply does not work on animations. Or am i doing something wrong? I have the both the warhead and the animation listed in the warheads and animations sections of Rules.ini.

Is there any other way to do this? I would like that the unit self-destructs, but the self-destruction should not cause damage to anything else than the unit itself, because the damage it deals to its targets comes from the weapon it fires.

Back to top
View user's profile Send private message
Orac
President


Joined: 11 Jul 2008
Location: New Zealand

PostPosted: Tue Dec 08, 2009 7:45 pm    Post subject: Reply with quote  Mark this post and the followings unread

To quote an old post by Morpher:
Morpher wrote:
Keep in mind animations can NOT have warheads, ONLY debris. TitanmkII tried and tested emulating an iron curtain with this method. Internal Error.

So yeah, you're correct. Warheads can't be given to animations.

Back to top
View user's profile Send private message
Dark Templar X
Commander


Joined: 26 Feb 2009

PostPosted: Tue Dec 08, 2009 9:30 pm    Post subject: Reply with quote  Mark this post and the followings unread

As far as I know, they can be, but it's ignored entirely.

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


Joined: 16 Aug 2006
Location: Germany

PostPosted: Tue Dec 08, 2009 9:50 pm    Post subject: Reply with quote  Mark this post and the followings unread

let me quote myself from the HyperPatch Announcement topic
Lin Kuei Ominae wrote:
Ordosherrscher wrote:
-Art.ini doesn't really look at the warhead

I just found out that it indeed works correct and perfectly fine the way it is.
You just have to understand how TS uses the warheads and anims, which is imo a very wise solution by WW.

TS knows 2 different types of anims: normal frame based anims and debris.

1. frame based anims like fire use by default the warhead "Fire2" which is set with the key "FlameDamage2=" in rules.ini [CombatDamage]. This is necessary to make sure, that the warhead has Sparky=no, or every anim with damage would create a feedback loop that creates more and more flames.
The damage on these anims is done on each frame, thus they also allow floating point damage like "0.06".

2. art.ini debris (like meteors) use perfectly fine the warhead which you assign to them. They just don't use the animation of the warhead, to again prevent a feedback loop where an art.ini debris creates a warhead anim which in turn could create an art.ini debris again.
The damage on these anims is done only once on impact, thus they only allow integer damage (Damage=0.99 would be changed to Damage=0).

_________________
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
SuperJoe
Commander


Joined: 03 Sep 2009

PostPosted: Wed Dec 09, 2009 8:35 am    Post subject: Reply with quote  Mark this post and the followings unread

After alot of testing I managed to make a nearly working suicide animation that does not damage other things apart from the suiciding unit. Problem is that i can't contain the damage to one square only, it sometimes spills to the nearby squares slightly. Using concrete armor on the suiciding unit or structure and making the animation warhead damage only concrete can make the problem nearly dissapear (still affects deployed tick tanks and a few structures). Here's the code:

Code:

[SUICIDEANIM]
Elasticity=0.0 ; This should prevent it from moving any further?
MaxXYVel=1.0 ; Can't make this less, and this is the key that causes the problem, the debris won't hit the very center of the square
MinZVel=0.0 ; Blow right on top of the square instantly
MaxZVel=0.0
ExpireAnim=EXPLOMED ; Can be whatever you want
Damage=2000 ; Needs to be quite a bit more than your suiciding unit has health, because the debris won't hit the very center of the square. My unit has 100hp and 1000 damage was not enough.
DamageRadius=0 ; Don't think this has ANY effect at all
Warhead=YourWarhead ; Make sure Spread=0 on the warhead
IsMeteor=true ; To make debris work
Spawns=METDEBRI ; To make debris work
SpawnCount=0 ; Don't want anything spawned
LoopStart=0 ; Not sure these are needed
LoopEnd=8
LoopCount=-1
RandomRate=0,0 ; What does this do????
DetailLevel=0 ; Make sure this is played
Surface=yes ; Not sure any of these 3 have any relevance
Flat=yes
Sticky=yes


Can anyone think of a way to limit the debris damage to only the square where the suiciding unit or building was? It hardly is a problem for my unit since it uses concrete armor, but if it could be limited to one square it would allow you to use any armor type you want.

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


Joined: 03 Sep 2009

PostPosted: Wed Dec 09, 2009 1:48 pm    Post subject: Reply with quote  Mark this post and the followings unread

Tried another method of doing it with particles. Only way i could make a particle attached to a weapon damage the shooter itself was by giving the weapon UseFireParticles=yes, giving the weapon an attached particle system that behaves like fire, and that particle system holds a particle that behaves like gas. Something like this:

Code:

[WeaponX]
...
UseFireParticles=yes
AttachedParticleSystem=SuicideSys

[SuicideSys]
HoldsWhat=SuicideParticle
Spawns=yes
SpawnFrames=1
SpawnRadius=0
BehavesLike=Fire
Image=none
Lifetime=1

[SuicideParticle]
Image=none
Deacc=0.01
Velocity=1.0
BehavesLike=Gas
MaxEC=1
MaxDC=0
Warhead=SuicideWH
Damage=1000
StartStateAI=0
StartFrame=0
EndStateAI=1
StateAIAdvance=1
DeleteOnStateLimit=yes
Normalized=yes
FinalDamageState=1


I coulnd't get this to work but with some adjustments i know it works, cause i tried a slightly modified version of the FireSteamSys and it did damage the shooter itself. But the real problem is that if you use this way, you can't use the units normal weapon. The main weapon gets overrided by the flame shooter. What i wanted to do is make the weapon spawn the suicideparticle AND shoot its normal weapon. This can be done with spark particles (but they won't cause any damage). Gas particles can't be used on a weapon, only in warhead. Fire particles on the other hand seem to override any weapon you had given the unit (at least it didn't use the projectile i had given the weapon, which should have used airburst logic).

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


Joined: 16 Aug 2006
Location: Germany

PostPosted: Wed Dec 09, 2009 2:30 pm    Post subject: Reply with quote  Mark this post and the followings unread

try the following. I haven't tested it but it should work and kill the firing unit. However i doubt that this won't do damage on adjacent cells.
btw, check your units FireFLH in art.ini. If this is too far to the front (the F value), the muzzleflash anim or particlesystem will always hit the adjacent cell, regardless what you set on your warhead.

UseSparkParticles=yes
AttachedParticleSystem=SuicideSys

[SuicideSys]
HoldsWhat=SuicidePart
Spawns=yes
SpawnFrames=1
SpawnRadius=1
Slowdown=.025
ParticleCap=30
SpawnCutoff=15.0
SpawnTranslucencyCutoff=13.0
BehavesLike=Smoke

[SuicidePart]
Image=INVISO
MaxEC=2
MaxDC=1
Translucency=25
Velocity=5.0
Deacc=.05
WindEffect=0
Damage=1000
Warhead=SuicideWH
BehavesLike=Fire
DeleteOnStateLimit=yes
EndStateAI=25
StateAIAdvance=1

_________________
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
SuperJoe
Commander


Joined: 03 Sep 2009

PostPosted: Wed Dec 09, 2009 5:14 pm    Post subject: Reply with quote  Mark this post and the followings unread

With your original code the results were mixed. Sometimes the unit blew up, but more often the unit next to it with concrete armor blew up, and not the unit itself. I tried giving the particle some image to see what was going on, and there was a smoke hovering above the unit. Not sure why it damaged things near it more often though.

EDIT: Not sure why i keep talkin about a unit, it's a building i am testing this on. The building is size 1x1 and has no PrimaryFireFLH defined. I tested with PrimaryFireFLH=-50,0,0 too, and i couldn't get it to work. Still sometimes the nearby units exploded instead of the suiciding one.

I tried tweaking the settings and the most working thing i got is this:

Code:

[SuicideSys]
HoldsWhat=SuicideParticle
Spawns=yes
SpawnFrames=1
SpawnRadius=1
Slowdown=.025
ParticleCap=1 ;30
SpawnCutoff=15.0
SpawnTranslucencyCutoff=13.0
BehavesLike=Smoke

[SuicideParticle]
Image=INVISO
MaxEC=2
MaxDC=1
Translucency=25
Velocity=1.0
Deacc=.05
WindEffect=0
Damage=150
Warhead=SuicideWH
BehavesLike=Gas
DeleteOnStateLimit=yes
EndStateAI=1
StateAIAdvance=1



This will destroy the suiciding unit always, and might cause very little damage to a few squares next to it (often 1 up to 3). The damage is so slight that i wouldn't mind it at this point anymore. However there is a catch (seems like there always is when you get something working in this game...). Because the particle BehavesLike=Gas, the suiciding unit that gets destroyed will spawn a baby visceroid. I'm guessing there is no way to avoid this without breaking the chemical missile and other things that are supposed to spawn them. It would be alot easier to do this if there was a list somewhere that explains more of the keys related to particles.

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


Joined: 16 Aug 2006
Location: Germany

PostPosted: Wed Dec 09, 2009 9:01 pm    Post subject: Reply with quote  Mark this post and the followings unread

If it's a building, just give it an ActiveAnim
e.g.
Code:
ActiveAnim=SUICIDEANIM

[SUICIDEANIM]
Image=INVISO
Damage=1
Rate=900 ;play the anim as fast as possible (900 frames per minute)
LoopStart=0
LoopEnd=1
LoopCount=-1

This should destroy the building very fast and due to the very low damage, no adjacent cell will receive damage.

_________________
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
SuperJoe
Commander


Joined: 03 Sep 2009

PostPosted: Wed Dec 09, 2009 9:54 pm    Post subject: Reply with quote  Mark this post and the followings unread

Unfortunately the building is a mine that is deployed and waits for an enemy to get close. The problem i'm having with it is i have a special weapon that i want it to use, but i can't get the unit to self-destruct without causing damage to others near it. Just want it to use its main weapon and not cause damage by anything else. The particle system thing works perfect apart from the visceroid problem Sad . With the debris thing you put a certain armor type at risk of being instantly destroyed (given the concrete armor works pretty well for this).

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [10 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.1723s ][ Queries: 11 (0.0087s) ][ Debug on ]