PDA

View Full Version : [Extension]: Enhanced Items for 3.5/PFRPG



sciencephile
February 15th, 2014, 21:43
I needed the ability to store "GM Only" notes on an item and added it to the idea informer list but due to it being new, I doubt whether this idea will float to the top anytime soon.

So I created an extension to perform this function.

Why is this useful?

Sometimes you want to give the players the ability to identify a magic item, yet have some information about its background (or other properties) hidden and viewable only to the GM.

Examples for use:


Keeping a history of a magical weapon that you don't want the player to immediately know upon an Identify.
Storing secondary magic properties not identified by a simple Identify
Perhaps there is a curse to go along with the magical ability. Perhaps it is a +2 longsword, but has the curse that it reduces Will save by 2 (and only the +2 longsword should be gleaned from an identify).


Hopefully, this will become part of the CoreRPG (or at least selfishily the 3.5/PFRPG ruleset) but until then I figured I wouldn't keep this for myself.

Enjoy,

Danny

JohnD
February 15th, 2014, 22:55
Nice... useful for, say, a Wand of Wonder as well!

Nickademus
February 15th, 2014, 23:27
Perhaps there is a curse to go along with the magical ability...

You have just earned the enmity of all my players. XD

I was actually desiring something like this recently. Will try this out.

Bidmaron
February 16th, 2014, 13:44
I nominate this for CoreRPG thread link, please.

Trenloe
February 16th, 2014, 13:59
I nominate this for CoreRPG thread link, please.
I've already added this to the 3.5e/Pathfinder extension lists as the title and the extension name itself says "3.5E/PFRPG".

https://www.fantasygrounds.com/forums/showthread.php?15925-List-of-Extensions

A quick test using this in CoreRPG shows that is adds some extra unlabelled fields (I assume the 3.5E/PFRPG Aura, Caster Level and Craft Prereq fields) so this is not quite ready for CoreRPG general use as it is based on 3.5E code.

Bidmaron
February 16th, 2014, 14:01
Thanks, Trenloe.

sciencephile
February 16th, 2014, 15:52
I've already added this to the 3.5e/Pathfinder extension lists as the title and the extension name itself says "3.5E/PFRPG".

https://www.fantasygrounds.com/forums/showthread.php?15925-List-of-Extensions

A quick test using this in CoreRPG shows that is adds some extra unlabelled fields (I assume the 3.5E/PFRPG Aura, Caster Level and Craft Prereq fields) so this is not quite ready for CoreRPG general use as it is based on 3.5E code.

Thank you.

Yes, I based the code off of the 3.5 version of the record_item.xml (which PFRPG uses too). I tried to base it off the Core's version but it didn't suit my needs for Pathfinder/3.5. I therefore labelled it as 3.5/Pathfinder to give everyone the indication that it wasn't based on the CoreRPG set.

Trenloe
February 16th, 2014, 16:07
Yes, I based the code off of the 3.5 version of the record_item.xml (which PFRPG uses too). I tried to base it off the Core's version but it didn't suit my needs for Pathfinder/3.5. I therefore labelled it as 3.5/Pathfinder to give everyone the indication that it wasn't based on the CoreRPG set.
I'm not 100% sure exactly what you've done for this extension, but you can use the merge="join" XML tag in your windowclass to just add the GUI field/s that you need, joining your <Windowclass> XML with the ruleset defined XML. This will allow the GM Only fields to be added to whichever item_main <windowclass> is active based off the ruleset being used.

Some more info here: https://www.fantasygrounds.com/forums/showthread.php?19530-Ruleset-layering-summary

For example, if the things you added to the item_main windowclass was divider6, gmonly_label and gmonly then the following code would add this to any underlying item_main windowclass:

<windowclass name="item_main" merge="join">

<sheetdata>
<line_column name="divider6" />

<label_column name="gmonly_label">
<static textres="item_label_gmonly" />
</label_column>
<string_columnh name="gmonly">
<gmeditonly />
</string_columnh>
</sheetdata>
</windowclass>
Define this in a differently named XML file, perhaps record_item_EnhancedItem.xml, and load it with an <includefile> in your extension.xml - replacing the current <includefile source="campaign/record_item.xml" /> entry.

The only down side to this is that it will create the controls at the end of the sheet - you may be able to anchor the control to a CoreRPG control?

Of course, the next step is seeing what needs to be done to try to make any LUA code changes CoreRPG, and rulesets layered on top of CoreRPG, compatible. If the code if just enabling/disabling controls then you may be able to use the <gmvisibleonly /> tag in the control: https://www.fantasygrounds.com/refdoc/windowcontrol.xcp

sciencephile
February 16th, 2014, 17:20
Thanks for the help. While I used to be a programmer and understand that aspect, the hardest thing to do is understand a system's architecture (especially when you haven't written it). There is a little more involved than just merging the code mentioned. Some level of LUA is involved to make sure the GM Only field goes in and out of edit mode based on the "lock" icon. If someone out there can tell me how to merge LUA files, then I will try again. Otherwise, I will just let sleeping dogs lie.

Honestly, the ability to have "GM Only" information attached to items seems like such a core functionality, it would be baked into the official ruleset once it gains traction. With an extension, you have to enable the extension for each and every module you create to put the information in and you have to enable it for the core campaign file. So in the long run, having this functionality as an extension is a pretty bad idea. Of course, it is better than not having it at all. Given this, I would suggest that everyone vote for this on the idea informer list so it gets high enough on the list to get attention.

https://fg2app.idea.informer.com/proj/?ia=81222

I just needed the functionality ahead of time so I created the 3.5/PFRPG functionality to suit my needs and didn't feel like being selfish and decided to share.

Like I said though, if someone knows how to merge LUA files, I can try to fix it to be more CoreRPG compatible but I think this extension should be a short-term solution until this gets baked into the core ruleset.

biomage
February 18th, 2014, 23:18
Very helpful! Something this simple but useful should be incorporated into the PFRPG ruleset.

sciencephile
February 19th, 2014, 01:40
^^ Then be sure to vote for it on the idea informer page (I put the link in my previous post). :)

Bidmaron
February 28th, 2014, 04:12
EDIT: Disregard. Found it myself.