User Tag List

Results 1 to 8 of 8

Thread: Imzogelmo's Propsal for FF1 spell data template

  1. #1
    Floormaster Imzogelmo's Avatar
    Join Date
    Sep 2005
    Location
    Earth, currently
    Age
    46
    Posts
    387
    Mentioned
    7 Post(s)
    Tagged
    3 Thread(s)
    vBActivity - Stats
    Points
    1,481
    Level
    13
    vBActivity - Bars
    Lv. Percent
    2.14%

    Imzogelmo's Propsal for FF1 spell data template

    II. Spell
    A. Attributes (32 * 4 bytes)
    1. Sphere (White or black, can certainly define others)
    2. Effect (none, affect attributes, affect status, affect elemental)
    3. EffectParam1 (which attribute to affect; which status, which elemental)
    4. EffectParam2 (how much to add/subtract for attribute)
    5. Price
    6. Targetting (one ally, all allies, caster only, one enemy, all enemies)
    7. SuccessRate
    8. SpellLevel
    9. FieldEffect (script to run out of battle)
    10. FieldParam1 (base)
    11. FieldParam2 (range)
    12.
    13.
    14.
    15.
    16.
    17.
    18.
    19.
    20.
    21.
    22.
    23.
    24.
    25.
    26.
    27.
    28.
    29.
    30.
    31. BattleMessage
    32. GraphicSet
    B. Elemental (32 * 2 bytes)
    1. ElementalAttack (weapons only)
    2. (reserved for expansion of above)
    3. ElementalResistance(from non-weapons only)
    4. (reserved for expansion of above)
    5. ElementalWeakness (from non-weapons only)
    6. (reserved for expansion of above)
    7. ElementalNullify (from non-weapons only)
    8. (reserved for expansion of above)
    9. ElementalAbsorb (from non-weapons only)
    10. (reserved for expansion of above)
    11.
    12.
    13.
    14.
    15.
    16.
    17.
    18.
    19.
    20.
    21.
    22.
    23.
    24.
    25.
    26.
    27.
    28.
    29.
    30.
    31.
    32.
    C. Status (32 * 2 bytes)
    1. BlockedStatus
    2. (reserved for expansion of above)
    3. (reserved for expansion of above)
    4. (reserved for expansion of above)
    5. (reserved for expansion of above)
    6. (reserved for expansion of above)
    7. SetStatus
    8. (reserved for expansion of above)
    9. (reserved for expansion of above)
    10. (reserved for expansion of above)
    11. (reserved for expansion of above)
    12. (reserved for expansion of above)
    13. RemovedStatus
    14. (reserved for expansion of above)
    15. (reserved for expansion of above)
    16. (reserved for expansion of above)
    17. (reserved for expansion of above)
    18. (reserved for expansion of above)
    19. ToggledStatus
    20. (reserved for expansion of above)
    21. (reserved for expansion of above)
    22. (reserved for expansion of above)
    23. (reserved for expansion of above)
    24. (reserved for expansion of above)
    25.
    26.
    27.
    28.
    29.
    30.
    31.
    32.
    D. Flags (32 * 2 bytes)
    1. LearnableClasses
    2. (reserved for expansion of above)
    3. (reserved for expansion of above)
    4. (reserved for expansion of above)
    5. (reserved for expansion of above)
    6. (reserved for expansion of above)
    7. (reserved for expansion of above)
    8. (reserved for expansion of above)
    9. HurtCategoryBonus (damaging spells only)
    10. (reserved for expansion of above)
    11. (reserved for expansion of above)
    12. (reserved for expansion of above)
    13. AttributeEffectFlags
    0x0001 Subtractive (Damage to attribute)
    0x0002 Additive (Healing to attribute)
    0x0004 Undead Only
    0x0008 Ignore Defense
    14.
    15.
    16.
    17.
    18.
    19.
    20.
    21.
    22.
    23.
    24.
    25.
    26.
    27.
    28.
    29.
    30.
    31.
    32.
    Last edited by Imzogelmo; 01-16-2013 at 03:43 PM. Reason: Section A is 32* 4 bytes per specification

  2. #2
    Cor Blimey! CJC's Avatar
    Join Date
    Dec 2002
    Location
    Fading into the darkness
    Age
    36
    Posts
    1,398
    Mentioned
    150 Post(s)
    Tagged
    6 Thread(s)
    vBActivity - Stats
    Points
    6,641
    Level
    25
    vBActivity - Bars
    Lv. Percent
    4.55%
    Could we perhaps have a little more space for sphere, so that we can add spells of various other categories to a customized game?


    IE: Blue, Red, Time, Summon, etc.

    (I know that Red is technically just a class restriction on Black and White, but it might be nice to have it as a sphere so that Red Mages can learn spells unique to their class, like DoubleCast.

  3. #3
    Floormaster Imzogelmo's Avatar
    Join Date
    Sep 2005
    Location
    Earth, currently
    Age
    46
    Posts
    387
    Mentioned
    7 Post(s)
    Tagged
    3 Thread(s)
    vBActivity - Stats
    Points
    1,481
    Level
    13
    vBActivity - Bars
    Lv. Percent
    2.14%
    I have it taking a whole 2 bytes (which is really overkill, it could be a few bits). 65536 possibilities there...
    It could be delegated to a series of bits, maybe 4, which would still leave 16 possibilities (which is about all I can imagine at the moment for sphere).

    Actually, that brings up an interesting point. How easy/difficult would it be to have multiple accesses to the same data? A lot of times you need a field that is only 1 byte, so it would be handy if you could have the same field be 1, 2, or 4 bytes depending on how it was used. I'm talking, of course, of unions. Perhaps even making a basic type that is a union of 1 4-byte integer, 2 2-byte shorts, and 4 1-byte char entries. That could lead to problems in portability though, so I don't know.

  4. #4
    Cor Blimey! CJC's Avatar
    Join Date
    Dec 2002
    Location
    Fading into the darkness
    Age
    36
    Posts
    1,398
    Mentioned
    150 Post(s)
    Tagged
    6 Thread(s)
    vBActivity - Stats
    Points
    6,641
    Level
    25
    vBActivity - Bars
    Lv. Percent
    4.55%
    Quote Originally Posted by Imzogelmo View Post
    It could be delegated to a series of bits, maybe 4, which would still leave 16 possibilities (which is about all I can imagine at the moment for sphere).
    This is what I meant. It looked like a lot of the two bytes was empty space, and the one-bit assignment for sphere felt a little constraining. Even allowing just three bits would give a total of eight possible classifications for spell sphere, which would cover pretty much all the classic forms of Final Fantasy Magic. Adding the fourth would allow people to assign spheres to 'magic' abilities, such as a list of martial arts 'spells' that only one character uses.

  5. #5
    Floormaster Imzogelmo's Avatar
    Join Date
    Sep 2005
    Location
    Earth, currently
    Age
    46
    Posts
    387
    Mentioned
    7 Post(s)
    Tagged
    3 Thread(s)
    vBActivity - Stats
    Points
    1,481
    Level
    13
    vBActivity - Bars
    Lv. Percent
    2.14%
    Ah, but what I'm saying is that each line in the above template proposal is already 32 bits. Having 32 bits where 3 are needed is indeed overkill. I just listed 'white or black' as that's all FF1 needs (could assign 0x0000 to white, and 0x0001 to black). Certainly this can be expanded to have 0x0002 for red, 0x0003 for blue, 0x0004 for summon, 0x0005 for gray/effect, 0x0006 for ninja, 0x0007 for whatever...) It's basically a menu-restriction. Point being-- 32 bits is still way too many, as you really only need 3, 4, or maybe 5 at the outside. You're never going to see 65000 different "spheres" of magic. Of course, if that is the case, each spell pretty much is a sphere unto itself, which may in fact be desired in some scenario (probably the designer is using that 4-byte value for something else though).

    Each game would be able to define these bytes as it wishes though, or that is my understanding at least. That's the reason for making it so large. My thinking is that all of these are big enough except character, which I think needs to be larger due to having a spell book (and I'm afraid it's still too small, I'll post more in that topic later).

  6. #6
    The Time-Loop Continues ZC Developer
    Gleeok's Avatar
    Join Date
    Apr 2007
    Posts
    4,827
    Mentioned
    259 Post(s)
    Tagged
    10 Thread(s)
    vBActivity - Stats
    Points
    12,979
    Level
    33
    vBActivity - Bars
    Lv. Percent
    28.41%
    The reason things like elements and status effects were 2 bytes each was for the possibility of percentages or actual values. I know that early FF only uses flags for these:
    weak->none->nullify->absorb (1 byte for these would still be better than 4bits though)

    I just figured one extra byte gives you the option of more modern things like:
    [fire infuse - spell that buffs a character's fire element]
    -fire atk : +25%
    -water def : -25%

    or something...
    It is tricky though, because to perfectly emulate the early FF games flags are actually better I think.
    It's also possible to make all the stats, etc.. dynamic or variable sized. (all types must share the same amount in the game though). This has only an overhead of 48 bytes (I think) (or 96 if compiled on x64bit). [edit]per-item overhead that is what I meant./

    This is why I made the attributes stuff templated in the beginning - so it could be easily changed later on. I'm open to suggestions.
    Last edited by Gleeok; 01-16-2013 at 04:52 AM.
    This post contains the official Gleeok seal of approval. Look for these and other posts in an area near you.

  7. #7
    Cor Blimey! CJC's Avatar
    Join Date
    Dec 2002
    Location
    Fading into the darkness
    Age
    36
    Posts
    1,398
    Mentioned
    150 Post(s)
    Tagged
    6 Thread(s)
    vBActivity - Stats
    Points
    6,641
    Level
    25
    vBActivity - Bars
    Lv. Percent
    4.55%
    Quote Originally Posted by Imzogelmo View Post
    Ah, but what I'm saying is that each line in the above template proposal is already 32 bits.
    OH!

    I thought each line represented one bit, with the whole array coming to 2 bytes. I didn't realize you meant that each line was 2 bytes.

    That's why I was concerned. The way I was interpreting your presentation, I thought there was only one gate for Magic Sphere, but there's actually 32. That's way more than enough.


    Thank you for clarifying.

  8. #8
    Floormaster Imzogelmo's Avatar
    Join Date
    Sep 2005
    Location
    Earth, currently
    Age
    46
    Posts
    387
    Mentioned
    7 Post(s)
    Tagged
    3 Thread(s)
    vBActivity - Stats
    Points
    1,481
    Level
    13
    vBActivity - Bars
    Lv. Percent
    2.14%
    Just to further clarify, I should have said 16 bits, not 32. 2 bytes = 16 bits. Sorry about that. Still, way more bits than needed, but the template can be defined as the questmaker (what are we going to call it for FFC?) sees fit.

Thread Information

Users Browsing this Thread

There are currently 2 users browsing this thread. (0 members and 2 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Armageddon Games is a game development group founded in 1997. We are extremely passionate about our work and our inspirations are mostly drawn from games of the 8-bit and 16-bit era.
Social