avatar Edit displays/Validation
May 05, 2009 09:04PM
Hi, I'm trying out the ruleset editor and most of it is pretty easy to follow (with a bit of trial and error). What has me confused is the displays/validations sections. Am I right in thinking that this requires me to know some kind of programming language (lua)? Will this section be updated to become more user friendly to those of us without programming skills?
avatar Re: Edit displays/Validation
May 06, 2009 01:57AM
Yes, those sections require some programing skills.
I decided that there is so many gaming systems with so much different rules that there is no possibility to create better solution.

Here When Validating rules You are writing a piece of program that is getting table with army as an input and has to return table of errors and warning as an output.
Also when generating pdf from army You can write a code that will convert army to HTML which will be converted to pdf.

But...
    1) This items are optional! It doesn't work for now but I am working on something like default Display. So if you will leave display script empty your army will be converted to some standard pdf(table with units and bonuses etc.) Ruleset validation can be used for complex rules checking but a lot of simple things might be done with the bonuses tree (maximum amount of subbonuses etc.) For example in dwarfs Ruleset I am using validation only to check core/rare/special slots...
    2) Lua is easy to learn. Lua is one of the most clean and easiest scripting language I have ever used. You can check other public Rulesets to see how their scripts are written. Later on i will be writing some tutorials and code samples in the documentation section...
    3) I will also write library of helper functions like 'unit_has_bonus(unit,bonusid)' which will make writing the code even simpler...

I am working on a strict standard of format of this scripts right now (names of functions will be changed, etc) but the basic idea will remain so You can play with it.

regards
avatar Re: Edit displays/Validation
May 06, 2009 08:11PM
Thanks for the reply. As it stands I doubt that I'd have the time/inclination to learn the necessary code. If there was a handy list of commands along with some examples I might give this a go but as it stands I guess I'm unlikely to be in a position to contribute rulesets. That said I'll have a go when you get some tips up online. No doubt there are plenty of people with the right knowledge to do this already.

Of course I'd be happy to use them though, the armylist tool is very neat and as a Mac user an online army builder is very welcome.
avatar Re: Edit displays/Validation
May 06, 2009 08:53PM
no problem,

and speaking about multi platform staff:

online editor is just a first step,
If all things here will be done I will be finishing the standard of the *.twr (tabletop wargame ruleset) file. You will be able to save your ruleset.
And then I will be finishing my multiplatform( linux, mac ,windows ) offline editor which will use those files!

and one small tip (works in firefox):
Editor is in pure javascript working on the client side so You can:
create new (empty) army go to editor and save page as html.
then You can open this file offline and editor should work! so you can take it as a simple calculator into battle! (but only as a calculator because saving and validation wont work)
Sorry, only registered users may post in this forum.

Click here to login

© 2009,2010 FSW; almost valid XHTML; generated in: 0.03s;