I embarked on an adventure to make a utility for the Software Inc community. It is an XML generator for furniture mods, making hand-writing the XML’s and constantly referencing the wiki obsolete. I went with a simple 3 column interface with the logical sections of the XML separated.

Usually, I don’t utilize Javascript or jQuery when developing a PHP script. This time was different since I was on an adventure! I decided to use jQuery and noUiSlider to produce an intuitive way to assign values. In Software Inc, a piece of furniture has a bar denoting the effect, so the slider is a good analog for in-game. The sliders are set for the in-game range of accepted input so there won’t be any faulty values, noUiSlider handled that with a breeze. I used a few examples from their site to achieve my sliders.

Going along with motif of this project, I ventured into the world of XML’s. I’d be hard pressed to find a developer who jumps at the opportunity to work with XML… until this project. I discovered SimpleXMLElement on php.net, it allowed me to create a skeleton XML and effortlessly build the rest of the XML via forms. It then builds the XML depending on the options chosen with the added bonus of being able to put static objects in the skeleton. Sign me up for working with XML’s in the future, I’m excited to try building an array and then using SimpleXML to generate XML from it in a single line.

While showing off my draft to another mod developer, I learned a useful way to display large select lists without horrific code repetition. He wrote this simple yet powerful function which I will be able to use time and time again.

Furniture XML Generator is the product of this journey. You can see it in action over here, the left column are the required options, otherwise go wild with the rest of them.