Thread: Faster ruleset debugging cycle
-
July 4th, 2014, 09:24 #1
- Join Date
- May 2014
- Location
- Sydney, Australia
- Posts
- 808
Faster ruleset debugging cycle
Hi,
I am currently doing some ruleset development using eclipse as my ide. I have a project which points to the fg data ruleset folder and I am making changes and testinga lot ('cos I haven't got much idea what I'm doing yet) and the issue that I have is having to keep manually changing to the FZg app and /reload to update or if it's a module change, quit and restart.
Is there any way to call fg with command line arguments to load a given campaign or to anything like that? Also is there any way to remote control fg using an external program like eclipse or ant? Maybe, again using command line arguments to send chat commands...
Cheers,
Ian
-
July 4th, 2014, 10:19 #2
- Join Date
- Feb 2009
- Location
- USA Eastern Time Zone (GMT -5/-4)
- Posts
- 2,479
- Blog Entries
- 1
In the chat window type /reload
Writer for Just Insert Imagination and co-host of the Wild Die Podcast.
Find me on G+ to get in on one-shots, check out my YouTube and Twitch channel and follow me on Twitter @Mask_of_Winter
-
July 4th, 2014, 10:28 #3
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,426
For modules, you can close and reactivate from the Module Activation screen.
For rulesets, the /reload chat command is the the mechanism. Also, make sure to use the Debug.chat/Debug.console commands to help you output Lua variables to uncover details of issues.
Regards,
JPG
-
July 4th, 2014, 10:29 #4
Without a visual layout editor (Psicodelix's project), there's no way to check the results of the XML changes without loading the changes in to FG. Editor on one screen, FG on a second. Type /reload to view the changes just done in the editor in the FG window. If you're working in a ruleset in the rulesets folder, this is the quickest method. Extensions can also be worked on in the unzipped form, in a sub-folder of extensions. Modules, as yet, can't.
Using Ultimate license - that means anyone can play.
Valarian's Fantasy Grounds Rulesets
-
July 4th, 2014, 10:57 #5
- Join Date
- May 2014
- Location
- Sydney, Australia
- Posts
- 808
I know that I can manually switch from eclipse to fg and type /reload in the chat window but Inwas looking fir a way to automate this and/ or other actions from eclipse using ant. It would mean I could just make a change and have fg reload and open a character (for example) without having to do it manually each time. It would require fg client to have a listener for chat commands and a way to send them to it (maybe simply have a command line argument which forwards the command to a running fg).
I think it might be useful in other situations too you could have an external program sending messages to the chat window.
-
July 4th, 2014, 16:16 #6
Another good tip for ruleset/extension debugging: remove all tokens from you /tokens folder while debugging (copy them back when you're playing). All tokens in these folders are loaded each time you type /reload. If you have a bunch of tokens in the /tokens directory it can make a few seconds difference in load time if you temporarily remove them while developing.
Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
July 5th, 2014, 03:12 #7
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,426
The same goes for modules and extensions. Close or disable ones that you are not specifically developing them.
Also, I usually type /reload in chat entry and drag to F12 so that I reload with a single key press.
Regards,
JPG
-
July 5th, 2014, 03:51 #8
- Join Date
- May 2014
- Location
- Sydney, Australia
- Posts
- 808
That's a good idea!
I guess I can make a chat window command to open up a character sheet or open the combat tracker (depending which I'm debugging) and use a F key to reload and open?
-
July 5th, 2014, 03:55 #9
- Join Date
- May 2014
- Location
- Sydney, Australia
- Posts
- 808
Whould it be possible to add LuaSocket support? I tried but it seem that FG doesn't support the required dynamic lua package stuff it needs.
With luasocket maybe I can add a listener socket and send it commands.
Ian
-
July 5th, 2014, 21:49 #10
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,426
If you are trying to send commands between client/host use the OOB message support in the Comm package.
No plans to add socket support, since this creates some security questions and then you have even more port forwarding issues. The Lua within FG is deliberately sandboxed.
Regards,
JPG
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks