5E Product Walkthrough Playlist
Page 2 of 2 First 12
  1. #11
    Yup, that fixed it.

    I changed my definition to:

    Code:
    	<template name="list_text" merge="join">
    		<windowlist>
    			<child mergerule="resetandadd"></child>
    			<child><backcolor>1A40301E</backcolor></child>
    			<allowcreate />
    			<allowdelete />
    			<script file="common/scripts/list_text.lua" />
    		</windowlist>
    	</template>
    And added the "onSortCompare" from above to the newly copied "list_text.lua" file I grabbed from CoreRPG.


    I assume that was my only choice? Anyone have any better suggestions for me than copying code whole cloth like that?

  2. #12
    EDIT:

    Turns out - I could ignore what I did above.

    ie: delete the copied text_list.lua from CoreRPG.
    Remove the entry for templates_list.xml in extension.xml in my extension (and delete the xml file)

    because this in the record_char_more.xml file handles it for each control I wanted that functionality on:

    Code:
    			<!-- Customize sorting for the Attributes list -->
    			<list_text name="cliroller1" merge="join">
    				<script file="utility/scripts/sort_methods/sort_on_alt_sort_order.lua" />
    			</list_text>

    oops - I guess I left some orphaned stuff in git and forgot.


    ===> So the TAKEAWAY I should learn here, correct if wrong:

    If I added the <script> to a redefined (with merge="join") template of same name "list_text" only the <script> in MY override goes into effect. BUT if I merely do an override of an named INSTANCE of that template (e.g. <list_text name="cliroller1" merge="join">) - I am able to ADD more "code" to the template's ummm... "code space?"

    ??
    Last edited by Varsuuk; August 9th, 2020 at 05:56.

  3. #13
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    22,117
    Blog Entries
    1
    Yes... if i understood you correctly - that is correct.

    MoreCore - Generic Ruleset
    --- Projects ---
    Extensions | Tutorials | MoreCore | MoreCore Themes | Call of Cthulhu | Maelstrom | FG Con

Thread Information

Users Browsing this Thread

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
PF2E Playlist

Log in

Log in