STAR TREK 2d20
Page 2 of 4 First 1234 Last
  1. #11
    As suggested I created a new Ruleset to fool around in, I wanted to use CoreRPGExtended as a base because I like the Abilities Page there. I added a folder Scripts and copied the manager_actions.lua over, added the code from above and rolled some d100. A 100 was still 100, the script did not fire properly.

    To make sure I did the code correctly I then took the CoreRPG, extracted it to a new folder and edited the manager_actions.lua directly. When I roll D100 there it works! A 100 is counted as a 0!

    Though I know now that the code would work I do not quiet understand why it did not in CoreRPGExtended. My gut tells me it has something to do with the files and where they are. I assume that simply adding the single LUA Script may not be sufficient to make it work within Cascading ruleset.
    Last edited by ImaTarget; May 31st, 2014 at 14:16. Reason: clarification
    Teamwork is essential, it gives them someone else to shoot at.
    Read me: https://chaosmeister.games/

  2. #12
    All right, tried to work out how the Charsheets work but not as much success as I would like. Where the heck can I define how big a window is? It seems there are so many different ways to define how a window looks like that it is really hard for me to figure out how to do it properly as every ruleset seems to do it differently.

    Code:
    		<frame_char name="overviewframe">
    				<bounds>15,20,-140,45</bounds>
    			</frame_char>
    			<string_labeled name="name">
    				<anchored to="overviewframe" position="insidetopleft" offset="15,10" height="20">
    					<right offset="-145" />
    				</anchored>
    				<labelres>char_label_name</labelres>
    			</string_labeled>
    			
    			
    			<!--MB ADD RACE to name -->
    			
    			<string_labeled name="race">
    				<anchored>
    					<to>name</to>
    					<position>right</position>
    					<offset>5,0</offset>
    					<size>
    						<width>130</width>
    					</size>
    			</anchored>
    				<labelres>char_label_race</labelres>
    				
    			</string_labeled>			
    			
    						
    			<!--MB ADD AGE to name-->
    			
    			<string_labeled name="age">
    				<anchored>
    					<to>name</to>
    					<position>below</position>
    					<offset>0,10</offset>
    					<size>
    						<width>50</width>
    					</size>
    			</anchored>
    				<labelres>char_label_age</labelres>
    				
    			</string_labeled>
    This is what I added in record_char.xml to try to figure out how stuff works. There must be an easier or better way to do it this?? At the moment I canīt figure out for the life of me where the size of the frames is defined. I canīt get it bigger to encompass the added field. See the attached screenshot. Help? There must be something fundamental I did not grasp in the documentation or I am not seeing in record_char.xml.
    Teamwork is essential, it gives them someone else to shoot at.
    Read me: https://chaosmeister.games/

  3. #13
    FYI, there's an Abilities tab in the CoreRPG ruleset in beta testing.

    Frames are defined in the ruleset using "framedef" objects defined in the ruleset files. In CoreRPG, these are defined in ./graphics/graphics_frames.xml file and the graphics are in the ./graphics/frames/ folder.

    Here is the developer reference for that tag to see how they are defined.
    https://www.fantasygrounds.com/refdoc/framedef.xcp

    The frame only defines the corners, sides and center graphics to use when a frame is used. The size of the window or control that the frame is applied to is what controls the ultimate display size of the frame.

    There is a "frame" tag defined for most controls defined within a windowclass (or inherited through templates). Also, a frame tag can be defined for each windowclass as well.

    I'm away from my machine currently. I believe that the framedef for character sheets is "charsheet" which is defined in ./graphics/graphics_frames.xml and the windowclass for the character sheet is also called "charsheet" and defined in ./campaign/record_char.xml. An instance of this windowclass is created when a character is selected or created in the character selection window.

    Just keep asking questions, and I'll answer if someone doesn't beat me to it. Great community here.

    Also, make sure to check out the developer guides. They are more of a reference than a walk through, but it's good to know where they are if you're digging in. Especially the Ruleset Reference.
    https://www.fantasygrounds.com/wiki/...veloper_Guides

    Cheers,
    JPG

  4. #14

  5. #15
    Thanks for these tips!

    I was able to figure that one out! First Success! I had to change a different <bounds> value in the charsheet then I thought I needed. Big DUH from my end, so easy once you know how.

    Code:
    	<frame_char name="overviewframe">
    			<!-- changed from 15,20,-140,45 -->
    				<bounds>15,20,-140,75</bounds>
    			</frame_char>
    Still have the problem that the Age field does not show the underline as the Name and Race fields do though. Any idea where this comes from? Code seems pretty identical for all three to me.

    Code:
    <string_labeled name="name">
    				<anchored to="overviewframe" position="insidetopleft" offset="15,10" height="20">
    					<right offset="-145" />
    				</anchored>
    				<labelres>char_label_name</labelres>
    			</string_labeled>
    			
    			
    			<!--MB ADD RACE to name -->
    			
    			<string_labeled name="race">
    				<anchored>
    					<to>name</to>
    					<position>right</position>
    					<offset>5,0</offset>
    					<size>
    						<width>130</width>
    					</size>
    			</anchored>
    				<labelres>char_label_race</labelres>
    				
    			</string_labeled>			
    			
    						
    			<!--MB ADD AGE to name-->
    			
    			<string_labeled name="age">
    				<anchored>
    					<to>name</to>
    					<position>below</position>
    					<offset>0,10</offset>
    					<size>
    						<width>100</width>
    					</size>
    			</anchored>
    				<labelres>char_label_age</labelres>
    				
    			</string_labeled>
    Teamwork is essential, it gives them someone else to shoot at.
    Read me: https://chaosmeister.games/

  6. #16
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,411
    Quote Originally Posted by ImaTarget View Post
    Still have the problem that the Age field does not show the underline as the Name and Race fields do though. Any idea where this comes from? Code seems pretty identical for all three to me.
    Specify a height instead of a width for the age control. Using the below anchor shorthand shares the bottom-left and bottom-right positions of the "name" control - this inherits the width of the anchor control, but not the height. The reason why "race" works OK is that it uses the right anchor shorthand which gets the top and bottom right corners from the anchor control, hence inheriting the control height.
    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  7. #17
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,411
    By-the-way, you do know that race and age are included on the "Notes" tab in the CoreRPG ruleset? Adding race and age to the title section adds it on all tabs and so reduces the space available to every tab.
    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  8. #18
    Ah, OK I will try that, thank you very much. <below> is then just a good choice if I have the same length but if the length it is different I will have to use <bound> again, is that correct?

    Right now I am just fumbling about trying to grasp what does what, and then I will figure out how the final sheet should look like. The system has a very small character sheet, I wager I will have Attributes and Skills on the first page. Combat relevant things on the second tab, a third tab for the inventory. And notes then on the 4th or somesuch. You are right of course that it wonīt make much sense to add too much to the title if that is repeated on every page. Good point, I will have to remember that.
    Teamwork is essential, it gives them someone else to shoot at.
    Read me: https://chaosmeister.games/

  9. #19
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,411
    Quote Originally Posted by ImaTarget View Post
    Ah, OK I will try that, thank you very much. <below> is then just a good choice if I have the same length but if the length it is different I will have to use <bound> again, is that correct?
    It will probably be easier to use one of the corner shorthand anchors (e.g. belowleft) to give you one corner of another control and then use <width> and <height> entries in the <size> section. For example:
    Code:
    <string_labeled name="age">
    	<anchored>
    		<to>name</to>
    		<position>belowleft</position>
    		<offset>0,10</offset>
    		<size>
    			<height>20</height>
    			<width>25</width>
    		</size>
    </anchored>
    	<labelres>char_label_age</labelres>
    </string_labeled>
    Would give:

    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  10. #20
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,411
    More info on the shorthand anchors in the "Using the anchoring shorthand notation" section here: https://www.fantasygrounds.com/modguide/windowing.xcp
    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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