Eventing a Random State Skill

● ARCHIVED · READ-ONLY
Started by Zurea 3 posts View original ↗
  1. I've looked over and attempted to use http://forums.rpgmakerweb.com/index.php?/topic/18097-making-a-skill-with-random-effects/ as a guide to very little effect.

    To fully grasp what I'm attempting I'm using Galv's Magic Shards script http://galvs-scripts.com/2013/03/24/magic-shards/ to make a shard combo skill when the elements of Metal and Arcane are side by side to make an attack called 'Paradox'.

    The skill deals random damage in a formula of c=1+rand(6);d=1+rand(6);if c==1 and d==1;10000;elsif c==d;c*400;else;(c+d)*100;end; by Formar0153 http://cobbtocs.co.uk/wp/?p=271

    Though to a minuted effect of a 10th the damage and double 1s is a death to the user instead. Anyway the skill's other effect is that it's supposed to place a random status effect on the target (1 random enemy) problem I'm encountering is in the Conditional Branch, it has 'else' on it and ether the condition doesn't work or it applies multiples. I'm not asking to have something made for me or a script for this, I'm just simply asking who to better utilize the conditional branch to get the result I'm looking for.

    Edit: Okay I figured out how to remove the 'Else' but I'm still stuck on making it target a random enemy unit with a random state instead of it looking for a specific unit.
  2. I'm quite confused trying to figure out exactly what you need help with here.  It sounds like you are having issues with the scope of a skill, because usually the skill should add a state to a random foe, but occasionally it should instead KO the user of the skill?

    If that's the case, set the scope of the skill to One Random Enemy but then use a formula like:

    if rand(100) < 5; a.add_state(1); else; b.add_state(59); end

    State 1 is the KO state.  State 59 is whatever state you want to add to the random foe if the skill doesn't backfire.  If you need to add, say, one of 20 different negative states to an enemy, that's too long for the formula box, so here's what you do: continue to use this same formula, but then add a Common Event to the skill.  The Common Event would check each enemy character for this State 59, and if they have it, it would pick a random number, and based on that random number, apply the appropriate negative state to that enemy, then remove State 59 from that enemy.
  3. Edited: Alright never mind, I got it working right, all I had to do was conditional branch: Variable random 0 ~ 12.

    Then on the Variable == # use Force Enemy state X. It kept asking me if I wanted the enemy troop or just 1 monster, but I thought an actual monster had to be declared in the "monster index" (whatever that is) and that leaving it blank would do nothing, but it works fine. Thanks for that though, it did help me to solve the backlash issue though (which don't know if it's working as the random scope of the skill.).