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 Sat Apr 20, 2024 4:16 am
All times are UTC + 0
Damage Over Time Weapons
Moderators: 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
FurryQueen
General


Joined: 24 Jul 2010
Location: Liyue

PostPosted: Sun Oct 10, 2010 10:41 pm    Post subject:  Damage Over Time Weapons
Subject description: Works best with Ares.
Reply with quote  Mark this post and the followings unread

I'm sure you all know what damage over time means when it comes to damage and its application. If not, it's the short of way saying 'this weapon does damage over time instead of all at once'. The method itself is quite simple, but it does have a few setbacks.

The setbacks are Red Alert 2 and YR without Ares (includes RockPatch and NonsensePatch) use C4Warhead for the damage. Ares allows you to use a specific warhead so that's always a plus. The second is that the looping structure does not appear to cease the animation on the last frame as you would expect. This may be desired in some instances however.

However, the ability to control the damage on a per frame basis is very nice, and the ability to have damage applied over a duration to fit in-line with the animation's image is very nice. If you have Ares, you can even change what warhead to use whenever you want.

The following is just an example: let's assume we have an animation with five frames, just to keep things simple.

You would have code similar to this:
Code:
[ANIM01]
Image=ANIM
Damage=
Warhead= ;only works with Ares
Normalized=yes
Start=0
End=1
Next=ANIM02

[ANIM02]
Image=ANIM
Damage=
Warhead= ;only works with Ares
Normalized=yes
Start=1
End=2
Next=ANIM03

[ANIM03]
Image=ANIM
Damage=
Warhead= ;only works with Ares
Normalized=yes
Start=2
End=3
Next=ANIM04

[ANIM04]
Image=ANIM
Damage=
Warhead= ;only works with Ares
Normalized=yes
Start=3
End=4
Next=ANIM05

[ANIM05]
Image=ANIM
Damage=
Warhead= ;only works with Ares
Normalized=yes
Start=4
End=5


That's the basic premise. Not too complicated, and it can be used with any number of frames.

Some things to keep in mind:
- The animation will play rather quickly, but you can use Rate to slow it down.
- All new animations need to be added to the [Animations] list.
- Invoke it using [ANIM01] on your warhead.

No, it isn't perfect. But it's a neat effect with the right animations.

Feel free to experiment as you wish, as well. If you manage to correct anything I missed, do let me know so I can append it to the tutorial.

[EDIT] Tutorial updated. Thanks LKO.


Key Words: #Tutorials #Modding #RedAlert2 #YurisRevenge #Ares #Rules.INI 

_________________
KGR | AT
AZUR
Discord: theastronomer1836
Steam

Last edited by FurryQueen on Mon Oct 11, 2010 12:52 am; edited 4 times in total

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


Joined: 16 Aug 2006
Location: Germany

PostPosted: Sun Oct 10, 2010 11:27 pm    Post subject: Reply with quote  Mark this post and the followings unread

FurryQueen wrote:
The setbacks are that Tiberian Sun, Red Alert 2 and YR without Ares (includes RockPatch and NonsensePatch) will always use C4Warhead for the damage.

In TS it's the warhead defined under FlameDamage2, not C4Warhead.

In addition do art.ini debris use correct the warhead. So if you want to give an animation a frame based damage with a certain warhead, simply let the animation spawn the art.ini debris with TrailerAnim=.

In addition was the fixed warhead done on purpose by WW to prevent a feedback loop which causes flames to spawn more and more flames.

So, even if this Ares feature might be useful, it should be very carefully used, or you'll receive some heavy lags if you created by accident a feedback loop.

FurryQueen wrote:
However, the ability to control the damage on a per frame basis is very nice, and the ability to have damage applied over a duration to fit in-line with the animation's image is very nice. If you have Ares, you can even change what warhead to use whenever you want.

Using the art.ini debris logic you can do the same too. Just assign a different debris to each animation step.


FurryQueen wrote:
- If you use Start instead of LoopStart, the animation's fluidity will be lost.
- If you use End anywhere, the animation will be cut short.

I don't know RA2, but for TS this is wrong.
In your example would ANIM05 start playing with frame 0 instead of frame 3 as defined under LoopStart.
Since no End key is set in your example, each anim would also play until the last frame, thus in TS you would see ingame the complete ANIM played 5 times. One time for each of the ANIM01-ANIM05 steps. Since LoopCount is 0, the loop keys are completely useless as the anim simply runs over them without having to take care of the set frames.

Start= defines the frame at which an animation should start playing. If not set it starts at frame 0
LoopStart= defines the frame at which the loop should start playing.
End= defines the frame at which the animation should stop. If not set it ends at the last frame
LoopEnd= defines the frame at which the loop should stop playing.
e.g.
Start=5
LoopStart=10
LoopEnd=15
LoopCount=5
End=20
This animation would start playing at frame 5 (first visible frame ingame is 6, because engine counts from 0), then loop 5 times between frames 10 to 15 (visible ingame actually frame 11-15) and after the last loop it would play the anim until frame 20.

_________________
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
FurryQueen
General


Joined: 24 Jul 2010
Location: Liyue

PostPosted: Mon Oct 11, 2010 12:17 am    Post subject: Reply with quote  Mark this post and the followings unread

[EDIT] Is End zero-based or one-based? That will finalize things.

[EDIT2] Removed redundant nonsense.

_________________
KGR | AT
AZUR
Discord: theastronomer1836
Steam

Back to top
View user's profile Send private message Skype Account
Cranium
Defense Minister


Joined: 05 Dec 2009
Location: USA

PostPosted: Mon Oct 11, 2010 1:05 am    Post subject: Reply with quote  Mark this post and the followings unread

Both start= and end= are 0 based

Back to top
View user's profile Send private message Visit poster's website Skype Account
m7
Commander


Joined: 17 Apr 2009

PostPosted: Mon Oct 11, 2010 2:16 am    Post subject: Reply with quote  Mark this post and the followings unread

Quote:
Using the art.ini debris logic you can do the same too. Just assign a different debris to each animation step.


Art(md).ini debris weapons have long been known to cause horrible lag online, IIRC.

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


Joined: 24 Jul 2010
Location: Liyue

PostPosted: Mon Oct 11, 2010 4:17 am    Post subject: Reply with quote  Mark this post and the followings unread

Cranium wrote:
Both start= and end= are 0 based

I wasn't sure since LoopEnd is stupidly one-based. Either way, I think I still did it right... It works, but it's just fast.

_________________
KGR | AT
AZUR
Discord: theastronomer1836
Steam

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


Joined: 16 Aug 2006
Location: Germany

PostPosted: Mon Oct 11, 2010 5:43 am    Post subject: Reply with quote  Mark this post and the followings unread

FurryQueen wrote:
Cranium wrote:
Both start= and end= are 0 based

I wasn't sure since LoopEnd is stupidly one-based. Either way, I think I still did it right... It works, but it's just fast.

No, the End and LoopEnd keys are also 0 based. But the frame you set there isn't played and the last visible frame ingame is the set frame-1.

This was probably done so you can have for example End=15 on the first anim and Start=15 on the Next= anim and both are seemless connected without playing the 15th frame twice.

If you look at the anim in XCC Mixer (which is 0 based too) and have in art.ini something like End=4, then this means the last visible frame is 3. (playing frames 0-3 which is again 4 frames)
In SHP Builder (which is unfortunately 1 based, thus confusing since everything else is 0 based) it would show the number 4 of the last visible frame.

e.g. the SHP turrets use also LoopEnd=32, even if the 0-based anim counts only from 0-31.

_________________
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
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.2480s ][ Queries: 11 (0.0106s) ][ Debug on ]