DICE PACKS BUNDLE
Page 16 of 26 First ... 61415161718 ... Last
  1. #151

    Join Date
    Mar 2009
    Location
    Lidingö, Sweden, Europe
    Posts
    351
    Thanks for looking into this.

    I did some digging in my backed-up editions of the ruleset. The current look and feel for table item first appeared in 2021-09-11. Table item are now drag-and-droppable to the inventory tab. But the current error message for armor and shields also first appear here. In the previous edition, just a few days earlier, 2021-09-08, the old look and feel still reigned. Weapon, armor and shield content are shown, but they can't be dragged to the inventory, nor is the list scrollable, and the link icons use a D&D style icon. So, there was a codebase change in September 2021 that introduced the current state.

    Hope this helps.

  2. #152

    Join Date
    Mar 2009
    Location
    Lidingö, Sweden, Europe
    Posts
    351

    Module BRP Game System X does not show table of armors or table of shields

    There is a windowlist called 'content' but it's located in another windowclass "reference_armor_category". So, when in onInit in windowclass "reference_armor" the code makes are reference to 'content' it's out of scope, and that's why we get the error message.

    Code in made bold by me.
    Code:
    function onInit()
    	local src = DB.getValue(getDatabaseNode(), "source", "");
    	local source = nil;
    	local w,h;
    	if super and super.onInit then
    		super.onInit();
    	end
    	if src and src~="" then
    		source = DB.findNode(src);
    		for _,node in ipairs(DB.getChildList(source)) do
    			if DB.getValue(node, "equipmenttype", "") == "Armor" then
    				local catname = DB.getValue(node, "catname");
    				local win = catlist[catname];
    				if not win then
    					catcount = catcount + 1;
    					win = content.createWindow();
    					catlist[catname] = win;
    					win.name.setValue(catname);
    				end
    				win.content.createWindow(node);
    				entcount = entcount + 1;
    			end
    		end
    		content.applySort();
    		w = getSize();
    		h = catcount*29 + entcount*15 + 61;
    		setSize(w,h);
    	end
    end
    Proper referencing always confuses me in FG. In this case we have a function that tries to reference a named item in another windowclass:

    Code:
    windowclass A
        function
    windowclass B
        item
    So how do you do the proper referencing?

  3. #153
    I just pushed a fix to address the script error in reference_armor. Both content.createWindow and content.applySort were pointing at the wrong control; it should be list.createWindow and list.applySort. I've checked in a change that I think should fix, but I'm not familiar with where to pull up that list.

    Can you run a new Check for Updates and verify whether that fixes the issue for reference_armor, or walk me through the steps to find that list with the included data?

    Thanks,
    JPG

  4. #154

    Join Date
    Mar 2009
    Location
    Lidingö, Sweden, Europe
    Posts
    351
    The change did indeed fix, at least one part of the problem. The list of armors is now properly displayed.

    Two issues remain:

    a) The armor items are not drag-and-droppable, like weapons are.
    b) The same fix needs to be applied to reference_shields as well, since it has the same problem.

    Thanks for looking into the problem and providing a fix.

  5. #155

    Join Date
    Mar 2009
    Location
    Lidingö, Sweden, Europe
    Posts
    351
    When I review the code, I see that you have in fact changed the code in reference_shields. But I still get an error message, as before, about 'content' being a nil value when clicking on the link to "Shields".

  6. #156
    Ok, good catch on the other equipment types (I should have checked for similar issues in that file), as well as the items not being able to be dragged and dropped. I've added fixes for each of those items in a new build, if you want to run a new Check For Updates to take a look.

    This is our oldest ruleset we still sell, and it doesn't have a dedicated developer any more (moved on long ago). So, we're still trying to maintain to keep it working with Core features, and fix any bugs reported. Thanks for your help figuring them out.

    Regards,
    JPG

  7. #157

    Join Date
    Mar 2009
    Location
    Lidingö, Sweden, Europe
    Posts
    351
    All items in the tables are now shown as expected and they are all drag and droppable. Even items in my homemade modules that wasn't working before.

    Many thanks for this update!

    /Peter

  8. #158

    Join Date
    Mar 2009
    Location
    Lidingö, Sweden, Europe
    Posts
    351

    Creature descriptions are not shown

    As currently coded the npc sheet expect a creatures description to be stored in an xml element named "appears", see campaign/record_npc.xml lines 45 and 61. The creatures in the Game Master Guide module stores all their descriptions in the (unformatted) notes element so they are not affected by this. However, the creatures in the "Basic Creatures" module, which is not for sale anymore, use an element named "text", as is 3.5E and 5E. So, these creatures descriptions are not shown. I used the same layout in when I created a module containing creatures converted from the 5E SRD to BRP, so my creature descriptions doesn't show either. I propose that the code in campaign/record_npc.xml is changed so it uses the element name "text" instead of "appears", as in the code below. This change will not affect any creatures in the Game Master Guide, but it will make the descriptions in the "Basic Creature" module visible. And, I guess, using the element name "text" is more inline with what other rulesets use in the same situation. The other option would be to change the xml code of a module that is not on sale anymore.

    In the windowclass "npc" (campaign/record_npc.xml)
    Code:
    		<script>
    			function onInit()
    				onStateChanged();
    			end
    
    			function onLockChanged()
    				onStateChanged();
    			end
    
    			function onStateChanged()
    				if header.subwindow then
    					header.subwindow.update();
    				end
    				if main.subwindow then
    					main.subwindow.update();
    				end
    				if combat.subwindow then
    					combat.subwindow.update();
    				end
    				if notes.subwindow then
    					notes.subwindow.update();
    				end
    
    				local bReadOnly = WindowManager.getReadOnlyState(getDatabaseNode());
    				text.setReadOnly(bReadOnly);
    			end
    		</script>		
                    <sheetdata>
    			<sub_record_header name="header">
    				<class>npc_header</class>
    			</sub_record_header>
    
    			<frame_record_content_tabbed name="contentframe" />
    
    			<subwindow_record name="main">
    				<class>npc_main</class>
    			</subwindow_record>
    			<subwindow_record name="combat">
    				<class>npc_combat</class>
    			</subwindow_record>
    			<ft_record name="text">
    				<anchored to="contentframe" position="over" />
    				<invisible />
    			</ft_record>
    			<subwindow_record name="notes">
    				<class>npc_notes</class>
    			</subwindow_record>
    
    			<scrollbar_record>
    				<target>main</target>
    			</scrollbar_record>
    			<scrollbar_record>
    				<target>combat</target>
    			</scrollbar_record>
    			<scrollbar_record>
    				<target>appears</target>
    			</scrollbar_record>
    			<scrollbar_record>
    				<target>notes</target>
    			</scrollbar_record>
    
    			<tabs_recordsheet name="tabs">
    				<tab>
    					<icon>tab_main</icon>
    					<subwindow>main</subwindow>
    				</tab>
    				<tab>
    					<icon>tab_combat</icon>
    					<subwindow>combat</subwindow>
    				</tab>
    				<tab>
    					<icon>tab_appears</icon>
    					<subwindow>text</subwindow>
    				</tab>
    				<tab>
    					<icon>tab_notes</icon>
    					<subwindow>notes</subwindow>
    				</tab>
    			</tabs_recordsheet>
    			
    			<resize_recordsheet />
    			<close_recordsheet />
    		</sheetdata>
    	</windowclass>
    Last edited by peterb; May 29th, 2023 at 11:28.

  9. #159
    Seems reasonable, though there is a gotcha. BRP is the oldest ruleset still being offered in the store, which is why it does everything a little different.

    The gotcha is that any data placed in those fields within an existing campaign or custom module will not be available any longer. Since it's a low use ruleset, I'll probably just offer to do the data migration if anyone encounters that.

    The ruleset is currently locked down pending the new release, so the changes are currently in the beta Test channel and will be released in June.

    Regards,
    JPG

  10. #160

    Join Date
    Mar 2009
    Location
    Lidingö, Sweden, Europe
    Posts
    351
    OK. Thanks!

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