-
June 11th, 2026, 04:52 #1Devotee
- Join Date
- Dec 2019
- Posts
- 9
Building module with tables for random item - can't link to SFRPG2 items - how to?
Hello.
Not sure it is the right thread. I got hit by inspiration and now I have created a few Tables with items for my SFRPG2 players to get. I did the first table by hand. Exported the campaign db.xml, use the template to create my own module. By following this path, the item that I add in the XML will not link back to actual SFRPG2 items, and my players end up having to replace my now placeholder items for the SFRPG2 actual item.
This is quite inconvenient. Is there a way for XML populated tables to contain items that will not just be placeholders?
This is the first time I build a module and was hoping to save time... Grrr
I do have other projects, but this is my first one and I can't get the result I need.
Any feedback is welcome.
-
June 11th, 2026, 08:14 #2
I'm not sure exactly what you've done here. You say you created a table and then exported it and then used that as a template? What does that mean? To create a module that players can use create your table inside a new campaign and then export it as a player module. Your players will then be able to open that module when they join your game. Note that whatever you link to that table must also be shared with your players - so if, for example, you link things from a module that isn't available to your players they won't be able to access that item.
If there is something that you would like to see in Fantasy Grounds that isn't currently part of the software or if there is something you think would improve a ruleset then add your idea here https://www.fantasygrounds.com/featu...rerequests.php
-
June 11th, 2026, 12:48 #3FG Wiki: How to Compile the FG Logs
Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
June 11th, 2026, 15:17 #4Devotee
- Join Date
- Dec 2019
- Posts
- 9
While trying to answer you and provide evidence, I stumbled upon my answer.
My tables that I generated in a module were not containing "links" to actual SF2 objects from the Player Core.
These links are provide in the <resultlink> block attached the the line item of the table.
So for a medpatch - commercial, the link is "item.id-00058@PZOSMWPZO22001FG"
Now I need to list of all SF2 objects from the Player Core (PZOSMWPZO22001FG) and their individual Item ID.
Medpatch - commercial = item.id-00058
Where can I find this?
Here's the working table code. I want to add items, but I'm missing the "links" to SF2 Player Core. Can you guide me on where to get them?
Code:<tables> <category name="LootBox Example Tables"> <id-table_example_bronze> <name type="string">Bronze Loot</name> <resultscols type="number">1</resultscols> <labelcol1 type="string">Item</labelcol1> <output type="string">parcel</output> <tablerows> <id-00001> <fromrange type="number">1</fromrange> <torange type="number">100</torange> <results> <id-00001> <result type="string">Medpatch - commercial</result> <resultlink type="windowreference"> <class>item</class> <recordname>item.id-00058@PZOSMWPZO22001FG</recordname> </resultlink> </id-00001> </results> </id-00001> </tablerows> </id-table_example_bronze> </category> </tables>
-
Yesterday, 19:53 #5Devotee
- Join Date
- Dec 2019
- Posts
- 9
Hello,
I did posted code examples and actual challenges I'm trying to find around. It told me the moderators would need to look at it before releasing my response.
Can you provide me with an update? I would love to roll out my loot box system to my players this weekend
Cheers!
-
Yesterday, 20:42 #6
Sorry, I missed that a post required moderation, I've approved it. Probably the easiest way to get a database reference is to use the /debug on chat command to show the debug window in the top left of the FG desktop, then hover over the name of the item/s you're interested in.
See the image below - 1) Hovering over the name in the item list; 2) The DB reference - it'll include the .name (as that's the DB field of the name control), just remove that to give the base item DB path - in this screenshot item.id-00082.name@PZOSMPZO22001FG -> item.id-00082@PZOSMPZO22001FG
FG Wiki: How to Compile the FG Logs
Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
Yesterday, 22:33 #7Devotee
- Join Date
- Dec 2019
- Posts
- 9
Thank you!
Now I have a path forward.
Is there a way to get the full list instead of building it manually? If not, I'll work around it
Thanks again!
-
Today, 00:17 #8FG Wiki: How to Compile the FG Logs
Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
Today, 12:47 #9
Would it not be easier just to build the table inside of Fantasy Grounds and you can then just drag the links into the table? I could be missing something as to why you need to do it in code.
If there is something that you would like to see in Fantasy Grounds that isn't currently part of the software or if there is something you think would improve a ruleset then add your idea here https://www.fantasygrounds.com/featu...rerequests.php
-
Today, 13:23 #10Devotee
- Join Date
- Dec 2019
- Posts
- 9
I’m creating 144 loot boxes with randomized objects.
This is a lot of tables aligned with box theme and quality.
And I created tons of custom items too.
The table will generate the loot in a parcel that can be dragged into the players inventory.
As each item is a reference, I need the actual item reference from SF2 to allow everything to work.
Why code instead of manual built?
I wrote myself a python script to generate my loot randomness and thematic tables.
And I wanted to learn how to build FGU modules, which needed only a few tweaks to bring my python output to FGU Modules compliant XML.
I did lots of reverse engineering on this and now all is working.
I will be able to update and change my loot system, but will always have to provide manually the object reference into the code each time I add objects, or if the rule set DB updates, or when a new rule book with items comes out. I will have to live with that.
Cheers and thanks for your help!
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)

Reply With Quote



Bookmarks