Thread: MoreCore Coding Tutorials
-
January 16th, 2021, 01:15 #101
- Join Date
- Dec 2017
- Location
- Mid-West USA
- Posts
- 63
-
March 7th, 2022, 20:59 #102
- Join Date
- Jan 2019
- Posts
- 11
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
-
March 7th, 2022, 21:53 #103
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
-
March 7th, 2022, 22:13 #104
- Join Date
- Jan 2019
- Posts
- 11
Thanks for the quick reply but I found the problem it was in the call name for it
Thanks
-
October 28th, 2022, 08:09 #105
- Join Date
- Sep 2019
- Posts
- 7
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:
- Created a new record for the corporation data in record_entity.xml
- 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
- Defined the new record and used the LibraryData.overrideRecordTypes(aRecords) method to add it to the sidebar in data_library_tsb.lua
- 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!
-
October 28th, 2022, 08:13 #106
Something like this for the offset
<frame>
<name>windowlist</name>
<offset>12,10,12,10</offset>
</frame>
-
October 28th, 2022, 08:17 #107
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>
make sure the icon is white
-
October 28th, 2022, 17:18 #108
- Join Date
- Sep 2019
- Posts
- 7
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>
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>
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>
My question is two fold.
- Why does the font assignement in my template no appear to effect the fonts within those fields?
- 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.
-
October 28th, 2022, 17:51 #109
- Join Date
- Sep 2019
- Posts
- 7
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>
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
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