Universal Inventory System (API)
Moderators: dorpond, trevor, Azhrei, giliath, Gamerdude, jay, Mr.Ice
Re: Universal Inventory System (API)
It might be cumbersome at this point, but if the macros use Wiki: getProperty() and Wiki: setProperty() then adding a given property to the property type wouldn't be necessary...
-
- Kobold
- Posts: 8
- Joined: Sun Feb 14, 2010 2:23 pm
Re: Universal Inventory System (API)
First off, I would like to say that this is such a great tool. Thanks for putting the time and effort into making it. Unfortunately, I am having a problem getting out of the door with this. I am confused as to what name I am supposed to change in "Step 2" and what am I supposed to change it to?
Also, I went through the whole thing without changing the name, and when I try to call up the inventory, i get the following error:
Also, I went through the whole thing without changing the name, and when I try to call up the inventory, i get the following error:
Note: I am using 3.5 framework in case it matters.java.lang.NumberFormatException: For input string: "ItemTypes" error executing expression macro.return = json.get(eval(InventoryLocation), "ItemTypes").
Re: Universal Inventory System (API)
Hey! I'm a fellow newb, but I think I just figured this out, and I'm happy that I might actually be able to be helpful to someone else here for the first time.Rockinorange wrote:First off, I would like to say that this is such a great tool. Thanks for putting the time and effort into making it. Unfortunately, I am having a problem getting out of the door with this. I am confused as to what name I am supposed to change in "Step 2" and what am I supposed to change it to?
Anywhere the downloaded macros contain the text
Code: Select all
inventory.location1()
Code: Select all
[macro("Setup Inventory@Lib:UniversalInventorySystem"): inventory.location1()]
Code: Select all
[macro("Setup Inventory@Lib:UniversalInventorySystem"): "Equipment"]
This unfortunately has to be done, not just with the Call Inventory Setup macro, but also with all the Z: Calling Macros that you copy later in the setup process. Alternatively, you could rename things elsewhere. You can either just name the Token Property that keeps track of items in your campaign "Inventory", or you can edit the location1 macro button on the library token, and change its code from
Code: Select all
[H: macro.return = "Inventory"]
Code: Select all
[H: macro.return = "Equipment"]
"Fairy tales do not tell children the dragons exist. Children already know that dragons exist. Fairy tales tell children the dragons can be killed."
- G. K. Chesterton
Wonderful HTML/CSS reference * Color Manager * Token Manager 2.0
- G. K. Chesterton
Wonderful HTML/CSS reference * Color Manager * Token Manager 2.0
-
- Kobold
- Posts: 5
- Joined: Mon May 10, 2010 12:47 am
Re: Universal Inventory System (API)
This looks interesting, and definitely useful, but I can't seem to get my foot in the door. I'm assuming that I access it by launching MT and selecting File > Open Campaign. When I try this, I get the following error:
There's something else that's unrelated, but I have no idea where to post it. It appears that the gallery section of the rptools.net site is down. I want to take a look at Cweord's tokens, but just get a database error when I click the link in his signature.
I get the same thing if I try to do anything with the token file.Could not load campaign.
java.util.zip.ZipException: error in opening zip file
There's something else that's unrelated, but I have no idea where to post it. It appears that the gallery section of the rptools.net site is down. I want to take a look at Cweord's tokens, but just get a database error when I click the link in his signature.
Re: Universal Inventory System (API)
This is the preferred approach. It allows all locations in the code to be changed at once and was requested to work this way so that the macro was more flexible in terms of which property was used to hold the information.Raoden wrote:[...] or you can edit the location1 macro button on the library token, and change its code fromtoCode: Select all
[H: macro.return = "Inventory"]
Code: Select all
[H: macro.return = "Equipment"]
I think this is mentioned in the OP, IIRC.
@LonePaladin: Given the error message I would suggest that you verify that the download worked properly. As you can probably guess by that message, the ".cmpgn" (and ".rptok") file is really a ".zip" file. Try opening the file with an UNZIP utility and see if the contents can be viewed. If they can't, then your download was probably messed up somehow and you should try again.
I just tried downloading both files from RapidShare and they unzip fine for me.
-
- Kobold
- Posts: 5
- Joined: Mon May 10, 2010 12:47 am
Re: Universal Inventory System (API)
I've tried this. The files won't respond to opening in WinZip or WinRAR, and I've probably downloaded them from the links in the OP about a dozen times.Azhrei wrote:@LonePaladin: Given the error message I would suggest that you verify that the download worked properly. As you can probably guess by that message, the ".cmpgn" (and ".rptok") file is really a ".zip" file. Try opening the file with an UNZIP utility and see if the contents can be viewed. If they can't, then your download was probably messed up somehow and you should try again.
I just tried downloading both files from RapidShare and they unzip fine for me.
Since you got copies of the files that work the way they should, could you try sending me those copies? For some reason, the ones I'm pulling from the links are consistently getting messed up.
Re: Universal Inventory System (API)
I'm attaching them directly here. Let me know if it works. If it does, then it's likely some combination of issues between your browser and the RapidShare service...
- Attachments
-
- UniversalInventoryV1_1.cmpgn
- (117.96 KiB) Downloaded 240 times
-
- UniversalInventory1_1.rptok
- (31.94 KiB) Downloaded 276 times
-
- Kobold
- Posts: 5
- Joined: Mon May 10, 2010 12:47 am
Re: Universal Inventory System (API)
That seemed to do the trick. Thanks a bunch!
Now to play around with it and figure out how to use it for my next game...
Now to play around with it and figure out how to use it for my next game...
- Full Bleed
- Demigod
- Posts: 4736
- Joined: Sun Feb 25, 2007 11:53 am
- Location: FL
Re: Universal Inventory System (API)
So... has anyone done a Pathfinder setup?jsharen wrote:Has anyone created a token for pathfinder/3.5? Would be great to get an example of what that would look like.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."
- quikdagger
- Giant
- Posts: 128
- Joined: Tue Jul 27, 2010 10:15 am
- Location: Indianapolis, IN
- Contact:
Re: Universal Inventory System (API)
First just let me say, I love this resource
Now onto my problem
Works great but for some reason all-of-a-sudden I keep getting the following error anytime I attempt to add items to a tokens inventory
Error executing getProperty: there is no impersonated token.
now i have tried to impersonate token but it comes up with same error...
Now onto my problem
Works great but for some reason all-of-a-sudden I keep getting the following error anytime I attempt to add items to a tokens inventory
Error executing getProperty: there is no impersonated token.
now i have tried to impersonate token but it comes up with same error...
RPGA#: 5223824963
Recruiting: World's Largest Dungeon
Camapign Session Summary Page
In Development: World of Deiradh
SkypeID:quikdagger
LFR Character:Malcrere Krylon (Human Pursuing Avenger 1)
Recruiting: World's Largest Dungeon
Camapign Session Summary Page
In Development: World of Deiradh
SkypeID:quikdagger
LFR Character:Malcrere Krylon (Human Pursuing Avenger 1)
Re: Universal Inventory System (API)
Check the macro checkbox settings. Maybe apply to selected tokens is not checked?
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
- quikdagger
- Giant
- Posts: 128
- Joined: Tue Jul 27, 2010 10:15 am
- Location: Indianapolis, IN
- Contact:
Re: Universal Inventory System (API)
worked thanksaliasmask wrote:Check the macro checkbox settings. Maybe apply to selected tokens is not checked?
RPGA#: 5223824963
Recruiting: World's Largest Dungeon
Camapign Session Summary Page
In Development: World of Deiradh
SkypeID:quikdagger
LFR Character:Malcrere Krylon (Human Pursuing Avenger 1)
Recruiting: World's Largest Dungeon
Camapign Session Summary Page
In Development: World of Deiradh
SkypeID:quikdagger
LFR Character:Malcrere Krylon (Human Pursuing Avenger 1)
Re: Universal Inventory System (API)
A while has passed since this library was originally created. Since then many new features have come out and we have new insight into ways to optimize macros.
I'm reworking this library's data structure. Converting it from using giant nested jsons to use hidden properties holding individual jsons (or at least much smaller ones). It works similar to rumble's d&d v5 equipment data structures. I'm attempting to make it backward compatible, and use all the same function names to get the same data. Behind the scenes it will just use alot more variables.
Here are some average times (ms) the various functions take to perform in the new version versus the old.
Most of the functions operate 10 times faster in with the new structures. I'll post it when I finish.
I'm reworking this library's data structure. Converting it from using giant nested jsons to use hidden properties holding individual jsons (or at least much smaller ones). It works similar to rumble's d&d v5 equipment data structures. I'm attempting to make it backward compatible, and use all the same function names to get the same data. Behind the scenes it will just use alot more variables.
Here are some average times (ms) the various functions take to perform in the new version versus the old.
Code: Select all
Function New Old
Get Item Types 3.3 23.9
Get Properties of Type 3.3 25.2
Get IDs of Type 4.2 N/A
Get Item 3.2 119.4
Get Items of Type 75.1 51.2
Get Items of Type Length 4.4 57.1
Get Items Length 5.1 N/A
Get List of Items For Type 4.5 260.4
Re: Universal Inventory System (API)
Nice! My first pass at my Earthdawn Framework ran into this exact problem, but I've been reading up on UDFs and storing lists and arrays in hidden properties instead of nested JSONs in defined properties. Definitely seems the way to go, and it's good to see you getting hard numbers.
Looking forward to seeing the new API.
Looking forward to seeing the new API.
Re: Universal Inventory System (API)
I pretty much got my new property based version of this working. Theres a couple clunky things that I should fix before public consumption.
I'm actually using the new version of this in my new aces & eights framework. I used it for alot of things not just inventory. For instance I'm trackings skills and such as well. I just gave them a different location name so they wouldn't interfere with each other.
Works pretty good. I'm happy with the higher speeds I'm getting. My character sheets are much faster than my other framework using the old version of this library.
I'm actually using the new version of this in my new aces & eights framework. I used it for alot of things not just inventory. For instance I'm trackings skills and such as well. I just gave them a different location name so they wouldn't interfere with each other.
Works pretty good. I'm happy with the higher speeds I'm getting. My character sheets are much faster than my other framework using the old version of this library.