Thread: New DFRPG Ruleset Extension WIP
-
April 17th, 2015, 15:12 #11
- Join Date
- Apr 2015
- Posts
- 24
Dakalin, pretty sure, yeah.
Damned, as far as I know, I think you're right. I've been looking through extensions trying to find one with no luck. Honestly, I thought this would be easy, but it's proved deceptively difficult xp
-
April 18th, 2015, 04:07 #12
Siggy442 in my experience it is most definitely NOT easy.
For NPCs I suggest that you extend the existing Main Tab. You will need to work out how the Anchors work and are defined.
Have a look at the Malestrom (community) ruleset - I have a bunch of different additions in there. A ruleset and an Extension are pretty similar.
I could not work out the anchors so there are some kludges in terms of element positioning.
-
April 18th, 2015, 05:07 #13
- Join Date
- Apr 2011
- Posts
- 2,253
I just went through the process to refresh my memory and created an extension you can use as an example. Here are the steps I used:
- Created a new windowclass that will represent the new tabs contents. I just copied npc_main and removed most of the fields.
- Copied the main subwindow_record and changed the <class> to match the windowclass I created above in step 1.
- Copied an existing tab in the <tabs_recordsheet>. Changed the <subwindow> to match the name of the new subwindow_record in step 2. Update the <icon> to match an existing icon that is defined in the ruleset or your extension. I used the tab_abilities.
Hopefully it helps.
-
April 18th, 2015, 23:11 #14
- Join Date
- Apr 2015
- Posts
- 24
That helped a lot. I was able to start creating the new tabs no problem. I've been doing a lot of tinkering and have managed to figure out a few more things. Since then, I've decided I was going to reorganize the way the NPC sheet was set up, so that I could have different menus on the main section. Thus, I started butchering some of the code... and now I'm running into an error I can't seem to get rid of.
My Code for the setup of the general window:
Code:<windowclass name="npc"> <frame>recordsheet</frame> <placement> <size width="350" height="300" /> </placement> <sizelimits> <minimum width="350" height="300" /> <dynamic /> </sizelimits> <minimize>minimized_npc</minimize> <tooltip field="name" /> <nodelete /> <script> function onInit() onLockChanged(); DB.addHandler(DB.getPath(getDatabaseNode(), "locked"), "onUpdate", onLockChanged); end function onClose() DB.removeHandler(DB.getPath(getDatabaseNode(), "locked"), "onUpdate", onLockChanged); end function onLockChanged() if header.subwindow then header.subwindow.update(); end if main.subwindow then main.subwindow.update(); end local bReadOnly = WindowManager.getReadOnlyState(getDatabaseNode()); notes.setReadOnly(bReadOnly); end </script> <sheetdata> <sub_record_header name="header"> <class>npc_header</class> </sub_record_header> <subwindow name="main"> <bounds>0,65,-1,-20</bounds> <class>npc_main</class> </subwindow> <subwindow name="abilities"> <bounds>0,65,-1,-20</bounds> <class>npc_abilities</class> </subwindow> <subwindow name="notes"> <bounds>0,65,-1,-20</bounds> <class>npc_notes</class> </subwindow> <scrollbar_record> <target>main</target> </scrollbar_record> <scrollbar_record> <target>abilities</target> </scrollbar_record> <scrollbar_record> <target>notes</target> </scrollbar_record> <tabs_recordsheet> <tab> <icon>tab_main</icon> <subwindow>main</subwindow> </tab> <tab> <icon>tab_abilities</icon> <subwindow>abilities</subwindow> </tab> <tab> <icon>tab_notes</icon> <subwindow>notes</subwindow> </tab> </tabs_recordsheet> <resize_recordsheet /> <close_recordsheet /> </sheetdata> </windowclass>
Last edited by Siggy442; April 18th, 2015 at 23:20.
-
April 19th, 2015, 01:50 #15
See post #12 above!
I could not work out the anchors so there are some kludges in terms of element positioning.
-
April 19th, 2015, 02:58 #16
The error is saying that it can't find contentframe so it makes sense that you don't have contentframe in your code, otherwise it would be able to be found.
Controls templates used in the XML are set to anchor to a frame called "contentframe". Do a "find in files" in the base CoreRPG ruleset for contentframe to see where it usually is and you'll be able to put it back into your code. (Hint, look in campaign\record_npc.xml). The extension will overwrite code from CoreRPG - so your definition of <windowclass name="npc"> will overwrite the base CoreRPG definition of the same windowclass.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!
-
April 20th, 2015, 06:03 #17
- Join Date
- Apr 2015
- Posts
- 24
Project [Relatively] Complete. After much trial and error, I decided to stick with what I knew I could edit confidently and make it as usable as possible. No graphics changes, but the game can now be used rather effortlessly with the DFRPG. Link to download is attached to the first page.
-
April 20th, 2015, 06:30 #18
Hi Sigg442 - can you zip the files up - with the extension being in the base (eg dont zip up the parent folder) - and rename the file dfrpg.ext or similar?
-
April 20th, 2015, 13:54 #19
-
April 20th, 2015, 14:38 #20
- Join Date
- Apr 2015
- Posts
- 24
Ha, it's ago Damned. That threw me the first time I saw the files on a Google Drive, too.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks