Hellow guys so it's not a thread for RANTING about how people should do their params plugins but for share HOW you do your params plugins.
(also any "ranting" or arguments for how a params should be done will be automatically reported)
so let's begin on HOW I do my params
I do prototyped params in simple I create mostly all my stuffs in one big function and after attribute the stuff to the other thing's.
though if I have multiple function to handles I mostly just attribute a dummy function for handle my params here's the idea
function Game_AI() {this.initialize.apply(this,arguments);}Game_AI.prototype.constructor = Game_AI;function Game_AI(){this.initialize.apply(this,arguments);}Game_AI.prototype.constructor = Game_AI;Game_AI.prototype.initialize = function() { this.get_plugin_data(); this.throwerror();};Game_AI.prototype.get_plugin_data = function() { this.ai_params = PluginManager.parameters('EEM-Origin(AI_Core)'); this.voice_folder = String(this.ai_params['AI voice folder name']); this.bust_folder = String(this.ai_params['AI Bust folder name']);};Game_AI.prototype.throwerror = function(){ if(this.voice_folder === "voice"){ alert("it's work!"); }};//normally get like thisGame_AI.prototype.call_voice = function(file,volume,pitch) { var folder_extention = this.voice_folder;}//can be use outside ofr the functionfoo.prototype.method_name = function(first_argument) { var example = personality.bust_folder;}; obviously I put the global variable "personality" inside the DataManager.loadgameobject so it's only call once so no worry of instance calls.
in that ways it's clear accessible everywhere's and OUT of the global scope
but Global to the functions 🙂
so how guys do ? they have multiple ways to do this
(also any "ranting" or arguments for how a params should be done will be automatically reported)
so let's begin on HOW I do my params
I do prototyped params in simple I create mostly all my stuffs in one big function and after attribute the stuff to the other thing's.
though if I have multiple function to handles I mostly just attribute a dummy function for handle my params here's the idea
function Game_AI() {this.initialize.apply(this,arguments);}Game_AI.prototype.constructor = Game_AI;function Game_AI(){this.initialize.apply(this,arguments);}Game_AI.prototype.constructor = Game_AI;Game_AI.prototype.initialize = function() { this.get_plugin_data(); this.throwerror();};Game_AI.prototype.get_plugin_data = function() { this.ai_params = PluginManager.parameters('EEM-Origin(AI_Core)'); this.voice_folder = String(this.ai_params['AI voice folder name']); this.bust_folder = String(this.ai_params['AI Bust folder name']);};Game_AI.prototype.throwerror = function(){ if(this.voice_folder === "voice"){ alert("it's work!"); }};//normally get like thisGame_AI.prototype.call_voice = function(file,volume,pitch) { var folder_extention = this.voice_folder;}//can be use outside ofr the functionfoo.prototype.method_name = function(first_argument) { var example = personality.bust_folder;}; obviously I put the global variable "personality" inside the DataManager.loadgameobject so it's only call once so no worry of instance calls.
in that ways it's clear accessible everywhere's and OUT of the global scope
but Global to the functions 🙂
so how guys do ? they have multiple ways to do this