RPTools.net

Discussion and Support

Skip to content

It is currently Sun Jul 23, 2017 5:40 am 






Reply to topic  [ 26 posts ]  Go to page 1, 2  Next

Previous topic | Next topic 

  Print view

Author Message
 Offline
Cave Troll
 
Joined: Mon Oct 31, 2011 6:32 pm
Posts: 73
 Post subject: Adventure editor tool
PostPosted: Sun Aug 02, 2015 2:31 pm 
Maptool is awesome to show map and tokens, but to have a complete adventure, with all the text, images and information of all the encounters, rooms and PNJs, like a book of a adventure module... maptool lacks of that funcionality.
This tool tryes to solve this.

USE
1- Write everything important of your room or encounter in a GM notes of a token (a info token). Every room or encounter must have his own info token.
2- You can enclose text between <share>...</share>. Later, you will be able to share this text to your players
3- You can enclose a image url or a asset image between <image>...</image>. Later, you will be able to share this image to your players.
3- You can allways share the images of portrait and handout of this token
4- You can use html tags to format your text. For example <b>...</b> to use bold or <h1>...</h1> to write titles

When your token has all the information, select it, and press the macro button with a picture of a open book (it has to be in campaign panel). A new frame will be open with all this information nicely presented, formatted and with images and macrolink to share images and text to your players every time is needed.
If you share a image to your players, they will be able to zoom in and out the image.

INSTALATION
1-Drop the files “lib_adventure.rptok”, “EXAMPLE.rptok” and “lib_frames.rptok” to your campaign
2-Import the tables “frames tables.mttable” and “images table.mttalbe”
3-Copy the macro with a image of a book from the lib token “lib:adventure” to your campaign panel
4-Run the macro onCampaignLoad from the lib token “lib:frames”
5-You can now select the token “EXAMPLE - Y1. Main Entrance (CR 2)” and run the macro with a image of a book to test the sample.

EDIT AUG 10, 2015

NEW- Added a new function, Use <infolink>text</infolink> to make a link to a new window with all the text, showed to GM only. You can use the tags <titlelink>text</titlelink> before <infolink> to modify the title of the link

NEW TIP- You can use html tags to make a web link to be open with a browser:
<a href=http://www.d20srd.org/srd/monsters/kobold.htm>kobold stats (web link)</a>

Included all wolph42's improvements


File comment: EDIT-all together
scenario campaign 2.cmpgn [4.51 MiB]
Downloaded 66 times
File comment: EDIT-lib token of frames with wolph42's improvements
lib_frames.rptok [18.43 KiB]
Downloaded 80 times
File comment: EDIT-lib token with the new function and wolph42's improvements
lib_adventure.rptok [19.7 KiB]
Downloaded 63 times
File comment: EDIT- example with the new funtion
EXAMPLE - Y1. Main Entrance (CR 2).rptok [110 KiB]
Downloaded 65 times
CAPTURE.jpg
CAPTURE.jpg [ 101.22 KiB | Viewed 1353 times ]
images table.mttable [73.95 KiB]
Downloaded 65 times
frames table.mttable [4.03 MiB]
Downloaded 71 times


Last edited by Nildik on Sun Aug 09, 2015 6:53 pm, edited 1 time in total.
Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Nov 10, 2009 6:11 pm
Posts: 7750
Location: Bay Area
 Post subject: Re: Adventure editor tool
PostPosted: Sun Aug 02, 2015 4:35 pm 
Very cool. Thanks for sharing.

_________________
Downloads:


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Fri Mar 20, 2009 4:40 am
Posts: 9265
Location: Netherlands
 Post subject: Re: Adventure editor tool
PostPosted: Sun Aug 02, 2015 4:53 pm 
Awesome! Thanks for sharing!

_________________
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
Deity
 
Joined: Tue Nov 10, 2009 6:11 pm
Posts: 7750
Location: Bay Area
 Post subject: Re: Adventure editor tool
PostPosted: Sun Aug 02, 2015 6:41 pm 
FYI, I do something similar but it's not as pretty as yours.

Attachment:
Example.jpg
Example.jpg [ 630.25 KiB | Viewed 1337 times ]


All my data is in one file on a lib token. The marker tokens just hold the room name, like A1. Under GMName, I put the actual room name which is displayed in chat when posting. I was planning on making it a bit more user friendly before sharing. Now that I see what you did I should include an option for a handout. I can also include skill check links in my descriptions.

_________________
Downloads:


Top
 Profile  
 
 Offline
Cave Troll
 
Joined: Mon Oct 31, 2011 6:32 pm
Posts: 73
 Post subject: Re: Adventure editor tool
PostPosted: Sun Aug 02, 2015 6:52 pm 
I'm very interested in your job aliasmask. Could you share it?, I´m pretty sure that I can use it to get ideas to improve mine.


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Nov 10, 2009 6:11 pm
Posts: 7750
Location: Bay Area
 Post subject: Re: Adventure editor tool
PostPosted: Sun Aug 02, 2015 11:51 pm 
Nildik wrote:
I'm very interested in your job aliasmask. Could you share it?, I´m pretty sure that I can use it to get ideas to improve mine.

Sure. I'll try to consolidate it in to one lib because it has a lot of interdependencies to my framework. But this is the guts of it:

Code:
[H: EOL = decode("%0A")]
[H: thisLib = getMacroLocation()]

<!-- clear token of old data -->
[H: props = getMatchingLibProperties("room[.].*",thisLib,"json")]
[H, foreach(prop,props): resetProperty(prop,thisLib)]

<!-- read in raw dialog -->
[H: buttonIndex = getMacroIndexes("rawDialog")]
[H: descriptions = json.fromList(getMacroCommand(buttonIndex),EOL)]

<!-- parse lines in to workable data -->
[H: dialogObj = "{}"]
[H: image = ""]
[H, foreach(line,descriptions), code: {
   [H: roomData = listGet(line,0,":")]
   [H, if(listCount(line,":") > 2): text = substring(line,length(roomData)+1); text = listDelete(line,0,":")]
   [H: roomId = replace(lower(listGet(roomData,0,"/")),"[^a-z0-9_.]","")]
   [H: numVars = listCount(roomData,"/")]
   [H, if(numVars >= 2): roomHeader = listGet(roomData,1,"/"); roomHeader = "Description"]
   [H, if(roomId == "image"), code: {
      [H: image = trim(roomHeader)]
   };{
      [H, if(json.isEmpty(roomHeader)): roomHeader = "Description"]
      [H, if(numVars >= 3): targets = listGet(roomData,2,"/"); targets = ""]
      <!-- this rooms json obj -->
      [H: room = json.set("{}","subtitle",roomHeader,"description",text,"targets",targets,"image",image)]
      <!-- append to array of objects for room id -->
      [H: rooms = json.append(json.get(dialogObj,roomId),room)]
      <!-- add rooms to main storage variable -->
      [H: dialogObj = json.set(dialogObj,roomId,rooms)]
   }]
}]

<!-- save data to be used in "description" function -->
[H: roomIds = json.fields(dialogObj,"json")]
[H, foreach(roomId,roomIds): setLibProperty("room."+roomId,json.get(dialogObj,roomId),thisLib)]


Text is read from a macro called rawDialog. The text format of each line is like this:
image/tokenName - tokenName is the name of any token in the campaign. this can be left blank and it will default to the lib token image. This sets all future lines with this image when displaying in the chat.
id: - id is the name of token being used for a marker, like A1. room name defaults to "description". Also, if no gmName is specified on marker token it uses the format room, like "Room A1", other gmName is used in its place.
id/uniqueName: same as above, but unique name is subname of the id, like A1/Trap which may describe a trap in that room.
id/uniqueName/gm: same as above but chat only goes to gm. Can use other names, but I haven't found this very useful and will likely change or remove.

I recently changed the output to a custom output macro so it doesn't like any html at the moment. Changing it to a normal broadcast or post to a frame should fix that. You can include macro code in the lines for clickable links or other calculations.

Code:
<!-- lib.dialog.description -->
[H: assert(isGM(),"<b>GM ONLY FUNCTION</b>",0)]
[H: roomId = "room." + replace(lower(token.name),"[^a-z0-9_.]","")]
[H: infoArray = getLibProperty(roomId)]
[H: title = getGMName()]
[H, if(title == token.name): npcDialog = 1; npcDialog = 0]
[H, if(npcDialog): defaultImage = getImage(token.name); defaultImage = getImage(getMacroLocation())]

[H, if(json.isEmpty(title)): title = "Room "+token.name]

<!-- Get all room info so GM may select which to display -->
[H: options = ""]
[H, foreach(room,infoArray), code: {
   [H: image = getImage(json.get(room,"image"))]
   [H, if(json.isEmpty(image)): image = defaultImage]
   [H: subtitle = json.get(room,"subtitle")]
   [H: description = json.get(room,"description")]
   [H: targets = json.get(room,"targets")]
   [H: options = json.append(options,replace(strformat('<html><table width="600"><tr valign=top><td><img src="%{image}" height=50 width=50 /></td><td width=550><b>%{subtitle} (%{targets}):</b> %{description}</td></tr></table></html>'),",","&#"+44))]
}]
[H: options = json.toList(options)]
[H: PCs = getPCNames()]

[H: inputStr = json.append("","tab0|Dialogs|Chose a Dialog to display|TAB",
   "saveToTranscript|1|Save to Transcript?|CHECK",
   strformat("header|<html>%{token.name} - %{title}</html> %{defaultImage}||label|span=true icon=true iconsize=40"),
   strformat("option|%{options}||radio|span=true"),
   "tab1|Selected|Set Selected PC Token|TAB",
   strformat("selected|%{PCs}|Pick target output|radio|value=string"))]
   
[H: abort(input(json.toList(inputStr,"##")))]

[H: room = json.get(infoArray,option)]
[H: subtitle = json.get(room,"subtitle")]
[H: image = getImage(json.get(room,"image"))]
[H, if(json.isEmpty(image)): image = defaultImage]
[H: description = json.get(room,"description")]
[H: targets = json.get(room,"targets")]
[H, if(json.isEmpty(targets) || targets == "all"), code: {
   [H, if(! json.isEmpty(description)): am.play.output.room(description,strformat("%{title} (%{subtitle})"),image,saveToTranscript)]
};{
   [H, if(! json.isEmpty(description)): am.play.output.basic(description,targets,"DM")]
}]

_________________
Downloads:


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Mon Sep 15, 2008 8:27 am
Posts: 1165
Location: Bristol, UK
 Post subject: Re: Adventure editor tool
PostPosted: Mon Aug 03, 2015 4:18 am 
Very cool ...



... but poor caged mite :(


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Fri Mar 20, 2009 4:40 am
Posts: 9265
Location: Netherlands
 Post subject: Re: Adventure editor tool
PostPosted: Mon Aug 03, 2015 5:01 pm 
@Nildik

For now a very hypothetical question (as I don't know whether I can find the time): upto now I've been absorbing all system agnostic maptool-tools into the bag of tricks. If you follow the link you will see that there is quite a list of stuff from others that I (with permission) absorbed (and usually also improved) in the BoT. Since what you've made is both system agnostic and quite useful, im considering to do the same thing, but obviously only with your permission. Hence the (for now hypothetical) question: would you mind if I integrated your tool into the BoT ?

_________________
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  
 
 Offline
Cave Troll
 
Joined: Mon Oct 31, 2011 6:32 pm
Posts: 73
 Post subject: Re: Adventure editor tool
PostPosted: Mon Aug 03, 2015 6:28 pm 
wolph42 wrote:
@Nildik

For now a very hypothetical question (as I don't know whether I can find the time): upto now I've been absorbing all system agnostic maptool-tools into the bag of tricks. If you follow the link you will see that there is quite a list of stuff from others that I (with permission) absorbed (and usually also improved) in the BoT. Since what you've made is both system agnostic and quite useful, im considering to do the same thing, but obviously only with your permission. Hence the (for now hypothetical) question: would you mind if I integrated your tool into the BoT ?

Of course you can. You have my permission.


Top
 Profile  
 
User avatar  Offline
Demigod
 
Joined: Sun Feb 25, 2007 11:53 am
Posts: 3632
Location: MD
 Post subject: Re: Adventure editor tool
PostPosted: Tue Aug 04, 2015 2:07 am 
Is this using the updated "Fancy Frames" drop-in (also from Nildik!) from this thread?

Looks like the frames lib changed its name.

_________________
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
Cave Troll
 
Joined: Mon Oct 31, 2011 6:32 pm
Posts: 73
 Post subject: Re: Adventure editor tool
PostPosted: Tue Aug 04, 2015 4:40 am 
Full Bleed wrote:
Is this using the updated "Fancy Frames" drop-in (also from Nildik!) from this thread?

Yes, use this drop-in to make the frames "pretty"
Full Bleed wrote:
Looks like the frames lib changed its name.

Maybe the macros are updated, but I think that the name still the same... lib:frames both... I think...


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Fri Mar 20, 2009 4:40 am
Posts: 9265
Location: Netherlands
 Post subject: Re: Adventure editor tool
PostPosted: Tue Aug 04, 2015 5:26 am 
Nildik wrote:
wolph42 wrote:
@Nildik

For now a very hypothetical question (as I don't know whether I can find the time): upto now I've been absorbing all system agnostic maptool-tools into the bag of tricks. If you follow the link you will see that there is quite a list of stuff from others that I (with permission) absorbed (and usually also improved) in the BoT. Since what you've made is both system agnostic and quite useful, im considering to do the same thing, but obviously only with your permission. Hence the (for now hypothetical) question: would you mind if I integrated your tool into the BoT ?

Of course you can. You have my permission.

Thanks.

Are you still developing this,or is this finished?

_________________
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: 3632
Location: MD
 Post subject: Re: Adventure editor tool
PostPosted: Tue Aug 04, 2015 6:18 am 
Nildik wrote:
Maybe the macros are updated, but I think that the name still the same... lib:frames both... I think...

It looks like there are a number of changes.

The version I have (probably Wolph's upgrade of your original) is named "lib:fancyframes" with the following macros on it:

frameClose
frameOpen
Example
frameOverview
onCampaignLoad


The new one is named "lib:frames" with the following macros on it:

frameClose
frameClose2
frameClose3
frameOpen
frameOpen2
frameOpen3
onCampaignLoad
examples frames
examples frames2
examples frames 3
examples frames sci-fi


Both onCampaignLoads define two of the same functions (but on different libs): frameOpen() and frameClose(). And the code has changed a bit in both versions.

Also, the table they both use is also called "frames" with the original having 139 entries (ending with the sci-fi option) and the new one having 169.

Basically, I'm wondering if there will be compatibility problems when trying to use both. I doubt that I'm the only person using the original.

_________________
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: 9265
Location: Netherlands
 Post subject: Re: Adventure editor tool
PostPosted: Wed Aug 05, 2015 8:18 am 
Full Bleed wrote:
Nildik wrote:
Maybe the macros are updated, but I think that the name still the same... lib:frames both... I think...

It looks like there are a number of changes.

The version I have (probably Wolph's upgrade of your original) is named "lib:fancyframes" with the following macros on it:


yes I did the update. Rewrote a few bits to make it faster and the code a bit leaner. I haven't checked yet but @Nildik: did you use the original frames code or my updates?:
viewtopic.php?p=234324#p234324

_________________
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
Deity
 
Joined: Fri Mar 20, 2009 4:40 am
Posts: 9265
Location: Netherlands
 Post subject: Re: Adventure editor tool
PostPosted: Wed Aug 05, 2015 11:44 am 
for those interested, I've had a rough look at the code. translated most of the code from spanish to english (for better reading) and changed a few small things. Ill probly do more, but for now it works again (as it didn't right after the translation).
Here the link: https://www.dropbox.com/s/rgvy55nogfgcl ... cmpgn?dl=0

changes so far:
- translation and a few typos/grammar thingies
- changed the layout of the code a bit
- added a bit of comment
- removed the zoom buttons for web-images (as apparently they don't work for those)
- replaced the frame open/close code with the updates i did earlier (which also was not much, but easier to read and slightly faster).
- quite a bit of tiny unremarkable tweaks
- in the frames, some types go wrong when using the title option, fixed that for those frames

interesting things: if you're referring to a web image:
- <img src=http://etc.></img> if you leave spaces around the = it does not work (go figure).
- the 'size' option (that is the "-50" at the end of any asset id to indicate its height) does not work for external web images
- the code is really nifty !! kuddos to Nildik

_________________
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  [ 26 posts ]  Go to page 1, 2  Next

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 3 users online :: 1 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: Bing [Bot] and 2 guests





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

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman