-
Notifications
You must be signed in to change notification settings - Fork 3
Developing Scripts
OpenORPG can be customized by writing scripts that interact with the game world. These can vary from all sorts of things, but this page will cover the very basics. If you want your weapon to do something special when it attacks or to do something special while defending, this is your page. Maybe you just want to do something special on a quest state, and this is your page, too.
If there is something dynamic and unique you want to do in your game that is not available through the stock editors and is a 'one off situation', in that very few pieces of content share or it does not belong in the core -- it is a good candidate for a script.
A combat script allows the behavior of a combat skill to be modified or the behavior of a monsters attacks. These certainly could be applied elsewhere, too but these are the general cases. You should consider writing a combat script for some of the following example cases:
- Consider the weapon "Arrogant Spear", which should have a hidden ability that when the users HP is below 25% deals double damage. Given such a specific requirement, it is a good candidate to write a script for such a feature.
- A monster when attacking has a random chance to inflict a status ailment when attacking. Let us say it chooses between three different ailments depending on your hitpoints. This is a complicated requirement and would be suited well for a script.
In many cases, scripts are generalized (adding status effects, damage modifiers upon certain conditions) so they can be reused. Check out the community scripts before rolling your own and consider contributing back your ideas.