PDA

View Full Version : Maps, hexes, and "distance" tag



GrimmSpector
February 17th, 2016, 03:00
Looking through the gameelements.xml file, and I can see "distance" tags, and the base tag indicates 5, for 5 feet.

I'm aiming to make two or three sets of map setups possible ideally, one for mech combat, (including mixed with platoons and vehicles), and one for characters on foot for sure.

Possibly also one for aerospace combat separately, as the rules for aerospace are quite different when in a fight.

Hoping someone could give me a bit of direction, the guides on rulesets seem to be very out of date for the most part.

I've actually so far been unsuccessful in even getting my new ruleset copy to show up in FG.

damned
February 17th, 2016, 03:08
Looking through the gameelements.xml file, and I can see "distance" tags, and the base tag indicates 5, for 5 feet.

I'm aiming to make two or three sets of map setups possible ideally, one for mech combat, (including mixed with platoons and vehicles), and one for characters on foot for sure.

Possibly also one for aerospace combat separately, as the rules for aerospace are quite different when in a fight.

Hoping someone could give me a bit of direction, the guides on rulesets seem to be very out of date for the most part.

I cant see any actual question here?

I've actually so far been unsuccessful in even getting my new ruleset copy to show up in FG.[/QUOTE]

There is never going to be a full guide to building a ruleset on the current engine (and possibly never on the new one).
Writing a ruleset is going to require you to know/learn both XML and LUA and to be able to follow existing rulesets and reverse engineer / copy / adapt code from those.
Have a look at the Maelstrom RPG (somewhere in CoreRPG forum) as it is reasonably well commented.
Your (unpacked) ruleset requires at the minimum a Folder (which will be teh ruleset name) and a file called base.xml
from there.... there are lots of ways to go.

GrimmSpector
February 17th, 2016, 03:17
Well the main question was about how possible it is to do more than one type/scale of maps in the system, if it's something I can implement.

Learning LUA is not a problem, and xml isn't really a language, and something I already know.

Also unsure what you mean by saying I need a Folder which is the name for the ruleset, non of the paks I've opened up have a folder that's in any way named after the ruleset, though they all of course have the base.xml with it's description, not seeing their "name" from the list of rulesets in that base file, must be missing it somewhere. I'll keep poking around.

And thank you, I'll look at Maelstrom, comments always help. Reverse engineering and copying was a given, but any help I can get since the guides that do exist are terribly out of date is the goal in the end.

damned
February 17th, 2016, 03:41
look at all the existing rulesets.

CoreRPG.pak
5E.pak
Numenera.pak
etc

The ruleset NAME is the filename before the extension.
You can also run an unpacked ruleset.
You unpack a ruleset to a folder name - THAT folder name will become the ruleset name.
If you want a ruleset called Grimm you create a folder called Grimm

In 95% of cases you will be best served by building a layered ruleset on top of CoreRPG.
This will allow you to use all the existing CoreRPG code and any future improvements to it automatically.
This is done by using this line:

<!-- Attributes -->
<importinfo>
<acceptfrom ruleset="Grimm" />
</importinfo>

<!-- Layers -->
<importruleset source="CoreRPG" />

Additionally if your ruleset was layered on say 5e you would do:

<!-- Attributes -->
<importinfo>
<acceptfrom ruleset="Grimm" />
</importinfo>

<!-- Layers -->
<importruleset source="5e" />

Which means you would actually have:

CoreRPG running
+ 5e adds new features + replaces/modifies some features
+ Grimm adds new features + replaces/modifies some features

The rulesets would load in that order: CoreRPG -> 5e -> Grimm

damned
February 17th, 2016, 04:17
AFAIK there is no option to use more than one map scale in FG.

Trenloe
February 17th, 2016, 04:25
Some good starter info and links for modifying rulesets here: https://www.fantasygrounds.com/forums/showthread.php?20651-Modifying-the-CoreRPG-ruleset

Step #1 in post #1 mentions the ruleset directory damned is referring to.

GrimmSpector
February 17th, 2016, 05:04
Great, well either by folder method or by .pak file method, my attempt isn't showing up, and currently it's just a renamed copy of the corerpg set renamed. Meanwhile I can load other paks, including some of the community ones, so I'm not sure what could possible be wrong...

my directory...

13058

and here's the list in FG...

13059

Not a great start...

Trenloe
February 17th, 2016, 05:09
Restart FG after making any changes to the ruleset directories or .pak files.

If you create a .pak file make sure you ZIP up from within the directory, selecting all the files and sub-directories, don't zip up from outside of the directory.

If you use a directory instead of a .pak file (much better for faster development) make sure the base.xml file is in the first level of he ruleset directory.

GrimmSpector
February 17th, 2016, 06:32
Yes, I've done all of that, multiple restarts, obviously I know how to add a .pak file, as I've added a community ruleset as an example to show that FG is working otherwise, but simply making a new copy of an existing one and naming it differently seems for whatever reason to not be working...

damned
February 17th, 2016, 07:38
GrimmSpectre here is a renamed CoreRPG and it shows up.
Please re-read Trenloes post.

13060

GrimmSpector
February 17th, 2016, 16:09
Finally got it to show directories, not seeming to show any .pak files I make...I just generated a half dozen different copies of CoreRPG in different dirs, restarting each time, and eventually all of them suddenly showed up at once...thinking I might delete and reinstall FG.

Thanks for the help guys.

So as far as maps go, I'm assuming it's built in functionality in FG and not something I can significantly modify? If there were a way to make a separate instance of the image window I could easily make one for a different scale/setup.

If I can't modify map functionality I'm unsure if I can make BattleTech work, as elevation changes cost AP, and so do turns beyond a certain distance. Plus facing matters, and facing seems to work pretty weird in the D&D modules as far as how it's controlled.

Anyone know if I can find ways around these things? I'll be hunting through all the modules I have to see what I can figure out. Thanks again.

Trenloe
February 17th, 2016, 17:02
So as far as maps go, I'm assuming it's built in functionality in FG and not something I can significantly modify? If there were a way to make a separate instance of the image window I could easily make one for a different scale/setup.
You would absolutely need to have separate window instances as the code is tied to the specific <imagecontrol> in the "imagewindow" <windowclass> - see the CoreRPG campaign\campaign_images.xml file.

How far you'd be able to go with this I'm not sure. There are limited API calls available to the imagecontrol, info here: https://www.fantasygrounds.com/refdoc/imagecontrol.xcp and I'd imagine that at some point you'd experience limitations in what you can do through the FG API, and what is hard coded.

There would also be knock on changes needed in other ruleset code - e.g. the token placement code in the encounter process is coded to a specific image control.

For an example, see all the "Things to note" in post #1 and issues list in post #2 of the image layer extension here: https://www.fantasygrounds.com/forums/showthread.php?20231-Enhanced-Images-%28layers%29-for-FG-3-0-CoreRPG-%28and-rulesets-based-on-CoreRPG%29 The majority of these limitations are due to hard coded functionality within the API.

GrimmSpector
February 17th, 2016, 22:19
Thanks very much Trenloe, I'll take a look and see, sounds promising, we'll have to see how far I can push things.