User Tag List

Results 1 to 10 of 10

Thread: Secret of Mana Style Damage Number System and Enemy Weaknesses

  1. #1
    I shall exalt myself over all Armagedddon Games bigjoe's Avatar
    Join Date
    Apr 2000
    Age
    39
    Posts
    5,621
    Mentioned
    87 Post(s)
    Tagged
    6 Thread(s)
    vBActivity - Stats
    Points
    6,573
    Level
    24
    vBActivity - Bars
    Lv. Percent
    93.49%

    Secret of Mana Style Damage Number System and Enemy Weaknesses

    I think I'm finally getting to an intermediate level in terms of scripting. Check out this video, and read the description

    http://www.youtube.com/watch?v=nwW-HRDbRnI

    When I am finished with this script I will release it. Anyone interested?

    P.S. The enemies do seem a little unimaginative, but they're pretty much dummy enemies with which to test the system.


  2. #2
    The Time-Loop Continues ZC Developer
    Gleeok's Avatar
    Join Date
    Apr 2007
    Posts
    4,826
    Mentioned
    259 Post(s)
    Tagged
    10 Thread(s)
    vBActivity - Stats
    Points
    12,958
    Level
    33
    vBActivity - Bars
    Lv. Percent
    26.18%

    Re: Secret of Mana Style Damage Number System and Enemy Weaknesses

    Oooh..Nice. I friggin love this idea. At some point there may even be a little drawtile pop up that displays damage dealt.

    I'm assuming you even got a little custom array type thing made and maybe have plans for stuff like armor and whatnot also....but I'm just speculating.

    Although I have no use for this script whatsoever, I'd love to see it used. :)
    This post contains the official Gleeok seal of approval. Look for these and other posts in an area near you.

  3. #3
    I shall exalt myself over all Armagedddon Games bigjoe's Avatar
    Join Date
    Apr 2000
    Age
    39
    Posts
    5,621
    Mentioned
    87 Post(s)
    Tagged
    6 Thread(s)
    vBActivity - Stats
    Points
    6,573
    Level
    24
    vBActivity - Bars
    Lv. Percent
    93.49%

    Re: Secret of Mana Style Damage Number System and Enemy Weaknesses

    Well, theres something I can't really wrap my mind around about arrays. I'd love to use them, but.. hmm, let's see. I'll grab a code snippet.


    Code:
    //FROM INSIDE rpgfunc.zh
    
    int damage_algorithm_basic(int algtype){
    int rdamage;
    //ALGORITHMS FOR SWORDS
    if (algtype == 2) rdamage = Rand(char_atk) + Rand(2);
    if (algtype == 4) rdamage = char_atk + Rand(char_atk) + Rand(2);
    if (algtype == 6) rdamage = char_atk + (2 * Rand(char_atk)) + Rand(2);
    if (algtype == 8) rdamage = char_atk + (3 * Rand(char_atk)) + Rand(char_atk) + Rand(2);
    
    return rdamage;
    }
    There's a ENGINE hp and a REAL hp.

    ENGINE HP = The hp that the engine uses. Part of the npc.

    REAL HP = The hp that will determine whether or not the enemy dies or goes into a frantic weak mode or whatever.

    What the script does to determine what algorithm it will use to calculate the damage is takes the difference between the enemy's max ENGINE hp (usually 256) and it's current hp. Once it does that, the enemy's hp is immediately restored to maximum, but the difference is kept in a variable. That variable is passed through the above function. What is returned gets subtracted from the REAL hp, and then another function creates a display from that. When the REAL hp is zero, the enemy dies.

    The above four algorithms are for swords.

    If an enemy is immune to swords, it would pass to a different function. One that might be called damage_algorithm_noswords.

    Rather than

    Code:
    if (algtype == 2) rdamage = Rand(char_atk) + Rand(2);
    if (algtype == 4) rdamage = char_atk + Rand(char_atk) + Rand(2);
    if (algtype == 6) rdamage = char_atk + (2 * Rand(char_atk)) + Rand(2);
    if (algtype == 8) rdamage = char_atk + (3 * Rand(char_atk)) + Rand(char_atk) + Rand(2);
    You'd just see

    Code:
    if (algtype == 2) rdamage = 0;
    if (algtype == 4) rdamage = 0;
    if (algtype == 6) rdamage = 0;
    if (algtype == 8) rdamage = 0;
    How can I use arrays to streamline this? Is there any way I can use them to reduce it to a single function rather than having different functions for different weakness types?

    Oooh..Nice. I friggin love this idea. At some point there may even be a little drawtile pop up that displays damage dealt.
    Already got that taken care of. See the video. (You may have to enlarge it to full screen to see them, they're tiny.)

    (Also, anyone got some better algorithm ideas? These were just slapped together. There are three offensive stats, char_atk, char_spd, and char_mag. I'd like for basic swords to use char_atk. Also, I'm going to factor in accuracy somehow. Not sure how just yet.)

    Now, if I were to have weapons with their own stats, I could see how I could use arrays. I'll have to consider doing that. But for now the damage calculations are taken directly from base statistics. I think thats pretty sufficient given the average scale of a quest.


  4. #4
    The Time-Loop Continues ZC Developer
    Gleeok's Avatar
    Join Date
    Apr 2007
    Posts
    4,826
    Mentioned
    259 Post(s)
    Tagged
    10 Thread(s)
    vBActivity - Stats
    Points
    12,958
    Level
    33
    vBActivity - Bars
    Lv. Percent
    26.18%

    Re: Secret of Mana Style Damage Number System and Enemy Weaknesses

    Already got that taken care of. See the video. (You may have to enlarge it to full screen to see them, they're tiny.)

    0_o ....How did I miss that?! @_@ That's...Sweet!



    Well from what you posted I don't really see a need for arrays. (Though Joe123 might disagree.. <_<) I myself am only using three in my entire quest so far.
    ..Well if your gonna utilize enemy ID's in any way, then yeah, your gonna want to use them. For example; enemy[1-8]keese, enemy[8-16] Gels...etc. It lets you reference lots of stored data quickly and easy with only one variable. :)



    Also, I'm going to factor in accuracy somehow. Not sure how just yet.
    That could get ugly. When a lweapon hits an enemy, it knocks it back and deals damage. Youd be doing what I'm doing at that point; Trying to 'uncode' Zelda.

    And do I smell experience points?
    This post contains the official Gleeok seal of approval. Look for these and other posts in an area near you.

  5. #5
    Wizrobe C-Dawg's Avatar
    Join Date
    Jan 2002
    Posts
    4,205
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    6,611
    Level
    24
    vBActivity - Bars
    Lv. Percent
    99.87%

    Re: Secret of Mana Style Damage Number System and Enemy Weaknesses

    Awesome. This is exactly why I encourage people to release their scripts. The more scripters we have working on stuff, the faster we can develop new and awesome features. I was planning on something like this for my own quest, but I hadn't gotten as far as figuring out how to display damage. Joe, does your script let you display any arbitrary amount of damage? Or is it limited to tiles you've drawn? I'd love to see the code.

    It shouldn't be too hard to modify this code so that damage "falls" from the enemy and bounces on the ground, or alternatively, "rises" from the enemy into the air.

    If you're really going for Secret of Mana, you could make a custom energy meter (or use magic) that steadily refills, empties with each attack, and the power of the attack varies with how full the meter is.

    As far as making your code universal goes, why not go with FFC weapons? That is, have your weapon item just set an FFC, then have a global or ffc script use drawtile to display an animation, and if it's close to an enemy, calculate damage and spawn a weapon on the screen to damage the enemy accordingly.

  6. #6
    I shall exalt myself over all Armagedddon Games bigjoe's Avatar
    Join Date
    Apr 2000
    Age
    39
    Posts
    5,621
    Mentioned
    87 Post(s)
    Tagged
    6 Thread(s)
    vBActivity - Stats
    Points
    6,573
    Level
    24
    vBActivity - Bars
    Lv. Percent
    93.49%

    Re: Secret of Mana Style Damage Number System and Enemy Weaknesses

    Quote Originally Posted by C-Dawg View Post
    Joe, does your script let you display any arbitrary amount of damage? Or is it limited to tiles you've drawn? I'd love to see the code.
    Well, at the time of the video, it was limited to tiles I drew. However, I tweaked it a bit since and now it displays each digit seperately from a set of tiles 0-9. At this point, it can display any arbitrary value up to 9999. It would take only a few lines of code to add another digit to that.
    As well, since then, I've made it to where the damage stays after the enemy dies.

    I am currently working on making it use different number sets for different damage ranges. This is to add emphasis when you start taking large amounts of damage.


    Quote Originally Posted by C-Dawg View Post
    It shouldn't be too hard to modify this code so that damage "falls" from the enemy and bounces on the ground, or alternatively, "rises" from the enemy into the air.
    Right now I'm working on streamlining it. Getting rid of unnecessary segments and stuff. When its finish I'll have different variations to suit peoples whims.

    Quote Originally Posted by C-Dawg View Post
    If you're really going for Secret of Mana, you could make a custom energy meter (or use magic) that steadily refills, empties with each attack, and the power of the attack varies with how full the meter is.
    I'll probably have a global variable or something that sets whether this functionality is true. Some people might like to have it off or on.



    Quote Originally Posted by C-Dawg View Post
    As far as making your code universal goes, why not go with FFC weapons? That is, have your weapon item just set an FFC, then have a global or ffc script use drawtile to display an animation, and if it's close to an enemy, calculate damage and spawn a weapon on the screen to damage the enemy accordingly.
    I'm trying to make global things like weapons and damage calculations more or less independent of FFCs. Enemies, however, are currently each linked to an FFC. This is because, in my quest, I wish to have all enemies use a skeleton "custom enemy" but have their behavior modified by ffc variables.

    As for using drawtile to display animations, I am working on a function called drawdmg which draws a tile and spawns a stationary weapon as long as that tile is present.

    Because of the complexity of setting up enemy weaknesses, it will be difficult to make it universal. However, once the code is finished, I may work on a more universal-friendly version of it, for those who wish to implement it into quests without having to sit and go through each of their weapons and items and adjust their damage/variables accordingly, among other things. This universal-friendly system may have some limitations due to the fact that spawning weapons that way only allows engine weaknesses to be factored in. You couldn't have enemies with weaknesses that go beyond the basic stuff, unless you scripted them yourself, and I'm trying to focus more on editor friendliness.


  7. #7
    I shall exalt myself over all Armagedddon Games bigjoe's Avatar
    Join Date
    Apr 2000
    Age
    39
    Posts
    5,621
    Mentioned
    87 Post(s)
    Tagged
    6 Thread(s)
    vBActivity - Stats
    Points
    6,573
    Level
    24
    vBActivity - Bars
    Lv. Percent
    93.49%

    Re: Secret of Mana Style Damage Number System and Enemy Weaknesses

    Update: I am going to release the damage display function. Feel free to leave suggestions. Note that you have to call this function yourself from your global or FFC scripts. To get a variable to pass to it, check for changes in an enemy's hit points. Because of the problem about having to go through a proxy, I cant do CODE, so Im going to link to a text file: http://bigjoesquests.googlepages.com/dmgdisfunc.txt Until this godawful proxy problem is fixed for me again I will operate elsewhere, but I will check in every other day or so.


  8. #8
    The Time-Loop Continues ZC Developer
    Gleeok's Avatar
    Join Date
    Apr 2007
    Posts
    4,826
    Mentioned
    259 Post(s)
    Tagged
    10 Thread(s)
    vBActivity - Stats
    Points
    12,958
    Level
    33
    vBActivity - Bars
    Lv. Percent
    26.18%

    Re: Secret of Mana Style Damage Number System and Enemy Weaknesses

    What proxy are you using? There are some faster ones. The one I'm using right now is actually pretty good. http://www.kingofproxies.com/
    I do have javascript and everything else shut off while I use it, that could be making a big difference in speed. In fact, just paste it in your restricted sites list, that'll get rid of the ads too.


    I'll check out yous script. :)



    ..Wait, why can't you post code?
    This post contains the official Gleeok seal of approval. Look for these and other posts in an area near you.

  9. #9
    I shall exalt myself over all Armagedddon Games bigjoe's Avatar
    Join Date
    Apr 2000
    Age
    39
    Posts
    5,621
    Mentioned
    87 Post(s)
    Tagged
    6 Thread(s)
    vBActivity - Stats
    Points
    6,573
    Level
    24
    vBActivity - Bars
    Lv. Percent
    93.49%

    Re: Secret of Mana Style Damage Number System and Enemy Weaknesses

    Well, the one I was using, beatfiltering, was slow. But kingofproxies is much faster! Thanks. Still a little delay but its more tolerable. beatfiltering sucks. It removes formatting so you can't split lines. Hopefully this one doesn't do that. EDIT:ARGH. Still does.


  10. #10
    Octorok Master_of_Power's Avatar
    Join Date
    May 2001
    Age
    35
    Posts
    496
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    2,195
    Level
    15
    vBActivity - Bars
    Lv. Percent
    47.04%

    Re: Secret of Mana Style Damage Number System and Enemy Weaknesses

    It reminds me of Light Crusader, except with weaknesses! sweet!
    Keeping something big a secret, in case it doesn't work out I can understand.
    But he deliberatly drops little hints just to drive us mad.

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