I just got a something funny in module Vocab.
My goal was to be able to switching Vocab to other language.
But, since the variables in Vocab are constant (which is unable to change), I though that was impossible.
Later ......
Since I knew the word 'require' in ruby, I planned to make a switching vocab by a script call.
def translated require 'indo_vocab'enddef english require 'english_vocab'endThe indo_vocab.rb contains translated module vocab in my language.I tried to make two events that call these two methods.
But I realized that you could only call the 'require' keyword with same parameter in one time.
Okay, my experiment was failed ...
Then, I've been wondering what if I could re-define Vocab by using script call. So, I tried to make these code
def indonesian_vocab eval(" module Vocab ShopBuy = \"Beli\" # Buy in my language end ")enddef english_vocab eval(" module Vocab ShopBuy = \"Buy\" end ")endAnd did you know? it works perfectly
Well, I just want to share this trick. And I'm sorry if I can't explain a thing in english properly
My goal was to be able to switching Vocab to other language.
But, since the variables in Vocab are constant (which is unable to change), I though that was impossible.
Later ......
Since I knew the word 'require' in ruby, I planned to make a switching vocab by a script call.
def translated require 'indo_vocab'enddef english require 'english_vocab'endThe indo_vocab.rb contains translated module vocab in my language.I tried to make two events that call these two methods.
But I realized that you could only call the 'require' keyword with same parameter in one time.
Okay, my experiment was failed ...
Then, I've been wondering what if I could re-define Vocab by using script call. So, I tried to make these code
def indonesian_vocab eval(" module Vocab ShopBuy = \"Beli\" # Buy in my language end ")enddef english_vocab eval(" module Vocab ShopBuy = \"Buy\" end ")endAnd did you know? it works perfectly

