using module or class?

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,949
Reaction score
3,042
First Language
French
Primarily Uses
RMMV
So recently I encountered a little problem with my module AI so I was tempted to transfer my module to a class 

but my main concern was...did this will make my system more hard to use because my main goal is to make my  script easy to implement because it's a scripter tool and ALSO easy to edit.

so I was curious to know did the fact I use a class instead of a module will make my script More hard to edit for the other people? 

or this not change anything and this make even my script more stable?

that's what my main concern seriously and I don't want to publish a script no one will use simply because it's to much hard to edit or to understand....

thanks for your further answer :) !
 

Evgenij

Veteran
Veteran
Joined
Aug 28, 2013
Messages
349
Reaction score
100
First Language
German
Primarily Uses
N/A
Hi, maybe it would help to know which problem you have encountered.
 

Iavra

Veteran
Veteran
Joined
Apr 9, 2015
Messages
1,797
Reaction score
863
First Language
German
Primarily Uses
When i'm extending classes, i usually tend to handle most of my logic inside the module and add to the class only what's really needed. When i'm writing my own classes, i do so inside a module, so they are namespaced and don't clash with other scripts.
 

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,949
Reaction score
3,042
First Language
French
Primarily Uses
RMMV
Hi, maybe it would help to know which problem you have encountered.
the problem was the fact  was a code line I was unable to extract string from a certain method I want to employ 

AI_Personality ||= { } so I decided to move on on class because this code only seem to works in class instance  and for the organisation + I was not enable to update proprelly the module like I wanted 

but I am just worry if the class will make my system to much complicate for people to use my script due it's a Scripter tools if I explain I offert this script for permit to people to Implement without problem their own VN (visual Novel) AI in their Scene  

it's totally independent of the system you just have to initialize the system and to call the reaction key 

example from my default :

def methodcase signwhen :buyAI_Base.interaction_key = :execute_buyAI_Base.interaction#do you stuffend endI know module and class works in the same ways for calling instance but I am worry of the extra step you have to do with class will make people to hesit to use or edit my system.

When i'm extending classes, i usually tend to handle most of my logic inside the module and add to the class only what's really needed. When i'm writing my own classes, i do so inside a module, so they are namespaced and don't clash with other scripts.
hum I see but in a way we still sometime to use class because they have sometime more module don't have no?
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,865
Messages
1,017,059
Members
137,575
Latest member
akekaphol101
Top