Log in

View Full Version : There's got to be a better way...



Jingo
April 30th, 2016, 06:20
Greetings friends in FG land! I do tech writing for work, and I've been involved in html/xml/scripting for many years. So, I figured I'd try my hand at creating my own extension. My main goal was to add a few custom tabs on top of CoreRPG. I used Damned's MoreCore as a guide (thank you!) and came up with something I felt fairly good about. I got my stat boxes and custom fields, and note boxes and everything all lined up in my very own About tab (See attached. I know, Ooooo. I can see you're easily impressed.).

But the Stats boxes are the wrong number types or something (I copied what was in MoreCore's combat frame). They don't roll the dice when you click on them. So today I wanted to turn them into something that could take drag and drop dice so that when you clicked on it, it'd roll the dice and apply the stat modifier. But after looking at CoreRPG and how they do that on their Attributes tab, I decided it wasn't for the faint of heart. (And my heart is getting fainter.)

Even with my background, and my growing familiarity, I'm finding this is a difficult and convoluted mess to step into.

I'm wondering, surely there's a better/easier way to create character sheets! FG has been around for a long time now, hasn't anyone come up with a utility to assist with creating char sheets? Like a visual drag and drop layout tool, similar to Visual Studio, where you can drag and drop controls and it then exports the necessary XML for you?

Imagine being able to say, "Gee, I want this label to be able to take dropped dice, so let's drag that on and position it just so. Ah perfect. Here's where I want my attributes, laid out just so. Very nice. Now let me press F8 to export the xml and test it."

A tool like this would be a great boon to any GM who want to create custom char sheet content. (I'm not saying you can't do a lot with CoreRPG. I know you can. But it's not always pretty, and I personally found it difficult to work with after so many custom fields in one tab.)

Mask_of_winter
April 30th, 2016, 06:36
Someone tried to fund such a tool a few years ago but it didn't work out. Ruleset Wizard I believe it was called.

Zacchaeus
April 30th, 2016, 08:35
Indeed it was (https://www.fantasygrounds.com/forums/showthread.php?19549-New-project-Ruleset-wizard).

ddavison
April 30th, 2016, 16:55
Carl (cpinder) had some good ideas on simplifying this by essentially putting in a background image and overlaying attributes, dice and formulas on top of it. He's been working with us on the integration to Unity since he joined the company in October, 2015, but this is on the queue for us to work on once we get some of the other items done. We are not sure what form it will take or when we will start work on it in earnest, but it is at least in the list of things to research and hopefully correct.

Jingo
May 1st, 2016, 03:39
Yeah that Ruleset wizard would indeed have solved a lot of headaches! Hopefully he's still working on it. So much of what I do is trial and error and a bucket load of /reload commands to test.

I've been away from the FG scene for a while (though I joined up in the FG I and II days) what is this Unity thing?

LordEntrails
May 1st, 2016, 06:19
...I've been away from the FG scene for a while (though I joined up in the FG I and II days) what is this Unity thing?

Unity is a game engine. See https://unity3d.com/unity

The SmiteWorks team has been working on moving (re-programming) Fantasy Ground into that engine as it is much more modern, powerful etc. You can search the forums for more information. But in general, no timeline has yet been announced, the initial release is expected to have the same functionality as the current application, enhanced functionality is expected after the initial release, cost (if any) for current license holders has not been announced but a cost is expected by many of us.

damned
May 1st, 2016, 10:12
The MoreCore extension doesnt have a good example for a rollable field.
You will need to look at another ruleset for this - Ive been thumbing thru a few rulesets looking for a good example that rolls 2 dice and adds a modifier.
The Maelstrom ruleset on the Combat tab and Weapons/Damage can roll 2 dice and add the modifier. You basically want to roll 2d6 (always instead of retrieving dice from the field) and add the value in that field as the modifier. The rolling strings in that example should be adjustable to what you want... I think.
Trail of Cthulhu rolls a d6 and adds 1 to the roll (and subtracts 1 from the pool) if you hold ALT when you click.... this might give you some clues
The 3.5e ruleset on many of the fields on the first page rolls 1d20 and adds the modifier in that field (complicated by the fact that the modifiers are all auto-calculated)... you would need to remove teh auto-calc and replace 1d20 with 2d6...

you would end up with something like:



function action(draginfo)
local nMod = window.mod.getValue();
local sStatName = window.name_label_score.getValue();

local rActor = ActorManager.getActor("pc", window.getDatabaseNode().getChild("..."));
local sMod = tostring(nMod);
if nMod >0 then
sMod = "+" .. sMod;
end

local sDesc = "[ABILITY] "..sStatName.. .. sMod ..")";

local rRoll = { sType = "ability", sDesc = sDesc, aDice = {"d6","d6"}, nMod = nMod };
ActionsManager.performAction(draginfo, rActor, rRoll);
end

damned
May 1st, 2016, 10:12
And yes the Ruleset Wizard should have gained more support based on the number of votes it has on the wishlist... but it still would not have written all the code...