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

Do you want to advertise at Project Perfect Mod. Find out how to do it HERE.

The time now is Tue May 26, 2020 10:23 am
All times are UTC + 0
 Forum index » Modding Central » Red Alert 2 Editing Forum
Proper coding of 32 facing muzzle anims.
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [14 Posts] View previous topic :: View next topic
Author Message
suffle19
Cyborg Soldier


Joined: 27 Jun 2019

PostPosted: Fri Mar 27, 2020 9:41 am    Post subject:  Proper coding of 32 facing muzzle anims. Reply with quote

I dont exactly know how game defines direction of muzzle but I assuming thats by special keys like _N _NE _S etc.
Problem is I dont know keys for 16-32 facing anims only for 8. Can some one give me that info?
Or if I wrong, can some one explain how it works?

P.s. Small example would be nice.

Back to top
View user's profile Send private message
Sir Prize
Vehicle Driver


Joined: 27 Mar 2020
Location: AKA WoRmINaToR

PostPosted: Fri Mar 27, 2020 4:42 pm    Post subject: Reply with quote

http://ares-developers.github.io/Ares-docs/new/weapons/anim.html

You must define a list of exactly 8, 16, or 32 animations. The order is how the game chooses which animation to play for which facing. The list must start from North, continuing to East, then South, then West, in that order, with all of the incremental facings in between.

Take a machine gun Anim= like the M60 for example. With the vanilla 8 facings it looks like this:

Code:
[M60]
...
Anim=MGUN-N,MGUN-NE,MGUN-E,MGUN-SE,MGUN-S,MGUN-SW,MGUN-W,MGUN-NW


With 16 facings, you would have to make 8 additonal facings and add them to this list manually. If you wanted to follow the naming convention (which is arbitrary, you can name them whatever you want), name the new animations something like:
Code:
MGUN-NNE <-- "North of Northeast"
MGUN-ENE <-- "East of Northeast"
MGUN-ESE <-- "East of Southeast"
MGUN-SSE <-- "South of Southeast"
MGUN-SSW <-- "South of Southwest"
MGUN-WSW <-- "West of Southwest"
MGUN-WNW <-- "West of Northwest"
MGUN-NNW <-- "North of Northwest"


Then, insert your 8 facings into the appropriate position in the list:
Code:
[M60]
...
Anim=MGUN-N,MGUN-NNE,MGUN-NE,MGUN-ENE,MGUN-E,MGUN-ESE,MGUN-SE,MGUN-SSE,MGUN-S,MGUN-SSW,MGUN-SW,MGUN-WSW,MGUN-W,MGUN-WNW,MGUN-NW,MGUN-NNW


And that's basically it. Hope that helps!
_________________
Formerly WoRmINaToR. I've created a new account to update to the name I've been using everywhere else for the last several years.

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


Joined: 27 Jun 2019

PostPosted: Fri Mar 27, 2020 4:53 pm    Post subject: Reply with quote

Sir Prize wrote:
http://ares-developers.github.io/Ares-docs/new/weapons/anim.html

You must define a list of exactly 8, 16, or 32 animations. The order is how the game chooses which animation to play for which facing. The list must start from North, continuing to East, then South, then West, in that order, with all of the incremental facings in between.

Take a machine gun Anim= like the M60 for example. With the vanilla 8 facings it looks like this:

Code:
[M60]
...
Anim=MGUN-N,MGUN-NE,MGUN-E,MGUN-SE,MGUN-S,MGUN-SW,MGUN-W,MGUN-NW


With 16 facings, you would have to make 8 additonal facings and add them to this list manually. If you wanted to follow the naming convention (which is arbitrary, you can name them whatever you want), name the new animations something like:
Code:
MGUN-NNE <-- "North of Northeast"
MGUN-ENE <-- "East of Northeast"
MGUN-ESE <-- "East of Southeast"
MGUN-SSE <-- "South of Southeast"
MGUN-SSW <-- "South of Southwest"
MGUN-WSW <-- "West of Southwest"
MGUN-WNW <-- "West of Northwest"
MGUN-NNW <-- "North of Northwest"


Then, insert your 8 facings into the appropriate position in the list:
Code:
[M60]
...
Anim=MGUN-N,MGUN-NNE,MGUN-NE,MGUN-ENE,MGUN-E,MGUN-ESE,MGUN-SE,MGUN-SSE,MGUN-S,MGUN-SSW,MGUN-SW,MGUN-WSW,MGUN-W,MGUN-WNW,MGUN-NW,MGUN-NNW


And that's basically it. Hope that helps!


Thanks!

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


Joined: 27 Jun 2019

PostPosted: Fri Mar 27, 2020 8:34 pm    Post subject: Reply with quote

I have a probem, again with these "names"

I've gathered rendered frames into anims and made them:

Spoiler (click here to read it):
SHFLAMMUZ_N1
SHFLAMMUZ_N2
SHFLAMMUZ_N3
SHFLAMMUZ_N4
SHFLAMMUZ_N5
SHFLAMMUZ_N6
SHFLAMMUZ_N7
SHFLAMMUZ_E1
SHFLAMMUZ_E2
SHFLAMMUZ_E3
SHFLAMMUZ_E4
SHFLAMMUZ_E5
SHFLAMMUZ_E6
SHFLAMMUZ_E7
SHFLAMMUZ_S1
SHFLAMMUZ_S2
SHFLAMMUZ_S3
SHFLAMMUZ_S4
SHFLAMMUZ_S5
SHFLAMMUZ_S6
SHFLAMMUZ_S7
SHFLAMMUZ_W1
SHFLAMMUZ_W2
SHFLAMMUZ_W3
SHFLAMMUZ_W4
SHFLAMMUZ_W5
SHFLAMMUZ_W6
SHFLAMMUZ_W7
SHFLAMMUZ_W8
SHFLAMMUZ_W9


With these names, same order at weapon Anim=
but still it goes wrong... I made like so cuz I cant undestand what can I write 8 times for each direction
Also there's name mistake E1 must be N8 and so on

Back to top
View user's profile Send private message
Sir Prize
Vehicle Driver


Joined: 27 Mar 2020
Location: AKA WoRmINaToR

PostPosted: Fri Mar 27, 2020 8:42 pm    Post subject: Reply with quote

You're short 2 Anims.

That list has only 30 anims. The Anim= list must be exactly 32 anims to render 32 facings properly.
_________________
Formerly WoRmINaToR. I've created a new account to update to the name I've been using everywhere else for the last several years.

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


Joined: 27 Jun 2019

PostPosted: Fri Mar 27, 2020 8:55 pm    Post subject: Reply with quote

Sir Prize wrote:
You're short 2 Anims.

That list has only 30 anims. The Anim= list must be exactly 32 anims to render 32 facings properly.


Oh, I didn't even thought about it... what a shame...

edit:
But names like those is ok?

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


Joined: 11 Feb 2016

PostPosted: Fri Mar 27, 2020 9:06 pm    Post subject: Reply with quote

Name doesn’t matter at all. Order matters.
_________________
I DON'T extract models from Rivals.
I play Rivals tho, PM me for a fight.

Back to top
View user's profile Send private message Skype Account
suffle19
Cyborg Soldier


Joined: 27 Jun 2019

PostPosted: Fri Mar 27, 2020 9:18 pm    Post subject: Reply with quote

It works now, thanks.

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


Joined: 27 Jun 2019

PostPosted: Fri Mar 27, 2020 9:47 pm    Post subject: Reply with quote

Ok, next problem...
When after unit fired and started to move anim goes with it's gun. Cuz it have 52 frames while firing takes ~5-10.
Is projectile anim uses same facing logic as muzzle from N to W?
Can I transfrom my muzzle to projectile anim?(and i need to gather separated shp to one for it?)
Sorry for many questions, I just can't gather my thoughts to get a concept of task.

Edit:
Ok, found it
https://ares-developers.github.io/Ares-docs/new/projectiles/animations.html

Back to top
View user's profile Send private message
Sir Prize
Vehicle Driver


Joined: 27 Mar 2020
Location: AKA WoRmINaToR

PostPosted: Fri Mar 27, 2020 10:21 pm    Post subject: Reply with quote

Projectiles can have 32 facings as well. However, projectile trailers cannot. As I assume your weapon already fires a projectile that travels, and all you want is the remaining smoke from the discharge of the weapon, I'm afraid there's no workaround that I am aware of.
_________________
Formerly WoRmINaToR. I've created a new account to update to the name I've been using everywhere else for the last several years.

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


Joined: 27 Jun 2019

PostPosted: Fri Mar 27, 2020 10:27 pm    Post subject: Reply with quote

Sir Prize wrote:
Projectiles can have 32 facings as well. However, projectile trailers cannot. As I assume your weapon already fires a projectile that travels, and all you want is the remaining smoke from the discharge of the weapon, I'm afraid there's no workaround that I am aware of.


No, not really, mine is flame anim.


flame03_01_224.gif
 Description:
 Filesize:  105.5 KB
 Viewed:  178 Time(s)

flame03_01_224.gif



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


Joined: 27 Jun 2019

PostPosted: Fri Mar 27, 2020 11:06 pm    Post subject: Reply with quote

Damn... looks like I misunderstood those Ares tags. They must be made for self-around weapons... Otherwise i dont understand why it didn't works...

Is too heavy animation size could be the reason? It's weight is ~230mb,
1664 frames.

Back to top
View user's profile Send private message
Sir Prize
Vehicle Driver


Joined: 27 Mar 2020
Location: AKA WoRmINaToR

PostPosted: Sat Mar 28, 2020 12:18 am    Post subject: Reply with quote

Okay, try this.

You will need 32 additional art entries to pull this off, but it just might work.

Create a blank, 1-frame dummy SHP and name it something like DUMMYANIM.

Then, create 32 new animation entries and add them to the [Animations] list:
Code:
XXX=SHFLAMSPAWN_N1
XXX=SHFLAMSPAWN_N2
XXX=SHFLAMSPAWN_N3
XXX=SHFLAMSPAWN_N4
... etc

Then in Artmd.ini, add an entry for each new animation that looks like this:
Code:
[SHFLAMSPAWN_N1]
Image=DUMMYANIM
TrailerAnim=SHFLAMMUZ_N1
TrailerSeperation=2


Then on your weapon, do:
Code:
[Weapon]
Anim=SHFLAMSPAWN_N1,SHFLAMSPAWN_N2,SHFLAMSPAWN_N3, etc


This is untested, theoretical code. But I just used a similar method with excellent results to create a lightning strike weapon. It just might work here as well.
_________________
Formerly WoRmINaToR. I've created a new account to update to the name I've been using everywhere else for the last several years.

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


Joined: 27 Jun 2019

PostPosted: Sat Mar 28, 2020 8:38 am    Post subject: Reply with quote

Sir Prize wrote:
Okay, try this.

You will need 32 additional art entries to pull this off, but it just might work.

Create a blank, 1-frame dummy SHP and name it something like DUMMYANIM.

Then, create 32 new animation entries and add them to the [Animations] list:
Code:
XXX=SHFLAMSPAWN_N1
XXX=SHFLAMSPAWN_N2
XXX=SHFLAMSPAWN_N3
XXX=SHFLAMSPAWN_N4
... etc

Then in Artmd.ini, add an entry for each new animation that looks like this:
Code:
[SHFLAMSPAWN_N1]
Image=DUMMYANIM
TrailerAnim=SHFLAMMUZ_N1
TrailerSeperation=2


Then on your weapon, do:
Code:
[Weapon]
Anim=SHFLAMSPAWN_N1,SHFLAMSPAWN_N2,SHFLAMSPAWN_N3, etc


This is untested, theoretical code. But I just used a similar method with excellent results to create a lightning strike weapon. It just might work here as well.


Yeah, its working. Thanks!

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [14 Posts] View previous topic :: View next topic
 Forum index » Modding Central » Red Alert 2 Editing Forum
Jump to:  
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.3150s ][ Queries: 13 (0.0034s) ][ Debug on ]