external input files

Doc requests, organization, and submissions

Moderators: dorpond, trevor, Azhrei

Post Reply
THUDGUN
Giant
Posts: 148
Joined: Mon Apr 26, 2010 1:03 am
Location: Los Angeles

external input files

Post by THUDGUN »

I was wondering if the MACRO language in MT supported getting input from an external file and reading it into an array, or like data structure.

I'd like to control data inputs from a simple text file, so I can easily update/manipulate character and rules data (character sheets, equipment tables, etc.).


On a second note, can you use a macro to get coordinate data from, say all the tokens a particular token can see? I'd like to develop macros that go along with weapons, so when a character goes to use that weapon, it'll show a list of tokens, their relative ranges and show a modifier to hit, and allow the player to select which one to attack at.


Thank you kindly

Chris
People are like a box of chocolates... yum...

User avatar
Rumble
Deity
Posts: 6235
Joined: Tue Jul 01, 2008 7:48 pm

Re: external input files

Post by Rumble »

There's no provision to do the first option (MapTool doesn't communicate with external files in that fashion), but there are macro functions that if properly arranged will determine the location and range of other tokens based on a starting point/token.

Specifically, the Wiki: getTokens() family of function (getTokens, getTokenNames, etc) allows you to collect tokens on the map, and the Wiki: getDistance() family of functions can determine ranges. I use them in my D&D "framework" to collect tokens within the range of an attack, and then determine if the selected target is at short or long range, etc.

THUDGUN
Giant
Posts: 148
Joined: Mon Apr 26, 2010 1:03 am
Location: Los Angeles

Re: external input files

Post by THUDGUN »

Rumble wrote:There's no provision to do the first option (MapTool doesn't communicate with external files in that fashion), but there are macro functions that if properly arranged will determine the location and range of other tokens based on a starting point/token.

So, no DataInputStream class for MT? Disappointing, but no big deal. I'll just have to develop and maintain the tables within MT.

I guess I should become more familiar with the system before I start to delve into much deeper subjects.

Thank you for the help.


Chris
People are like a box of chocolates... yum...

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: external input files

Post by Azhrei »

THUDGUN wrote:
Rumble wrote:There's no provision to do the first option (MapTool doesn't communicate with external files in that fashion), but there are macro functions that if properly arranged will determine the location and range of other tokens based on a starting point/token.
So, no DataInputStream class for MT? Disappointing, but no big deal. I'll just have to develop and maintain the tables within MT.
There are issues with allowing access to external files. Particularly, how does MT know about them so they can be included in the campaign file? And where are they stored on the user's computer? Under .maptool presumably, but they are really part of a particular campaign and should be stored with it.

That means building an editor for said files, perhaps similar to the large JEditorPane used by the macro editor dialog. Then some kind of tree-structured filesystem so store these things so they can be organized in a reasonable manner. Yada, yada, yada...

Too much work for too little payoff. However, if you want to submit patches I'll look at them and consider integration. ;)

THUDGUN
Giant
Posts: 148
Joined: Mon Apr 26, 2010 1:03 am
Location: Los Angeles

Re: external input files

Post by THUDGUN »

Azhrei wrote:Too much work for too little payoff. However, if you want to submit patches I'll look at them and consider integration. ;)

My feeling is, if you have external files, it's up to you to make sure they're in the right place. ;)

I see a tremendous amount of potential with MapTools, and I plan on developing as complete a package for my game system as possible. Unfortunately, I only have a passing familiarity with programming. My work doesn't allow me enough time to improve my skill set much. !}

I've been reading over all the wiki pages and I can see most of what I'll need to do to make my game system swing. Sometimes I'm stubborn with how I want something to work... I just have to discipline myself to 'getting the basics down.' Work on the absolute minimum just to play the game, then add to it. Just like everyone else. !)

Whatever I do develop, I will definitely submit.


Chris
People are like a box of chocolates... yum...

Post Reply

Return to “Documentation Requests/Discussion”