-
November 5th, 2016, 03:14 #61
I simply launched off the npclist windowclass. That was replaced by something that's not immediately obvious:
3.1.6 campaign_npcs.xml
Code:<windowclass name="npclist"> <frame>campaignlistwithtabs</frame> ... ... </windowclass>
https://pastebin.com/h9Q5rSXb
I've already looked at record_npc encounter, randomencounter, which reference an npc list, but aren't referring to 'the' npc list.Last edited by Ken L; November 5th, 2016 at 03:17.
-
November 5th, 2016, 04:38 #62
So everything is now grouped under the masterindex; this will raise a few issues, i'm surprised advanced bestiary isn't having issues as well given it launches similarly. Also the data node bindings are different so record population is failing. I'll look at it later.
-
November 5th, 2016, 05:05 #63
Pushed out a new update, it should work again. There's a quick hacky fix that just places it on the masterindex window so it'll show up as a button on npc/story/item tabs etc...
I'm wary of injecting any script for the masterindex to be context sensitive to display the button only when the NPC section of the master index is shown given how that may change. Some time down the line i'll figure something out unless there are any ideas floating around. I'm all open to pull requests.
-
November 5th, 2016, 05:21 #64
Patriarch
- Join Date
- Nov 2015
- Posts
- 378
-removed=
-
November 5th, 2016, 15:04 #65
-
November 5th, 2016, 16:20 #66
Yay! Thanks Ken. This is one of the most (if not *the most*) useful extension I've found as a GM. I've only had it two weeks and already I can't imagine myself using FG without it - so your efforts are very much appreciated.
Also, FYI, I have come across another couple of string substitutions that came up when pasting from various sources (PDF files, web pages, etc.) One is used as a dash symbol, and the other was used as a multiplier symbol in a weapon crit range (e.g. halberd +5 (1d10+3/×3). I've added the following code to function stripString to accommodate. As before, spaces are added here so the forum doesn't interpret as character codes.
data = data:gsub('& #150;','-');
data = data:gsub('& #215;','x');If you're not having fun, then you're not doing it right.
-
November 5th, 2016, 16:29 #67
I attempted to place it in npc_header, but I don't have a full grasp on how the windowing structure works in FG so I gave up after 30m of fan-dangling and scouring the documentation as well as looking for examples.
@KevenSimmons: Thanks for the catch. I'll probably also add all html entities for the common unicode just incase. For myself it seems to use the /u#### format; but every clipboard is different so it makes sense I never caught it. There's also left double paren and right double paren as well as other strange things.
-
November 6th, 2016, 05:02 #68
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,566
You can use:
LibraryData.addIndexButton("npc", "button_creaturegen");
And:
<template name="button_creaturegen">
<button_text_sm>
<anchored to="buttonanchor" width="70">
<top />
<left anchor="right" relation="relative" offset="5" />
</anchored>
<state textres="npc_button_creaturegen" />
<script>
function onButtonPress()
Interface.openWindow("creaturegen_windowclass", "creategen_datanode (if any)");
end
</script>
</button_text_sm>
</template>
I've used this template for several different similar additions throughout the SavageWorlds settings.
Regards,
JPG
-
November 6th, 2016, 10:30 #69
I'm not exactly clear what the LibraryData object is. I'm vaguely aware that you're adding a template here but without context I'm unaware of specifics. If I had limitless time I perhaps can dig more but I tend to do these things at the end of day and oddly enough in my morning hours (pending grogginess).
-
November 7th, 2016, 06:21 #70
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,566
The LibraryData script manages the "record types" that are recognized by the various campaign lists, including what to show in the campaign lists themselves.
The addIndexButton just assigns a template to be instantiated when the campaign list is instantiated. It is used to add template buttons like the "Forge", "Folder" and "Store" buttons you see in the campaign lists.
Regards,
JPG
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks