- Oct 30, 2019
- 193
- 158
First off the article is posted here because the "Programming" in "Programming, development &Art" Secondly, the reason I used Renpy above well its probably the most appropriate because it can use pure python blocks in it.
The primary part is the class bSM. I gave single very basic example of it's use. Were I used it to make a simple corruption demo you could however use it for many attributes.
The method is fairly fast and allows you to create rather clean and easy manageable code. Meaning if you need to make changes later on because you don't like something well you can do it rather easily. It should perform rather well speed wise in comparison to using a lot of if statements and should also be a lot easier to follow.
To create an attribute use : attributename = bSM(start value). Start value is whatever value you want that character to start that attribute with.
For most uses you shouldn't need to make changes to the class itself just create new states and save them using save_state().
When you want to test against that state use the function checkF( state_you_want_to_check).
there are functions to increment, decrement,set and get the value of the attribute.
state_count currently really isn't being used.
Hope this comes in use for some one.
I corrected for the issue with class variable vs Instance variables. Yep, I don't use python that much. Most C and C++.
The primary part is the class bSM. I gave single very basic example of it's use. Were I used it to make a simple corruption demo you could however use it for many attributes.
The method is fairly fast and allows you to create rather clean and easy manageable code. Meaning if you need to make changes later on because you don't like something well you can do it rather easily. It should perform rather well speed wise in comparison to using a lot of if statements and should also be a lot easier to follow.
To create an attribute use : attributename = bSM(start value). Start value is whatever value you want that character to start that attribute with.
For most uses you shouldn't need to make changes to the class itself just create new states and save them using save_state().
When you want to test against that state use the function checkF( state_you_want_to_check).
there are functions to increment, decrement,set and get the value of the attribute.
state_count currently really isn't being used.
Hope this comes in use for some one.
You don't have permission to view the spoiler content.
Log in or register now.
You don't have permission to view the spoiler content.
Log in or register now.
I corrected for the issue with class variable vs Instance variables. Yep, I don't use python that much. Most C and C++.
Last edited: