Joshua Stream Pre
Page 1 of 2 12 Last
  1. #1

    TEST and ct_entry - heads up

    Heads up for anyone who inserts stuff into the ct_entry as the most recent TEST has been reshuffled to the point extensions will no longer find controls they previously anchored off of to do insertions. I've only superficially tested TEST to see what extensions of mine got blown out of the water and it appears (as in really not tested thoroughly yet) that positional controls anchored among the CT entry controls are going to fail. SO be prepared to do a forensic dig to find out what new way we need to deal with this.
    Free(Forums/Forge) Extension(FGU 5E):
    Paid (Forge) Extension(FGU 5E):

  2. #2
    Question: It appears a lot of control names have been shifted out of ct_host.xml and moved into templates. Why? I used to insertafter the activateeffects name in ct_host.xml but now I see it has been moved to template_ct.xml buried under a template name and is no longer locatable. In fact, I can't see where <template name="button_ctentry_activateeffects"> is ever used looking at 5E/CoreRPG. Would like an explanation of how the ct stuff has been shifted around and how to access it now for placement of my own buttons in there.
    Free(Forums/Forge) Extension(FGU 5E):
    Paid (Forge) Extension(FGU 5E):

  3. #3
    I left the old templates in place, in case anyone had written mods which used them. They are not shifted out, but no longer used at all in the CoreRPG/5E combat trackers. They've been replaced with new templates that support the new subwindow method for CT entry subsections. That is the essence of the change in this release.

    All the controls for toggling sections and the CT entry subsections themselves have been changed, and subsection fields have been moved into individual subwindows.

    5E has some fairly straightforward examples. Just look at:
    Code:
    	<template name="button_ct_section_active">
    		<button_ct_section>
    			<tooltip textres="ct_tooltip_offense" />
    			<state icon="button_sword" merge="add" />
    			<state icon="button_sword_down" merge="add" />
    			<target>active</target>
    		</button_ct_section>
    	</template>
    	<template name="button_ct_section_defense">
    		<button_ct_section>
    			<tooltip textres="ct_tooltip_defense" />
    			<state icon="button_shield" merge="add" />
    			<state icon="button_shield_down" merge="add" />
    			<target>defense</target>
    		</button_ct_section>
    	</template>
    
    	<windowclass name="ct_entry">
    		<sheetdata>
    			...
    			<button_ct_section_defense name="button_section_defense" />
    			<button_ct_section_active name="button_section_active" />
    			...
    			<sub_ct_section name="sub_active" />
    			<sub_ct_section name="sub_defense" />
    			...
    		</sheetdata>
    	</windowclass>
    
    	<windowclass name="ct_section_active">
    		...
    	</windowclass>
    	<windowclass name="ct_section_defense">
    		...
    	</windowclass>
    Regards,
    JPG
    Last edited by Moon Wizard; August 12th, 2022 at 07:51.

  4. #4
    Quote Originally Posted by Moon Wizard View Post
    I left the old templates in place, in case anyone had written mods which used them. They are not shifted out, but no longer used at all in the CoreRPG/5E combat trackers. They've been replaced with new templates that support the new subwindow method for CT entry subsections. That is the essence of the change in this release.

    All the controls for toggling sections and the CT entry subsections themselves have been changed, and subsection fields have been moved into individual subwindows.

    5E has some fairly straightforward examples. Just look at:
    Code:
    	<template name="button_ct_section_active">
    		<button_ct_section>
    			<tooltip textres="ct_tooltip_offense" />
    			<state icon="button_sword" merge="add" />
    			<state icon="button_sword_down" merge="add" />
    			<target>active</target>
    		</button_ct_section>
    	</template>
    	<template name="button_ct_section_defense">
    		<button_ct_section>
    			<tooltip textres="ct_tooltip_defense" />
    			<state icon="button_shield" merge="add" />
    			<state icon="button_shield_down" merge="add" />
    			<target>defense</target>
    		</button_ct_section>
    	</template>
    
    	<windowclass name="ct_entry">
    		<sheetdata>
    			...
    			<button_ct_section_defense name="button_section_defense" />
    			<button_ct_section_active name="button_section_active" />
    			...
    			<sub_ct_section name="sub_active" />
    			<sub_ct_section name="sub_defense" />
    			...
    		</sheetdata>
    	</windowclass>
    
    	<windowclass name="ct_section_active">
    		...
    	</windowclass>
    	<windowclass name="ct_section_defense">
    		...
    	</windowclass>
    Regards,
    JPG
    Not sure how you think its straightforward - It's been completely rewritten with no directions on how it works. I think I'm going to have to rewrite everything that added a CT entry from scratch and figure out how it works by trial and error. Trying to translate between old stuff and new stuff is not working for sure. Will have to pretend I never wrote anything and develop it from scratch for this stuff.
    Free(Forums/Forge) Extension(FGU 5E):
    Paid (Forge) Extension(FGU 5E):

  5. #5
    I think you're making this bigger than it is.

    If you are inserting controls in the top line, then you would do it just like you did before (though the names have changed slightly with the new controls).
    If you are inserting controls in a subsection, then use a window class merge on that new subsection window.
    If you are inserting a completely new section, then you would need a new section button template (see example) which you add to entry, and you need to define a new subwindow with a name matching the button template and put any controls you need in there.

    While I was migrating the rulesets, this new method actually made things much easier to add/remove. You just need to look at the 5E example (with more to come shortly after for other included rulesets).

    Regards,
    JPG

  6. #6
    Quote Originally Posted by Moon Wizard View Post
    I think you're making this bigger than it is.

    If you are inserting controls in the top line, then you would do it just like you did before (though the names have changed slightly with the new controls).
    If you are inserting controls in a subsection, then use a window class merge on that new subsection window.
    If you are inserting a completely new section, then you would need a new section button template (see example) which you add to entry, and you need to define a new subwindow with a name matching the button template and put any controls you need in there.

    While I was migrating the rulesets, this new method actually made things much easier to add/remove. You just need to look at the 5E example (with more to come shortly after for other included rulesets).

    Regards,
    JPG
    I'm trying to port this stuff but having issues where I think I just have to start over. One thing I'm noticing I cannot find the global buttons (for sections) anymore. They were removed it appears. Are we no longer going to be able to display "all" effects or other sections in the ct entry?
    Free(Forums/Forge) Extension(FGU 5E):
    Paid (Forge) Extension(FGU 5E):

  7. #7
    As exampled in this post:
    https://www.fantasygrounds.com/forum...l=1#post659335

    The buttons have been changed to a new template and renamed, in order for them to work in conjunction with other templates and renaming. (i.e. the naming is tied to the way the templates work)

    Example:
    "button_ct_section_targets" is used to toggle the "targets" subsection which is embedded in the "ct_section_targets" subwindow. In all CoreRPG derived rulesets, the window class used for targets is "ct_section_targets".

    Example 2:
    "button_ct_section_defense" is used to toggle the "defense" subsection which is embedded in the "ct_section_defense" subwindow. In 5E, the windowclass used for defense is one of the following: "ct_section_defense", "ct_section_defense_npc", "ct_section_defense_vehicle". The ct_entry.lua script controls which windowclass is placed in the defense subsection when toggled. The default child window class would be "ct_section_defense", if the ct_entry.lua doesn't specify an alternate as part of the override in the onSectionChanged function defined in the CT entry.

    Regards,
    JPG
    Last edited by Moon Wizard; August 14th, 2022 at 21:39.

  8. #8
    Quote Originally Posted by Moon Wizard View Post
    As exampled in this post:
    https://www.fantasygrounds.com/forum...l=1#post659335

    The buttons have been changed to a new template and renamed, in order for them to work in conjunction with other templates and renaming. (i.e. the naming is tied to the way the templates work)

    Example:
    "button_ct_section_targets" is used to toggle the "targets" subsection which is embedded in the "ct_section_targets" subwindow. In all CoreRPG derived rulesets, the window class used for targets is "ct_section_targets".

    Example 2:
    "button_ct_section_defense" is used to toggle the "defense" subsection which is embedded in the "ct_section_defense" subwindow. In 5E, the windowclass used for defense is one of the following: "ct_section_defense", "ct_section_defense_npc", "ct_section_defense_vehicle". The ct_entry.lua script controls which windowclass is placed in the defense subsection when toggled. The default child window class would be "ct_section_defense", if the ct_entry.lua doesn't specify an alternate as part of the override in the onSectionChanged function defined in the CT entry.

    Regards,
    JPG
    The globals are still missing - you can bring up a TEST CT with no extensions and see they are no longer in the header after wounds.
    Free(Forums/Forge) Extension(FGU 5E):
    Paid (Forge) Extension(FGU 5E):

  9. #9
    Here is what I have tried...

    Code:
    	<windowclass name="ct_entry" merge="join">	
    		<sheetdata>
    ...
    			<button_ct_section_ctgroup name="button_section_ctgroup" insertbefore = "button_section_effects"/>
    			<sub_ct_section name="sub_ctgroup" insertafter = "sub_effects"/>
    		</sheetdata>	
    	</windowclass>
    
    	<template name="button_ct_section_ctgroup">
    		<button_ct_section>
    			<tooltip textres="ct_tooltip_ctgroup" />
    			<state icon="combatgroups_icon" />
    			<state icon="combatgroups_icon_down" />
    			<target>ctgroup</target>
    		</button_ct_section>
    	</template>
    
    	<windowclass name="ct_section_ctgroup">
    		<sheetdata>
    			<!-- CTGroup section -->
    			<icon_ctsection name="ctgroupicon">
    				<icon>combatgroups_icon</icon>
    			</icon_ctsection>
    
    			<anchor_ct_section name="anchor_section" />
    
    			<combobox name="combatgroup">
    				<anchored to="anchor_section" width="200" height="30">
    					<top anchor="bottom" relation="relative" offset="10" />
    					<left parent="ctgroupicon" anchor="right" offset="40" />
    				</anchored>
    				<empty textres="empty_combatgroup_select" />
    				<listmaxsize>15</listmaxsize>
    				<listdirection>down</listdirection>
    				<tooltip textres="combatgroup_tooltip" />
    				<script>
    					function onInit()
    						super.onInit();
    						CombatGroupsManager.InitCombatGroups(window, true);
    					end
    					function onValueChanged()
    						wCombatTracker = Interface.findWindow("combattracker_host", "combattracker");
    						if wCombatTracker then
    							wCombatTracker.list.applyFilter();
    						end
    					end
    				</script>
    			</combobox>
    			<genericcontrol name="spacer_ctgroup">
    				<anchored to="anchor_section" height="30">
    					<top anchor="bottom" relation="relative" />
    					<left />
    					<right />
    				</anchored>
    				<disabled />
    			</genericcontrol>			
    			<frame_ct_section name="frame_section">
    				<anchored>
    					<left parent="ctgroupicon" anchor="right" offset="0" />
    					<bottom parent="spacer_ctgroup" offset="10" />
    				</anchored>
    			</frame_ct_section>
    		</sheetdata>
    	</windowclass>
    When I try to access the "combatgroup" value in combobox per usual it tells me its nil. Fine you've moved it all around I can see that - so I look in .getControls() and among many things I see sub_ctgroup - which using my vChild.sub_ctgroup - I can't find anything. I'm at a loss how I can access my values in this sub class or how it works. Becuase while the icon shows in the list of icons at top of entry - clicking on it does nothing. So I'm still missing some important clue on how to do this and on how to access my window values whether visible or not.

    The landscape has completely changed and I no longer understand how to do what I was doing.

    And is "combatgroup" combo box DB entry still going to be at the same level of DB under the CT list entry? If that will move to some other level in DB that would truly suck.
    Last edited by SilentRuin; August 14th, 2022 at 23:58.
    Free(Forums/Forge) Extension(FGU 5E):
    Paid (Forge) Extension(FGU 5E):

  10. #10
    The global toggles in the top level CT have been removed, as they negatively affect performance in large CT lists.

    JPG

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
  •  
FG Forge

Log in

Log in