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 Apr 18, 2024 12:41 pm
All times are UTC + 0
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] Mark the topic unread ::  View previous topic :: View next topic
Author Message
suffle19
Disk Thrower


Joined: 27 Jun 2019

PostPosted: Fri Mar 27, 2020 9:41 am    Post subject:  Proper coding of 32 facing muzzle anims. Reply with quote  Mark this post and the followings unread

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
Medic


Joined: 27 Mar 2020
Location: AKA WoRmINaToR

PostPosted: Fri Mar 27, 2020 4:42 pm    Post subject: Reply with quote  Mark this post and the followings unread

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
Disk Thrower


Joined: 27 Jun 2019

PostPosted: Fri Mar 27, 2020 4:53 pm    Post subject: Reply with quote  Mark this post and the followings unread

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
Disk Thrower


Joined: 27 Jun 2019

PostPosted: Fri Mar 27, 2020 8:34 pm    Post subject: Reply with quote  Mark this post and the followings unread

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
Medic


Joined: 27 Mar 2020
Location: AKA WoRmINaToR

PostPosted: Fri Mar 27, 2020 8:42 pm    Post subject: Reply with quote  Mark this post and the followings unread

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
Disk Thrower


Joined: 27 Jun 2019

PostPosted: Fri Mar 27, 2020 8:55 pm    Post subject: Reply with quote  Mark this post and the followings unread

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  Mark this post and the followings unread

Name doesn’t matter at all. Order matters.

_________________

Back to top
View user's profile Send private message Skype Account
suffle19
Disk Thrower


Joined: 27 Jun 2019

PostPosted: Fri Mar 27, 2020 9:18 pm    Post subject: Reply with quote  Mark this post and the followings unread

It works now, thanks.

Back to top
View user's profile Send private message
suffle19
Disk Thrower


Joined: 27 Jun 2019

PostPosted: Fri Mar 27, 2020 9:47 pm    Post subject: Reply with quote  Mark this post and the followings unread

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
Medic


Joined: 27 Mar 2020
Location: AKA WoRmINaToR

PostPosted: Fri Mar 27, 2020 10:21 pm    Post subject: Reply with quote  Mark this post and the followings unread

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
Disk Thrower


Joined: 27 Jun 2019

PostPosted: Fri Mar 27, 2020 10:27 pm    Post subject: Reply with quote  Mark this post and the followings unread

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:  675 Time(s)

flame03_01_224.gif



Back to top
View user's profile Send private message
suffle19
Disk Thrower


Joined: 27 Jun 2019

PostPosted: Fri Mar 27, 2020 11:06 pm    Post subject: Reply with quote  Mark this post and the followings unread

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
Medic


Joined: 27 Mar 2020
Location: AKA WoRmINaToR

PostPosted: Sat Mar 28, 2020 12:18 am    Post subject: Reply with quote  Mark this post and the followings unread

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
Disk Thrower


Joined: 27 Jun 2019

PostPosted: Sat Mar 28, 2020 8:38 am    Post subject: Reply with quote  Mark this post and the followings unread

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] 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.1924s ][ Queries: 14 (0.0118s) ][ Debug on ]