PDA

View Full Version : Community call for a 3.0 Core expanded how to make a ruleset tutorial



Blacky
December 23rd, 2013, 17:14
Formally posted here (https://fg2app.idea.informer.com/proj/?ia=79524), I'll ask and expand here because I think the Fantasy Grounds community is more apt to answer than SmiteWorks (who are busy with other things).

Given the very very steep learning curve of Fantasy Grounds, and the tremendous delta in features between most community ruleset and top of the line rulesets (like the D&D ones), and the fact that FG was greenlighted on Steam and will gain a broader audience, and finally since that we have now in production the 3.x branch with the 3.0.0 version which handle ruleset layering/cascading;

I think it's time for a real, expanded, precise, tutorial on how to make a ruleset if one doesn't know a thing, based on the Core ruleset and with the layering/cascading functionality.

I'm talking about something other than booting people unto the forums for answers (which mostly it doesn't have), and something with some mind behind it to do it the “right” way. Not fast and loose, not some glue and paint to make it work, but something that describe everything in details the right way.

I would think:



Text (and images) based, no podcast or screencast. Because it's easier to maintain, edit, correct, and easier to use for non-English speakers. COuld even be community translated by and for other non-English speaking communities.
Very detailed, step by step, with a lot of real world examples. Like chapter 1 plan your thing, chapter 2 how to handle characteristic and skills, chapter 3 how to handle tests and dices, chapter 4 how to automate things, and so on.
Simple, talk-to-me-like-I'm-10-years-old. Nothing implicit, no previous knowledge required apart from a basic end-user knowledge of Fantasy Grounds and very very basic end-user knowledge of the Core ruleset. No XML, LUA, ruleset, previous knowledge required.
Community made, easy to write and maintain, probably some kind of wiki.
Verified and endorsed by SmiteWorks. Moon_wizard knows what works and what doesn't, how he made the new D&D, Pathfinder and other Core+ ruleset. To reassure the readers this is not some bake and cake, glue and paint thing that will become irrelevant soon but it's the “right” way some kind of verification and endorsement is, I believe, necessary.


I believe the first steps are the hardest. Once one knows how to do small things, one can look up more complex things, start reading advanced LUA books and tutorials, and so on. I think real world examples, in much details, with explanations, would be a huge help for a lot of people.

damned
December 24th, 2013, 11:52
i doubt very much that you could write your own ruleset - even as an extension - without reasonable programming skill. if you dont have LUA you need the ability to learn and understand it at least.

Dracones
December 24th, 2013, 14:19
A help would be some simple tutorials with a sort of "where to start" type thing. To compare, I've been using VTT's for a couple years(even FG off and on) and I found it a lot easier to start digging into Maptool than FG when it came to adding my own stuff. For example with Maptool when you start digging in it all starts with "here's how to make a simple macro", which then makes you learn more complex things and then even more complex things and so on. All of that steamrolled into me eventually writing my own Hero Lab to Maptool complex as hell desktop application(https://hg.tarsis.org/hl2mt), but it all started with a very simple start that got me more interested in digging down into more stuff.

Fantasy Grounds felt/feels like it has a much steeper barrier for that start up, because you have to dig down into megs worth of XML and LUA files.

Blacky
December 26th, 2013, 10:58
Dracones is quite right. This is why I think with 3.0 and Core+, and Steam, now is the right time to do some work in that area. Damned, I don't think extensive LUA knowledge is necessary. And said tutorial can certainly link to LUA ressources or official website for LUA specifics parts, as long as everything from the FG side is explained. Explaining what a while loop is would be out the scope, pointing what loop in what file handle for example PC sheet skill test absolutely is in my opinion.

malvok
December 26th, 2013, 14:00
I think some sort of tutorial would be great. If you are using an established ruleset then Fantasy Grounds is awesome. If you have to make your own ruleset then not so much. Aside from having to learn XML and Lua, there is a great deal of fumbling around in the dark, searching through files trying to find out where something you need to edit is located. I find myself at times wondering if it would just be simpler to learn to customize another VTT than to invest the time in learning XML, LUA, and Fantasy Grounds.

Don't get me wrong, I dig Fantasy Grounds but the investment needed to get a new working ruleset is not trivial.

Qai
December 26th, 2013, 16:31
While a tutorial would be nice, the scope of it would, unfortunately, have to focus on advanced programming such as pointing people to the right files and functions to accomplish what they need to do. There is no way of getting to the nitty-gritty step-by-step details without becoming overly pedantic.

Learning to mod FG is very different than learning XML and LUA. When learning XML and LUA, you can always start simple with lots of explanations to learn those programming languages. On the other hand, modding FG from the outset uses full-blown XML and LUA intertwined at an advanced level. Even if you start simple, the complexity explodes exponentially, especially when what you want to accomplish ultimately spans several files. It is the complexity of the FG framework that needs to be understood in order to create a ruleset, which is knowledge on top of knowing XML and LUA.

The only viable way I can suggest for anyone wanting to learn how to mod is to look at base.xml from CoreRPG and then look at base.xml from a ruleset build on top of CoreRPG. base.xml essentially tells FG what the key files are needed in order to implement the ruleset and which files supplement/override those of CoreRPG. Then simply go line-by-line in base.xml, look at each file it is loading, then go line-by-line in that file, and so on. If you don't understand XML and LUA, then, without hurting anyone's feelings, you aren't ready to mod FG. You might be able to pull something off, but it will take you a long time and will be frustrating as you struggle to learn XML and LUA alongside the FG framework.

malvok
December 26th, 2013, 16:40
"Then simply go line-by-line in base.xml, look at each file it is loading, then go line-by-line in that file, and so on."

That's exactly what a tutorial could cover. I don't think anyone needs or wants an XML or Lua tutorial, there are many places on the Net to find those. But one that could save people time when searching for particular areas in a ruleset could come in handy.

Honestly, if i had known how much extra work, graphics and code, etc. it would take to make a ruleset for my games, I would have probably chosen a different VTT.

Bidmaron
December 26th, 2013, 19:19
Making a worthwhile ruleset cannot, IMO, be done in any other VTT. As has been frequently observed, fg is the only tool that even comes close to really handling a ruleset. As with any other endeavor, making a ruleset requires progrMming. It is an illusion to think that some software will let you wAve some kind of virtual wand and create a ruleset.

The reason fg seems hard is because a lot of the toolset code is built into fg. This is code you'd have to write yourself if fg didn't already provide it. Learning how to use this library, which is quite extensive, takes time. A tutorial could help explain what is where and maybe show you how to use some of the packages. As for knowing lua and XML, I think it's possible to teach it to yourself as you go (I did) but you need to, I think, understand basic programming concepts to have any prayer to do anything worthwhile.

malvok
December 26th, 2013, 19:27
I won't discuss alternate VTTs as this is a FG forum, but you're wrong about FG being the only VTT capable of handling different games.

And I don't see why people are against the idea of a tutorial. How is a tutorial a bad thing?

Also, the insinuation that anyone who thinks a tutorial is a good idea is somehow a simpleton incapable of designing a ruleset is pretty lame.

Bidmaron
December 26th, 2013, 20:10
I'm not against a tutorial. I'm certain other VTTs can handle rulesets. I simply said (IMO again, just like I said up there) that other VTTs couldn't do the rulesets justice. The fact that fg can is a result of its flexibility and commensurate sophistication (and, unfortunately, complexity). I think a tutorial is a great idea. Problem is someone has to do it. The people qualified barely have time to make the feAtures were all clamoring for.

Moon Wizard
December 26th, 2013, 20:17
If someone wants to organize and write the core content, I'd be more than happy to provide feedback, suggestions and some of the write-up.

The v3.0.x launch is still absorbing a lot of time (plus holiday travel). Next up after that is getting the basic user manuals updated, then probably Steam integration.

Regards,
JPG

Qai
December 26th, 2013, 20:54
XML and LUA aside, what is most time-consuming is navigating the FG framework.

I honestly think that that a thematic Question/Answer section on the forums would be much more beneficial than a step-by-step hold-your-hand tutorial. Of course, the assumption is that the modder already knows XML and LUA, or is willing to learn as needed.

Let me give an example, using CoreRPG as the underlying ruleset:

*****
Q/A Theme: Customizing the Main User Interface

Question: How do you use custom sidebar icons for players, stories, maps, items, npcs, etc.?

Answer: The first thing you need to realize is that base.xml loads the following file <includefile source="graphics/graphics_icons.xml" />. In graphics_icon.xml, CoreRPG loads the following sidebar icons:

<!-- Sidebar -->
<icon name="button_ct" file="graphics/sidebar/button_ct.png" />
<icon name="button_ct_down" file="graphics/sidebar/button_ct_down.png" />
<icon name="button_partysheet" file="graphics/sidebar/button_partysheet.png" />
<icon name="button_partysheet_down" file="graphics/sidebar/button_partysheet_down.png" />
<icon name="button_options" file="graphics/sidebar/button_options.png" />
<icon name="button_options_down" file="graphics/sidebar/button_options_down.png" />
<icon name="button_tables" file="graphics/sidebar/button_tables.png" />
<icon name="button_tables_down" file="graphics/sidebar/button_tables_down.png" />
<icon name="button_calendar" file="graphics/sidebar/button_calendar.png" />
<icon name="button_calendar_down" file="graphics/sidebar/button_calendar_down.png" />
<icon name="button_color" file="graphics/sidebar/button_color.png" />
<icon name="button_color_down" file="graphics/sidebar/button_color_down.png" />
<icon name="button_light" file="graphics/sidebar/button_light.png" />
<icon name="button_light_down" file="graphics/sidebar/button_light_down.png" />
<icon name="button_modifiers" file="graphics/sidebar/button_modifiers.png" />
<icon name="button_modifiers_down" file="graphics/sidebar/button_modifiers_down.png" />
<icon name="button_effects" file="graphics/sidebar/button_effects.png" />
<icon name="button_effects_down" file="graphics/sidebar/button_effects_down.png" />

<icon name="button_characters" file="graphics/sidebar/button_characters.png" />
<icon name="button_characters_down" file="graphics/sidebar/button_characters_down.png" />
<icon name="button_book" file="graphics/sidebar/button_book.png" />
<icon name="button_book_down" file="graphics/sidebar/button_book_down.png" />
<icon name="button_maps" file="graphics/sidebar/button_maps.png" />
<icon name="button_maps_down" file="graphics/sidebar/button_maps_down.png" />
<icon name="button_people" file="graphics/sidebar/button_people.png" />
<icon name="button_people_down" file="graphics/sidebar/button_people_down.png" />
<icon name="button_encounters" file="graphics/sidebar/button_encounters.png" />
<icon name="button_encounters_down" file="graphics/sidebar/button_encounters_down.png" />
<icon name="button_items" file="graphics/sidebar/button_items.png" />
<icon name="button_items_down" file="graphics/sidebar/button_items_down.png" />
<icon name="button_parcels" file="graphics/sidebar/button_parcels.png" />
<icon name="button_parcels_down" file="graphics/sidebar/button_parcels_down.png" />
<icon name="button_notes" file="graphics/sidebar/button_notes.png" />
<icon name="button_notes_down" file="graphics/sidebar/button_notes_down.png" />
<icon name="button_library" file="graphics/sidebar/button_library.png" />
<icon name="button_library_down" file="graphics/sidebar/button_library_down.png" />
<icon name="button_tokencase" file="graphics/sidebar/button_tokencase.png" />
<icon name="button_tokencase_down" file="graphics/sidebar/button_tokencase_down.png" />

All of the name="" icons are part of the FG framework. So what you will need to do is in your own ruleset, create a corresponding graphics_icon.xml file, and make sure that your file="" image corresponds to the name="" icon you want to replace. Then be sure to place your file in the graphics\sidebar folder.
*****

I think something like this is clear and straight to the point. Every ruleset has its quirks that you wont be able to satisfy all ruleset from just one particular guide. However, a Q/A organized thematically could be much more beneficial. Even if you don't see exactly what you want to do answered, there is the possibility of a Q/A close enough to what you want to do that all you need is a push in the right direction. The last thing a modder wants to do is to waste hours reading a step-by-step guide only to find out that what he/she wants to do isn't covered. A quick glance at the Q/A will let the modder know if the info is available within minutes, and if not, then post the question and someone will respond.

damned
December 27th, 2013, 06:23
I won't discuss alternate VTTs as this is a FG forum, but you're wrong about FG being the only VTT capable of handling different games.

And I don't see why people are against the idea of a tutorial. How is a tutorial a bad thing?

Also, the insinuation that anyone who thinks a tutorial is a good idea is somehow a simpleton incapable of designing a ruleset is pretty lame.

I dont think anyone thinks a tutorial would be a bad thing - its just not trivial - trivial isnt even in the same book...
as to other VTT's, the ones i have tried, can handle other rulesets - sure - but they dont do it any better than using the core ruleset - or require you to do some programming. you can play any game you like using the core ruleset - you just dont get the automation or all the included source material. automation requires some serious work.
i would suggest that better than 99% of FG license holders could not program a full ruleset - i dont think anyone is insinuating that 99% of us are simpletons. you *need* to be a programmer, think like a programmer, and be able to commit lots of time to take on a complex task like developing a ruleset with automation. changing graphics is relatively easy compared to automation. the games that we play have so many variables and permutations and dependencies - easy for complex human brains to manage - bloody hard to code.
i would love to learn how to do this - and I reckon if I gave up my job for a year I could possibly learn enough to do it - but that is not going to happen... not for at least 20years any way!
the ruleset builder project would be amazing if it can come to fruition - but even that i think is still limited to graphics and buttons etc at this stage and would then require coding on top of that.
the fact that lots of people want to develop rulesets is a great thing but not an easy one.

the replies here definitely werent intended to flame anyone or any ideas. ideas and discussions are good :)

Blacky
December 27th, 2013, 21:15
I honestly think that that a thematic Question/Answer section on the forums would be much more beneficial than a step-by-step hold-your-hand tutorial.
Several issues with this:

- As moon_wizard (and the very very few others who truly knows what they are doing) can't possibly monitor everything, we'll be getting tricks and workaround that might work but aren't the best possible way to address a point.
- Without heavy hands-on moderation, it will be impossible to search effectively. Meaning the same questions will be asked again and again, threads will bi hijacked, buried, possibly quite a mess.
- Doesn't do much for the steep learning curve. The hardest steps in FG are the first ones.

I do think a clean, moderated, sub-forum for Ruleset-Modules development & customization is a good idea. But not solely.

A tutorial would help beginners more I believe.

Let's start small(ish), with something concrete:

- being very precise writing it
- explaining each step along the way, apart from pure non-FG point (like why <…/> or <>…</> in XML, things like that)
- fully using Core and the ruleset layering/cascading new capability
- doing it clean, scalable, expendable, the “right” SmiteWorks way
- if needed pointing out things like potential optimizations, memory or bandwidth or whatever resources possible issues
- not overwriting/merging anything unnecessary (in this new ruleset layering paradigm)
- starting literally with a blank page

who could explain to a full beginner either :

- How to modify how dice tests are made to make something more complex, let's say oWoD tests
- How to add skill lists to the Character sheet (a few categories, several pre-filled skills, each category with as many player created ones as need)

Those two are both pretty basic needs, and can be linked together after (click on the score of those shiny new skills, that trigger the new dice tests system).

And those two are both being needed right now by beginners and very old ruleset coder still stuck in 2.0 mode, and could help us having something concrete to debate, improve, and show new FG users.

Trenloe
December 28th, 2013, 10:16
Great idea. Who's going to write it?

lokiare
February 7th, 2014, 01:43
Can we get a tutorial for writing Extensions too? That might be easier than a full blown rule set tutorial

dulux-oz
February 7th, 2014, 02:39
It's a great idea guys, but I think that, in all reality, its going to be impractical, for the following reasons (some of which are pointed out above):

1) Who is going to create it?
If you'd checked out my Tutorial YouTube Channel (link in my Sig) you'll have noticed the date when the videos were created. You'll have also noticed that there are large periods of time between the dates - this is because each one takes TIME, and the time isn't in the recording, its in the writing of the scripts ie it takes a lot of effort to write the damn thing. I suggest that a written Tutorial like originally suggested would take a similar amount of time. Not everyone has that time.

2) Programming Knowledge
I don't know how many of you are professional programmers, or even armature programmers, but as a professional trust me when I say that to create a Ruleset in any significant way WILL require programming skills (ie XML, LUA and just the basic "mentality" of a programmer). I tutor at one of the local Universities here in Brisbane, Australia, and what we're talking about is basically the level of knowledge that you would have after 12 months of study in an undergraduate program - don't believe me - have a look at this link (https://www.fantasygrounds.com/forums/showthread.php?19253-Custom-Pointers-Coding-Toolkit-Over-Several-Posts&p=153209#post153209) which is the level of knowledge you need to draw a different shaped pointer on an image/map.

3) Complexity of FG
Fantasy Grounds is a complex piece of software - I know, I've reversed engineered it so that I could understand how it all fits together so that I could write my Übergame Ruleset. Its complex in that a given functionality is often spread across two or more files, some XML and some LUA. This means that finding the correct files to modify/over right/etc is a non-trivial task - which is not improved by the new ability to "layer" rulesets - it literally means often going through the files line by line, so a tutorial would have to do this as well.

This issue comes up all the time in the business world, where people ask why something that seems so simple takes so long to program - what they don't realise is that the reason it seems simple is that the programmer has spent a lot of time writing complex code to make it look simple - the rule of thumb in coding is that the simpler it is for the end-user the more time, effort and code it will take to do.

Its a bummer, but that's why good programmers are the third most highly paid professionals in the world (on average after dentists and psychiatrists) - not everyone can do it and it takes several years to learn - can you take several years of knowledge and training and put it in a document?

Just my $0.02 worth :)

Trenloe
February 7th, 2014, 09:09
What dulux-oz said... Take a look at a typical Sams "Teach Yourself XXX in 24 hours book" and you'll see that the books are large format books typically well over 500 pages and people make money spending months writing these books. OK, I'm not saying that something like that is wholly necessary for FG, but for it to be truly useful to newbies and rookie FG developers it would have to be close to that - covering XML, LUA, FG database format and access, FG controls, FG operations, Ruleset Layering, Extensions, FG API, variable scope, GM vs Player vs Local (Manage Characters) mode, asynchronous programming, OOB messages, etc., etc., etc.... And then this would have to be updated every 1-2 years as rulesets and FG changes...

Regarding extensions in particular:

There is a "Ruleset Modification Guide" to get people started, and that has info on extensions: https://www.fantasygrounds.com/modguide/

And there are plenty of extension examples available on this forum. Here are a few that have been written/updated for the new FG 3.0 CoreRPG ruleset (and rulesets layered on top of CoreRPG): https://www.fantasygrounds.com/forums/showthread.php?20320-FG-3-0-CoreRPG-Extensions

Ruleset organisation:

This thread is quite good in giving a high level overview of where files are stored in a ruleset. It was specific to the FG 2.9.4 3.5e ruleset, but a lot of this information is relevant to FG 3.0 CoreRPG (and derived) rulesets: https://www.fantasygrounds.com/forums/showthread.php?19033-Modifying-the-3-5e-PFRPG-ruleset

The main thing that changes in post #2 is that the charsheet "stuff" is now contained in the campaign directory.

Nickademus
February 7th, 2014, 09:19
I'd be happy with just documentation on the CoreRPG ruleset design, not the controls and components, but the logic that is used to specifically to make them run. Also, it's worth noting that one of the hardest things for a new designer to understand with the built-in rulesets is the coding and naming convention used in the lua. This is entirely the prerogative on the original/current developers and it is not a necessity to use the conventions existing in the rulesets; thus a new programmer may not have ever been exposed to that particular coding standard.

malvok
February 11th, 2014, 10:35
If it is true that 99% of users will not be able to customize Fantasy Grounds to support different RPGs, then perhaps this part of the feature listing should be removed.

"A 3.5E fantasy ruleset accompanies the product but the appearance and function can be fully customized to accommodate almost every RPG system."

damned
February 11th, 2014, 11:54
when i first read your post i wanted to agree with you but after starting to write three times I changed my mind...

its not incorrect especially seeing that there are quite a few complete, almost complete and partial rulesets and themes out there.
if you look at almost any complex application it will tout benefits that most users cannot achieve on their own - even not so complex apps.

but I get your point. it would be awesome if this platform could be customised by the average joe - but then I think we would have to sacrifice the amazing wizardry that the full blown rulesets contain...

malvok
February 11th, 2014, 12:13
if you look at almost any complex application it will tout benefits that most users cannot achieve on their own - even not so complex apps.


Yeah, that's true.

I'm just a bit discouraged. I'm not really a D&D guy these days. There are however a bunch of unsupported or poorly supported games that I'd like to play but spending the time to develop a ruleset for something that, due to copyright restrictions, I wouldn't be allowed to distribute seems like an exercise in futility.

The only game I know I could release a ruleset for would be Eclipse Phase but my players aren't interested in that game. Another reason to not expend the time to write a ruleset for it.

Trenloe
February 11th, 2014, 12:23
There are however a bunch of unsupported or poorly supported games that I'd like to play but spending the time to develop a ruleset for something that, due to copyright restrictions, I wouldn't be allowed to distribute seems like an exercise in futility.

The only game I know I could release a ruleset for would be Eclipse Phase but my players aren't interested in that game. Another reason to not expend the time to write a ruleset for it.
Usually you can release a ruleset - as game mechanics aren't normally covered by copyright laws, it is the additional material from a game that is covered (races, classes, equipment, etc., etc.) The 4E ruleset that comes with Fantasy Grounds has no tie in with WotC - it can be created and distributed. It is the D&D 4E material that can't be distributed, hence why there are no library modules that come with the 4E ruleset.

There are also more games being released under the OGL or a creative commons license - which allows a certain level of extra material to be added (determined by the license specifics). A few examples are GUMSHOE, 13th Age, d20, Pathfinder, Mongoose Traveller... Some others listed here (although it is a bit dated): https://wiki.rpg.net/index.php/Open_Game_Systems

damned
February 11th, 2014, 12:25
hi Malvok - if you were playing one of these games face to face you would have in front of you a rulebook (or 16), some dice and some paper and pencils.
you absolutely can play any game you want using FG as the tabletop but without the automation.
record stats and notes in the character sheet and throw dice and determine what happens.
you can still share images and use maps and tokens.

the automation is serious stuff for an amateur coder and still not inconsequential (despite how easy JPG seems to make it look) for a LUA guru.

damned
February 11th, 2014, 12:27
as game mechanics aren't normally covered by copyright laws

i think it is even "game mechanics are NOT covered by copyright laws" which seems bizarre to me but hey!

malvok
February 11th, 2014, 12:42
hi Malvok - if you were playing one of these games face to face you would have in front of you a rulebook (or 16), some dice and some paper and pencils.
you absolutely can play any game you want using FG as the tabletop but without the automation.
record stats and notes in the character sheet and throw dice and determine what happens.
you can still share images and use maps and tokens.

Yep, that's what we do. I just want more. There is so much potential in Fantasy Grounds.

malvok
February 11th, 2014, 12:45
Usually you can release a ruleset - as game mechanics aren't normally covered by copyright laws, it is the additional material from a game that is covered (races, classes, equipment, etc., etc.)
There are also more games being released under the OGL or a creative commons license - which allows a certain level of extra material to be added (determined by the license specifics).

That's the thing, jumping through hoops over what's allowed and what's not allowed.

I should investigate new games. Eclipse Phase is Creative Commons licensed, maybe there are more like that out there.

Trenloe
February 11th, 2014, 12:53
That's the thing, jumping through hoops over what's allowed and what's not allowed.
It's usually pretty straight forward - if there is no OGL, CC, GNU, community use license then you can just release the a ruleset based on the mechanics of the game, the best example of this is the 4E ruleset that comes with Fantasy Grounds. There are other examples of community created rulesets here: https://www.fantasygrounds.com/library/ many of these have been created for non-OGL (or similar) games.

If there is an OGL, CC, GNU, community use or equivalent license then it usually isn't too much hassle to give it a quick read and work out what you can distribute and what you can't.

Zeus
February 11th, 2014, 18:07
If someone wants to organize and write the core content, I'd be more than happy to provide feedback, suggestions and some of the write-up.

The v3.0.x launch is still absorbing a lot of time (plus holiday travel). Next up after that is getting the basic user manuals updated, then probably Steam integration.

Regards,
JPG

I could provide some of the core content but I'm afraid I don't have the time to manage the organisation and ongoing upkeep of such an endeavour.

I personally think a series of short video tutorial would be easier and faster to produce than written text guides as well as being easier for users to perhaps follow, a sort of customise a ruleset as we go approach. This I think would be easier to also maintain as particular aspects of the API and CoreRPG ruleset are updated. Perhaps a series of video guides focused on the more popular customisation requirements might also help e.g.



Understanding the FantasyGrounds v3.0 CoreRPG Ruleset (Organisation & Structure)
Customising the Character Sheet
Customising the desktop theme
Customising Roll Types and Handlers

damned
February 12th, 2014, 00:02
Zeus,
That would be really cool.
The only downside I see to videos is that if things change its hard to edit/update the video however as v3 is just out this shouldn't happen for some time?

I am a terrible programmer but can often put something together from enough examples but I find LUA/FG absolutely daunting.

regards
Damian

Blacky
February 12th, 2014, 07:03
I personally think a series of short video tutorial would be easier and faster to produce than written text guides as well as being easier for users to perhaps follow
I do think text & images are easier:

The author don't have to handle HD screencast, keeping full control of the pacing, the windows, playing with bitrate and such, and so on.
One doesn't have to re-do the video (sometime the full video) to update its content.
It's easier to understand for non fluent English speakers.
It's more precise when talking about code that pronouncing it in a microphone.
It's easier to work on it with multiple authors, insert comments, updates, corrections, whatever.
It's easier to localize if such translation happens.
It's more accessible, for people who have a visual or hearing impairment.
It's easier to follow, the tutored doesn't have to speed check some way to slow passage or stop&rewind incessantly on more complex steps.


However, any serious guide rubber stamped by SmiteWorks is better than none :)

dulux-oz
February 12th, 2014, 07:19
I concur with Blacky - to do a Video Tutorial well you need a well written script to start with, otherwise the video jumps around to much, etc, etc, etc.

And if you've got a well written script in the first place, then you've effectively got a written text, etc.

Cheers

martel
February 12th, 2014, 15:35
i like this :-) Zeus and Blacky and dulux-oz :-)

one video could add 1 comment with each langage for explain example via https://captiontube.appspot.com/
the people translate and send mail to owner video, to add this caption text into video original. with out copy video :-)
click on CC button into video youtube to display the langage text caption.

it is a very good idea.

one video and x translate caption text langage. :-) it is easy to follow the video on other langage audio :s


I do think text & images are easier:

The author don't have to handle HD screencast, keeping full control of the pacing, the windows, playing with bitrate and such, and so on.
One doesn't have to re-do the video (sometime the full video) to update its content.
It's easier to understand for non fluent English speakers.
It's more precise when talking about code that pronouncing it in a microphone.
It's easier to work on it with multiple authors, insert comments, updates, corrections, whatever.
It's easier to localize if such translation happens.
It's more accessible, for people who have a visual or hearing impairment.
It's easier to follow, the tutored doesn't have to speed check some way to slow passage or stop&rewind incessantly on more complex steps.


However, any serious guide rubber stamped by SmiteWorks is better than none :)

Bidmaron
February 20th, 2014, 03:03
Users can try to put something together. dulux-oz has a great set of videos, and he put a great deal of time into them. FG3 came along, and now he's redoing them all because he really can't just patch them.

There is a ruleset creation guide already. It is horribly outdated. I just think that I'd rather have JPG, Trenloe, Zues, and those few who (as someone put it) "really know what they're doing" working on getting us the automation improvements that we really want and need (just look at the wish list) than creating tutorials or even sanctioning tutorials that any of us users come up with.

There are rulesets already for the more common games, and more are coming along. There are a whole lot more rulesets that were created and either no longer functional or barely functional because creating a ruleset is not a one-time endeavor. It requires maintenance and support.

Even if we were to produce a tutorial, it would be out of date in less than six months because MoonWizard would have moved on by then.

I'm not trying to insult anyone. It's just not possible or realistic. People have successfully made rulesets without these tutorials, and rulesets are in creation now. In deconstructing or reverse engineering, you gain the skills you are going to need in order to produce a ruleset. The journey is necessary to reach the destination. No video (IMO) is ever going to measure up with the sheer awe you will feel if you are ever in the Vatican (no, I'm not Catholic, but that experience almost made me wish I were).

You can't do a tutorial without showing how to walk your way through all the files, and you cannot do that without settling on a tool for that job. While Notepad++ seems to be the most popular among those who do (or try) some of this, the minute you settle on that, someone will be bitching because you didn't tell them how to do it in whatever program it is that they prefer. This is just one of the many issues you'll struggle with in such a set of tutorials.

Just look at the mini-debate going on here regarding format (I think Blacky has the only workable idea). Think about it: FG is so complex that you could sit through the entire tutorial library (dulux-oz had over 3 hours of videos on just PLAYING the game, and he's still got hours left to go), and then when you got ready to do something you'd do something like this: "okay, I remember the tutorial told me the chat box management was in Chat_Manager.lua, but which routine was it again where I could circumvent the xml node ownership by passing message from the client back to the host again? Gee, I think that was in video fifteen, but that thing was 30 minutes long."

It's just not realistic. The Bible has been around for many hundreds of years, and there are still people trying to explain it.

JPG has done a fabulous job, and I for one don't want him to slow down any more than is necessary to maintain the documents on the routines he has graciously provided. Whatever Smiteworks makes for their software I am certain is not enough. I thank them for what they do, but I support them in focusing on what is important, and I think they've done a masterful job in balancing engine evolution, ruleset generation and support, responding to us demanding bastards on the boards, and documenting their wonderful handiwork.

ImaTarget
June 3rd, 2014, 09:22
Hi all, I found this thread and must say I do not understand the reluctance to even start a Turorial. I think Dr.Zeus had the right idea. The average user does not need a totally in depth line by line tutorial. Give me one to explain how to change the graphics to make a Themepack and one on how to customize the character sheet. If this indeed so complicated that you need 12+ month programming knowledge to do then FG is simply not sustainable long term. There are many more games around these days then the big few, and modifying the rules to fit your needs is a must have. I have spent three days now just TRYING to understand how a character sheet is layed out without too much success. This is simply not a good way of doing stuff. Yes, there is reference available but if you scare users away with this complexity all you will do is loose more users as tools like Roll20 get more powerful. FG is frustrating as hell for me because I am more the creative kind and less the programmer. And I can´t be creative with FG right now because doing something that should be simple as a character sheets asks me too look into LUA scripts. That is just silly. You may disagree with me, but I am kind of angry I did indeed spend 80 USD on FG just to realize I wont be able to use it to run my games as I want to in the next few month because creating the ruleset extension for it with just a TINY bit of automation is so far out of my scope it is not even funny anymore. I can do some JS, was fairly good in HTML but the undocumented nature of the Rulests makes it near impossible for me to suss out what us what. And I rarely have time to prep my games, much less so to dive deep into the technological side. With my current skill level I can only use Core as is and that feels like a) a waste and b) like I should have stuck with Roll20. :-( And I do not want to go back to R20, I like FG. I am really frustrated right now as you can tell because wherever I look, I just can´t understand how a ruleset works and there are no tutorials at all. I do no need a step by step for everything. Like someone else suggested, start small. This is how you create a Theme extension. Here is how to create a character sheet without LUA. Next tutorial: Here is how to add some automation to your sheet. Roll Against DC. Roll against skill. etc. It seems a lot of people want to open up the whole can of worms to everyone and that is what is intimidating and driving people away from, not to, FG.

Alternatively FG needs a code repository or plugins or SOMETHING that makes creating a working character sheet easier. I think that ongoing crowdfunding thing is also a great idea, it should just be part of native FG and not a separate purchase. Well this went on longer then I wanted to and I hope I did not come off as too negative, I just pull my hair out on this and don´t make any headway. People in this forum are really helpful, I love that and thank them for it, it just slows everything down because I get stuck every few minutes it feels like and can´t move forward until someone steps up friendly and points me in the right direction.

Moon Wizard
June 3rd, 2014, 09:57
I apologize for your frustration. It's always a challenge keeping a fresh product moving forward, while documenting everything people should know. Plus, we are 2 guys working part time after working our day jobs. We rely heavily on our community to help us continue to move forward, and we have been very fortunate to have a great community full of people willing to help.

I would say that the easiest way to approach this situation is to back off the character sheet generation, and start with something smaller. Character sheets are typically one of the most complicated piece of any ruleset, because people expect them to do so much.

My suggestion would be to open up one of the theme extensions that comes with Fantasy Grounds to do some theme work first. Graphics replacement is a much easier task, and will give you a better feel.

A couple things that might help to get you started:

Files
* Whenever you open an extension, FG will open the extension.xml file for that extension and begin processing it. Nothing else will get loaded, unless it is specified in the extension.xml file.
* In a similar manner, when loading a ruleset, FG will open the base.xml file for that extension and begin processing it. Again, nothing else gets loaded unless the base.xml file specifies.

XML Tags
* Every tag in those files boils down eventually to a tag in the ruleset reference. If an XML tag has a name not shown, try searching for <template name="tagname"> to see if it is a control template. Otherwise, if it's not in the reference, it's only data for scripts.
https://www.fantasygrounds.com/refdoc/
* While the Anatomy of a Ruleset guide is VERY old and written when FG2 was relatively new, it covers several core topics which are still valid today.
https://www.fantasygrounds.com/filelibrary/community/Anatomy_of_a_Ruleset.pdf

Scripts
* Scripts defined by themselves in the ruleset files are global scripts, and the onInit function within each will be called on ruleset load.
* All other scripts are tied to objects (windowclass, windowcontrol), and are only called when instantiated. Each object type supports a number of "events" automatically called (such as onInit).
* Other objects that aren't specifically defined in the ruleset (tokeninstance, databasenode) can support "handlers" for registering and capturing events ob those objects.

Hope some of that helps. If still stuck, try picking one section of a sheet you are working on, and post up what you are trying to do and where you are stuck. I try to log onto the forums as often as I can, and I'll keep a look out.

Regards,
JPG

ImaTarget
June 3rd, 2014, 11:27
Hi MW,

Thank you for your tips. I understand what you are saying but sadly a graphical extension wont allow me to play my game. A simple tabletop that has no automation where I can only throw dice I could have gotten cheaper. That is not or anything, just a fact.

I do understand this is a niche product. Your fans are really awesome in helping, but that can go only so far. I remember when I learned HTML, it was much easier as I could open a handbook, look up the tag and had all possible variations and information there i need. Can´t do that with XML. A library of that would go a long way to help out understanding whats what.
I also did read "Anatomy of a ruleset" and that is what motivated me to start at all, as it seemed easy enough to follow/ do. However It seems to me at least that the new CoreRPG seems more complicated then that. But indeed, that is the kind of tutorial that actually helps. This is what is there, this is what I do, this is what the result is. Great stuff, sadly cut short.

Can you please elaborate on "* Every tag in those files boils down eventually to a tag in the ruleset reference. If an XML tag has a name not shown, try searching for <template name="tagname"> to see if it is a control template. Otherwise, if it's not in the reference, it's only data for scripts."

For example I search for <label_frametop> in all files and find:


Search "<template name="label_frametop">" (1 hit in 1 file)
E:\Fantasy_Grounds_Data\rulesets\CoreRPGHACK\commo n\template_common.xml (1 hit)
Line 54: <template name="label_frametop">

That still does not tell me what this tag does, only that it is defined in a file. And I cant find label_frametop in refdoc. And what is a "control template" ? :o I do not want to get too specific here, I ask the questions in my workshop thread. I just want to illustrate what problems new clients face that want to "just" play their homebrew and use the features that FG promises.

Moon Wizard
June 3rd, 2014, 11:48
This may help:
https://www.fantasygrounds.com/modguide/templates.xcp

Whenever a "label_frametop" is defined, it is merged with the contents of the label_frametop template. Let me walk through an example from campaign\record_char_notes.xml.



<label_frametop>
<anchored to="languageframe" />
<static textres="char_label_languages" />
</label_frametop>


Then the "label_frametop" template defined in common/template_common.xml is used to merge, and it becomes



<label>
<anchored to="languageframe" position="insidetop" offset="0,10" />
<center />
<static textres="char_label_languages" />
</label>


Then the "label" template defined in common/template_common.xml is used to merge, and it becomes



<stringcontrol>
<anchored to="languageframe" position="insidetop" offset="0,10" height="20" />
<font>sheetlabel</font>
<nodrag />
<readonly />
<center />
<static textres="char_label_languages" />
</stringcontrol>


Finally, the stringcontrol tag is a basic FG object, which supports the anchored, font, nodrag, readonly, center and static tags.
https://www.fantasygrounds.com/refdoc/stringcontrol.xcp
https://www.fantasygrounds.com/refdoc/windowcontrol.xcp

Regards,
JPG

Moon Wizard
June 3rd, 2014, 12:00
While I would love to have a drag and drop lego-like system to build character sheets and custom game system support, I haven't seen anyone even come close. It's a very complex problem, both from a data design and UI design point of view. Both Fantasy Grounds and Hero Lab come closest to decent multiple game system support and programmability, and both have development and UI challenges to show for it.

I would still say that FG is designed to be able to be programmed to play any game system, but specialized rules will always require specialized coding. Unfortunately, no other platform that I know of will do any better, unless it is specifically built with support for that game system and outside of user customization.

That said, every person who has developed rulesets on Fantasy Grounds spent quite a while figuring things out by working on extensions or modules first, trying out small changes in an existing ruleset, then working up to bigger changes and a full-fledged ruleset. I went through the same process myself years ago, before I joined the company. And I've added a ton of new features (both for users and developers) since then.

I'm not trying to defend anything, just trying to say that it is complex and requires smaller steps.

Hopefully, some of the questions I have answered will help lead you forward. The offer to look at your code still stands. You can post your PAK file, or send to [email protected], with your questions and issues; and I will do my best to help.

Regards,
JPG

dulux-oz
June 3rd, 2014, 16:39
Let me add something to this discussion - you may find it helpful or you may not.

I've actually been playing around with the idea of doing a Tutorial Video on creating "stuff" for FG - it won't be out for a while because I've got other things to do first, but this type of thing - "This seems so simple why can't it be simple" is something I hear professionally every day - its called "End User Computing".

EUC is a great idea on paper, but in reality it never, never lives up to is promises. Why? Because creating something for a computer is a complex task that takes a lot of time, knowledge and experience to do properly - ie you need to know how to code, either as a talented armature or as a professional - and even then you need people with other skills to do other parts of a given project. For eg, I can't do graphics if my life depended on it - thank God that Zeus (no pun intended) is very good at graphics and has been able to help me out whenever I've had to ask (once again, thankyou Zeus).

The art of being a good coder (or, more accurately, a good coding team - professionally) is to make a hugely complex and complicated "thing" seem simple to the End User - and herein lies the nub of the problem; because Moon and Doug and the community coders (Zeus, Doswelk, Trenloe, etc, and even my not-so-humble self) are good or even very good at what they do (& here I'm referring to the others, not myself) they've succeed in making the complex seem simple, and thus people who do not understand just how complex things are are always asking "Why can't we do this?" or "Why is this so hard?"

Well, it is hard - just like walking on two legs is hard - think about it; just what is it you need to do to (1) balance on two legs in the first place, then (2) continually lose and regain you balance in a controlled fashion so as to move forward (or backward) under complete control.

OK, enough of the "you need to be an expert" speech - here's the skills, etc, you are going to need to have to effectively create a Ruleset (or even an Extension) in FG.

A thorough, in-depth knowledge of your chosen RPG and it's game mechanics.
A good working knowledge of basic programing concepts.
A good working knowledge of basic logic.
A good working knowledge of XML.
A good working knowledge of LUA.
A "talented armature" level of skill in reverse engineering ie the ability to read a piece of code and work out what its supposed to do.
A good working knowledge of debugging techniques.
A good working knowledge of your chosen graphics application (eg Paint.net) - or someone you can beg too to do the graphics for you (Hi Zeus :) ).
A good working knowledge of your chosen text editer (eg Notepad++).
A lot of time.
Patience

In short, you need to be a coder - I'm sorry, but that's what is required.

Now, you can learn all of the above - there are some very good, free online Tutorials on each of those topics (just search Google) but its going to take some time - like leaning to walk before you lean to run, or leaning to drive before becoming a stunt or F1 driver. The nice thing about FG is that the community is always, ALWAYS willing to help - whether you are a complete coding newbie right through to an ICT Professional with multiply Post-Graduate Degrees and over 25 years in the industry who still needs to "bounce" ideas off of others.

So, get your feet wet and learn to swim, but don't expect to win an Iron Man race your first week out :)

Just my $0.02 worth

Cheers

Nylanfs
June 3rd, 2014, 17:13
You don't need to learn to drive to be a stunt or F1 driver, you need learn that to have a second gig or race. :)

DMFirmy
September 8th, 2014, 03:12
Hello everyone,

I only just discovered Fantasy Grounds, but already I am really starting to enjoy it a great deal. It has been providing me with a wonderful way to combine two of my passions, role playing games and writing computer code, into a single activity. What's not to love about that?

I have looked around these forums and online a bit, but from what I have found there is really very little information indeed when it comes to working on a ruleset. I was unable to even find a listing of reference material that is available, aside from some of the tutorial videos linked to in the Wiki or that a quick search on YouTube turned up. Unfortunately, the reference documentation and module guides are somewhat incomplete, and I have not found any good documentation on creating a ruleset at all except for the Anatomy of a Ruleset PDF that, as previously mentioned in this thread, is rather out-of date. While I certainly understand the time, effort, and preparation that it requires to create a tutorial series for something like as complex as the Fantasy Grounds software, there should at least be a sticky forum post that links off to where the most current information can be found.

It would also be very helpful if the rulesets that were included with the software were commented a bit better. It would be a lot easier to decipher how the existing rulesets function if they were commented a bit better (As a dev, I understand that comments are a pain, but they sure do help.) I have seen a few suggestions for reading material and some videos that provided me with some basic info, but I would love to see a more comprehensive listing of help topics for aspiring ruleset modders since there is no comprehensive tutorials available.

Trenloe
September 8th, 2014, 03:59
there should at least be a sticky forum post that links off to where the most current information can be found..
Starting info here: https://www.fantasygrounds.com/forums/showthread.php?20651-Modifying-the-CoreRPG-ruleset It's not comprehensive, or anything more than a "get you started" on modifying the CoreRPG ruleset, with a few pointers. But, it's one of the few resources available at the moment, warts and all... :)

DMFirmy
September 8th, 2014, 04:49
Starting info here: https://www.fantasygrounds.com/forums/showthread.php?20651-Modifying-the-CoreRPG-ruleset It's not comprehensive, or anything more than a "get you started" on modifying the CoreRPG ruleset, with a few pointers. But, it's one of the few resources available at the moment, warts and all... :)

Thanks Trenloe, that is some pretty good stuff. Have any good pointers for debugging? So far, the only method I have found is logging to the console window. I assume this is pretty much the defacto way to debug a rule set, but any additional tools/pointers would be appreciated. The campaign I am planning has a lot of house rules, and I would like to be able to figure out how to include some of them into my rule set. My campaign setting is a d20 3.5E based steampunk style world, so I am using the 3.5E rule set as a starting point, but I want to customize a lot of things. Some things, such as adding some new skills to the character sheet, were relatively easy. Others, like implementing functionality for some of the new races special features, might be a bit more difficult. I am sure that I will customize things quite a bit before I am satisfied, and debugging seems to be extremely time consuming. I have only been working with FG for a few days, so I am sure that will change some as I learn the API a bit better (Lua isn't one of my comfort languages, either).

Trenloe
September 8th, 2014, 05:04
Have any good pointers for debugging? So far, the only method I have found is logging to the console window. I assume this is pretty much the defacto way to debug a rule set, but any additional tools/pointers would be appreciated.
Yeah, Debug.console is pretty much the standard way.

EDIT: unfortunately there isn't a step debugging process to allow stepping through code, adding break points, watches etc.. Which, as you are finding out, can make debugging issues quite lengthy and tedious.

If I was debugging a specific issues/area of the ruleset I might write a script package specifically for debugging a specific issue, it would have some functions that would store data in the script variables and allow retrieving of those variables for debugging purposes. Something like a debugging stack could be implemented this way, for example. But, to be honest, most of the time Debug.console is the de facto method.

damned
September 8th, 2014, 06:20
my best shortcut tip for debugging process - type /reload in the chat window and dont press enter - drag it to one of your hotbar entries - eg F2 and then every time you make a change to your code press F2 for a faster reload... saved me a lot of time!

Moon Wizard
September 8th, 2014, 07:04
Also, don't forget the printstack command which will output the current Lua stack trace.

Regards,
JPG

Trenloe
September 8th, 2014, 14:44
my best shortcut tip for debugging process - type /reload in the chat window and dont press enter - drag it to one of your hotbar entries - eg F2 and then every time you make a change to your code press F2 for a faster reload... saved me a lot of time!
This is a great tip.

To help keep ruleset reloading as fast as possible make sure that there are a minimum of image files in the <FG app data>\tokens directory. Each token file is loaded and indexed when a ruleset is reloaded and adds to reload time. When developing move your tokens to a backup directory and when playing move them back.

DMFirmy
September 8th, 2014, 15:10
Very good tips. Thank you all so much. ��

damned
September 8th, 2014, 15:17
I dont know what your skill level is like - I know what mine is and I dont want to talk about it - but something I found useful was starting with a theme extension.
Unzip a theme.ext file and check out the files and links from the root files onwards.
Rulesets based on CoreRPG - and all new rulesets should be based on CoreRPG unless you are mad - are pretty much built the same way as extensions.

Further to my post above about the hotbar - you dont have to repackage your ruleset (or extension) up in between reloads - your project simply lives inside its folder with the proper folder/file hierarchy until you are ready to start sharing it. eg my project looks like this:

%appdata%\Fantasy Grounds\rulesets\Maelstrom\....
I dont have a Maelstrom.pak in the rulesets folder. I can edit file(s) and save and then press (eg) F2 and Fantasy Grounds will reload with the new ruleset (unless it fails to read my poor code).

DMFirmy
September 8th, 2014, 15:25
Well, in my daily career I am a C# and .NET programmer, so I am very comfortable with development in general. I also do quite a bit of minor web development. On the side, often using PHP or ASP.NET. I am very familiar with XML, and though my exposure to Lua has been rather limited, back in the day I tinkered with some World of Warcraft modding (which is done in Lua.) I actually have a the Wood Theme extension as part of my project files for reference, though I haven't dug into them much yet. I will make it a point to do so though, thanks for the tip!

damned
September 8th, 2014, 15:31
Well... with a solid programming background - and some time - you will work out whats going on...
Feel free to write up the odd guide or tip or tip sheet as you go :)

dulux-oz
September 8th, 2014, 16:26
Something else you may like to do is take a look at a code Extension - here I'll use my own Locations Database as an example - if you're a coding pro then you shouldn't have much difficulty in "reverse engineering" what I've done and therefore using it as a learning aid.

Have fun.

Cheers

Valarian
September 8th, 2014, 17:15
The Fate Core ruleset is probably worth looking at as an example of a ruleset built on top of CoreRPG, with the Age of Arthur extension as an extension of that. It's a little simpler than the 3.5e and 4e rulesets. It's currently available from the rulesets folder in my signature, but will eventually be coming as part of the upgrade process.

DMFirmy
September 9th, 2014, 21:31
Wow, thanks a ton for all the feedback guys. There really is quite alot going on in both the CoreRPG and the 3.5E rule sets, so looking at a few simpler examples may be pretty helpful. I also really like the idea of adding some things as extensions instead of right into the rule set. It has been sorta slow going, but I am at least starting to get the hand of it a bit more as I go on.

One question that did come to mind over the last couple days has to do with psionics. Psionics play a large part in my campaign, but I haven't come across psionics implemented in FG yet. Any good examples I might look at for this?

Trenloe
September 9th, 2014, 23:26
One question that did come to mind over the last couple days has to do with psionics. Psionics play a large part in my campaign, but I haven't come across psionics implemented in FG yet. Any good examples I might look at for this?
Psionics in what kind of way? A 3.5E/Pathfinder take on it or something else?

In the 3.5E and Pathfinder rulesets you can set the spell class in the actions tab - the icon to the left of the spell class name can be clicked on to select either prepared (like a wizard or a cleric - the book icon), spontaneous (like a sorcerer - star icon) or points spell casting (head icon). See step 4 here: https://www.fantasygrounds.com/wiki/index.php/3.5E_Character_Sheet#Add_Spell_Class