Plo's Inventory Manager

These are tools and utilities that make it easier to run games. This includes Lib: macro tokens dropped into MapTool to manage the game, a conversion file for CharacterTool to allow use in MapTool, or just about anything else you can think of -- except graphics with macros and anything specific to a particular campaign framework. Those are already covered by the Tilesets subforum and the Links and External Resources forum.

Moderators: dorpond, trevor, Azhrei, giliath, Gamerdude, jay, Mr.Ice

seanrpg
Kobold
Posts: 21
Joined: Mon Sep 27, 2010 2:41 pm
Location: Tidewater, VA
Contact:

Re: Plo's Inventory Manager

Post by seanrpg »

plothos wrote:
JML wrote:Great job plothos. I might borrow it for a framework I'm working on.

I've got a few questions regarding my own needs, but they may be of some interest for others :
  • 1) is it possible to have containers inside containers ?

    2) is it possible for a PC to drop a container on a temporary basis, aka a "drop" state ? (dropping a backpack to get rid of some encumbrance during a fight for instance)

    3) and the dropping idea leads me to wonder if it would be possible to exchange containers between tokens ? Which would allow to lend to others or even steal or being stolen :twisted:
1. You can put a container inside a container, but the way it's set up right now if you put stuff inside the container in a container they won't be sorted quite right.

2. There's no drop state per se, but you can click on the item and choose "ignore weight" or whatever I called it, and the weight of the item will be ignored in the total - the weight entry will be surrounded by [] to indicate this.
I don't see this option. Where is it supposed to be?
3. Another option that should come up when you click an item is "give" and when you choose this it will send a link to another player that will let them accept it, up which you will be returned a link that if clicked will remove the item from your inventory. This works for anything in there, including containers, but it won't transfer the contents of the containers (as of yet).
This fails on my campaign with "Undefined function: get.targets"

I am using the latest maptools, the Lindsay campaign file, and I put the inventory version 1.1 token in.

Any help appreciated, we use your tools for our campaign and have fun with them.

*** UPDATE ***

OK, clicking the weight turns it on and off, very nice.

I still am not able to move items due to the missin get.targets function. Researching that but any help appreciated.

Idea:

It would be nice if when you clicked on a container's weight to turn it off, it also turned off the weight for all items in that container.

For example, items in my backpack that I drop or leave, or items I have stored in some place.

User avatar
Guy Dude
Giant
Posts: 124
Joined: Thu Apr 09, 2009 4:10 pm

Re: Plo's Inventory Manager

Post by Guy Dude »

This is a pretty handy addon, but I ended up running into a few bugs when I added it to a framework because it uses a common word like "Class" as a variable.

User avatar
Guy Dude
Giant
Posts: 124
Joined: Thu Apr 09, 2009 4:10 pm

Re: Plo's Inventory Manager

Post by Guy Dude »

When you think about it, could probably have Shops in this just by adding a Cost column and buy or sell ability

User avatar
booga
Dragon
Posts: 365
Joined: Fri Dec 14, 2007 9:00 am

Re: Plo's Inventory Manager

Post by booga »

Hi,

this is a great too Plo, thanks for sharing. I adapted it for my Cyb. Campaign and it worked wonders.

Now I'm working on a hawkmoon/RQII Framework centered around a character sheet, so I'd like to link the inventory from it. I however hit a snafu you may help with.

The inventory is called as follow from the Charsheet code:

Code: Select all

<td align='center' bgcolor="black"><b><span color='white'>[R: macroLink("Inventaire","Invent Main Starter@Lib:inventory"), "all", "", activeId)]</span></b></td>
Where activeId is the id of the current token (whether it's selected or impersonated. The code determining ActiveId is here:

Code: Select all

[h, if(hasImpersonated()): activeId = getImpersonated(); activeId = getSelected()]
[h, if(listCount(activeId)!=1): abort(0)]
[h: gm = isGM()]
[h: owned = isOwner(getPlayerName(), activeId)]
[h, if(gm || owned): ""; assert(0, "You have no right to act with this token.")]
If I impersonate a token and open the CS, then I can click on the "Inventaire" link and it opens. However if I only select a token and open the CS, hitting the Inventaire link returns this error:
Error executing getProperty: there is no impersonated token.
I tried switching the call to the Inventory macro using "impersonated,selected", instead of ActiveId but get the same problem. I also tried using only "selected" or "impersonated". Same deal.

I'll try an attach the FW for testing. Just click on any token and click on the yellow macro "ouvrir fiche". the link to "inventaire" is in the middle of the CS. the Lib:gm is right now on the same map if you want to check out the macros, however the inventory lib is on the second map.

Thanks for your help !
Attachments
Hawkmoon New 12 10 10.cmpgn
(2.32 MiB) Downloaded 103 times

User avatar
Guy Dude
Giant
Posts: 124
Joined: Thu Apr 09, 2009 4:10 pm

Re: Plo's Inventory Manager

Post by Guy Dude »

How do you edit items in the database?

User avatar
Irrlicht
Dragon
Posts: 426
Joined: Mon Feb 09, 2009 10:53 am

Re: Plo's Inventory Manager

Post by Irrlicht »

Really great tool.
I have only three issues, at present, two of which have already been mentioned by others; despite tinkering a bit with the code, I'm not good enough to handle these things as I'd like to:
1) Creating new item categories (I wanted to add Staves, that would work similarly to Wands but is a separate category).
2) Remove 4E database and have an empty database (that maybe I'll fill with Pathfinder things, or maybe not).
3) Translation: I'm trying to translate all the terms displayed when running the tool, but there are some cases in which I'm unable to tell when a word is a property/key/wathever or simply a string of text. Is there any help or advice for this?
"There are many ways my Son, to find where the souls of Demons remain...
But it takes only one second of despair and of doubt until, at last, your Soul they will gain..."

User avatar
booga
Dragon
Posts: 365
Joined: Fri Dec 14, 2007 9:00 am

Re: Plo's Inventory Manager

Post by booga »

Irrlicht wrote:Really great tool.
I have only three issues, at present, two of which have already been mentioned by others; despite tinkering a bit with the code, I'm not good enough to handle these things as I'd like to:
1) Creating new item categories (I wanted to add Staves, that would work similarly to Wands but is a separate category).
2) Remove 4E database and have an empty database (that maybe I'll fill with Pathfinder things, or maybe not).
3) Translation: I'm trying to translate all the terms displayed when running the tool, but there are some cases in which I'm unable to tell when a word is a property/key/wathever or simply a string of text. Is there any help or advice for this?
I'm not Plo,

but I'll try answering a few things:

1/ Each Category is handled by a group of macros on the inventory lib, so adding new ones is a fairly major change. I managed to remove some of them without too much work, but adding is trickier IMO.
2/ To empty items from the database, I see two ways:
-- using the drop-in resource "token manager" you can find somewhere in the users creations subforum. an run it on the lib:inventory. You'll see that each item category has a property associated to it : GoodsDetails, WeaponDetails, etc... These JSON properties contain the items and their details for each Category. Token Manager allows you to delete items but it's pretty slow (you have to do it one by one). You'll also need to edit another property with Token Manager : ItemCateroryOptions. This JSON property has the lists of all the items in each category. So if you delete some items in WeaponsDetails, you'll have to delete the corresponding items in ItemCategoryOptions, or they will still show in the list of available items when adding items in the inventory window.
-- another way to do this: you can create a new property list in the Campaign properties (I called mine Lib), then add the following properties to this property list. then open lib:inventory, go to the Config Tab and give it the Lib property type. You'll then be able, to access the content of all those normally hidden properties by going to the Properties tab on lib:inventory. You can then edit them from in Notepad++

GoodsDetails
WeaponsDetails
ArmorDetails
ScrollsDetails
ServicesDetails
SpecialDetails
GoodsDetails
AmmoDetails
ToolsDetails
WandsDetails
ItemCategoryOptions

Adding items to the database is easier: if you look in the lib:inventory macros, there are macros similar to "add good to database" on lib:inventory (see group 99).

3/ Translation : I did make a French Translation and simplification of the Inventory lib token (I need only Goods for my games, as weapons and armors are handled by another subsystem). To translate, I'd recommed to use the Lib:RPedit library token that you kind find in Wolph42's Dark Heresy framework (you can also get the token manager library there by the way) in the Frameworks subforums. It has an Edit Token macro that you an copy to your Campaign panel and run on any token. This macro opens a window with all the text of all the macros on that token on one page, that you copy to Notepad++. This allows to search the reference of one term in all the macros on lib:inventory and see if translating it will affect the rest. Having all the macros on one page is very useful also to do search/replace quickly to translate something more than once. You can then then paste back the changed text into the Token Info frame and it will save the chagnes in each macro. Very Handy !

Here are my reverse-engineering tricks ! I hope that helps.

User avatar
plothos
Great Wyrm
Posts: 1890
Joined: Sat Jun 21, 2008 1:07 am

Re: Plo's Inventory Manager

Post by plothos »

Hey guys. I'm glad you're getting some use out of this. :)

I really can't get into too many details atm as i am snowed under with work and well... snow at present. :) I can tell you though that I am currently focused on a major spell manager recode that is first on my plate when i get time to code in the next couple of weeks. Once that's done i plan to come back to the inventory token and work it over. Your comments and requests will all be reviewed at that time. I promise. :)

As for the particular staff thing there's no easy way to add staffs without going into the code. But I did have a 3.5 version of this token that I thought had staffs working. I could be remembering partial code however. :p it's been too long since i looked at what's under the hood of this hot rod.
Drop-In Utilities:
My Spell Manager for D&D3.5 and PFRPG
My Inventory Manager for D&D and PFRPG, but more generally useable than that.
My Message Manager -- My Top-Down D&D Token Images
and my Custom Initiative & Status/Spell-Effect Tracker (work in progress, but functional).

User avatar
Guy Dude
Giant
Posts: 124
Joined: Thu Apr 09, 2009 4:10 pm

Re: Plo's Inventory Manager

Post by Guy Dude »

plothos wrote:Hey guys. I'm glad you're getting some use out of this. :)
heh definitely

Image Image

i only know enough about modding to get myself in trouble, so no doubt using a ton of image tokens is going to come back and bite me in the end somehow

User avatar
aliasmask
RPTools Team
Posts: 9029
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Plo's Inventory Manager

Post by aliasmask »

Nifty. How did you do the shaded lines? It looks like it uses the background image but covers it with a shaded opacity. Or are those separate images?

User avatar
Guy Dude
Giant
Posts: 124
Joined: Thu Apr 09, 2009 4:10 pm

Re: Plo's Inventory Manager

Post by Guy Dude »

used CSS to set parchment background image for the page and then had a 1px transparent black background image for table rows

User avatar
aliasmask
RPTools Team
Posts: 9029
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Plo's Inventory Manager

Post by aliasmask »

Okay, thanks. I didn't think the background images would stack. I thought it would replace.

User avatar
plothos
Great Wyrm
Posts: 1890
Joined: Sat Jun 21, 2008 1:07 am

Re: Plo's Inventory Manager

Post by plothos »

I did the same thing with the green lightning and fog images (stacking, that is) in the spell manager.
Drop-In Utilities:
My Spell Manager for D&D3.5 and PFRPG
My Inventory Manager for D&D and PFRPG, but more generally useable than that.
My Message Manager -- My Top-Down D&D Token Images
and my Custom Initiative & Status/Spell-Effect Tracker (work in progress, but functional).

User avatar
Irrlicht
Dragon
Posts: 426
Joined: Mon Feb 09, 2009 10:53 am

Re: Plo's Inventory Manager

Post by Irrlicht »

plothos wrote:Hey guys. I'm glad you're getting some use out of this. :)

I really can't get into too many details atm as i am snowed under with work and well... snow at present. :) I can tell you though that I am currently focused on a major spell manager recode that is first on my plate when i get time to code in the next couple of weeks. Once that's done i plan to come back to the inventory token and work it over. Your comments and requests will all be reviewed at that time. I promise. :)

As for the particular staff thing there's no easy way to add staffs without going into the code. But I did have a 3.5 version of this token that I thought had staffs working. I could be remembering partial code however. :p it's been too long since i looked at what's under the hood of this hot rod.
Thanks. The tool is truly awesome, so I'm really looking forward to seeing the new version.
About the translation, if I may advance a request for the new version that will come (a selfish request, sure, but this is the easiest way I can think of to help in a translation): could you (or some other pious soul) add an alternative version of the tool specifically for translation purposes, where all the text that is going to be displayed (and thus needs translation) contains some special characters (say, for example, something like "---Coinpurse---"), so that looking throughout the code for text and changing it would be easier?
Guy Dude wrote:
plothos wrote:Hey guys. I'm glad you're getting some use out of this. :)
heh definitely

-Image-

i only know enough about modding to get myself in trouble, so no doubt using a ton of image tokens is going to come back and bite me in the end somehow
Amazing. I too fear the weigth of it, though.
"There are many ways my Son, to find where the souls of Demons remain...
But it takes only one second of despair and of doubt until, at last, your Soul they will gain..."

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

Re: Plo's Inventory Manager

Post by Azhrei »

Irrlicht wrote:About the translation, if I may advance a request for the new version that will come (a selfish request, sure, but this is the easiest way I can think of to help in a translation): could you (or some other pious soul) add an alternative version of the tool specifically for translation purposes, where all the text that is going to be displayed (and thus needs translation) contains some special characters (say, for example, something like "---Coinpurse---"), so that looking throughout the code for text and changing it would be easier?
Keeping multiple branches in sync would be a major pain IMO. :(

If it were me, I'd find all of the strings that should be translated and move them into a table. Then use Wiki: table() to retrieve them at run time. This would allow a translator to change the table and not the code.

The biggest problem is languages there the order of fields might change due to a change in grammatical structure. I suppose the macro could use Wiki: replace() to change out positional arguments but I think that would be a lot of overhead. Which means a translation will probably never work as nicely as it could for all languages.

Post Reply

Return to “Drop-In Macro Resources”