Violent Sol World continues to ask the question, “Can we mod this?” We started out this project with every intention of making all things, from creatures to items to biomes, modable. So this week I spent a lot of time working out our system for items. We wanted to make sure that any average Joe could create their own items, or change the items that we have in game in a really simple way. So what we came up with is effects. Every item and every entity can have effects. So what is an effect?
<Effects> <VSEffect> <Duration>0</Duration> <AttributeEffected>Damage</AttributeEffected> <Amount>5</Amount> <PercentageChance>100</PercentageChance> </VSEffect> </Effects>
It is a combination of duration of the effect, attribute that is affected, amount of the effect, and percentage chance for it to hit. Using this simple layout, we can have these effects hit the defenders hit points, speed, accuracy, damage, armor, and fire rate. So in the example above with duration of zero and a percentage chance of 100 this is an instant effect, so the pistol that it is on increases the player’s damage by five.
In the following example though, the same damage has duration of two and a percentage chance to hit of 50. So this is your run of the mill damage over time, hitting for two hit points, every seconds, for two seconds, 50% of the time.
<Effects> <VSEffect> <Duration>2</Duration> <AttributeEffected>HitPoints</AttributeEffected> <Amount>2</Amount> <PercentageChance>50</PercentageChance> </VSEffect> </Effects>
So with these simple xml nodes you can create an item that does practically anything you want. So when our player only has an accuracy of 10 he can barely hit anything in front of him.
As a modder, you might feel the need to create a set of sleeves that increase his accuracy.
<Effects> <VSEffect> <Duration>0</Duration> <AttributeEffected>Accuracy</AttributeEffected> <Amount>90</Amount> <PercentageChance>100</PercentageChance> </VSEffect> </Effects>
See, simple right?
Of course there is a little bit more to it than that, but it is easy to put the effect on it right? Get ready to do a bunch of modding in Violent Sol World.
If you enjoyed this article please follow us over at Violent Sol World here on Indie DB.
And if you want to help support our progress we have a little side scrolling shooter for sale that is kind of fun on Itch.io called Cornflower Corbin. Check it out.
As always, follow me @Viedt_EL on Twitter.