DICE PACKS BUNDLE
Page 7 of 25 First ... 5678917 ... Last
  1. #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>
    I can't seem to find an equivalent windowclass here:
    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.

  2. #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.

  3. #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.

  4. #64

  5. #65
    ddavison's Avatar
    Join Date
    Sep 2008
    Posts
    6,135
    Blog Entries
    21
    Quote Originally Posted by Ken L View Post
    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.
    Yes, Advanced Bestiary broke as well when 3.2 launched. I had to similarly switch it over to use the masterlist.

  6. #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.

  7. #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.

  8. #68
    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

  9. #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).

  10. #70
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
FG Spreadshirt Swag

Log in

Log in