5E Product Walkthrough Playlist
Page 1 of 2 12 Last
  1. #1

    coding for morons

    im a cnc programmer so this is not above my understanding. but where to start im trying to do something that seems simple when said but probably not in actuality with the way everything seems interlaced. I have notepad++ but cant seem to understand anything like i should be able to. Where do i start when trying to modify an existing extension? Like I cant quite figure out step by step do this then this then this ect....

  2. #2
    I'd advise to check out the following:

    - https://www.youtube.com/watch?v=54PS...qc_9w1TWQfTPUA
    - https://fantasygroundsunity.atlassia...eveloper+Guide

    You can also look at all the included rulesets such as CoreRPG and D&D 5e for example. Extract the .pak file and you're good to go.

    With the chat command '/debug on' you can see the XML elements when hovering over with your mouse inside FGU.

  3. #3
    Thanks im trying to move the location of a tab of an extension. example its an extension for 5e but works for pf2e(some of it. the part about the extension i like does)but it covers up the spells tab on the npc for gm. So im trying to move the inventory tab of this extension to a different spot.

  4. #4
    Can you show me an image of what you are trying to accomplish?
    Dominic Morta
    Ruleset Developer
    Smiteworks

    How to zip up your campaign if the Developers ask for it-How to zip up your campaign if the Developers ask for it

    How to provide an Unity Connection issue?-Connection Issues and What to Provide

    Unity Updater issue?-Updater Issues

    Classic and Unity Port Forwarding?-Fantasy Grounds Connections Explained

    Comcast or Cox ISP User?-Comcast XFinity and Cox Users

    Have a suggestion?-Feature Request

  5. #5
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,362
    Quote Originally Posted by toastsniffer187 View Post
    Thanks im trying to move the location of a tab of an extension. example its an extension for 5e but works for pf2e(some of it. the part about the extension i like does)but it covers up the spells tab on the npc for gm. So im trying to move the inventory tab of this extension to a different spot.
    I don't know exactly what the extension code is doing, but I would imagine it's not covering the PF2 spells tab, but not even having that tab present because the code is based on the 5e NPC which doesn't have a spell tab.

    For an example of how to setup the tabs, in the "tabs_recordsheet" XML, see the PFRPG2 ruleset campaign\record_npc.xml file - search for "tabs_recordsheet" - you'll also need to ensure the subwindow_record and scrollbar_record entries are correct. Look for similar code within the extension and adjust as needed.

    Also keep in mind that the extension you're using was written for 5e, and uses 5e code. Even if you display the PF2 spells tab, there is no guarantee that the rest of the code in the extension is fully compatible with the PFRPG2 ruleset code - just because something appears to be working doesn't mean that it's 100% compatible and isn't overriding PF2 code with 5e code.
    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!

  6. #6
    The directions I gave you in the PM are the best way to approach these things (minus the typo of me calling the .pak ruleset zips a .rul file).

    Tabs are notoriously a pain in the *** in FGU. There is no simple way to describe it - polymorphism out of my stuff is the most tab centric complex thing you can look at. But gist is - most coding in FGU - or least for the things I do - are nebulous and trial and error where you have to figure out stuff on your own and sometimes its counterintuitive on what is required. Gist is - using example .ext to work from and experiment with is your best course of action.

    As I told you I don't support rulesets I don't use and while I naively tried in the early days to do so - I found that while CoreRPG was used as a base platform to code to - most people writing rulesets rapidly diverged from it doing their own things with no care about keeping it overridable or in a pattern that could be consistent between other things based on CoreRPG. I found this especially true in .xml code where you would literally have to rewrite large chunks of it just to override tiny part of it.

    And tabs are the worst of them. Polymorphism.ext is where I had to the most horror work bashing it with a hack hammer to what I wanted - but I'd not claim that "code" is the most readable and straightforward though I did comment it alot.

    My advice stands though - start with the MapParcel.ext and experiment around with it till you figure it out for what you want to do. And don't assume things are written with consistency or a common pattern. Rulesets are not. You have to be willing to experiment with the ruleset/engine/extension code to get where you want to be and even then it may look like a total hack. Do what you gotta do is my policy. And keep it as simple as you can - and code as to be the least conflicting with other things you can (as in keep that in mind while you code - many don't).
    Free(Forums/Forge) Extension(FGU 5E):
    Paid (Forge) Extension(FGU 5E):

  7. #7
    it does what i want it to do. I just want the tab moved to its own location i will post a pic in a min of before and after map parcel ext.

  8. #8
    I'd advise to check out the following:

    - https://www.youtube.com/watch?v=54PS...qc_9w1TWQfTPUA
    - https://fantasygroundsunity.atlassia...eveloper+Guide

    You can also look at all the included rulesets such as CoreRPG and D&D 5e for example. Extract the .pak file and you're good to go.

    With the chat command '/debug on' you can see the XML elements when hovering over with your mouse inside FGU
    see how in the video you can read his. Even when i set my note++ to lua it is jumbled wording. Is what I was asking. How do I make it readable?

  9. #9
    Quote Originally Posted by superteddy57 View Post
    Can you show me an image of what you are trying to accomplish?
    Attachment 49931
    Attachment 49932

  10. #10
    Quote Originally Posted by toastsniffer187 View Post
    it does what i want it to do. I just want the tab moved to its own location i will post a pic in a min of before and after map parcel ext.
    As I said, not something I plan on doing. The only part of Map Parcels that interacts with an NPC sheet is the inventory tab it adds in. You can just remove it if you don't need or want it by removing that tab logic completely out of record_npc.xml logic. The code he wants to change is this...

    Code:
    	<windowclass name="npc" merge="join">
    		<sheetdata>
    			<subwindow_record name="npc_inventory">
    				<class>charsheet_inventory</class>
    			</subwindow_record>
    
    			<tabs_recordsheet name="tabs" merge="join">
    				<tab merge="add">
    					<icon>tab_inventory</icon>
    					<subwindow>npc_inventory</subwindow>
    				</tab>
    			</tabs_recordsheet>
    		</sheetdata>
    	</windowclass>
    For whatever reason 2E does not like it and having looked at how rulesets go off and hardcode references or positions and other things I have no plans on supporting it. Just FYI.

    I only use 5E as I told you - no plans on changing that anytime soon. And I won't support things I don't actively use unless they just "work" as is in the 5E implementation.
    Last edited by SilentRuin; November 12th, 2021 at 19:54.
    Free(Forums/Forge) Extension(FGU 5E):
    Paid (Forge) Extension(FGU 5E):

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
STAR TREK 2d20

Log in

Log in