FG Spreadshirt Swag
Page 1 of 4 123 ... Last
  1. #1

    how do you get the scroll code to work?

    I'm making a ruleset for a game that has a total of seventy skills and about twenty are the player full out it I.E. craft: armor, craft: weapon. I want it to share the page with space where the player can write down their abilities, so there would be two spaces, one for skills and the other for abilities. If put all of the skills it will go outside of the frame so how do I give the frame a scroll bar?

  2. #2
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,413
    Have a look at the XML in the CoreRPG ruleset. campaign\record_char_abilities.xml - the "charsheet_abilities" windowclass.

    The abilities are stored in a windowlist control called "abilities" and a scrollbar (using the <scrollbar_list> template) is anchored on that windowlist:

    Code:
    <scrollbar_list>
    	<anchored to="abilities" />
    	<target>abilities</target>
    </scrollbar_list>
    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!

  3. #3
    thank you for this, but I'm running into a problem

    here is the code I'm writing, I am not very versed with XML could you give the code a once over point out where I'm dropping the ball because FG is crashing and giving a "Database Error: A XML parse error occurred processing file campaign/record_char_skills.xml - Error on line 61: Error reading end tag." which is referring to the "</sheetdata>"

    File: record_char_skills.xml

    Code:
    <?xml version="1.0" encoding="iso-8859-1"?>
    
    <!-- 
      Please see the license.html file included with this distribution for 
      attribution and copyright information.
    -->
    
    <root>
    	<windowclass name="charsheet_skills">
    		<margins control="0,0,0,2" />
    		<sheetdata>
    <!--CCCCCCCC(skillSframe)CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC-->
    			<frame_char name="skillSframe">
    				<bounds>15,0,242,-5</bounds>
    			</frame_char>
    			<label_frametop>
    			<list_text name="skills_text">
    				<anchored to="skillSframe">
    					<left offset="15" />
    					<top offset="35" />
    					<right offset="-20" />
    					<bottom offset="-20" />
    				</anchored>
    				<columns width="222" filldown="true" />
    				<newfocus>name</newfocus>
    				<datasource>.skills_textlist</datasource>
    				<class>char_skills_text</class>
    				<acceptdrop>
    					<class>referencetext</class>
    					<class>referencetextwide</class>
    					<field>*</field>
    				</acceptdrop>
    			</list_text>
    			<scrollbar_list>
    				<anchored to="skills_text" />
    				<target>skills</target>
    			</scrollbar_list>	
    <!--CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC-->
    <!--CCCCCCCCC( Abilities )CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC-->
    			<frame_char name="AbilitiesFrame">
    				<bounds>260,0,-20,-5</bounds>
    			</frame_char>
    			<label_frametop>
    				<anchored to="AbilitiesFrame" />
    				<static textres="char_label_bene_abil" />
    			</label_frametop>
    			<stringu name="Abilities">
    				<anchored to="AbilitiesFrame">
    					<top offset="30" />
    					<left offset="15" />
    					<right offset="-20" />
    					<bottom offset="-15" />
    				</anchored>
    				<multilinespacing>20</multilinespacing>
    			</stringu>
    			<scrollbar_list>
    				<anchored to="Abilities" />
    				<target>Abilities</target>
    			</scrollbar_list>
    <!--CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC-->
    	</sheetdata>
    </windowclass>
    	
    </root>

  4. #4

    Join Date
    Jun 2013
    Location
    Isanti, MN
    Posts
    2,922
    One of your "label_frametop" elements seems to be left open...

  5. #5
    *facepalm* thank you

    ok what am I missing, this is the source fo the skills frame

    Code:
    <?xml version="1.0" encoding="iso-8859-1"?>
    
    <!-- 
      Please see the license.html file included with this distribution for 
      attribution and copyright information.
    -->
    
    <root>
    	<windowclass name="skills_text">
    		<frame>referencepage</frame>
    		<placement>
    			<size width="400" height="350" />
    		</placement>
    		<sizelimits>
    			<dynamic />
    		</sizelimits>
    		<minimize>minimized_reference</minimize>
    <!--CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC-->
    			
    			<anchor_column name="columnanchor" />
    		<!--Skills/Skills/Skills/Skills/Skills/Skills/Skills/Skills/Skills/-->
    			<label_column name="Skill_label">
    				<static textres="char_label_mecInt" />
    				<bounds>22,40,135,15</bounds>
    			</label_column>
    			<number_columnh name="mecInt_rnk">
    				<bounds>160,40,15,15</bounds>
    				<hideonvalue >0</hideonvalue>
    			</number_columnh>
    							<label_column name="plus_label">
    								<static textres="char_label_plus" />
    								<bounds>181,40,15,15</bounds>
    							</label_column>
    			<number_columnh name="Int_stat">
    				<bounds>195,40,15,15</bounds>
    				<hideonvalue >0</hideonvalue>
    				<nokeyedit />
    			</number_columnh>
    							<label_column name="equl_label">
    								<static textres="char_label_equl" />
    								<bounds>215,40,15,15</bounds>
    							</label_column>
    			<number_columnh name="mecInt_tot">
    				<bounds>227,40,15,15</bounds>
    				<hideonvalue >0</hideonvalue>
    			</number_columnh>
    		<!--Skills/Skills/Skills/Skills/Skills/Skills/Skills/Skills/Skills/-->
    			<label_column name="Skill_label">
    				<static textres="char_label_mecInt" />
    				<bounds>22,60,135,15</bounds>
    			</label_column>
    			<number_columnh name="mecInt_rnk">
    				<bounds>160,60,15,15</bounds>
    				<hideonvalue >0</hideonvalue>
    			</number_columnh>
    							<label_column name="plus_label">
    								<static textres="char_label_plus" />
    								<bounds>181,60,15,15</bounds>
    							</label_column>
    			<number_columnh name="Int_stat">
    				<bounds>195,60,15,15</bounds>
    				<hideonvalue >0</hideonvalue>
    				<nokeyedit />
    			</number_columnh>
    							<label_column name="equl_label">
    								<static textres="char_label_equl" />
    								<bounds>215,60,15,15</bounds>
    							</label_column>
    			<number_columnh name="mecInt_tot">
    				<bounds>227,60,15,15</bounds>
    				<hideonvalue >0</hideonvalue>
    			</number_columnh>
    		<!--Skills/Skills/Skills/Skills/Skills/Skills/Skills/Skills/Skills/-->
    			<label_column name="Skill_label">
    				<static textres="char_label_mecInt" />
    				<bounds>22,80,135,15</bounds>
    			</label_column>
    			<number_columnh name="mecInt_rnk">
    				<bounds>160,80,15,15</bounds>
    				<hideonvalue >0</hideonvalue>
    			</number_columnh>
    							<label_column name="plus_label">
    								<static textres="char_label_plus" />
    								<bounds>181,80,15,15</bounds>
    							</label_column>
    			<number_columnh name="Int_stat">
    				<bounds>195,80,15,15</bounds>
    				<hideonvalue >0</hideonvalue>
    				<nokeyedit />
    			</number_columnh>
    							<label_column name="equl_label">
    								<static textres="char_label_equl" />
    								<bounds>215,80,15,15</bounds>
    							</label_column>
    			<number_columnh name="mecInt_tot">
    				<bounds>227,80,15,15</bounds>
    				<hideonvalue >0</hideonvalue>
    			</number_columnh>
    		<!--Skills/Skills/Skills/Skills/Skills/Skills/Skills/Skills/Skills/-->
    			<label_column name="Skill_label">
    				<static textres="char_label_mecInt" />
    				<bounds>22,100,135,15</bounds>
    			</label_column>
    			<number_columnh name="mecInt_rnk">
    				<bounds>160,100,15,15</bounds>
    				<hideonvalue >0</hideonvalue>
    			</number_columnh>
    							<label_column name="plus_label">
    								<static textres="char_label_plus" />
    								<bounds>181,100,15,15</bounds>
    							</label_column>
    			<number_columnh name="Int_stat">
    				<bounds>195,100,15,15</bounds>
    				<hideonvalue >0</hideonvalue>
    				<nokeyedit />
    			</number_columnh>
    							<label_column name="equl_label">
    								<static textres="char_label_equl" />
    								<bounds>215,100,15,15</bounds>
    							</label_column>
    			<number_columnh name="mecInt_tot">
    				<bounds>227,100,15,15</bounds>
    				<hideonvalue >0</hideonvalue>
    			</number_columnh>
    		<!--Skills/Skills/Skills/Skills/Skills/Skills/Skills/Skills/Skills/-->
    		
    		</windowclass>
    	</windowclass>
    </root>
    Last edited by Dragon_of_old; November 10th, 2016 at 03:01.

  6. #6
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,413
    <sheetdata> is missing.

    Info on windows and control 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!

  7. #7
    thank you for that info, sorry for not replying soon.

    sadly I'm still missing something every time I click on the tab it gives me these errors.

    Runtime Notice: Host session started
    Ruleset Error: windowlist: Could not find windowclass (char_skillsText) for control (skillsText) in windowclass (charsheet_skills)
    Ruleset Error: window: Control() anchoring to an undefined control (skillsText) in windowclass (charsheet_skills)
    Ruleset Error: window: Control() anchoring to an undefined control (skillsText) in windowclass (charsheet_skills)
    Ruleset Error: window: Control() anchoring to an undefined control (skillsText) in windowclass (charsheet_skills)
    Last edited by Dragon_of_old; November 16th, 2016 at 00:37.

  8. #8
    There's a control inside the sheetdata tag for the charsheet_skills windowclass, that does not have a name attribute, but uses anchors to "skillsText"; and that control does not exist in the charsheet_skills windowclass.

    You should be able to search for "skillsText" in the file containing charsheet_skills windowclass, and then fix up the anchors to point to a named control that exists.

    Regards,
    JPG

  9. #9
    thank you
    Last edited by Dragon_of_old; November 17th, 2016 at 12:33.

  10. #10
    There is something very simple I'm missing here, and I can't nail it down.

    Here is what I'm trying to achieve, I want to add a tab that has both "skills" and "benefits and abilities" this is what it looks like so far.
    Attachment 16434
    in the "Skills" box there is the list of skills (like skill one, skill two, etc.) I have looked over the XML files of the CoreRPG, 4E and other rulesets.

    Here is what I have done
    1.in the "base.XML"
    Code:
    <?xml version="1.0" encoding="iso-8859-1"?>
    
    <!-- 
      Please see the license.html file included with this distribution for 
      attribution and copyright information.
    -->
    
    <root version="3.0" release="3" logo="logo.png">
    	<announcement text="Iron Kingdoms RPG by Privateer Press\rRuleset by: Carl Hawkins" font="emotefont" icon="rulesetlogo_CoreRPG" />
    
    	<!-- Attributes -->
    	<description>
    		<text>Iron Kingdoms</text>
    		<author>Carl Hawkins</author>
    		<website>https://www.fantasygrounds.com</website>
    	</description>
    	
    	<!-- Layers -->
    	<importruleset source="CoreRPG" />
    	
    	<!-- Tabletop settings -->
    	<includefile source="gameelements.xml" />
    
    	<!-- Graphics -->
    	
    	<!-- Strings -->
    	<includefile source="strings/strings_ik.xml" />
    
    	<!-- Campaign Records -->
    	<includefile source="campaign/record_char.xml" />
    	<includefile source="campaign/record_char_main.xml" />
    	<includefile source="campaign/record_char_skills.xml" />
    	<includefile source="campaign/record_char_abilities.xml" />
    	<includefile source="campaign/record_char_inventory2.xml" />
    	<includefile source="campaign/record_char_notes.xml" />
    	<includefile source="campaign/record_char_skillsText.xml" />
    	
    </root>
    2. in the "record_char_skills.xml"
    Code:
    <?xml version="1.0" encoding="iso-8859-1"?>
    
    <!-- 
      Please see the license.html file included with this distribution for 
      attribution and copyright information.
    -->
    
    <root>
    	<windowclass name="charsheet_skills">
    		<margins control="0,0,0,2" />
    		<sheetdata>
    <!--CCCCCCCC(skillSframe)CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC-->
    			<frame_char name="skillSframe">
    				<bounds>15,0,242,-5</bounds>
    			</frame_char>
    			<label_frametop>
    				<anchored to="skillSframe" />
    				<static textres="SkillsTitle" />
    			</label_frametop>
    			<list_text name="skillsText">
    				<anchored to="skillSframe">
    					<left offset="15" />
    					<top offset="35" />
    					<right offset="-20" />
    					<bottom offset="-20" />
    				</anchored>
    				<columns width="222" filldown="true" />
    				<newfocus>name</newfocus>
    				<datasource>.skillsTextlist</datasource>
    				<class>char_skillsText</class>
    				<acceptdrop>
    					<class>referencetext</class>
    					<class>referencetextwide</class>
    					<field>*</field>
    				</acceptdrop>
    			</list_text>
    			<scrollbar_list>
    				<anchored to="skillSframe" />
    				<target>skillsText</target>
    			</scrollbar_list>	
    <!--CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC-->
    <!--CCCCCCCCC( Abilities )CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC-->
    			<frame_char name="AbilitiesFrame">
    				<bounds>260,0,-20,-5</bounds>
    			</frame_char>
    			<label_frametop>
    				<anchored to="AbilitiesFrame" />
    				<static textres="baaTitle" />
    			</label_frametop>
    			<stringu name="Abilities">
    				<anchored to="AbilitiesFrame">
    					<top offset="30" />
    					<left offset="15" />
    					<right offset="-20" />
    					<bottom offset="-15" />
    				</anchored>
    				<multilinespacing>20</multilinespacing>
    			</stringu>
    			<scrollbar_list>
    				<anchored to="Abilities" />
    				<target>Abilities</target>
    			</scrollbar_list>
    <!--CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC-->
    	</sheetdata>
    </windowclass>
    	
    </root>
    3. in the "record_char_skillsText.xml"
    Code:
    <?xml version="1.0" encoding="iso-8859-1"?>
    
    <!-- 
      Please see the license.html file included with this distribution for 
      attribution and copyright information.
    -->
    
    <root>
    	<windowclass name="skillsText">
    		<frame>referencepage</frame>
    		<placement>
    			<size width="400" height="350" />
    		</placement>
    		<sizelimits>
    			<dynamic />
    		</sizelimits>
    		<minimize>minimized_reference</minimize>
    		<tooltip field="value"/>
    <!--CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC-->
    			<sheetdata>
    				<sub_record_header name="header">
    					<class>char_skillsText_header</class>
    				</sub_record_header>
    				
    				<frame_record_content name="contentframe" />
    				
    			<anchor_column name="columnanchor" />
    		<!--Skills/Skills/Skills/Skills/Skills/Skills/Skills/Skills/Skills/-->
    			<label_column name="Skill_label">
    				<static textres="char_label_mecInt" />
    				<bounds>22,40,135,15</bounds>
    			</label_column>
    			<number_columnh name="mecInt_rnk">
    				<bounds>160,40,15,15</bounds>
    				<hideonvalue >0</hideonvalue>
    			</number_columnh>
    							<label_column name="plus_label">
    								<static textres="char_label_plus" />
    								<bounds>181,40,15,15</bounds>
    							</label_column>
    			<number_columnh name="Int_stat">
    				<bounds>195,40,15,15</bounds>
    				<hideonvalue >0</hideonvalue>
    				<nokeyedit />
    			</number_columnh>
    							<label_column name="equl_label">
    								<static textres="char_label_equl" />
    								<bounds>215,40,15,15</bounds>
    							</label_column>
    			<number_columnh name="mecInt_tot">
    				<bounds>227,40,15,15</bounds>
    				<hideonvalue >0</hideonvalue>
    			</number_columnh>
    		<!--Skills/Skills/Skills/Skills/Skills/Skills/Skills/Skills/Skills/-->
    			<label_column name="Skill_label">
    				<static textres="char_label_mecInt" />
    				<bounds>22,60,135,15</bounds>
    			</label_column>
    			<number_columnh name="mecInt_rnk">
    				<bounds>160,60,15,15</bounds>
    				<hideonvalue >0</hideonvalue>
    			</number_columnh>
    							<label_column name="plus_label">
    								<static textres="char_label_plus" />
    								<bounds>181,60,15,15</bounds>
    							</label_column>
    			<number_columnh name="Int_stat">
    				<bounds>195,60,15,15</bounds>
    				<hideonvalue >0</hideonvalue>
    				<nokeyedit />
    			</number_columnh>
    							<label_column name="equl_label">
    								<static textres="char_label_equl" />
    								<bounds>215,60,15,15</bounds>
    							</label_column>
    			<number_columnh name="mecInt_tot">
    				<bounds>227,60,15,15</bounds>
    				<hideonvalue >0</hideonvalue>
    			</number_columnh>
    		<!--Skills/Skills/Skills/Skills/Skills/Skills/Skills/Skills/Skills/-->
    			<label_column name="Skill_label">
    				<static textres="char_label_mecInt" />
    				<bounds>22,80,135,15</bounds>
    			</label_column>
    			<number_columnh name="mecInt_rnk">
    				<bounds>160,80,15,15</bounds>
    				<hideonvalue >0</hideonvalue>
    			</number_columnh>
    							<label_column name="plus_label">
    								<static textres="char_label_plus" />
    								<bounds>181,80,15,15</bounds>
    							</label_column>
    			<number_columnh name="Int_stat">
    				<bounds>195,80,15,15</bounds>
    				<hideonvalue >0</hideonvalue>
    				<nokeyedit />
    			</number_columnh>
    							<label_column name="equl_label">
    								<static textres="char_label_equl" />
    								<bounds>215,80,15,15</bounds>
    							</label_column>
    			<number_columnh name="mecInt_tot">
    				<bounds>227,80,15,15</bounds>
    				<hideonvalue >0</hideonvalue>
    			</number_columnh>
    		<!--Skills/Skills/Skills/Skills/Skills/Skills/Skills/Skills/Skills/-->
    			<label_column name="Skill_label">
    				<static textres="char_label_mecInt" />
    				<bounds>22,100,135,15</bounds>
    			</label_column>
    			<number_columnh name="mecInt_rnk">
    				<bounds>160,100,15,15</bounds>
    				<hideonvalue >0</hideonvalue>
    			</number_columnh>
    							<label_column name="plus_label">
    								<static textres="char_label_plus" />
    								<bounds>181,100,15,15</bounds>
    							</label_column>
    			<number_columnh name="Int_stat">
    				<bounds>195,100,15,15</bounds>
    				<hideonvalue >0</hideonvalue>
    				<nokeyedit />
    			</number_columnh>
    							<label_column name="equl_label">
    								<static textres="char_label_equl" />
    								<bounds>215,100,15,15</bounds>
    							</label_column>
    			<number_columnh name="mecInt_tot">
    				<bounds>227,100,15,15</bounds>
    				<hideonvalue >0</hideonvalue>
    			</number_columnh>
    		<!--Skills/Skills/Skills/Skills/Skills/Skills/Skills/Skills/Skills/-->
    			<resize_referencepage />
    			<close_referencepage />
    		</sheetdata>
    		</windowclass>
    		
    		<windowclass name="char_skillsText_header">
    		<margins control="0,0,0,7" />
    		<script>
    			function onInit()
    				update();
    			end
    			function update()
    				local bReadOnly = WindowManager.getReadOnlyState(getDatabaseNode());
    				name.setReadOnly(bReadOnly);
    			end
    		</script>
    		<sheetdata>
    			<link_record_header>
    				<class>skillsText</class>
    				<description field="name" />
    			</link_record_header>
    
    			<string_record_name name="name">
    				<anchored>
    					<top offset="5"/>
    					<left offset="40" />
    					<right offset="-40" />
    				</anchored>
    			</string_record_name>
    
    			<anchor_record_header_right name="rightanchor" />
    			<icon_record_locked />
    			<button_record_locked />
    		</sheetdata>
    	</windowclass>
    </root>
    and I'm still getting an error
    "Runtime Notice: Host session started
    Ruleset Error: windowlist: Could not find windowclass (char_skillsText) for control (skillsText) in windowclass (charsheet_skills)"

    I thank you for your patience in helping me with this problm.

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
  •  
STAR TREK 2d20

Log in

Log in