FG Spreadshirt Swag
Page 1 of 2 12 Last
  1. #1

    3.5 / Pathfinder Town Extension

    Okay! A far cry from what it was when I first posted here, I give you town.ext version 1.0 for 3.5E / Pathfinder ruleset. Hopefully it covers most everything of what you want to see in your towns. If anyone would like to post requests for additional features I'd love to hear them. Enjoy!
    Last edited by bradmcadam; May 19th, 2012 at 00:39.

  2. #2
    Zeus's Avatar
    Join Date
    Mar 2009
    Location
    Olympus
    Posts
    2,658
    Blog Entries
    2
    Looks like you may have some malformed XML, try removing the second < character in the window class definition for town_stats:

    i.e.
    Code:
    <<windowclass name="town_stats">
    to
    Code:
    <windowclass name="town_stats">
    As for embedding the code or attaching it: if your post is asking for help in debugging, its best to post up the code as you have done (easier to read inline), if on the other hand your post is offering code for use in other users games, probably best to attach the file as a regular ruleset xml/lua file.
    FG Project Development
    Next Project(s)*: Starfinder v1.2 Starship Combat

    Current Project:
    Starfinder v1.1 - Character Starships
    Completed Projects: Starfinder Ruleset v1.0, Starfinder Core Rulebook, Alien Archive, Paizo Pathfinder Official Theme, D&D 5E data updates
    * All fluid by nature and therefore subject to change.

  3. #3
    I caught the double << after the post, sorry about that. It's not the cause of the problem though.

  4. #4
    Ran the code through NPP's xml check and it doesn't find any bad code. What is the actual error?

  5. #5
    Zeus's Avatar
    Join Date
    Mar 2009
    Location
    Olympus
    Posts
    2,658
    Blog Entries
    2
    If your referring to the extension not being listed when you select a 3.5E/PF campaign. try changing the <root version tag to the same version as is used in the 3.5E/base.xml file.

    E.g 2.8 if your running current release version or 2.9 if your running the test version.
    FG Project Development
    Next Project(s)*: Starfinder v1.2 Starship Combat

    Current Project:
    Starfinder v1.1 - Character Starships
    Completed Projects: Starfinder Ruleset v1.0, Starfinder Core Rulebook, Alien Archive, Paizo Pathfinder Official Theme, D&D 5E data updates
    * All fluid by nature and therefore subject to change.

  6. #6
    No, the extension runs fine, looks good and is setup the way I told it to be, except for the "name" part of townsmall, or at least, that's where I think it is. The name part of townlist bugs out whenever you create a new town. It claims there's a problem with name not being anchored to anywhere, but I don't see where it needs to be when I compare the files from 3.5E of itemlist or npclist.

    I updated it to 2.8 just to be safe. No change.
    Last edited by bradmcadam; May 17th, 2012 at 22:14.

  7. #7
    The template for the "name" field in the townsmall class is anchored to a control called modified which is not in your windowclass definition for townsmall .

    If you include the modified and access fields in the townsmall class, the errors go away and it works.

    In general, if you are using a control tag that is not one of the built-in control types (stringfield, numberfield, etc.), that tag is a custom ruleset class and may make assumptions about other controls on the page.

    Code:
    		<windowclass name="townsmall">
    			<sizelimits>
    				<minimum>
    					<height>10</height>
    				</minimum>
    			</sizelimits>
    			<nodelete />
    			<sheetdata>
    				<link_control name="open">
    					<bounds>0,0,20,20</bounds>
    					<class>town</class>
    				</link_control>
    
    				<icon_access name="access">
    				</icon_access>
    				<icon_modified name="modified">
    				</icon_modified>
    			
    				<string_campaignrecordname name="name">
    					<empty>« New Town »</empty>
    				</string_campaignrecordname>
    			</sheetdata>
    		</windowclass>
    Cheers,
    JPG

  8. #8
    Excellent! Thank you so much for the proper fix. I had it working with an improper fix which is still in my code commented out for those that want a laugh.

    Since it's working I'll post what I have in case anyone wants to use it. I think there's still some issues with sharing, so once I have it tested and all of the fields the way I want them I'll post the final version. Enjoy Pathfinder/3.5E players!


    Code:
    <?xml version="1.0" encoding="iso-8859-1"?>
    
    <root version="2.8">
    	<properties>
    		<name>Town sheet</name>
    		<version>1</version>
    		
    		<author>Brash Entertainment</author>
    		<description>A town plugin for 3.5E/Pathfinder.</description>
    		
    		<ruleset>
    			<name>3.5E</name>
    		</ruleset>
    	</properties>
    
    	<base>
    		<icon name="button_towns" file="button_towns.png" />
    		<icon name="button_towns_down" file="button_towns_down.png" />
    		
    		<windowclass name="town_stats">
    			<sheetdata>
    				<genericcontrol name="columnanchor">
    					<bounds>0,0,0,0</bounds>
    					<invisible />
    				</genericcontrol>
    				
    				<string_column name="size">
    					<tabtarget next="alignment" prev="population" />
    				</string_column>
    				<label_column>
    					<anchor>size</anchor>
    					<static>Size</static>
    				</label_column>
    	
    				<string_column name="alignment">
    					<tabtarget next="gplimit" prev="size" />
    				</string_column>
    				<label_column>
    					<anchor>alignment</anchor>
    					<static>Alignment</static>
    				</label_column>
    	
    				<number_column name="gplimit">
    					<tabtarget next="assets" prev="alignment" />
    					<!--<script>
    						function onInit()
    							self.onSizeChanged = sizeChanged;
    						end
    						
    						function sizeChanged()
    							local winwidth, winheight = getSize();
    							
    							local gplimitwidth = math.floor(winwidth - 60);
    							
    							gplimit.setAnchoredWidth(gplimitwidth);
    							gplimit.setAnchoredHeight(15);
    						end
    					</script>-->
    				</number_column>
    				<label_column>
    					<anchor>gplimit</anchor>
    					<static>GP Limit</static>
    				</label_column>
    	
    				<number_column name="assets">
    					<tabtarget next="population" prev="gplimit" />
    					<!--<script>
    						function onInit()
    							super.onInit();
    							setAnchoredWidth(70);
    						end
    					</script>-->
    				</number_column>
    				<label_column>
    					<anchor>assets</anchor>
    					<static>Assets</static>
    				</label_column>
    	
    				<number_column name="population">
    					<tabtarget next="size" prev="assets" />
    				</number_column>
    				<label_column>
    					<anchor>population</anchor>
    					<static>Population</static>
    				</label_column>
    		
    				<!-- Spacer -->
    				<!--<genericcontrol>
    					<anchored>
    						<to>population</to>
    						<position>below</position>
    						<size>
    							<height>15</height>
    						</size>
    					</anchored>
    				</genericcontrol>-->
    				<spacer>
    					<anchor>columnanchor</anchor>
    					<relative />
    					<height>25</height>
    				</spacer>
    			</sheetdata>
    		</windowclass>
    
    		<windowclass name="town">
    			<frame>charsheet</frame>
    			<placement>
    				<size>
    					<width>270</width>
    					<height>350</height>
    				</size>
    			</placement>
    			<sizelimits>
    				<dynamic />
    				<minimum>
    					<width>200</width>
    					<height>220</height>
    				</minimum>
    			</sizelimits>
    			<minimize>minimized_note</minimize>
    			<sharable />
    			<tooltip>
    				<field>name</field>
    			</tooltip>
    			<sheetdata>
    				<link_control>
    					<bounds>19,28,20,20</bounds>
    					<class>town</class>
    				</link_control>
    				
    				<!-- NAME -->
    				<genericcontrol name="nameframe">
    					<bounds>40,20,-25,35</bounds>
    					<frame>
    						<name>sheetgroup</name>
    					</frame>
    				</genericcontrol>
    				
    				<stringfield name="name">
    					<bounds>50,30,-30,20</bounds>
    					<empty>« New Town »</empty>
    					<font>sheettext</font>
    				</stringfield>
    				
    				<!-- Frames -->
    				<genericcontrol name="statframe">
    					<bounds>10,54,-12,130</bounds>
    					<frame>
    						<name>sheetgroup</name>
    						<offset>0,1,0,0</offset>
    					</frame>
    				</genericcontrol>
    				
    				<genericcontrol name="noteframe">
    					<bounds>10,184,-12,-13</bounds>
    					<frame>
    						<name>sheetgroup</name>
    						<offset>0,1,0,0</offset>
    					</frame>
    				</genericcontrol>
    				
    				<!-- Stats Window -->
    				<subwindow name="stats">
    					<anchored>
    						<to>statframe</to>
    						<position>over</position>
    						<offset>-15,-7</offset>
    					</anchored>
    					<class>town_stats</class>
    					<activate />
    				</subwindow>
    				
    				<scrollercontrol name="stat_scroller">
    					<anchored>
    						<to>statframe</to>
    						<position>belowright</position>
    					</anchored>
    					<target>stats</target>
    					<invisible />
    				</scrollercontrol>
    
    				<!-- Notes Window -->
    				<stringfield name="notes">
    					<anchored>
    						<to>noteframe</to>
    						<position>over</position>
    						<offset>-12,-7</offset>
    					</anchored>
    					<multilinespacing>18</multilinespacing>
    					<font>sheettext</font>
    				</stringfield>
    				
    				<button_close_charsheetmini />
    			</sheetdata>
    		</windowclass>
    		
    		<windowclass name="townsmall">
    			<sizelimits>
    				<minimum>
    					<height>10</height>
    				</minimum>
    			</sizelimits>
    			<nodelete />
    			<sheetdata>
    				<link_control name="open">
    					<bounds>0,0,20,20</bounds>
    					<class>town</class>
    				</link_control>
    				
    				<icon_access name="access">
    				</icon_access>
    				<icon_modified name="modified">
    				</icon_modified>
    			
    				<string_campaignrecordname name="name">
    					<!--<bounds>25,1,-1,20</bounds>-->
    					<empty>« New Town »</empty>
    				</string_campaignrecordname>
    			</sheetdata>
    		</windowclass>
    		
    		<windowclass name="townlist">
    			<frame>scrollboxfortabs</frame>
    			<dynamic />
    			<placement>
    				<size>
    					<width>275</width>
    					<height>350</height>
    				</size>
    			</placement>
    			<sizelimits>
    				<dynamic />
    				<minimum>
    					<width>200</width>
    					<height>220</height>
    				</minimum>
    			</sizelimits>
    			<softclose />
    			<nodelete />
    			<sheetdata>
    				
    				<list_campaign name="list">
    					<datasource>.</datasource>
    					<class>townsmall</class>
    					<acceptdrop>
    						<class>town</class>
    						<field>*</field>
    					</acceptdrop>
    				</list_campaign>
    				<scroller_campaign>
    					<target>list</target>
    				</scroller_campaign>
    				
    				<button_new>
    					<class>town</class>
    					<gmonly />
    				</button_new>
    				<categories>
    					<targetcontrol>list</targetcontrol>
    				</categories>
    
    				<filter name="filter">
    					<bounds>55,-70,-50,20</bounds>
    				</filter>
    				<button_filter name="filtertrigger">
    					<bounds>20,-85,21,41</bounds>
    				</button_filter>			
    				
    				<button_close_scrollbox />
    			</sheetdata>
    		</windowclass>
    		
    		<script name="towninit">
    			function onInit()
    				if not User.isLocal() and User.isHost() then
    					DesktopManager.registerDockShortcut("button_towns", "button_towns_down", "Towns", "townlist", "town");
    				end
    			end
    		</script>
    	</base>
    </root>

  9. #9
    Town 1.1 is up for 3.5E / Pathfinder !

    I made some changes such as the NPC list, and the main data is structured much better for towns in this ruleset. Enjoy!

  10. #10
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,362
    Great - thanks for converting. :-)

    I've added an entry in the 3.5E/Pathfinder forum extension list: https://www.fantasygrounds.com/forum...d.php?p=124702

    Hope this is OK.

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
  •  
DICE PACKS BUNDLE

Log in

Log in