-
June 20th, 2012, 02:56 #21
- Join Date
- Nov 2011
- Posts
- 71
I see... so it is making a copy instead of linking when you drag-n-drop a shop or NPC entry into the matching tab in the Town list entry, instead of making a link back to the original? I
-
June 20th, 2012, 06:19 #22
- Join Date
- Apr 2008
- Posts
- 44
Basically, yes. I'll update when I solve it.
-
June 20th, 2012, 23:21 #23
- Join Date
- Apr 2008
- Posts
- 44
Feeling Stuck
So I'm trying to get the NPC list to only be links from the main list. Tried using <windowreferencefield> but I'm not even getting an icon unless I add in <class>npc</class> and then I get tons of scripting errors. Any ideas?
Code:<windowclass name="town_npcsmall"> <sizelimits> <minimum> <height>10</height> </minimum> </sizelimits> <sheetdata> <stringu name="name"> <anchored> <top><anchor>top</anchor><offset>5</offset></top> <left><anchor>left</anchor><offset>0</offset></left> <size><width>100</width><height>20</height></size> </anchored> <tabtarget next="type" prev="levelrole" /> </stringu> <stringu name="type"> <anchored> <top><anchor>top</anchor><offset>5</offset></top> <left><anchor>left</anchor><offset>102</offset></left> <right><anchor>right</anchor><offset>-90</offset></right> </anchored> <tabtarget next="levelrole" prev="name" /> </stringu> <stringu name="levelrole"> <anchored> <top><anchor>top</anchor><offset>5</offset></top> <right><anchor>right</anchor><offset>-30</offset></right> <size><width>55</width><height>15</height></size> </anchored> <tabtarget next="name" prev="type" /> </stringu> <!--<windowreferencecontrol> <bounds>-20,5,20,20</bounds> <anchored> <top><anchor>top</anchor><offset>5</offset></top> <right><anchor>right</anchor><offset>-5</offset></right> <size><width>20</width><height>20</height></size> </anchored> <icon> <normal>button_openwindow</normal> <pressed>button_emptytarget</pressed> </icon> <class>npc</class> <allowdrop /> <closetoggle /> <description> <field>name</field> </description> <script> function onDrag(button, x, y, draginfo) draginfo.setType("shortcut"); local base = draginfo.createBaseData("shortcut"); base.setShortcutData(getValue()); draginfo.resetType(); return true; end </script> </windowreferencecontrol>--> <windowreferencefield name="npc_link"> <bounds>-20,5,20,20</bounds> <icon> <normal>button_dragtarget</normal> </icon> </windowreferencefield> </sheetdata> </windowclass> <windowclass name="town_npcs"> <sheetdata> <!-- NPC list --> <stringcontrol> <anchored> <top><anchor>top</anchor><offset>5</offset></top> <left><anchor>left</anchor></left> <position>insidetop</position> </anchored> <center /> <font>sheetlabel</font> <static>Notable NPCs by Name</static> </stringcontrol> <stringcontrol> <anchored> <bottom><anchor>bottom</anchor><offset>-10</offset></bottom> <left><anchor>left</anchor></left> <position>insidebottom</position> </anchored> <center /> <font>chatitalicfont</font> <static>Drop NPC links on this frame to add</static> </stringcontrol> <stringcontrol> <anchored> <top><anchor>top</anchor><offset>25</offset></top> <left><anchor>left</anchor><offset>25</offset></left> </anchored> <font>sheetlabelsmall</font> <static>Name</static> </stringcontrol> <stringcontrol> <anchored> <top><anchor>top</anchor><offset>25</offset></top> <left><anchor>left</anchor><offset>130</offset></left> </anchored> <font>sheetlabelsmall</font> <static>Type</static> </stringcontrol> <stringcontrol> <anchored> <top><anchor>top</anchor><offset>25</offset></top> <right><anchor>right</anchor><offset>-35</offset></right> </anchored> <font>sheetlabelsmall</font> <static>Level/Role</static> </stringcontrol> <windowlist name="npclist"> <anchored> <top><anchor>top</anchor><offset>40</offset></top> <left><anchor>left</anchor><offset>5</offset></left> <bottom><anchor>bottom</anchor><offset>-25</offset></bottom> <right><anchor>right</anchor><offset>-5</offset></right> <position>over</position> </anchored> <datasource>.npclist</datasource> <class>town_npcsmall</class> <acceptdrop> <class>npc</class> <field>*</field> </acceptdrop> <allowdelete /> <script> function onSortCompare(w1, w2) return w1.name.getValue() > w2.name.getValue(); end </script> </windowlist> <scrollbar> <bounds>-17,40,20,-25</bounds> <target>npclist</target> </scrollbar> </sheetdata> </windowclass>
-
June 23rd, 2012, 23:57 #24
- Join Date
- Apr 2008
- Posts
- 44
Silveras,
Exporting is on hold for the moment until I can figure out how to access the variable aExport in manager_export.lua from my extension files. I'm releasing another version tonight with some updated features including notes for GMs hidden from the players side if you wish to share the town data. Still running into the problem of the links copying over so I have a minor work-around going.
-Brad
-
June 24th, 2012, 03:36 #25
- Join Date
- Nov 2011
- Posts
- 71
Originally Posted by bradmcadam
-
June 24th, 2012, 04:10 #26
- Join Date
- Apr 2008
- Posts
- 44
Version 1.5
Version 1.5 is out tonight with some updates.
Changelog:
- Big thanks to DrZeuss for the new icons, headers and sidebars!
- Added GM notes in the bottom of the main tab that only the GM can see so write bad things about your players and share the sheet knowing the joke's on them!
- Hid the NPC link for players so it's only accessible to the GM. All the players get to see is the name and job of the NPC in town
- Changed how the links work. This is still sort of buggy and this is my workaround in place. The links back to npcs or shops link back to the original npc or shop, but you have to drag it on to the link after the npc or shop is created. This means that you have to double drag, but once you do you can change all the info you want inside the npc or shop and it gets saved back to it's original. This also means you can change the name or job of the npc/shop and it won't affect it's link name or job. It was a request to be able to have a town guard be a frost giant in disguise. Remind me not to be in that campaign.
- Links in the shop inventory screen simply create their own items and do not reference back to the original. It seemed like a real hassle to me to have to double drag for such a huge list in a case that really won't matter.
- Various code cleanup, minimizing fixes and other such things you probably won't notice unless you caught it when it was wrong.
-
June 25th, 2012, 03:01 #27
- Join Date
- Apr 2008
- Posts
- 44
Quick note, because of my attempted workaround with the links back with npcs and shops, the addon is nicely broken. I'll do a quick 1.5.1 update to restore functionality back to the way it was where it copied in a new instance of npc or shop so you'll at least have access to the links and they won't disappear every time you close a window.
-
June 25th, 2012, 15:10 #28
I love this extension, by the way! I started playin' around with it last weekend, and before I knew it; I'd spent hours creating all kinds of shops.
Thank you for your contribution to the community! Very cool, very helpful.
-
June 26th, 2012, 01:30 #29
- Join Date
- Apr 2008
- Posts
- 44
1.5.1 Update for broken links
Thanks Torgaard! I really appreciate it. It makes working on this stuff easier and more fun when I know people are making good use of it.
Here's the latest - Version 1.5.1:
Changelog:
- Reverted back to previous <windowreferencecontrol> configuration so links stopped dissapearing. This means they still copy new instances of NPCs and Shops, but at least it's doable.
-
July 9th, 2012, 02:20 #30
- Join Date
- Nov 2011
- Posts
- 71
Hey Brad, I just wanted to mention one thing.. it looks like by including the version number in the extension name, each version appears as a new extension. That means there's no way to do an "in-place" upgrade by replacing the old version with the new version. As a result, each time there's a new version, you have to disable the old extension and enable the new in the Load Campaign screen.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks