Re: SCP - Containment is Magic Mod

#1061
I'm the animator of the models. You need to change the source code. I don't know what you know, and I get on rarely so I probably
won't see any response post for a while, so I'll go over a lot in one post.So, let's do a quick(ish) Animation & Coding 101...
(If you wanna reply I don't accept TLDR;)

The game animates from calculating the differences between set positions at set times, called Keyframes.
Every frame (24 per sec on the models) the game does the math and moves the points on the model to their new calculated positions.

The old D-class locations have different keyframes, so they will not animate, because the models don't have those keyframes.
As for other things, like stretching, rotation, disjointed objects (tail, mane, eyes, etc.) that's the .B3D.

So, to fix the models, you need some basic coding skills, the keyframes animation, and the FPS (Frames-per-second) of the model.
I can't help you with the first thing, and you could find the other two using fragMOTION, but I'm nice and did a lot of digging.

AT 24FPS...

Code: Select all

Rainbow Dash (106) Frames:
Grab (Ceiling)	0-25
Rise (Ceiling)	26-107
Walk (Ceiling)	108-182
Grab				 183-208
Rise				 209-290
Idle				 291-359
Walk				 360-434

Derpy (Class-D) Frames:
Idle				 210-235
Walking			 0-74
Dying			   75-89
106 Lure Chair   90-99
So, I'm using the 0.8.2 bug-fixed version by JuanJPro, you can find it here.
All the animation in the intro is coded, and that's in the Event section of Main.bb. Prepare to enter the spaghetti zone.

Code: Select all

								e\room\NPC[1] = CreateNPC(NPCtypeD, EntityX(e\room\Objects[1], True), 0.5, EntityZ(e\room\Objects[1], True))
								PointEntity(e\room\NPC[1]\Collider, e\room\Objects[5])
								e\room\NPC[2] = CreateNPC(NPCtypeD, EntityX(e\room\Objects[2], True), 0.5, EntityZ(e\room\Objects[2], True))
								PointEntity(e\room\NPC[2]\Collider, e\room\Objects[5])
So, NPC[1] is a Class-D, along with NPC[2] and they have spawned. We need to find where the game uses the Animate2() function on both of those entities.

Starting at Line 2001:

Code: Select all

									Animate2(e\room\NPC[2]\obj, AnimTime(e\room\NPC[2]\obj),406,382,-0.01*15)
There it is, now we need to find out what it means. We can do this by looking at the documentation Regalis made for the function so he can plug in all the variables.

Code: Select all

Function Animate2(ent%, curr#, start%, quit%, speed#, loop=True)
So, if we cross all the numbers...
ent%=e\room\NPC[2]\obj
curr#=AnimTime(e\room\NPC[2]\obj)
start%=406
quit%=382
speed#=-0.01*15
loop= Not defined.

So, Animate2() affects the physical entity (\obj) of NPC[2]. It uses AnimTime() to calculate the current frame it is on and it draws it. The walk animation starts at frame 406 and ends at 382.
So, it goes backward? Our animation however is not, if we plug in those numbers from earlier from the keyframe lists, and boom.

Code: Select all

									Animate2(e\room\NPC[2]\obj, AnimTime(e\room\NPC[2]\obj),0,74,0.01*15)
Now, for speed you might need to experiment, I don't know what speed Glitch had them at, try to sync it up with their movement.
That's the intro, the 106 anims are in NPCs.bb, and other events are scattered in various places. They still need to be updated for the
new events.

I'm out of time, I hope you learned enough to fix the rest of it. Go, my child.
Image

Re: SCP - Containment is Magic Mod

#1068
From NPC.bb:

Code: Select all

                	Select n\State
                   	Case 0 ;idle
                      	n\currspeed = CurveValue(0.0, n\currspeed, 5.0)
                      	Animate2(n\obj, AnimTime(n\obj), 210, 235, 0.2)
                   	Case 1 ;walking
                            	n\currspeed = CurveValue(0.015, n\currspeed, 5.0)
                            	Animate2(n\obj, AnimTime(n\obj), 0, 70, n\currspeed * 55)
                	End Select
                
This is what the Class D pony used.
I'm not here as much right now, mention me on our Discord server if you need anything.

Re: SCP - Containment is Magic Mod

#1069
Glitch wrote:From NPC.bb:

Code: Select all

                	Select n\State
                   	Case 0 ;idle
                      	n\currspeed = CurveValue(0.0, n\currspeed, 5.0)
                      	Animate2(n\obj, AnimTime(n\obj), 210, 235, 0.2)
                   	Case 1 ;walking
                            	n\currspeed = CurveValue(0.015, n\currspeed, 5.0)
                            	Animate2(n\obj, AnimTime(n\obj), 0, 70, n\currspeed * 55)
                	End Select
                
This is what the Class D pony used.
For all anyone cares I could work on sound. I could also turn scp 682 in to luna! P.S. Glitch rainbow looks very 'festive'.
Have you seen chef?