First, thanks for this editor for those who doesn't work well with CSS and haven't done any PHP in ten years.
I am trying to adapt Mille Sabords! (Piraten Kapern) through the Sandbox and since I haven't see much posts about the Sandbox I though to share some feedback and of course I have some questions
Feedback & ideas
The scripts documentation is good but the examples are too few, and if examples can't be added, I think that a documentation generated from code would suffice.
A more moderne editor (like monaco) with type completion would be awesome, or maybe typescript (or another) to check the code throught defintion files?
=> It is not easy to change editor, but the bga's functions have been added for completion.
Definitions files would also allow us to code outside the online editor and maybe have test and mock frameworks to check the code without having to run a test session.
=> I have started to create a definition file in the source code for Piraten Kapern (not finished).
The interface part is missing a documentation, at least a basic presentation of the editor and the game parts. I can propose one but I think I don't have the rights on the wiki.
Questions
1. Is it possible to add game a option like another score to achieve to win the game?
=> Yes, it is done through the game variant in game infos (see question #6).
2. How to add buttons in the action status bar? Like 'addActionButton' in the client-side framework.
I use clickable label for now but the feeling is not the same.
3. Just to be sure, the game has to be published in the original game name "Piraten Kapern"?
4. Is it possible to add images to log? Like miniatures of the dice.
5. Is it possible to replace default log for some action like roll? If the dice in the game doesn't have number it confuse the game log.
Example:
Code: Select all
laedit0 rolled Skull,Diamond,Parrot,Monkey,Monkey,Skull,Skull,Skull => custom
laedit0 rolls 6 dice and gets 4, 3, 1, 5, 5, 4 => default=> You have to use the bga.getVariant method, which takes the id of the variant (1 or 2) and returns the option's id (1, 2 or 3).
7. Is there a way to set the 'bgg_id' like in gameinfos.inc.php to associate the game with BoardGameGeek?
Thanks a lot and sorry for the long post!