User Tag List

Results 1 to 10 of 10

Thread: Level up data

  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,480
    Level
    13
    vBActivity - Bars
    Lv. Percent
    1.81%

    Level up data

    OK, trying to get an idea how to set up a Level Up table.

    Different games do different things on level up.

    All games have an experience curve. It's not too important how it is stored; it can be a cumulative amount or an increment from previous. (FF6 acttually only stores increments/8). Either way accomplishes the same thing.

    FF1 has HP increases (one of two types, chosen by a bit called 'weak/strong'), stat increases (5 bits, if set the stat increases by 1), and MP charge increases (8 bits, if set the corresponding level charge increases by 1). Each class has its own table of size [MAXLEVEL-1]. I'm not 100% sure, but I believe there are only 6 tables, with promotions still using the same table.

    FF6 has HP and MP increases. They do not vary from character to character; everyone has the same Exp requirements and gets the same HP and MP increases. However, the amount to increase HP or MP can be affected by an Esper bonus of some percent, and the 4 base stats of FF6 can be incremented by 1 or 2, again based on an Esper bonus (if equipped).

    --------

    So, now a quick proposal:

    A table, size MAXLEVEL-1, for each class.
    Each entry would hold the following (4 bytes each):
    1. Exp. needed
    2. HP increase (0 or 1, weak or strong level up. This could be defined in other games as a straight increase)
    3. MP increase (to use for charges, 4 bits each, gives you 8 levels of magic)
    4. Stat increase (to use for the 5 base stats... 4 bits each? Could go as high as 6 bits but that's kinda overkill)
    5-32. Padding for chunk, could be defined by other games.

    Thoughts?

  2. #2
    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,978
    Level
    33
    vBActivity - Bars
    Lv. Percent
    28.31%
    So that's 128 bytes? I can't imagine wanting to map out every stat of every level-up for every character.. though I guess it is possible. It's funny because normally I think that memory is cheap, but it seems like just 74 KB of wasted space. lol. I think even rpg-maker has a formula X 8 stats and that's it (8 * 4bytes * 99 * num_chars)

    ..there should be something in there though I guess. How about: neededEXP + 1 byte per stat, and then when someone makes a case for why more is better we can add more. ..Plus it's kind of useless having extra without some kind of level up editor thingy. Mmm. Yeah?

    [edit] Also, it's not really the the number of bits that is important, but rather what the memory is used for.
    Last edited by Gleeok; 01-16-2013 at 06:32 PM.
    This post contains the official Gleeok seal of approval. Look for these and other posts in an area near you.

  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,480
    Level
    13
    vBActivity - Bars
    Lv. Percent
    1.81%
    How about Needed EXP (4 bytes), and 16 1-byte fields for stats?

  4. #4
    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,978
    Level
    33
    vBActivity - Bars
    Lv. Percent
    28.31%
    I did an EXP table already, so I think I can do better with an EXP table index and then data, since those are shared a lot anyway.

    Also, while I'm not saying that exact stats per lv-up are bad, It would be difficult to change that data without an editor for it, plus I sorta kinda don't want to go through the hassle of hacking the rom; writing a function to extract stat and charge data; writing another xml conversion; loading it and resaving it again... It's time consuming and I can get more needed things done instead. :\ I've already done Items and cropped a bunch of character sprites..and I'm pretty much tired of doing it by now. (or put it on the todo list when there's a beta version prehaps)

    How about writing a simple function that increases stats on lv-up? We have a constant (lv) and we know that every n levels stat x increases somewhat uniformly to this.
    This post contains the official Gleeok seal of approval. Look for these and other posts in an area near you.

  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,480
    Level
    13
    vBActivity - Bars
    Lv. Percent
    1.81%
    Yep. I can do that.

    EDIT: This is what I came up with for the Fighter class:

    Code:
    void LevelUp()
    	{
    		if( lv >= 99 )
    			return;
    		
    		bool Strong = false;
    		bool Str_bonus = false;
    		bool Agi_bonus = false;
    		bool Vit_bonus = false;
    		bool Luc_bonus = false;
    		bool Int_bonus = false;
    
    		if (lv < 12) Strong = true;
    		else if ((lv < 24) && (lv % 3 != 0)) Strong = true;
    		else if ((lv >= 24) && (lv % 3 == 2)) Strong = true;
    		//--------------------------------
    		Str_bonus = true;
    		//--------------------------------
    		if (lv < 21) Agi_bonus = true;
    		else if ((lv < 30) && (lv % 3 != 0)) Agi_bonus = true;
    		else if ((lv >= 30) && (lv % 2 == 1)) Agi_bonus = true;
    		//--------------------------------
    		if ((lv < 31) && (lv % 3 != 1)) Vit_bonus = true;
    		else if ((lv >= 31) && (lv < 41) && (lv % 2 == 0)) Vit_bonus = true;
    		//--------------------------------
    		if ((lv < 31) && (lv % 3 != 2)) Luc_bonus = true;
    		else if ((lv >= 31) && (lv < 41) && (lv % 2 == 1)) Luc_bonus = true;
    		//--------------------------------
    		if ((lv < 44) && (lv % 3 == 1)) Int_bonus = true;
    
    		int hpIncrease = (vitality / 4) + 1;
    		if(Strong)
    			hpIncrease = 20 + (vitality / 4) + rand(1, 6);
    
    		max_hp += hpIncrease;
    		//mp
    		strength += 1;
    		Agi_bonus ? agility += 1      : if(probability(50) ) agility += 1;
    		Vit_bonus ? vitality += 1     : if(probability(50) ) vitality += 1;
    		Luc_bonus ? luck += 1         : if(probability(50) ) luck += 1;
    		Agi_bonus ? intelligence += 1 : if(probability(50) ) intelligence += 1;
    		mag_def += 2;
    	}
    Last edited by Imzogelmo; 01-16-2013 at 11:43 PM.

  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,978
    Level
    33
    vBActivity - Bars
    Lv. Percent
    28.31%
    Cool. How about simplifying each stat into a function call though;
    str += GetStatBonus(lv, 4, 8, 1); ..

    Also some of those formulas are not quite as inexact as specified. For instance I figured out the exact exp table here:

    Code:
    		for( size_t i(1); i < values.size(); i++ )
    		{
    			values[i] = values[i - 1] + fc::iround(39.f * powf((float)fc::min<size_t>(i, 29), (float)2));
    		}
    I imagine most everything else can be summed up simpler than what it says.
    Last edited by Gleeok; 01-17-2013 at 10:35 AM.
    This post contains the official Gleeok seal of approval. Look for these and other posts in an area near you.

  7. #7
    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,480
    Level
    13
    vBActivity - Bars
    Lv. Percent
    1.81%
    I guess I'm not quite seeing what you're seeing. Each curve can be broken up into a series of patterns, and I've tried to describe the patterns (for Fighters, and I've also done it for Thieves, the rest not yet). Since the patterns are not constant across the whole curve, I've done it piecewise. The status bonuses (as I've called them) are not the actual bonus, but rather a "guarantee" that it will increase. Even if it's false, there is a 50% chance of increase. So it's actually a series of 50% or 100% chances of increase.

  8. #8
    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,978
    Level
    33
    vBActivity - Bars
    Lv. Percent
    28.31%
    Oh, I see now. ..Wait, White Mages don't gain INT ever after LV 30?? ..WTF?!

    ..
    In the NES I guess anything after LV 25 doesn't matter much.. since it doesn't have bonus dungeons or anything. If you want to fix that (and other) bugs, do it.

    [edit] If you want to just stick those in the lv-up data under "stat_flags" be my guest. A text file ( ex; 3096 870 4879 etc..) or a binary file works. The bits should be in a 4-byte integer between 24-28, or 19-23, or 27-31.. (24-28 is how I have right now.) , or, 8-bit byte starting from 0. Either one works. (bin file is easier) ..
    then you can just say "stat[x] += game.lv_data[lv].stat_flags[x] ? 1 : rand(0,1);
    Last edited by Gleeok; 01-17-2013 at 03:21 PM.
    This post contains the official Gleeok seal of approval. Look for these and other posts in an area near you.

  9. #9
    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,480
    Level
    13
    vBActivity - Bars
    Lv. Percent
    1.81%


    I can easily create a binary file with all the bits needed (for all the classes), but I'm not sure where the level up data you're referring to is.
    Also, it needs 6 bits, and 14 if we do magic spell curves too.
    Last edited by Imzogelmo; 01-18-2013 at 01:35 AM.

  10. #10
    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,978
    Level
    33
    vBActivity - Bars
    Lv. Percent
    28.31%
    Translation: Do whatever is easier.
    This post contains the official Gleeok seal of approval. Look for these and other posts in an area near you.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 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