English (American)  中文(简体)
This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Spt] Understanding SPT file
#1
After talking with @不饿白帝BEBD, @Runningcake and @Lee Catalpa Tien (on QQ), I have grasped a few concepts of the SPT file. I'll leave a rough draft here, for future updates and development. Feel free to comment with your knowledge and improve it!

Overview of SPT file:

[Image: spt.png]
  • cad and keyTgr arrays appear to be useless. Maybe leftovers from older versions.
  • frames array contains all the frames' data.
    • allowKeyTrigger attribute of a frame specifies whether or not we can perform an action (e.g. attack) from this frame.
    • attack array contains all the attacks that the character can perform while in this frame. refName is the name reference for an attack. The attacks are in the file Data.Global_globalDat.
  • action array contains all the possible actions of a character.
    • a_keyTgr specifies the actions that can be TriGgeRed in the action state that it belongs to, as well as how to trigger them
      • rkt (restrict key trigger) if it is false, allowKeyTrigger in frame is ignored. If it is true, it can be triggered only in frames of the action that have allowKeyTrigger set to true. Example: In STAND state, rkt should be false for a special move if we want to trigger it at any time. But during an attack or specific action, rkt should be true so that only in certain frames (e.g. later frames) of the attack we can trigger another one.
      • k key combination to perform move to right.
      • kr key combination to perform move to left (stands for key reverse).
      • agi is the Action Group Index that this trigger corresponds to.
      • ati - in an action group there is an actionIndex array, ati is the index in this array.
      • ai - each element of the actionIndex array is also an array, and ai is the index of the element in this array that we want.
    • frameIndex refers to the frame where this action starts
  • actionGroup - corresponds to a set of actions. Most common are normal, gua (guard), cat (catch human), hea (catch object), rid (ride)
    • action useless array, probably leftover from older versions. It was moved to the outside action array mentioned above. Now actionGroup is linked to a set of actions through the attributes ati, agi and ai inside a_keyTgr inside of an action.

Making new moves requires modifying actionGroup, action and frame arrays.
  • hire_id - array with type of soldiers for each possible unit (we have to use their id to get them, e.g.: "z_infantry01"). If you use a mount as id (e.g. horse, horse_monster, horse_triceratops), they will be available to mount but won't attack on their own.
  • hire_max - array with count of soldiers for each possible unit (for ex. lets say "z_infantry01" if we put its value to 1, then we get 4 soldiers, if 2 means then 8 soldiers)
  • hire_price - array with costs to hire a unit, for each possible unit.
  • hire_h - array with mounts for each possible unit. If "null" they are on foot. If "h" they are on horse. If "m" they are on monster. If "t" they are on triceratops. These mounts won't disappear when a soldier falls from them, they will be available to mount by the player or another soldier, except if the hire_id is z_cavalry01, then the mounts will disappear.

In the attachment there is a much more complete tutorial file made by @Lee Catalpa Tien. Thanks to @nikhil for translating it to English!


Attached Files
.json   SPT_V0.10_en.json (Size: 228.96 KB / Downloads: 413)
.json   SPT_V0.10_zh.json (Size: 208.26 KB / Downloads: 349)
[Image: random.php?pic=random]
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
The meaning of life is to give life a meaning.
Stop existing. Start living.
The following 2 users say Thank You to MangaD for this post:
  • xristos, Julian
Reply
  


Forum Jump:


Users browsing this thread: 1 Guest(s)