PDA

View Full Version : FG Ruleset Tutorial



Zane_Marlowe
June 1st, 2006, 02:39
Hi Friends,

Many of you have been asking me about this, so I finally just decided to post the bit that I had, and then I'll be able to work on the other two bits when I can.

The first document can be found here (https://www.onthequest.com/documents/FG%20Ruleset%20Tutorial.pdf)

What it covers is the basic FG file system, how to get your first ruleset worked up, and how to edit character sheet, NPC sheet and monster data.

I'm going to insert my own disclaimer here: I'm a hack. I am NOT a code guru, and I do not pretend to have more knowledge than what I could figure out by just making educated guesses about what I was seeing in the xml files. Others have extended ruleset functionality into new kinds of controls on character sheets, etc. Any of this is stuff you can do, and stuff I've not done because I didn't need it to end up with a good playable finished product in the time I had alotted.

The next edition will discuss how to create the reference nodes I developed for use in my rulesets, and the final edition will discuss how to modify the graphics for the ruleset.

These tutorials do NOT require you to know XML, nor do they require you to have expensive tools.

Let me know what you think,
ZM

ByteBandit
June 1st, 2006, 03:21
Thanks for posting this Zane, just what I've been waiting for. Going to have a good read through it now :) Keep up the good work.

Ged
June 1st, 2006, 07:21
When making (and especially modifying) a ruleset, it's best to start by
creating the new folder for the new ruleset (say, rulesets/my_ruleset)
copying the base.xml from rulesets/d20/ to the new folder

(now starts the block of instructions deviating from Zane's)
copying only the file that you want to edit from rulesets/d20/ or data/ to the new folder (e.g. rulesets/d20/charsheet.xml)
change in rulesets/my_ruleset/base.xml the line
<includefile source="rulesets\d20\charsheet.xml" />
into
<includefile source="rulesets\my_ruleset\charsheet.xml" />
modify the file rulesets/my_ruleset/charsheet.xml
repeat 3-5 selecting different files from rulesets/d20/ or data/
Advantages of this procedure: most importantly, 1) only the modified files will need to be sent to player client when connecting to the host (game master). 2) Keeps the ruleset a little easier to debug, since all crashes can be pinpointed to the modified set of files. And finally, 3) the files in data/ folder especially are system independent and fit reasonably well in most rulesets and thus need not be copied for each ruleset (though they have fantasy flavour).

Anyway, very well done Zane, thanks for posting the tutorial! I guess the above instruction is a matter of taste, but that's the way it was designed in particular to keep download times down and to allow quick additions for house rules etc. (no need to hack the whole ruleset).

DarkStar
June 1st, 2006, 10:54
Advantages of this procedure: most importantly, 1) only the modified files will need to be sent to player client when connecting to the host (game master).

Good to know. So, how does it work, exactly? If I create a new rulesest with, let's say, 3 modified files and don't include any others, how will this look on a client (player) machine? Where are the missing files loaded from? resource.pak ? Is it mixing official ruleset with my new files? Until now, I thought that you had to include all files in your new ruleset, even if you did not modify them.

Ehh, you are really missing some good documentation here.

mr_h
June 1st, 2006, 15:03
*looks both directions*
*swipes the PDF*
*runs off to work on his own ruleset*

Zane_Marlowe
June 1st, 2006, 18:46
Ged, I'd agree that using a limited list of files is better for client downloads. The reason I instructed the reader to make a complete file transfer is because the instructions on what to change in the tutorial are open-ended. If the reader wishes to change something that I haven't instructed them to, then they can do so without having to spend more time setting up the file system. These instructions assume that people will be creating both d20 and non-d20 rulesets, and that they can change any number of things. Since the tutorial does not give steps to make a specific ruleset, but basic concepts for making any ruleset, then I'm assuming in the file system setup that they'll change everything.

Now that said, when I finished my Adventure ruleset, I went back and repointed the base.xml file for those files that were unchanged, and deleted the unchanged files from my ruleset folder, so all I was left with was the changed files in the ruleset, as you suggest. So I think we agree, but since I don't have the last steps up yet, the final "cleanup" details haven't shown this strategy.

Darkstar, as far as I know, whatever files are in the ruleset folder will be transferred to the client. If the client has already downloaded the ruleset, then I believe it will only download those files that are newer on the server than are on the client.

Oberoten
June 1st, 2006, 20:41
My hat is off to you sir. This is the kind of documentation we need to go out there and make this into all it can be.

Stuart
June 1st, 2006, 21:12
Darkstar, as far as I know, whatever files are in the ruleset folder will be transferred to the client. If the client has already downloaded the ruleset, then I believe it will only download those files that are newer on the server than are on the client.

I'm not so sure on this ... I made some major revisions to the ruleset my players use and posted it to them. They installed this yet when they logged on to the game they still had to download the entire ruleset again despite a) installing it prior to this and b) only two files had been modified subsequent to the initial download.

The tutorial is excellent ... it is certainly filling some of the alarming gaps in my xml-savvy.

Kalan
June 1st, 2006, 23:59
Very well done Zane! I'd not worked up to playing with the Monster or Personality entries as yet - having focused almost primarily with the addition of "books" onto the basic SRD structure (well in my case MSRD structure).

All in all very well presented! Kudo's to you :D

Zane_Marlowe
June 2nd, 2006, 07:35
I've updated the linked tutorial file with the next major section on how to create the main text reference. Once this is done, I'll turn to the secondary references such as spells and monsters, and then on to graphics.

This one should keep you guys busy for a while though ;)

ZM

Stuart
June 2nd, 2006, 08:13
Excellent work Zane; formatting tables can be a bit tricky, the only thing I'd add is that you can get a "smoother" look if you manipulate the windowclass reference in d20-graphics so that the table opens onto a different and appropriately sized background png. Assuming of course that the table being opened is not part of a reftxt (or similar) chunk of text which may well need a large background.

Zane_Marlowe
June 2nd, 2006, 14:57
Stuart raises a good point, and I've added two notes into the document in the next draft that relate to the foregoing material. Firstly, I actually use a "reftbl" that is identical to reftxt in all but name and the width of the control defined in the d20_reference.xml file. Tables need much more width if they're especially large, so I set the reftbl width at about 700px I think.

The other point is that to get the referenceroot.png to display correctly, you need to edit the graphics.xml file in the root folder and change the path to that file in its frame definition. That's hopefully a simple enough description and instruction of the necessary change for those who will attempt this before the next version, but I'll be documenting it properly then.

Zane_Marlowe
June 2nd, 2006, 20:16
Well I've finished Part One on how to create the informational elements of the ruleset.

This has come out to about 30 pages, so I'm going to take a breather and start thinking about the graphics elements next. Let me know what you think guys!

Citrean
June 14th, 2006, 19:54
Thanks Zane, much appreciation for your takeing the time to write this up.

Zane_Marlowe
July 16th, 2006, 03:54
I've added seven pages covering graphics and fonts for rulesets, so that about wraps it up for the tutorial. For those just reading this post, I'll add the link again here (https://www.onthequest.com/documents/FG%20Ruleset%20Tutorial.pdf).

Happy editing friends!

ZM

heliopolix
July 16th, 2006, 09:13
Just a minor suggestion in your grey side(mid?)-box about portraits [pg 33]. You mention that they are 63x63 and that FG resizes larger pics to that resolution for use in-game. You name saved client bandwidth as the main reason to do so. I'd also like to point out that the FG re-size is far inferior to the ones done by programs like The GIMP or Photoshop. As portraits are one of the main ways that you can portray your character, having a sharp and crisply rendered portrait is a good thing, and pre-re-sizing is definitely the way to go.

Also, kudo's on the tutorial man. Its very well done. If you were willing, I would love to collaborate with you to convert and integrate it into the FG wiki I started a while ago, with the intent to collect and share such gems as this.

Later,
helio

DrDeth
May 24th, 2007, 14:14
I've been wondering why this is still stickied? Its a great tutorial, but it really needs a lot of updating for FG-II. Still, some of info still applies...

BrashFink
May 27th, 2007, 03:05
Thanks a million, you are a newb-helper extraordinaire. I was so confused why nothing was changing when I edited it... had no idea about the base file.

Guess that'll teach me to stop trying to figure out things for myself!

Thanks again for this file!

Zane_Marlowe
June 16th, 2007, 19:52
DrDeth, I honestly haven't created a ruleset since 2nd ed. FG was released, but the little bit I've looked at the changes they've made, there is now a coding interface (which makes some things MUCH easier), there are extra tags to allow you to dynamically change rulesets, and ruleset info is kept in different locations. Most of the basic process and editing should be relatively the same once the extra tags and different paths are taken into account.

That said, a more direct answer to your question may just be that there are people out there using FG v.1, and this remains a good resource for them.

Sigurd
June 16th, 2007, 20:18
I'd suggest sombody change the name of the thread to include a reference to FG1 not 2.

Seriously, no disrespect to the Zane_Marlowe, it might be better to remove this to an FG1 section of the web page or remove it altogether.

Props to Zane, as a tutorial its great for version 1 but a real point of confusion for version 2.


Sigurd

Oberoten
June 16th, 2007, 23:23
DrDeth, I honestly haven't created a ruleset since 2nd ed. FG was released, but the little bit I've looked at the changes they've made, there is now a coding interface (which makes some things MUCH easier), there are extra tags to allow you to dynamically change rulesets, and ruleset info is kept in different locations. Most of the basic process and editing should be relatively the same once the extra tags and different paths are taken into account.

That said, a more direct answer to your question may just be that there are people out there using FG v.1, and this remains a good resource for them.

I am still using this tutorial as a base for my work... Mostly because I am not too fond of FG2 yet. (Oh it will come once I have more experience with it no doubt... but the learningcurve for doing things has increased exponentially and I simply have little time for both re-learning the XML and learning LUA at the same time... )

Especially with the current state of the rulesets and all the trouble with updates. (It does seem to have stabilized now though... but I'll still wait for next update a bit longer before I throw myself headfirst into things. )

Hamish
July 2nd, 2007, 21:49
Is the part about copying changed files only still valid? My base.xml does not have references to paths, only to filenames. And you have to change something, because (unlike I was hoping) FG2 does not use the default d20 file if it cannot find a file in the my_ruleset folder.

Zane_Marlowe
July 18th, 2007, 00:31
I've been looking at FG2 lately and I've got to admit it's a WHOLE different ballgame. It installs with a shortcut to a folder in your app data folder, and stores all the ruleset stuff there. Ruleset construction is quite different between the two versions, and those interested in pursuing further ruleset construction in FG v.1 will continue to be well-served by this tutorial. It is of marginal utility to those who are interested in developing for FG2.

Toadwart
July 18th, 2007, 05:43
Is the part about copying changed files only still valid? My base.xml does not have references to paths, only to filenames. And you have to change something, because (unlike I was hoping) FG2 does not use the default d20 file if it cannot find a file in the my_ruleset folder.

Custom rulesets in FG2 work do differently to FG1. You'll need to take a full copy of the example ruleset folder and modify the bits you want to change.
All the files for a custom ruleset have to exist within that rulesets' folder (can't bring in a file from a different custom ruleset, or from the base d20 rules).
Hence the lack of path names in base.xml. It simply expects to find the files in the ruleset folder (subfolders within the ruleset folder are ok - base.xml includes some of the lua scripts in the scripts sub-folder)

Unfortunately this does mean that changes in subsequent versions of FGII won't automatically appear in your custom ruleset. You'll have to copy the changed files across to your ruleset from the examples folder again (assuming you haven't modified that file, in which case you'll need to re-do the changes to the new file or identify the changes and apply them manually to your file).

There have been some hints about ruleset changes being done in a similar fashion to modules (i.e. being separate beasties that can be activated/deactivated) but that's behaviour isn't in place as yet, and no promises that it will be anytime soon...