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 Mar 26, 2025 2:54 pm
All times are UTC + 0
Weapon using Spark system?
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [8 Posts] Mark the topic unread ::  View previous topic :: View next topic

Weapons can use Spark systems
No, never, it is impossible
0%
 0%  [ 0 ]
Yes! I know how, let me explain...
100%
 100%  [ 1 ]
Yes, I have seen it (but don't know how)
0%
 0%  [ 0 ]
Total Votes : 1

Author Message
NimoStar
Commander


Joined: 07 Nov 2012
Location: Buenos Aires

PostPosted: Tue Jul 02, 2024 4:52 pm    Post subject:  Weapon using Spark system? Reply with quote  Mark this post and the followings unread

Does anyone know of a way so that a weapon will invoke Spark systems?

Spark systems are particles, thus generally look better than RA2's choppy and resource intensive animations. They are also randomized each time.

However, I don't know how to "replace" the anim lists of warhead, with spark systems instead.

Also would be useful for source point (weapon firing anim). Sparky cannons go boom.

I am using both Ares and Phobos if it helps.

_________________

Back to top
View user's profile Send private message Visit poster's website
Mig Eater
Defense Minister


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Tue Jul 02, 2024 7:32 pm    Post subject: Reply with quote  Mark this post and the followings unread

For warhead anims add SpawnsParticle=WeldingSys and NumParticles=X to the anim's art entry.

For weapon fire add UseSparkParticles=yes and AttachedParticleSystem=WeldingSys to the weapon code.

You could have just looked at the IFV code to see how its repair weapon does it.

_________________



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


Joined: 07 Nov 2012
Location: Buenos Aires

PostPosted: Tue Jul 02, 2024 10:22 pm    Post subject: Reply with quote  Mark this post and the followings unread

Quote:
You could have just looked at the IFV code to see how its repair weapon does it.


Sorry, I only play soviets Wink

Anyways, thanks.

I would have thought the repair spark is just hardcoded for repairing weapons. After all that's how the "healing animation overlay" plays.

***

Another (minor) thing is that the anims don't use a sparksys as you posted, but the spark directly. These are two different codes.

There is a little problem with the spark spawning on weapon origin point. On Burst weapons, the weapon will wait until the spark particle is gone before the second shot, which ruins most burst effects.

I tried a workaround for this by adding the sparks directly into the firing anim. So far this hasn't worked (the particles don't appear).

_________________

Back to top
View user's profile Send private message Visit poster's website
McPwny
Chem Warrior


Joined: 29 Jan 2018

PostPosted: Wed Jul 03, 2024 4:40 am    Post subject: Reply with quote  Mark this post and the followings unread

i played around with it a lot and feel the need to mention that using the spark system on a weapon has the same effect as a railgun
in the sense that the weapon cannot fire again until the particle system has disappeared.

also the drawing the spark systems consumes a lot of system resources especially with higher numbers of sparks; single
simple .shp anims on the other hand shouldnt be causing any lag. also the sparks themselves are 1 pixel big which was
meaningful in tibsun but at modern ra2 resolution they are unnoticeable.

so i dont really recommend using them heavily in any way for the spark effect itself due to the lag, however the spark
system, particularly on warheads, has a neat little hidden function that is a flashing effect like that of a cannon impact
but for a longer duration. i found that adding it to various lightning/tesla animations looked pretty badass and didnt
meaningfully hurt game performance.

_________________
visit my moddb profile for .shp downloads and stuff

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


Joined: 07 Nov 2012
Location: Buenos Aires

PostPosted: Mon Jul 08, 2024 10:07 pm    Post subject: Reply with quote  Mark this post and the followings unread

The sparks are notable. You just need more than one of them, obviously. Also combining with with oneframelight and other light is neat.

You can make sparks of different colors, durations, spark explosion sizes only with codes. No need to touch anims or palettes. That is practical. You don't need to create SHPs, find them or code them.

However, I wasn't very lucky attaching the particles to anims. I declare the code, but the sparks aren't invoked. Need to invoke the system on the warhead directly, which is not as practical compared to just doing it with the anim (you need one warhead per effect this way instead of doing it with animlists).

_________________

Back to top
View user's profile Send private message Visit poster's website
McPwny
Chem Warrior


Joined: 29 Jan 2018

PostPosted: Tue Jul 09, 2024 4:20 am    Post subject: Reply with quote  Mark this post and the followings unread

when the warhead hits its plays one anim at the place where it hits so even if you were to attach it to the anim it would still have the same
overall effect; i remember playing with it combined with cluster weapons and stuff and it ends up looking like a bunch of sparklers at the center
of each cell and also generates a lot of lag. making custom animations for sparks would look and perform better so in my opinion is the way
to go.

_________________
visit my moddb profile for .shp downloads and stuff

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


Joined: 07 Nov 2012
Location: Buenos Aires

PostPosted: Fri Jul 26, 2024 4:09 am    Post subject: Reply with quote  Mark this post and the followings unread

custom animations don't have much of the purpose of having random effects different every time. Even if you were to do several animations and use EMEffect=yes for randomization, the tag is buggy and Ares and other stuff doesn't fix it. Even them that wouldn't enable the oneframelight or have actual physics.

If you would be able to attack the sparks to the anim and not the warhead, this Wouldn't happen, as it would play where the anim plays (even for an invisible anim)

Also, if the sparks could be invoked from the anim, it wouldn't interfere with the weapon reload, since that happens because the Warhead is part of the Weapon system, while the Animation is independent.

_________________

Back to top
View user's profile Send private message Visit poster's website
Mig Eater
Defense Minister


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Fri Jul 26, 2024 11:58 am    Post subject: Reply with quote  Mark this post and the followings unread

With Phobos you can use AnimList.PickRandom=, AnimList.ScatterMin= and AnimList.ScatterMax= on the warhead to make it randomly pick an anim from the list and also randomly play it around the target.

I also dont see why you cant attach the particles to the anim instead of the weapon. If that doesn't work you could also attach a warhead to the anim and then the particles to that instead of the main weapon.

_________________



Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID YouTube User URL Facebook Profile URL Twitter Channel URL
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [8 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: 3.1732s ][ Queries: 13 (2.9988s) ][ Debug on ]