Melee and ranged skills and effects

Discussion in 'RPG Maker VX Ace' started by Draw, Jun 30, 2017.

  1. Draw

    Draw Veteran Veteran

    Messages:
    83
    Likes Received:
    1
    First Language:
    French
    Hi everyone !

    I was thinking about something : In my game I'd like to have two separates skills types > Melee skills and ranged skills (more like magic spells). And I'd like to add effects, for exemple a frozen state that disable all melee type skills for the target. Flying or faraway enemies couldn't be trageted by melee skills also.

    It is possible to make that with the default tools or I need a script ?
     
    #1
  2. Henryetha

    Henryetha Veteran Veteran

    Messages:
    387
    Likes Received:
    205
    Location:
    Germany
    First Language:
    german
    I think it should be possible.
    On creating the enemies you can make it so that certain damage is negated.

    I am just remembering a tutorial from Driftwood Gaming where he explains how to set up a mining system.
    Those ores ignored damage completely if not done with a pickaxe.
    There it was possible by setting up an element for it. Maybe just add an element called "melee".. However, I'm not sure, how it will work combined with other elements (like when your melee weapon doing fire attacks).

    Well.. it's just a vage basic approach to think about.
     
    #2
  3. Andar

    Andar Veteran Veteran

    Messages:
    28,703
    Likes Received:
    6,600
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    it is possible by default, even if a lot of people use scripts or plugins to make it easier.

    Basically you need to add the conditions to the enemy attack patterns to when and when not the enemy can use a skill.
    For the actors it's easier as you can seal skills or skill types.
     
    #3
  4. Draw

    Draw Veteran Veteran

    Messages:
    83
    Likes Received:
    1
    First Language:
    French
    I'm on RM Vx Ace, and I don't really know how to do it...

    The idea is simple : if an enemy as the <flying> tag, it will avoid all <melee> skill and simple attacks if the weapon used is <melee>

    Some skills and weapons with <ranged> tag can hit a flying enemy, easy

    I only found one old script, but it was only for weapons, melee skills could hit a flying enemy, there was no tag

    And without a script, I really don't know how to do it
     
    #4
  5. Kes

    Kes Global Moderators Global Mod

    Messages:
    21,101
    Likes Received:
    10,722
    First Language:
    English
    Primarily Uses:
    RMVXA
    'Game Mechanics Design' is for looking at aspects of game play at a more conceptual level. "How do I...?" questions belong in the Support forum for the engine you are using.

    I've moved this thread to RPGMaker VX Ace. Please be sure to post your threads in the correct forum next time. Thank you.

     
    #5
  6. Roninator2

    Roninator2 Gamer Veteran

    Messages:
    1,766
    Likes Received:
    385
    Location:
    Canada
    First Language:
    English
    Primarily Uses:
    RMVXA
    You could just set each flying enemy to PDR 0%
    and use a new element for the attack

    But I think having a script for what you want would be really nice. I'd want that too. :ehappy:
     
    #6
  7. Sanguine Persona

    Sanguine Persona Villager Member

    Messages:
    14
    Likes Received:
    4
    First Language:
    English
    Primarily Uses:
    RMVXA
    Try looking at this script:
    https://forums.rpgmakerweb.com/inde...-forced-actions-now-yanflys-compatible.17950/

    It looks like it would do what you want it to.

    I did a bit of testing on my own and I am pretty sure that it's possible to do it without scripts... except the solution I just about found was ugly as sin. I wouldn't bother trying this unless you can get a script for it. My solution was so horribly complicated and bad that it looked like Satan himself had written it.
     
    #7
  8. Draw

    Draw Veteran Veteran

    Messages:
    83
    Likes Received:
    1
    First Language:
    French
    #8
  9. Sanguine Persona

    Sanguine Persona Villager Member

    Messages:
    14
    Likes Received:
    4
    First Language:
    English
    Primarily Uses:
    RMVXA
    dayum, sorry to get your hopes up with that.

    Anyway I did some more checking and I have found a not great but not terrible way of doing it.

    first you need an auto state script like this one:
    http://www.rpgmakercentral.com/topic/7596-auto-states/

    this allows you to add a flying state to all flying enemies at the start of a battle. Then you need to have all of your melee skills in the database have their damage formula in the following method:

    if b.state?(X);0;else;ACTUAL DAMAGE STUFF;end

    Where X is the id of the Flying State and the ACTUAL DAMAGE STUFF is the normal formula stuff like a.atk*4-b.def*2 etc. This will make it so that if they have the flying state then attacks with this formula style (i.e. the melee ones) will do 0 damage.

    though looking at the supporting script to the auto state one:
    http://www.rpgmakercentral.com/topic/7395-effect-manager/
    you might be able to come up with something more effeicent using that but that would require a bit more expertise than I have.
     
    #9
  10. Roninator2

    Roninator2 Gamer Veteran

    Messages:
    1,766
    Likes Received:
    385
    Location:
    Canada
    First Language:
    English
    Primarily Uses:
    RMVXA
    Go to page two of that link. there is 1 member that still has a working link for the demo they were having trouble with. the script is in there.
     
    #10
  11. geri_khan

    geri_khan Veteran Veteran

    Messages:
    32
    Likes Received:
    6
    First Language:
    English
    Hi, author of that script. I've updated the thread with fixed links, since I occasionally get people asking about it.

    If you do choose to use it, than a setup like this on melee skills would work (assuming you have a flying state that is , say, state number 21)

    Code:
    ASTstart
    ASTinclude:opponent
    ASTremove:b.state?(21)
    ... will remove enemies from the targeting list who are flying.

    That said I can't quite recommend my own script. If you can find other skill targeting scripts that do the same thing, it may be better to go with them. It is, to me, very much an amateur production now and I no longer have the time to maintain it if people find bugs etc.
     
    #11
  12. Draw

    Draw Veteran Veteran

    Messages:
    83
    Likes Received:
    1
    First Language:
    French
    I'll try it and see what I can do.

    If I can't I'll try to find another way.
     
    #12

Share This Page