Add random states to enemies.

● ARCHIVED · READ-ONLY
Started by Eden019 4 posts View original ↗
  1. Hi guys, I'm wondering if anyone here can make a script that allows us to add a random state to enemies?

    Actually, I can make it by using variables, but I can't make 2-3 random states at once.  So, I want in a particular battle, at each the beginning of the battle; the boss will buff his/her minions. If we can configure it on the script editor, it will be nice.

    If anyone can make this, you'll be credited for sure.

    Sorry for my bad English. Thanks.
  2. Try to put this snippet

    Code:
    def random_states  states = [1,2,3,4,5,6] # State ID  result = []  2.times do    result.push(states.shuffle.shift)  end  return resultend
    Then in damage formula
    Code:
    random_states.each {|s_id| b.add_state(s_id)}
    I haven't tried it yet though
  3. why can't you do that with events?


    One randomizer (variable) for the number of states to add in a loop where a second variable randomly selects which state to add.


    If there are enough possible states in the list, you don't even need to check for existing states - in those cases the player has luck and gets one less state on their enemies...


    OK, doing everything in troop events on turn 0 does require quite a big event, but I don't see a reason why you can't do it...
  4. @TheoAllen

    It didn't work, but thanks for trying. And I forgot to mention that the buffs are only applicable only for bosses.  :)

    Yeah, it because I must make a huge list of conditional branches, looping the branches seem to be very annoying, and I think I've found a way to manage it.

    Actually I have to use 3 common events, each common event contains a list of potential states to occur. 

    I must make 3 variables and 4 common events :

    Set 1 states :

    Spoiler
    Set 1 states are mostly elemental buffs, it's kinda awkward to add fire and ice buff simultaneously. 

    Set_1.png

    Set 2 states :

    Spoiler
    Set 2 states are usually relevant to the special skill and states.

    Set_2.png
    Set 3 states

    Spoiler
    Set 3 is mostly for adding abnormal states.

    Set_3.png

    And, this is my troop event :

    Spoiler
    [1.] is the enemy's name. I always put the boss in the first monster.

    And note, that I added variable 6 and 7 to add a possibility to not add the 2nd and 3rd buffs.

    My_troop_event.png
    I think it's solved. I think it should be moved to the event tutorial right now. lol

    Thanks everyone.