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 Mon Jul 21, 2025 12:20 pm
All times are UTC + 0
TurretAnimX and Y not aligning weapon
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [13 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Ousagi
Rocket Infantry


Joined: 02 Nov 2022

PostPosted: Tue Jul 08, 2025 2:01 am    Post subject:  TurretAnimX and Y not aligning weapon Reply with quote  Mark this post and the followings unread

TurretAnimX and Y is suppose to be the TurretOffset for buildings, right? It did move the turret but it didn't move the part where the bullet comes from.

An exaggerated example below to show that the bullet still comes from the center of the buillding
Code:
[GXNMRD]
TurretAnimX=40
TurretAnimY=-20

[GXRLGUN]
Remapable=yes
Foundation=2x2
Buildup=GXRLGUNMK
Height=3
PrimaryFireFLH=490,10,0
SecondaryFireFLH=90,-50,100
NewTheater=yes
CanHideThings=True
CanBeHidden=False
OccupyHeight=3
Shadow=yes
DamageFireOffset0=1,20



TurretAnimXY not aligning.gif
 Description:
 Filesize:  3.64 MB
 Viewed:  7926 Time(s)

TurretAnimXY not aligning.gif



Last edited by Ousagi on Tue Jul 08, 2025 8:47 am; edited 1 time in total

Back to top
View user's profile Send private message
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Tue Jul 08, 2025 6:44 am    Post subject: Reply with quote  Mark this post and the followings unread

You still need to specify the FLH in art.ini... although to your question if it's .shp art then use the canvas to center it where you want by adding whitespace in the opposite direction you want it to move.

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
Ousagi
Rocket Infantry


Joined: 02 Nov 2022

PostPosted: Tue Jul 08, 2025 8:54 am    Post subject: Reply with quote  Mark this post and the followings unread

G-E wrote:
You still need to specify the FLH in art.ini...

Woops! Forgot to add the art ini code. I already did have the FLH set as you see in the gif. The laser starts further away just centered in the middle when rotating.

G-E wrote:
although to your question if it's .shp art then use the canvas to center it where you want by adding whitespace in the opposite direction you want it to move.

What does this mean? The turret originally was centered where the base building was. Then I changed it to be at the center.
The turret is now rendered at the center of the shp rather than the center of the building. That is why I am using TurretAnimX and Y.



Center.png
 Description:
 Filesize:  357.93 KB
 Viewed:  7878 Time(s)

Center.png



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


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Tue Jul 08, 2025 10:19 am    Post subject: Reply with quote  Mark this post and the followings unread

SHP turrets can't be offset, they're fixed to the center of the unit/building. TurretAnimX/Y is used to fix any misalignment of the anim and doesn't effect the turret/FLH.

_________________



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
Ousagi
Rocket Infantry


Joined: 02 Nov 2022

PostPosted: Tue Jul 08, 2025 1:32 pm    Post subject: Reply with quote  Mark this post and the followings unread

Ah, good to know! Guess I have to fix some of my building. Good to know before I made any more buildings.
Although, I saw in some mods where they attach a turret to the top of a Contrustion Yard.
Mostly the Soviet ones, was that because it was a voxel that they were able to make an offset?

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


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Tue Jul 08, 2025 3:07 pm    Post subject: Reply with quote  Mark this post and the followings unread

Yes vxl turrets can be offset on buildings.

_________________



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
McPwny
Chem Warrior


Joined: 29 Jan 2018

PostPosted: Wed Jul 09, 2025 4:41 am    Post subject: Reply with quote  Mark this post and the followings unread

wow thats quite a lot of offset in you shp

when rendering keep the building and turret in the same position and keep the
canvas size the same, just move the turret out of the camera view for rendering the
base, then move it back and remove the base and render just the turret

_________________
visit my moddb profile for .shp downloads and stuff

Back to top
View user's profile Send private message
Ousagi
Rocket Infantry


Joined: 02 Nov 2022

PostPosted: Wed Jul 09, 2025 10:16 am    Post subject: Reply with quote  Mark this post and the followings unread

Mig Eater wrote:
Yes vxl turrets can be offset on buildings.

Ah, thanks for clarifying Very Happy .

McPwny wrote:
wow thats quite a lot of offset in you shp

if you meant the TurretAnimXY then that was just for a more exagerrated example. So everyone can see better what I meant.

McPwny wrote:
when rendering keep the building and turret in the same position and keep the
canvas size the same, just move the turret out of the camera view for rendering the
base, then move it back and remove the base and render just the turret

I usually just set the "show render" and key them on the outliner so I could let the rendering run straight.
This is to set the head(if there is one), body, remap, and shadow frames for ImageShaper since I learned that it keeps track of the file location and name of the PNGs.
So if say, I replace "Image000" in a folder called "Turret", ImageShaper updates and use the replacement rather than giving an error where the original file no longer exist.
I learned that when just using the original frames in /tmp and the ones in ImageShaper were replaced with the new rendered ones

This has been my method of rendering since I wasn't able to use DonutArnold template. I had been doing it manually.



Show in render and holdout.mp4
 Description:
 Filesize:  7.87
 Viewed:  7735 Time(s)


Right Click To Download This File



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


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Wed Jul 09, 2025 2:28 pm    Post subject: Reply with quote  Mark this post and the followings unread

McPwny wrote:

just move the turret out of the camera view for rendering the
base, then move it back and remove the base and render just the turret


I'd recommend rendering the base as part of the turret, then the turret can cast a shadow over the base as it rotates.

_________________



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
Ousagi
Rocket Infantry


Joined: 02 Nov 2022

PostPosted: Wed Jul 09, 2025 4:30 pm    Post subject: Reply with quote  Mark this post and the followings unread

Mig Eater wrote:
McPwny wrote:

just move the turret out of the camera view for rendering the
base, then move it back and remove the base and render just the turret


I'd recommend rendering the base as part of the turret, then the turret can cast a shadow over the base as it rotates.

I thought about this, but don't know yet if the turret can have anims on it. The base can have an ActiveAnim on it, but I don't know about the turret.

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


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Wed Jul 09, 2025 7:26 pm    Post subject: Reply with quote  Mark this post and the followings unread

If you plan to add an active anim to the base then the base should be separate so you can make the different parts render/layer over each other correctly.

The rotating turrets cant have a separate anim tho. Unlike shp units, shp building turrets can't have a firing anim too :/

_________________



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
Ousagi
Rocket Infantry


Joined: 02 Nov 2022

PostPosted: Thu Jul 10, 2025 12:29 pm    Post subject: Reply with quote  Mark this post and the followings unread

Mig Eater wrote:
The rotating turrets cant have a separate anim tho. Unlike shp units, shp building turrets can't have a firing anim too :/

Checked what you meant and I thought you were referring to infantries. But that's cool that units such as tanks can have FiringAnims.
A turret that can have FiringAnims? That sounds better than infantries Surprised . If what I think it does is correct, The unit's firing anim continues to play even when rotating away from the enemy.
So say, if there is a light in front of the tank it could be obscured when facing away from the camera and can appear when the unit's turret rotates to face back.

Is there an example of this in a mod someone created? I want to see what the anim codes for units does in action.

The examples in the art.ini were for the Terror Drone and the Squid. Both of which doesn't really have a turret to see what FiringAnim is a capable of. Confused
Mig Eater wrote:
If you plan to add an active anim to the base then the base should be separate so you can make the different parts render/layer over each other correctly./

Just to be consistent, I'll try to keep the shadows off the base from the turret so nothing feels off when someone else plays.
It would've been like they know something feels different from the different defenses but just couldn't point their finger on it.  Laughing

Back to top
View user's profile Send private message
Ousagi
Rocket Infantry


Joined: 02 Nov 2022

PostPosted: Sun Jul 13, 2025 7:25 am    Post subject: Reply with quote  Mark this post and the followings unread

There could possibly be another way with dealing with this with Phobos. In Project Phantom, there were tier 4 units that could be built in the buildings tab.
With the new things add to Phobos like the Select Box and the updated Digital Display, there could be a way to just make a unit to use all things exclusive vehicletypes code.
Just have to look into Phobos if there is a way to have ActiveAnim on the base.I know there is the WalkFrames for VehicleTypes but I don't know yet.
Vehicles can also be considered buildings now for some time now in Phobos. So making VehicleType buildings might be the future. I would give more types of anim to be possible.

The Select Box and Digital Display look awesome. Especially the Digital Display. There could be multilayer healthbars, sideways healthbars and so much more.Very Happy
Could be used for boss health and longer or bigger units. Thanks to the Phobos Team for giving amazing features to expand the game greatly!

Also, there is also the selling and repair part... I don't think that was added yet in Phobos unfortunately...

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