DICE PACKS BUNDLE
Page 11 of 11 First ... 91011
  1. #101

    Join Date
    Dec 2017
    Location
    Mid-West USA
    Posts
    58
    Quote Originally Posted by damned View Post
    resize the attacks frame using the script at the top of the record_char_more.xml that looks something like this -

    Code:
    		<script>
    			function onInit()
    				self.onSizeChanged = resizeFrames;
    				Debug.chat("onInit!");
    			end
    
    			function resizeFrames(sourceWindow)
    				local nWidth,nHeight = getSize();
    				Debug.chat("nWidth,nHeight: ", nWidth,nHeight);
    				combatframe.setStaticBounds((nWidth/3*2)-15, 45, (nWidth/3)-15, 170)
    				attackframe.setStaticBounds(15, 0, (nWidth*2/3)-30, 215)
    				cas2.setStaticBounds((nWidth/3), 215, (nWidth/3)-15, 240)
    			end
    		</script>
    Doh!, I had looked at that, but it didn't click.

    Thanks!

  2. #102
    Question: I am working on a ext to basic fantasy and have it all most done it is based off yours with changes on my end but I can not get the exporter to show classes it does work with out the ext that I have but with the ext load it does not show up. I have tried just using the standard class that comes with morecore but that did not seem to help. Any ideas on how to get it add to the exporter please.

    Thanks

    ps I am using FG classic and the lastest morecore ruleset

  3. #103
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,638
    Blog Entries
    1
    Hi Cyberlinxz

    Please PM me a link to your ext and module and Ill have a look.
    Unfortunately I have stopped supporting FGC (just not enough time) but Ill see if I can see what the issue is for you.

    Damian

  4. #104
    Thanks for the quick reply but I found the problem it was in the call name for it
    Thanks

  5. #105
    Hi all!

    I am getting into some dev on a "The Sprawl" extension. I watched through the tutorials and had asked some relatively uneducated questions in another solo thread. I have since read through this thread and reviewed the videos and source files again. I have gotten to a point where I am not sure what I am missing.

    What I have done, in order:

    1. Created a new record for the corporation data in record_entity.xml
    2. Created a file with the icon definition for the sidebar button I desire ( and the string name for the title of "Corperation" called graphics_sidebar.xml
    3. Defined the new record and used the LibraryData.overrideRecordTypes(aRecords) method to add it to the sidebar in data_library_tsb.lua
    4. All 3 of the previous files are defined in extension.xml

      The source for all of these file is in TheSprawEntitySource.zip


    The good news is I get a new sidebar entry and it opens my record! The bad news is that no matter what I do I get the default icon and an empty title as seen here -> entity_sidebar.png

    I have no log errors and all of the names or elements appear to match so I am not sure why. The button works despite not having a title. The font override in the same graphics_frames.xml has been applied just fine...

    Secondarily:

    I have not been able to locate how I go about changing the orientation of the text within the parent frame.
    As you can see in this entity_window.png I have a window with a custom graphic frame for the text entry fields. they all use a template field defined in template_entity.xml that uses <basicft> which is a <simpleft> which is a <formattedtextfield>.

    I really want the text to be padded by about 20 to account for the thickness and glow of the frame edges. Offset appears to move the frame around rather than the text.

    Thank you in advance for any asstance!

  6. #106

  7. #107
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,638
    Blog Entries
    1
    Something like this

    sidebar.xml
    Code:
    <?xml version="1.0" encoding="iso-8859-1"?>
    
    <root>
        <!-- Common ruleset-specific record types -->
        <icon name="sidebar_icon_recordtype_ancestry" file="graphics/sidebar/sidebar_icon_A.png" />
    
       <string name="library_recordtype_label_ancestry">Ancestries</string>
    
    
    </root>
    note ancestry is the bit you are looking at here
    make sure the icon is white

  8. #108
    Quote Originally Posted by damned View Post
    Something like this for the offset

    <frame>
    <name>windowlist</name>
    <offset>12,10,12,10</offset>
    </frame>
    Thanks you! This worked!

    I have one remaining issue from a visual standpoint which is my fields are copied from the Worldbuilder and boil down to <formattedtextfield> fields that I am overwriting the config of.

    My Template:
    Code:
    <template name="ft_column_labeled_entity">
    	<basicft>
    		<font>tsb_basic_font_green</font> <!-- (THIS DOES NOT WORK) -->
    		<frame mergerule="replace" name="tsb_glow_frame" offset="20,20,20,20" />
    		<anchored>
    			<top parent="columnanchor" anchor="bottom" relation="relative" offset="7" />
    			<left offset="105" />
    			<right offset="-40" />
    		</anchored>
    	</basicft>
    </template>
    Which is modifying basicft from CoreRPG\common\template_common.xml:
    Code:
    <template name="basicft">
    	<simpleft>
    		<frame mergerule="replace" name="fielddark" offset="7,5,7,5" hidereadonly="true" />
    		<stateframe>
    			<keyedit name="fieldfocus" offset="7,5,7,5" />
    			<hover name="fieldfocus" offset="7,5,7,5" hidereadonly="true" />
    			<drophilight name="fieldfocus" offset="7,5,7,5" hidereadonly="true" />
    		</stateframe>
    	</simpleft>
    </template>
    Which is modifying stringft from CoreRPG\common\template_common.xml:
    Code:
    <template name="simpleft">
    	<formattedtextfield>
    		<script>
    			function onInit()
    				registerMenuItem(Interface.getString("button_import_clean_text"), "radial_magicwand", 8);
    			end
    			function onMenuSelection(selection, subselection)
    				if selection == 8 then
    					setValue(ImportUtilityManager.cleanUpText(getValue()));
    				end
    			end
    		</script>
    	</formattedtextfield>
    </template>
    I cannot modify the font and cannot find a definition for the <formattedtextfield> to go any further into what the definition for font is inside the tag.

    My question is two fold.

    1. Why does the font assignement in my template no appear to effect the fonts within those fields?
    2. Is there a better field to be using here? I really just want a field that can have multiple lines text and/or links I have draggeed in from another window. Any editable field that does that is fine with me I am just not sure what fields exist and what they do by default. I am only using this template because that is how Worldbuilder was defined and I used it as a base for my record.


    Edit - I have since figured out that this field is, like many others, governed by the "defaultstringcontrol" font definition, however I am still curious how one might overwrite that in a tag for a one-off font for a specific record.
    Last edited by Acofis; October 28th, 2022 at 18:44.

  9. #109
    Quote Originally Posted by damned View Post
    Something like this

    sidebar.xml
    Code:
    <?xml version="1.0" encoding="iso-8859-1"?>
    
    <root>
        <!-- Common ruleset-specific record types -->
        <icon name="sidebar_icon_recordtype_ancestry" file="graphics/sidebar/sidebar_icon_A.png" />
    
       <string name="library_recordtype_label_ancestry">Ancestries</string>
    
    
    </root>
    note ancestry is the bit you are looking at here
    make sure the icon is white
    Thanks for the fast reply!

    I am not sure what you mean by make sure the icon is white?

    To the rest of your reply... as far as I can tell I have this in place in the same manner described.

    I have a sidebar definition:
    Code:
    <!-- The Sprawl Basic -->
    <icon name="sidebar_icon_recordtype_entity" file="graphics/sidebar/sidebar_icon_treasureparcel_2.png" />
    <icon name="button_entity_down" file="graphics/sidebar/sidebar_dock_entry_down.png" />
    
    <string name="library_recordtype_label_entity">Corporations</string>
    I have a lua file that creates a record that is supposed to use this data:
    Code:
    aRecords = {
    	
    	-- New record types
    	["tsb_entity"] = { 
    		-- bExport = true,
    		-- sEditMode = "gm",
    		sDisplayText = "library_recordtype_label_entity",
    		aDataMap = { "tsb_entity", "reference.tsb_entity" },
    		aDisplayIcon = { "sidebar_icon_recordtype_entity", "buton_entity_down"},
    		fToggleIndex = toggleCharRecordIndex,
    		sRecordDisplayClass = "tsb_entity",
    	},
    };
    
    
    function onInit()
    
    	
    	LibraryData.overrideRecordTypes(aRecords);
    end
    I am getting the sidebar entry but everything is default (icon and empty title field). As far as I can tell the text and icon definition names match.

    My ext file defines all of the files that are in use and every part of this appears to work other than the icon and text setting. (I also do not get a title on the entity list that pops up when you click the button but I have not looked into why yet but I am hoping it is the same text field I am not getting for the sidebar button)
    Code:
    <base>
    	<!-- Tabletop settings -->
    	<includefile source="graphics/graphics_frames.xml" />
    	<includefile source="graphics/graphics_fonts.xml" />
    	<includefile source="graphics/graphics_icons.xml" />
    	<includefile source="graphics/graphics_sidebar.xml" />
    
    
    	<!-- Templates -->
    	<includefile source="campaign/template_entity.xml" /> -->
    
    	<!-- Entity (Corp or Threat) Settings -->
    	<includefile source="common/record_entity.xml" />
    
    
    	<!-- Strings -->
    	<includefile source="strings/strings_tsb.xml" />
    		
    	<!-- Scripts - Sidebar -->
    	<script name="DesktopManagerTSB" file="scripts/data_library_tsb.lua" />
    	<!-- <script name="EntityMainTSB" file="campaign/scripts/entity_main_tsb.lua" /> -->
    
    	<!-- Scripts - Character Sheet -->
    	<!-- <script name="CharacterUpdate" file="scripts/manager_dbd.lua" /> -->
    </base>

    • I never use DesktopManagerTSB but I assume the init() is run when this script is included (the record exists so I assume that is how this works).
    • Both icons exist already in morecore or corerpg and exist in each graphics/sidebar folder structure respectively.
    • String is explicipy defined so I am not sure how that is not getting to the sidebar unless something in my lua is silently failing.
    • I have no console errors or warnings about not finding files so I assume the icons, strings, and source files are being included as expected



    I am sure there is a straightforward reason this is happening I am just not seeing it and another set of eyes would be great!

    Also, is there an good way to make debug statements to test some of this stuff in the FGU console?
    Last edited by Acofis; October 28th, 2022 at 18:02.

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