Creating a certain hit attack but without certainty of applying states

● ARCHIVED · READ-ONLY
Started by thepsyche 18 posts View original ↗
  1. Hi there,

    This is a pretty basic thing - I want my characters to attack with certain kills that do not miss - and the "certain hit" hit type seems to be the best way to do this.

    However, although I do not want the initial hit to ever miss, I still want the states under "add states" in traits to operate as if the Hit Type was "physical attack". Meaning that the outcome of the state application is still determined by the state rate and the enemy's resistance to that state.

    Now, I'd rather not use a separate skill here and force action - so is there any way to contain this all within the same skill?

    Thanks!
  2. look into game_action.prototype.apply(), there's a bunch of conditions to check when the item is evaluated.
  3. @gstv87 - Thank you for the response. Sorry - I'm not much of an advanced user or scripting, but if you explain it a bit further in beginner's terms I can go and find the rest out on my own.

    Cheers.
  4. perhaps you should give a better description of what you want for your game, because there are several ways to do what you want.
    For example you might give all your actors a HIT% of 150% or so, then the physical skills would automatically hit but the rest of certain hit would not apply.
  5. @Andar I think in that case the target would have to have 0% eva as well: at least in v1.5.2, "missed" and "evaded" are separate checks (cf. apply and isHit methods of Game_Action in rpg_objects.js). A plugin like Yanfly's Hit Accuracy can help merge them into one check, though. ^_^
  6. perhaps you should give a better description of what you want for your game, because there are several ways to do what you want.
    For example you might give all your actors a HIT% of 150% or so, then the physical skills would automatically hit but the rest of certain hit would not apply.

    Hi @Andar - well I suppose I simply want a skill to deliver the damage formula with a certain hit, but then have a 80% chance of applying Poison (state 4).
  7. set the skill to certain hit, and then add an effect in the effects section?

    if you want that probability to be controlled by some other aspect, then you'll have to edit the validation,.... otherwise, just add it as it comes and call it a day.
  8. @gstv87 that would be optimal - but my understanding of using the "Certain Hit" target rate is that it will add any state listed in the traits, regardless of rate.
  9. no, the effects are added on top of the skill.
    if the skill doesn't land, neither will the effects.

    that's why there is such thing as "success rate" and physical/magical types, to give different kinds of validation checks.
  10. From what I remember certain hit uses only the state rate you apply in the event. So if you make it 50% that is a 50/50 skill, and nothing else factors in unless the target is immune to it. But to be sure I'd suggest testing it with say 0.1% state rate and then try it a few times and see if it ever does not apply. If not, then it would appear it is using only the state rate in the skill (though to be more sure you'd have to edit the code in the engine to print out the state rate it computes when the skill is used, and I only know how to do that in ACE, so can't help with that part of it).
  11. bgillisp said:
    You used hit type Certain Hit, which ignores state resistances. You will need to use either Physical Attack or Magical Attack for the state resistance to kick in.

    what he said.
    certain hit is certain hit, bypassing evasion or resistance.
    physical/magical will validate against resistance or evasion..... *on top of that*, damage formula, and *on top of that*, extra effects.

    that's why I say you can change the validation at game_action.apply()
  12. Right, then maybe my question should be more along the lines of, how do I make a "physical attack" target hit type land the "hit" part every single time so that the state rates still interact with the enemy's resistances?
  13. That is what I suggested above - give the actor a 150% HIT rate.
    That way even equipment and states that reduce the hit chance are unlikely to drop it below 100%.
    The option of evading by enemy values still exist then however, and despite several times being asked you still haven't said if you want evade and counter to be disabled or not.
  14. The condescension near the end there was not lost on me, thanks for that :).

    I would like evade and counter to be disabled, yes thank you.
  15. thepsyche said:
    The condescension near the end there
    There was no condescension there, but frustration about a lot of users that don't stop to think what they're doing here on this forum.
    So please think about it from our point of view:
    No one around here gets paid for anything - not even moderators who are all volunteers.
    We are using our own free time to help others with their games - free time that we could easily use for ourselves or our own projects.
    If we ask questions - take the time to write them down - then that means that the answers to these questions are important for helping you, and not having these answers will waste time while looking for whatever you need help with.
    And still there are a lot of people who often ignore those questions because they don't know why those answers are important.
    Think about it: you want us to spent our free time helping you with your game instead of working on our own games. So I think the minimum we can expect is that you give us all the info we need to help you fast instead of wasting our time by ignoring questions you don't understand.
    If you don't understand why we're asking something you should ask for clarification instead of ignoring the question.

    In this case that answer means that you have to use "certain hit" - absolutely no way around that, because nothing else in the default engine can disable evasion and counter on a per-skill-basis. (states reducing those values work in general for all skills while they're active)
    So your only option now is to look for other ways to get the state applied if you don't want the state to be guaranteed.

    there are theoretically three ways to do that:
    1) have a condition inside the damage formula decide wether a state should be added or not.
    This might be the easiest way, but it has its limits in what you can check inside the damage formula - that box has a limited length and a complex check requires a complex (=long) javascript code
    2) have the skill call a common event and apply the state through this common event
    Main limitation here is that without plugins, common events from skills are executed at the end of the battleturn only, not when the skill is used. And you'll need some tricks to get the correct target in the event.
    But then you can use any combination of conditional branches and control variables to decide how good the chance of application is and handle that.
    3) request a plugin to change that part of the engine to be more to your liking
    This requires either good programming knowledge on your own, or a good description and a lot of patience (waiting for someone to have the free time to do this for you).
  16. @Andar - your time isn't trivial to me, I'm very thankful to everyone who contributes. I didn't mean to set you off like that.

    Thanks for the suggestions, I've decided to go for option 3.
  17. This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.