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

Wing
Kobold
Posts: 12
Joined: Wed Aug 25, 2010 12:45 pm

Re: Plo's Inventory Manager

Post by Wing »

Can I just ask if there's a way to allow player's to see their inventory? I don't if it's something we're doing wrong, this system is great by the way, but is there a way to allow a player to check their own inventory?

I have the ownership of the player's token set to them but when they click on the Inventory macro nothing shows up, however it works fine for me, the GM.

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

Re: Plo's Inventory Manager

Post by plothos »

That's real odd. It's not set up to discriminate between players and GMs, so I'm not sure what's going on with that. Can you send me a campaign file to check out? (along with the build number you're using).
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).

Wing
Kobold
Posts: 12
Joined: Wed Aug 25, 2010 12:45 pm

Re: Plo's Inventory Manager

Post by Wing »

I attached the campaign file and we're using 1.3b70.

EDIT: I found the problem. If the Lib:Inventory token is isn't set to be visible to players, it won't work. Player get an error in the chat box that says something like 'token cannot be executed (or used, I can't remember exactly) because the token is not visible to players' or something along those lines. But the solved now :)

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

Re: Plo's Inventory Manager

Post by plothos »

Wing wrote:I attached the campaign file and we're using 1.3b70.

EDIT: I found the problem. If the Lib:Inventory token is isn't set to be visible to players, it won't work. Player get an error in the chat box that says something like 'token cannot be executed (or used, I can't remember exactly) because the token is not visible to players' or something along those lines. But the solved now :)
So sorry I didn't get to look into this. Dropped the ball and just plain forgot. Glad you got it solved.

Yeah, Libs need to be visible to players for stuff to work properly. That's not specific to this lib, really. :)
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
plothos
Great Wyrm
Posts: 1890
Joined: Sat Jun 21, 2008 1:07 am

Re: Plo's Inventory Manager

Post by plothos »

Conflict Warning:

I have discovered the the Inv system here conflicts with a small part of Veggie's 4E D&D framework. Fortunately, if I found the only problem, it's easy to fix.

The basic problem is the inventory stores its data in a token property called "Items". Thus, any macro that uses a local variable "items" (case won't save you), will over-write this important data. (In retrospect, I should have complicated the label myself, knowing items is a likely local variable name, but I didn't so there. :P)

The fix involves making either Veggie or the inventory manager use a different name. I could recode everything to make this hidden and avoid some potential conflicts, but not all, and it's used in like 90% of my macros. Fortunately, it's used (so far as I can tell) in only one of Veggies. So, we fix that. :)

The offending macro is called "useTargetsSelectionDialog" in the "selection" group on his main Lib token. It sets items once (to an integer) and then runs two nested count(item) loops. That's it. So replace those three appearances of "items" with another label (I used "itemz" and it worked out) and you're set. Inventory works again.

Simplest way to do this is in a text editor with a global replace, but the location is about 1/3 down from the top.

A pain to find, but easy to fix. :)
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).

newtim
Kobold
Posts: 5
Joined: Sat Oct 02, 2010 3:59 am

Re: Plo's Inventory Manager

Post by newtim »

Great Addon. Some ideas for improvements.
1. Party treasure inventory.
2. A way to add different qualities to items ie.(availability, cost, sell price, balistic armor rating, impact armor rating....)
3 Remove unwanted qualities.


Thank you for your time and effort.

Cuthulas
Kobold
Posts: 5
Joined: Thu Sep 23, 2010 5:49 pm

Re: Plo's Inventory Manager

Post by Cuthulas »

Love your work Plothos. I introduced this to my players this past weekend and they really enjoyed it. However, one of my players came across one snag. Whenever we try to "Open Inventory" on his token he gets:

Illegal argument type java.lang.String, expecting java.math.BigDecimal

He thinks he left a value blank in either a quantity or weight section ... just his guess. Any quick fix to rectify it? I'm not certain after digging around, how to go about putting a much needed "0" in the token's properties. That may not be the problem altogether.

Thanks!

MHolman
Cave Troll
Posts: 26
Joined: Tue Sep 28, 2010 5:46 pm

Re: Plo's Inventory Manager

Post by MHolman »

I am very excited to be using this Drop-In. It looks like it could be a lot of fun.

When I click on the black "Open Inventory" button from the Lib token, it shows the whole parties inventory.

When I copy the token to my player, one of two things happens:
"Apply to Selected Token" is clicked: Shows whole party inventory.
"Apply to Selected Token" is NOT checked: Shows only MY inventory..but then says "error executing getProperty: there is no impersonated token".

What is the solution here? I'm a total nub, and I apologize if this is overwhelmingly simple.

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

Re: Plo's Inventory Manager

Post by plothos »

newtim wrote:Great Addon. Some ideas for improvements.
1. Party treasure inventory.
2. A way to add different qualities to items ie.(availability, cost, sell price, balistic armor rating, impact armor rating....)
3 Remove unwanted qualities.


Thank you for your time and effort.
Thanks for the feedback.

1. A separate page could be coded, though this can kinda be done already. The coinpurse allows for a party funds section already, and if you really wanted to you could add to one person's inventory a container called "Party Stuff" or something and dump stuff in there. :)
It would only be accessible to that one person, though. Alternatively, you could drop a new token to hold the party stuff and give all the players ownership. Not elegant, but workable.

2 & 3. Yes, on my to-do list. I've gotta get around to finishing my spell manager update first, but eventually. :)
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
plothos
Great Wyrm
Posts: 1890
Joined: Sat Jun 21, 2008 1:07 am

Re: Plo's Inventory Manager

Post by plothos »

Cuthulas wrote:Love your work Plothos. I introduced this to my players this past weekend and they really enjoyed it. However, one of my players came across one snag. Whenever we try to "Open Inventory" on his token he gets:

Illegal argument type java.lang.String, expecting java.math.BigDecimal

He thinks he left a value blank in either a quantity or weight section ... just his guess. Any quick fix to rectify it? I'm not certain after digging around, how to go about putting a much needed "0" in the token's properties. That may not be the problem altogether.

Thanks!
Yeah, I should probably foolproof some of the input processes to avoid this sort of problem. Simplest fix would be to find the Items property on their token and set it to []. This empty json array is what the inventory manager looks for at first. It'll blank his inventory, but it'll function and he can start over.

The uglier process would be to copy and paste the contents to a text editor and search through it to find the missing value. Blah, not fun, unless he's only got a couple items entered.
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
plothos
Great Wyrm
Posts: 1890
Joined: Sat Jun 21, 2008 1:07 am

Re: Plo's Inventory Manager

Post by plothos »

MHolman wrote:I am very excited to be using this Drop-In. It looks like it could be a lot of fun.

When I click on the black "Open Inventory" button from the Lib token, it shows the whole parties inventory.

When I copy the token to my player, one of two things happens:
"Apply to Selected Token" is clicked: Shows whole party inventory.
"Apply to Selected Token" is NOT checked: Shows only MY inventory..but then says "error executing getProperty: there is no impersonated token".

What is the solution here? I'm a total nub, and I apologize if this is overwhelmingly simple.
Not 100% clear on the problem here, but the menu should work for individual tokens. If you run it on the lib, it'll treat the lib like a token and there will just be the one inventory for it, as though it were a player. You want to run the open macro against a specific token to open that token's inventory (whose it is should be displayed in the title at the top). To do this, you can do two things. Copy the open macro to the campaign or global panel and make sure apply to selected is checked. (From these panels it will not work otherwise). But you must also make sure the right token is selected, so that the macro is run against that token, not the lib, for example. Alternatively, you can copy the open macro to each token's selection panel and run it from there.

If that doesn't solve your problem, something more confusing must be wrong, and I'll need more info.
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).

MHolman
Cave Troll
Posts: 26
Joined: Tue Sep 28, 2010 5:46 pm

Re: Plo's Inventory Manager

Post by MHolman »

I tried it again this afternoon and I'm still getting the same error:
"Error executing getProperty: there is no impersonated token."

Here are the steps I took:
1) I dragged/copied the black "Open Inventory" button onto my character token.
2) Selected my character token and clicked the black "Open Inventory" button. Inventory screen opened saying "MHolman's Inventory".
3) I clicked "Add Item"-->"Weapons"---> "Bastard Sword" (and many other gear options".
4) Received error "Error executing getProperty: there is no impersonated token."
5) Repeated the process from the Campaign Macro's tab with my character selected. Same result.

Details:
I am running Veg's newest framekwork (V 2.23) and MT b75
"Apply to Selected Token" is checked.

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

Re: Plo's Inventory Manager

Post by plothos »

Could you post the campaign file here? I'll take a look and see if I can find the source of the problem.
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).

Cuthulas
Kobold
Posts: 5
Joined: Thu Sep 23, 2010 5:49 pm

Re: Plo's Inventory Manager

Post by Cuthulas »

Thanks Plothos. That was actually a very easy fix once I knew where to look.

For DM's who have tokens gettng the: "Illegal argument type java.lang.String, expecting java.math.BigDecimal" message when trying to use the Open Inventory Button, you probably had a player leave a blank space instead of placing a "0" for the weight, quantity, or description.

If so, just do what I did:

1. Save the player's token to a junk folder on the desktop.

2. Rename the token to a "zip" instead of "rptok". (Like another post said, they are just zip files in disguise). You'll need to change the junk folder options to do this. See http://www.mediacollege.com/microsoft/w ... hange.html to do so.

3. Once the file extension is changed to a zip, open it up ... take out the content.xml file and edit it with an XML edito ... like this one from Microsoft: http://www.microsoft.com/downloads/en/d ... laylang=en

4. Do a "find" for the "Items" property and set the value to []. That clears it completely. Or look for the offending blank spot and fill it with the appropriate value. It may take some combing, but by comparision it should be evident.

5. Save the edit, put the content.xml back into to zip. Rename the zip back to rptok. And drag the fixed token back into your campaign.

Anyhow ... hope that saves a bummed DM some time.

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

Re: Plo's Inventory Manager

Post by plothos »

An easier method, if you are going to just blank it by setting it to [], would be to give the token a defined property called Items, then you can access it from the token edit panel.
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).

Post Reply

Return to “Drop-In Macro Resources”