RPTools.net

Discussion and Support

Skip to content

It is currently Fri Oct 20, 2017 12:06 am 






Reply to topic  [ 9 posts ] 

Previous topic | Next topic 

  Print view

Author Message
 Offline
Kobold
 
Joined: Tue Feb 14, 2017 5:33 pm
Posts: 14
 Post subject: Building my custom framework. Criticism welcome. :)
PostPosted: Wed Feb 22, 2017 10:35 am 
Hello Everyone;

Looking for framework design tips or at least some validation that my approach is not utterly dumb.

I run a Judges Guild Wilderlands-influenced Pathfinder campaign that is fairly customized. As a rather new campaign (and new maptools user), I started with just putting some standard combat macros, health bars, states and utility stuff to move combat along while players navigate my various (and somewhat primitive) maps.

Behind the scenes, I am working on a more robust system that, while not providing much utility yet, I envision to transform the framework's utility.

A key component to this design is the use of library tokens that act as "databases". Properties of these library tokens are data items (skills, weapons, feats, races, etc.) whose attributes are stored in a json array of objects. For instance, Acrobatics, a skill, is stored as a property in Lib:SkillsDB and has a json array as an attribute that stores the various data associated with Acrobatics (source, ability, class, short_description, etc.).

Each library token possesses a series of macros. The "utility" functions (generally create, read, update and delete (CRUD)) have their own section and are GM only. The "interface" functions are those that the player and/or GM may add to use in their own macros. These interface functions allow searching for a property, obtaining a property's attributes or even formatting such properties as a quick display.

The goal is to store all of the relevant game rule information in these various library tokens and call the data when required (for a character sheet for instance). My goal is to only have static data stored once anywhere, and minimize stored derived data. I understand that I will need to make a few compromises for performance sake.

Any comments on my approach?


Top
 Profile  
 
 Offline
Kobold
 
Joined: Tue Feb 14, 2017 5:33 pm
Posts: 14
 Post subject: Re: Building my custom framework. Criticism welcome. :)
PostPosted: Sat Feb 25, 2017 1:31 pm 
Well, I downloaded Imarkus001's framework, and... I'm humbled. My approach is not at all the approach that is used in this framework, and the level of detail and complexity is somewhat breathtaking. I may have to rethink mine (I still need to build my own as my ruleset is heavily customized... dangit).


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Nov 10, 2009 6:11 pm
Posts: 7886
Location: Bay Area
 Post subject: Re: Building my custom framework. Criticism welcome. :)
PostPosted: Sat Feb 25, 2017 10:53 pm 
Lindsays' FW has been in the works for many many years and with several collaborators. It's a good base to do any customizations from.

_________________
Downloads:


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Fri Mar 20, 2009 4:40 am
Posts: 9411
Location: Netherlands
 Post subject: Re: Building my custom framework. Criticism welcome. :)
PostPosted: Sun Feb 26, 2017 7:08 am 
lol, I know even if I look back at my own framework which have been developed over the last 7 years with several people, I'm staggering at the complexity of it...
Don't be put of by it. Ive read you're initial post and thought: that looks good.
Point here is: you need to just get starting, which is the best way to learn mt script and its do's and don'ts.
Looking at FW that have been developed over years can be a bit too daunting and I would not let you be scared of by that too much. Have a look, pick some things that you think is neat and useful, set yourself reachable targets (e.g. core combat rules implement only or spell lib of these books only or ...etc.) and execute that. When done see if you want to do more.

_________________
GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC

My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent and
DPI.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS


Top
 Profile  
 
User avatar  Offline
Demigod
 
Joined: Sun Feb 25, 2007 11:53 am
Posts: 3728
Location: MD
 Post subject: Re: Building my custom framework. Criticism welcome. :)
PostPosted: Sun Feb 26, 2017 11:51 am 
wolph42 wrote:
lol, I know even if I look back at my own framework which have been developed over the last 7 years with several people, I'm staggering at the complexity of it...
Don't be put of by it. Ive read you're initial post and thought: that looks good.
Point here is: you need to just get starting, which is the best way to learn mt script and its do's and don'ts.
Looking at FW that have been developed over years can be a bit too daunting and I would not let you be scared of by that too much. Have a look, pick some things that you think is neat and useful, set yourself reachable targets (e.g. core combat rules implement only or spell lib of these books only or ...etc.) and execute that. When done see if you want to do more.

This is good advice.

In fact, chances are you will come up with some better ideas along the way and "course-correct" as needed. The good thing about building your own framework instead of trying to adopt something as complex/massive as lmarkus' is that you're going to be able to focus on what's important to you and your game.

Some things I would suggest for any new framework builder:

1) Start with Wolph's BoT in your framework. It really includes a good number of the "greatest hits" of MT macro coding.
2) Start with Alias' RPedit in your framework. Get comfortable using it.
3) Explore storing as much player/token information on Lib tokens as possible (it sounds like you're leaning that way). I prefer to have unique "data base" Lib tokens for each Player Character these days. I wish I'd focused on this method even earlier in my development.
4) Use a single Code level as much as possible (two levels are convenient and sometimes unavoidable, but it is the single largest performance hit in my experience and can get in the way later).
5) Get comfortable with UDF's and document your work.

Have fun!

_________________
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Fri Mar 20, 2009 4:40 am
Posts: 9411
Location: Netherlands
 Post subject: Re: Building my custom framework. Criticism welcome. :)
PostPosted: Sun Feb 26, 2017 4:25 pm 
Full Bleed wrote:
4) Use a single Code level as much as possible (two levels are convenient and sometimes unavoidable, but it is the single largest performance hit in my experience and can get in the way later).



pssst, there's a trick to use more than two nested {} in your code. I've been using it for 5 years now without any issue, you can find it in the wiki article concerning more than two nested levels. Don't tell the others :wink:

_________________
GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC

My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent and
DPI.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS


Top
 Profile  
 
User avatar  Offline
Demigod
 
Joined: Sun Feb 25, 2007 11:53 am
Posts: 3728
Location: MD
 Post subject: Re: Building my custom framework. Criticism welcome. :)
PostPosted: Sun Feb 26, 2017 10:40 pm 
wolph42 wrote:
pssst, there's a trick to use more than two nested {} in your code. I've been using it for 5 years now without any issue, you can find it in the wiki article concerning more than two nested levels. Don't tell the others :wink:

Yeah, I know. ;) I've looked at that before... I remember it being a little hacky though. But, mainly, I was just commenting on the performance hit I often see with using 2 code levels.

_________________
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."


Top
 Profile  
 
 Offline
Kobold
 
Joined: Tue Feb 14, 2017 5:33 pm
Posts: 14
 Post subject: Re: Building my custom framework. Criticism welcome. :)
PostPosted: Mon Feb 27, 2017 10:51 am 
Thank-you, Full Bleed, Wolph42 and Aliasmask. Really appreciate the advice!

Full Bleed wrote:
Some things I would suggest for any new framework builder:

1) Start with Wolph's BoT in your framework. It really includes a good number of the "greatest hits" of MT macro coding.
2) Start with Alias' RPedit in your framework. Get comfortable using it.
3) Explore storing as much player/token information on Lib tokens as possible (it sounds like you're leaning that way). I prefer to have unique "data base" Lib tokens for each Player Character these days. I wish I'd focused on this method even earlier in my development.
4) Use a single Code level as much as possible (two levels are convenient and sometimes unavoidable, but it is the single largest performance hit in my experience and can get in the way later).
5) Get comfortable with UDF's and document your work.

Have fun!


I've been a bit cautious about incorporating others' work into the framework due to my inexperience, but I think I will "take the plunge". :)

I will also start converting to UDFs. Thank-you. I do document every Library token including the design philosophy, data structures and its macros and distribute this documentation to my players for comment. This documentation is mostly useful for me, however, since I tend to forget things rather frequently (why did I enter this room again?).

As an old one-time C coder, I try to build small, useful macros and then call them as needed to do stuff. I had hoped that that would improve performance and avoid significant nesting. It does mean, however, that I write a ton of small macros...


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Fri Mar 20, 2009 4:40 am
Posts: 9411
Location: Netherlands
 Post subject: Re: Building my custom framework. Criticism welcome. :)
PostPosted: Mon Feb 27, 2017 12:24 pm 
some remarks from my side:
the bot will initially make it hard as its a tough nut to crack if you want to use its full potetial. however i did do significant documentaion on the general udfs i created which should make your life easier to employ them.
as for nesting, i dont really have performance issues with those, ive never tested the impact of deep nesting but in my experience using lots of json and loops are the critical performance hogs that csn happen. coding those smartly is key, and being able to deep nest makes your code a lot easier to read, but thats my opinion. if you look at the work of aliasmask you will see the other 'flat coding philosophy' and am is 'a coding force of note' :D.

the best advice i can give you is to at least read the 'read this' linked in my sig and to check out the first link in my sig as it gives you an introduction and overview in maptools and its script.

next to that, post here so we can give feedback.

lastly you might also want to check out the 'how to speed up my macros' also linked in sig. ive developed tools in the bot for that to swiftly test different approaches and the article gives insight on key performance indicators.

_________________
GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC

My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent and
DPI.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS


Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 9 posts ] 

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:

Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests (based on users active over the past 5 minutes)
Most users ever online was 243 on Sun Nov 04, 2012 6:14 am

Users browsing this forum: No registered users and 2 guests





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman