I'm very inexperienced with coding SHP units. First I tried using the Titan's code and just increased WalkFrames to match the number of frames this mech has per facing... then I thought maybe it has to be more complex so I changed it to this:
Facings=8 ; duh
StandingFrames=1 ; has one standing frame per facing
StartStandFrame=1 ; first frame of file is first stand frame
WalkFrames=41 ; 41 walking frames per direction
StartWalkFrame=9 ; walking frames start on frame #9
It still results in a garbled mess in-game though. Can anyone help point out what I did wrong? I did give it an honest try, but I'm out of ideas.
I know PBarrel/SBarrel/TurretOffset are unneeded, but they're not cause of the issue, right? It's something about the *Frames. QUICK_EDIT
I've avoided using shp units because setting up the frames looks like a pain. Show me the ini stuff when you figure it out
(it's a shame, i haven't found a release of the jetpacky one anywhere, i like it better actually lol) _________________ ????????MyAnimeList my Last.fm QUICK_EDIT
That mech in particular is bugged. If you read the topic it
-has wrong frame order in the SHP. Orac's rotates counterclockwise, while it has to rotate clockwise
-standing frames can not start on frame 0 for turreted units. Turreted units need first the walkframes, followed by the turret frames and then followed by any additional frames like standing or firing frames
Even Ambersia's fixed version in a post near the end still has some bugs. e.g. he removed the standing frames and added a shadow bug.
If that mech would be fixed, then the ini setting would be as follows
Facings=8
StandingFrames=1
StartStandFrame=0 ; doesn't work. Game is hardcoded to first read the walk frames in the SHP for turreted units
WalkFrames=42 ; it has 42 frames for walk anim, not 41
StartWalkFrame=8
Beside the frame order bug in the SHP, it also has a bad walk anim with inconsistent speeds for the legs, the legs don't lift up from the ground when moving forward (it looks like skating), and it has way too many frames.
For such a small unit, 42 frames for walk make the anim extremely slow ingame. It needs about 12 to max 24 frames, best would be 16.
So it's quite useless to get this unit ingame in its current bugged and unfinished state. _________________ SHP Artist of Twisted Insurrection: Nod buildings
Joined: 09 Mar 2008 Location: Osaka (JP)/Hong Kong/Germany
Posted: Mon Apr 20, 2015 11:11 am Post subject:
Oh... I did not know StartFrame setting does not work ><
Hmmm... reordering the frames and removing some of the WalkFrames shouldn't be too hard. I will try that. Isn't there a way to speed up the rate at which WalkFrames are played, tho? WalkRate in the rules setting? That way I could compensate for the huge amount of walkframes. _________________
Mao Zedong wrote:
Our mission, unfinished, may take a thousand years.
The key StartStandFrame does work, but turreted units have to follow a hardcoded order in the SHP. So this key is not fixing the wrong order.
With 16 walk frames and the correct frame order in the SHP, the code would look like this
Code:
Facings=8
StandingFrames=1
StartStandFrame=160 ; 16 walkframes*8 facings + 32 turret frames = frame 160 for the additional standing frames
WalkFrames=16
StartWalkFrame=0 ;hardcoded to start on frame 0 for turreted units and then followed by the 32 turret frames
Even with WalkRate=1, which is fastest, the 42 walkframes would play too slow due to the many frames and very small steps of the mech.
Or you have to give the unit a super slow Speed=1 or 2 so it matches the speed of the legs in the anim.
When you want to fix it, you have to do the following things
-reorder the frames and make the mech rotate clockwise beginning with north facing
-reorder the frames with first the walk frames, followed by the 32 turret frames, then followed by the standing frames
-shorten the walk frames from 42 down to 16
Though i don't think this work is worth it.
-Doing all these corrections on the frames can take up to an hour or more and is error prone, since you have to take care of the shadow frames too and don't mix up their order.
-the walk anim looks bad (no leg lifting up when moving forward) and the speed of left and right leg is different (giving it a limping look)
To do this on the 3D-Model is like a 10minute job, to fix the walk anim, change the frame order and render again. Maybe Orac can release the 3D-Model if he doesn't want to finish this unit. _________________ SHP Artist of Twisted Insurrection: Nod buildings
Joined: 22 Nov 2010 Location: Iszkaszentgyorgy, Hungary
Posted: Mon Apr 20, 2015 11:58 am Post subject:
Lin Kuei Ominae wrote:
-Doing all these corrections on the frames can take up to an hour or more and is error prone, since you have to take care of the shadow frames too and don't mix up their order.
Converting TS shadows to RA2 shadows before exporting the frames for the reordering would evade this tbh. Now that we both know there's a way for that. :whistles: _________________ "If you didn't get angry and mad and frustrated, that means you don't care about the end result, and are doing something wrong." - Greg Kroah-Hartman
=======================
Past C&C projects: Attacque Supérior (2010-2019); Valiant Shades (2019-2021)
=======================
WeiDU mods: Random Graion Tweaks | Graion's Soundsets
Maintainance: Extra Expanded Enhanced Encounters! | BGEESpawn
Contributions: EE Fixpack | Enhanced Edition Trilogy | DSotSC (Trilogy) | UB_IWD | SotSC & a lot more... QUICK_EDIT
ah right, this way you can indeed safe all the shadow frames hassle and half the amount of frames reorder work.
@Millennium:
in SHP Builder use Tools\Misc\Convert Shadows TS->RA2 to merge the separate shadow frames into the normal image frames.
Then export the SHP into png images
This way you don't have to take care of the shadow frames anymore.
Once you reimported the unit into SHP, use Tools\Misc\Convert Shadows RA2-> TS
to get separate shadow frames again. _________________ SHP Artist of Twisted Insurrection: Nod buildings
Joined: 22 Nov 2010 Location: Iszkaszentgyorgy, Hungary
Posted: Mon Apr 20, 2015 12:49 pm Post subject:
Use strictly PCX or Mixer, SHP Builder's PNG output is 32bpp, not indexed. _________________ "If you didn't get angry and mad and frustrated, that means you don't care about the end result, and are doing something wrong." - Greg Kroah-Hartman
=======================
Past C&C projects: Attacque Supérior (2010-2019); Valiant Shades (2019-2021)
=======================
WeiDU mods: Random Graion Tweaks | Graion's Soundsets
Maintainance: Extra Expanded Enhanced Encounters! | BGEESpawn
Contributions: EE Fixpack | Enhanced Edition Trilogy | DSotSC (Trilogy) | UB_IWD | SotSC & a lot more... QUICK_EDIT
ah, Convert Shadows doesn't work in this case
Orac rendered shadows also for areas which are covered by the unit itself (e.g. directly under the standing feet). Using the Convert Shadows function would remove these areas.
Those are however quite useful, due to the shadow bug on turreted SHP units, where the body moves up/down by 1 pixel according to the turret direction.
shown here on a early DTA shp tank, notice the gap between tank and shadow on some directions.
Though not sure if RA2 suffers under the same issue for turreted SHP units. _________________ SHP Artist of Twisted Insurrection: Nod buildings
Joined: 09 Mar 2008 Location: Osaka (JP)/Hong Kong/Germany
Posted: Tue Apr 21, 2015 1:06 am Post subject:
Well, fixing that part seems to be easy enough to do manually after converting.
And no, I don't know either if this occurs in RA2... I've not noticed it, but I've not worked with alot of SHP vehicles in that engine. Chances are it does though, unlikely the engine would get a fix for something that's not even used in RA2. _________________
Mao Zedong wrote:
Our mission, unfinished, may take a thousand years.
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