Tuesday, April 29, 2014

Hoardomatic Client

I put together a simple interface for the hoard-building machinery as an alternative to running the code manually in Eclipse. Pretty simple: enter a target value for the hoard and press the button.

To customize the output, there's a collapsible section of checkboxes. Various flags can be thrown for items in the hoard. "Required" means that items must be of that type. "Forbidden" means that items of that type are automatically rejected.

The machinery does it's bit and puts the items in the text box at the bottom, from which they can be copied to something more legible. Just to make sure it's working, there's a little display of the value of the items in the hoard (not including coinage) which updates as it goes.

More or less functional, but it really shows where the limitations of the approach I took (purely random items accepted or rejected after generation, data in XML files). Notably, selecting a small number of required embellishments and any number of forbidden ones (for example, non-enchanted swords) makes it slow to a crawl because only a fraction of generated items are likely to fit the required conditions and those have a non-trivial chance of then meeting the requirements for rejection. And, of course, the real limitation here is tagging the items, for which I need to come up with a better approach.

No comments: