David FoxFire
Adventurer
- Xy$
- 0.00
I have a script that, instead of improving on an existing feature, has it's own need for number-crunching. It basically simulates a d20 roll from table top RPGs, where a modifier is tallied up based on attributes and is added to a d20 roll. The result is given back to the event that calls the roll.
I can easily code in the d20 roll, setting up the attributes, and adding up the modifiers with the coding skill I have now, barring noobie syntax errors of course. It's getting it into a plugin format that I can use with MV that is the problem, and it's the part I need the most help with.
Any and all assistance will be apprecaited. Thanks in advance.
Revision List...
I can easily code in the d20 roll, setting up the attributes, and adding up the modifiers with the coding skill I have now, barring noobie syntax errors of course. It's getting it into a plugin format that I can use with MV that is the problem, and it's the part I need the most help with.
Any and all assistance will be apprecaited. Thanks in advance.
Revision List...
Revision 1: Updated my script to show the correct syntax to deal with $gameVariables and $gameSwitches . Thanks go to eivl for this. I still need to find out how to check whatever a certain character is in the party. Right now I have "$game_party.members.include?(3)" and I know for sure that I'm way off. Of course the big problem is converting this into a plugin so I can make the plugin calls, which is the main omission in this script.
I do need to put in more functions, but I want to make sure that the script is in plugin form before I do that, so I'll know what to add to the file.
Revision 2: Added some documentation and adjusted the code around. Now all the variables going in and out of the script are stored in $gameVariables and $gameSwitches for easy transition between the script and RMMV's event editor. Now you set the variables and switches and just run the plugin command (once it become a plug-in, that is)
A list of the used $gameVariables and $gameSwitches used is in the documentation.
Revision 3: Now I'm in the process of learning Object Oriented Programming, and turning these formulas into Methods. Since I'm still starting off with this, it's still feeling like pulling teeth to understand this part.
Revision 4: Added a function that helped deal with two needs at once: Find out whatever someone is in the party, and if so, what's that character's level. Also started on creating the Script Calls, but they still don't work.
Revision 5: After seeing how other plug-ins are doing it, and recognizing the patters in the more important Plug-In Command Section of the codes, I was finally able to get this plug-in to work. At this incarnation, I was able to use a Plugin Command to install the array, which is a very important step in the right direction. There might be some more debuging for the other two commands, but at this point, I'm very satisfied with the current success of this plug-in, and now that I know how to make one, I can work now on perfecting the code (and dealing with all the bugs) for the completed game.
I'd like to thank @eivl for all of his assistance, he's been a great tutor on how to make plugins. And without him, I would've never gotten my head around Object-Oriented Computing.
I do need to put in more functions, but I want to make sure that the script is in plugin form before I do that, so I'll know what to add to the file.
Revision 2: Added some documentation and adjusted the code around. Now all the variables going in and out of the script are stored in $gameVariables and $gameSwitches for easy transition between the script and RMMV's event editor. Now you set the variables and switches and just run the plugin command (once it become a plug-in, that is)
A list of the used $gameVariables and $gameSwitches used is in the documentation.
Revision 3: Now I'm in the process of learning Object Oriented Programming, and turning these formulas into Methods. Since I'm still starting off with this, it's still feeling like pulling teeth to understand this part.
Revision 4: Added a function that helped deal with two needs at once: Find out whatever someone is in the party, and if so, what's that character's level. Also started on creating the Script Calls, but they still don't work.
Revision 5: After seeing how other plug-ins are doing it, and recognizing the patters in the more important Plug-In Command Section of the codes, I was finally able to get this plug-in to work. At this incarnation, I was able to use a Plugin Command to install the array, which is a very important step in the right direction. There might be some more debuging for the other two commands, but at this point, I'm very satisfied with the current success of this plug-in, and now that I know how to make one, I can work now on perfecting the code (and dealing with all the bugs) for the completed game.
I'd like to thank @eivl for all of his assistance, he's been a great tutor on how to make plugins. And without him, I would've never gotten my head around Object-Oriented Computing.
Attachments
-
14.9 KB Views: 11
Last edited: