Jump to content
A 2021 backup has been restored. Forums are closed and work in progress. Join our Discord server for more updates! ×
SoaH City Message Board

We've come bearing gifts...


rogueyoshi

Recommended Posts

  • Replies 51
  • Created
  • Last Reply

Top Posters In This Topic

But you should really reconsider to use the new engine...

I'm thinking about using the new engine but before I do can you explain the .XANIM files and do I have to make a new one for a new character such as Shadow if so how do I? Also one last feature If it ok I can ask for is grinding using the new engine?

Link to comment
Share on other sites

The new animation system uses external files to load animation definitions. It also supports a basic level encryption using a string as a signature (in this case, we used "FreeForUse").

The format for the animations is basically this. At first, we have the header of the animation file:

[Information]
; Character name this file defines animation of
Character 				= Sonic

This tells wich variable name will output this animation file. After loading the animations, it'll result in a variable named Animations_Sonic;

After this, we just define the animations:

[Animation0]

; Animation name and sprite used

Name = Idle

Sprite = sprCharacterSonicIdle

; Animation flags

LoopbackTimes = -1

LoopbackFrame = 1

LoopbackAnimation = (None)

SubAnimation = (None)

; Frame information

Frame0_Id = 0

Frame0_Speed = 0.005

Frame1_Id = 1

Frame1_Speed = 0.1

Frame2_Id = 2

Frame2_Speed = 0.1

Frame3_SectionStart = 3

Frame3_SectionEnd = 4

Frame3_SectionRepeats = 40

Frame3_Speed = 0.13

Frame4_Id = 5

Frame4_Speed = 0.13

Frame5_SectionStart = 6

Frame5_SectionEnd = 7

Frame5_SectionRepeats = 40

Frame5_Speed = 0.13

Frame6_Id = 8

Frame6_Speed = 0.13

Frame7_Id = 9

Frame7_Speed = 0.13

Each new animation should be defined in a new sector with it's unique number. Animation0 in this case. Then, we define the name of the animation (Idle) and the sprite it'll use (sprCharacterSonicIdle).

After this, we set it's flags:

LoopbackTimes = Number of times the animation will repeat (-1 = infinite, 0 = play once)

LoopbackFrame = To wich keyframe (animation reference, not keyframe reference) will return on repeat

LoopbackAnimation = If the animation finishes, to wich animation it should go to.

SubAnimation = SubAnimation there will be shown. This is only used on the Tails part. It refers to another animation defined in this file.

Then we got the frame information setting. The frame information can be added in two ways:

FrameX_Id = Y
FrameX_Speed = Z

Wich adds only 1 animation frame with that speed; and

FrameX_SectionStart = A
FrameX_SectionEnd = B
FrameX_SectionRepeats = C
FrameX_Speed = Z

Wich actually adds a range of animation frames. At loading time, this statement is translated into a bunch of the previous statements, so it's only a quick way to add various frames wich are one after the other.

It should be noted there's a difference between the keyframes you add in the animation definition, and the animation frames. The number of the frame in the keyframe (FrameX_Etc) doesn't correspond to an animation frame (you've gotta understand this for the LoopbackFrame).

Anyway, to encrypt/deencrypt these files, in the animation loading script on the objPlayer object, it shows how to encrypt a file (it's commented). To decrypt a file, you need to use the same routine.

Link to comment
Share on other sites

  • 2 weeks later...

Well... Could someone atleast make a Sonic.XANIM that only uses 8 walk frames, 8 run frames (All 3 types), 2 spring up frames, 2 fall frames, 2 diagonal spring frames, 4 roll (jump) frames and 2 edge forward frames? I don't know how to decrypt (I haven't used GM for MONTHS) And from what Dami said I bet it's pretty hard X.X

Link to comment
Share on other sites

Well... Could someone atleast make a Sonic.XANIM that only uses 8 walk frames, 8 run frames (All 3 types), 2 spring up frames, 2 fall frames, 2 diagonal spring frames, 4 roll (jump) frames and 2 edge forward frames? I don't know how to decrypt (I haven't used GM for MONTHS) And from what Dami said I bet it's pretty hard X.X
Anyway, to encrypt/deencrypt these files, in the animation loading script on the objPlayer object, it shows how to encrypt a file (it's commented). To decrypt a file, you need to use the same routine.

like he said, just do the exact same thing to decrypt the file.

scrEncryptFile("Sonic.XANIM", "SonicDecrpted.ANIM", "FreeForUse");[/CODE]

that will produce a decrypted version of sonic's animation file (Sonic.XANIM) as (SonicDecrpted.ANIM).

Link to comment
Share on other sites

  • 1 year later...
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...