So, I decided to try and see if I could edit a script for some more utility. I already got experience with some other programming languages, so I figured I could probably find out how to do it by reading through the script, and checking some tutorials, but it didn't work.
The script I tried to modify was this one: http://www.theolized.com/2013/11/theo-enemy-swapper.html
And what I did was add this method:
def load_swap_rate_notetag if line =~ /<swapping rate: (.*)>/i if rand(100) <= $1.to_i return true else return false end end endHere (Stuff I added are between <'s and >'s)
The script I tried to modify was this one: http://www.theolized.com/2013/11/theo-enemy-swapper.html
And what I did was add this method:
def load_swap_rate_notetag if line =~ /<swapping rate: (.*)>/i if rand(100) <= $1.to_i return true else return false end end endHere (Stuff I added are between <'s and >'s)
Code:
class RPG::Enemy < RPG::BaseItem attr_accessor :swap <def load_swap_rate_notetag if line =~ /<swapping rate: (.*)>/i if rand(100) <= $1.to_i return true else return false end end end> def load_swap_notetag @swap = [] note.split(/[\r\n]+/).each do |line| if line =~ /<swap:[ ]*(.*)>/i @swap = $1.to_s.split(/,/).collect do |enemy_id| <if load_swap_rate_notetag> id = enemy_id.to_i next if id == 0 id end end.compact end end end end