RPTools.net

Discussion and Support

Skip to content

It is currently Sun Jul 23, 2017 3:27 pm 






Reply to topic  [ 46 posts ]  Go to page Previous  1, 2, 3, 4  Next

Previous topic | Next topic 

  Print view

Author Message
User avatar  Offline
RPTools Team
 
Joined: Tue Feb 07, 2006 1:07 am
Posts: 1766
Location: Austin, Tx
 Post subject:
PostPosted: Mon Jun 23, 2008 2:14 pm 
I assume I can do that, I just don't know how. Or how long that might take.
/me no make movies :)

Are you wanting one for something in particular?


Top
 Profile  
 
User avatar  Offline
RPTools Team
 
Joined: Tue Feb 07, 2006 1:07 am
Posts: 1766
Location: Austin, Tx
 Post subject: RPData Files
PostPosted: Mon Jun 23, 2008 5:37 pm 
The RPData file contains any static data you might need for a game. I've used it to hold races, modifiers, monsters and more. If there is a large amount of data that needs to be referenced by a character sheet then RPData files are the way to do it.

RPData files are loaded into an internal database w/in CT. Each property defined in the file ends up as a column in the table. There isn't anything that the game settings file editors have to know about the database as it is completely hidden. But you can access the database directly outside of CT see what is going on. I've found that this is a useful way to debug things. The code provides a numeric key for each of the records, but this isn't very useful in a character sheet since it just numbers the records as they are loaded. So there should always be a unique property that is stored in the table. By convention I use a property called name. I make the value if it displayable to the user so that it is easy to show in tables and combo boxes, but that isn't required it just makes other things easier. If you have a unique property defined for the data file then it is possible to refer to the data in the file using a SLOT type of property in the propertyDescriptorSet.xml file.

The actual file format consists of two sections. The first is a limited version of the property descriptor set xml file described in an earlier post. The second section is the definition of each item in the table. These are wrapped in a document element called <rptools-data>. It looks like this:
Code:
<rptools-data>
  <property-set>
     <!-- Limited form of the property descriptor set defined earlier -->
     <type>stuff</type>
     ...
  </property-set>
  <stuff>
     <!-- A single record in the database. The element name is the same as the type defined in the property-set above. -->
  </stuff>
  ...
  <stuff>
     <!-- Last record in the table -->
  </stuff>
</rptools-data>

The limitations placed on the <property-set> element are that there can be no MAP or LIST data types defined within it. This is because the the database tables are not hierarchical. Since there aren't any MAP properties there isn't a need for the <property-sets> element in this file either. The only data types can be stored in a table are BOOLEAN, NUMBER, STRING, IMAGE, SCRIPT & SLOT. The MAP & LIST types and the <property-sets> element are ignored by the database code and will not generate exceptions.

There are two attributes defined that are only used in RPData files. These are @slot and @game-prop. When the @slot attribute is defined on any property and it contains the value 'modifiable' CT will allow that value to be modified by scripts and forms that display that value from a SLOT. Trying to modify any other child property values in a SLOT type of property will generate an error. These property values are also saved with the rest of the character data for use later. It is possible to add new properties to a SLOT value, but they would have to contain string values. The @slot attribute lets you define a data type for them as well.

The other special attribute is @game-prop. It is used to link a property in the table with a property from the propertyDescriptorSet.xml. Normally they would be linked by name, but the propertyDescriptorSet has a hierarchical structure and the table does not. So there is a need to map the property names for those values that are not stored at the root of the propertyDescriptorSet. Right now this is only used for IT's combatant look up table. It contains a bunch of monsters that can be loaded from the database and placed into the hierarchical structure of a combatant.

The <property-set> element contains a <type> element (See propertyDescriptorSet.xml in an earlier post). This element describes the type of data and is used in the @data attribute for SLOT type values. It is also the element name for each record in the table. The above example shows this. The value for <type> is stuff, each record in the second section is stored in a <stuff> element. The child elements for each record are the names of the properties defined in the <property-set> element. The order you define the children is not important, and it is not required that you have an element for each property defined. If no element is in the record then the default value for the property type is used. Here is an example of a RPData file with all of the pieces:
Code:
<rptools-data>
  <property-set>
    <type>class</type>
    <name>Character Classes</name>
    <description>Classes available to characters.</description>
    <game>D &amp; D 4e</game>
    <source>PHB</source>
    <properties>
      <property name="name"><description>Unique name of the class.</description></property>
      <property name="role"><description>Text describing the roles of this class.</description></property>
      <property name="powerSource"><description>Text describing the source of your powers.</description></property>
      <property name="keyAbilities"><description>Text describing the key abilities for this class.</description></property>
      <property name="armorProficiencies"><description>Text describing the armor proficiencies for this class.</description></property>
      <property name="weaponProficiencies"><description>Text describing the weapon proficiencies for this class.</description></property>
      <property name="bonusToDefense"><description>Text describing the defense bonus for this class.</description></property>
      <property name="firstLevelHitPoints"><description>The number of hit points received at first level.</description></property>
      <property name="firstLevelHitPointScript" type="SCRIPT"><description>The number of hit points received at first level.</description></property>
      <property name="hitPointsPerLevel" type="NUMBER"><description>The modifier applied to the AC defense.</description></property>
      <property name="healingSurges" type="SCRIPT"><description>The number of healing surges for this class.</description></property>
      <property name="trainedSkills"><description>Text describing the skills available and the number trained for this class.</description></property>
      <property name="buildOptions"><description>Text describing the build options for this class.</description></property>
      <property name="classFeatures"><description>Text listing the class features for this class.</description></property>
      <property name="modifierSetName"><description>Name of modifier set that provides defense.</description></property>
    </properties>
  </property-set>
  <class>
    <name>Fighter</name>
    <role>Defender. You are very tough and have the exceptional ability to contain enemies in melee.</role>
    <powerSource>Martial. You have become a master of combat through endless hours of practice, determination, and your own sheer physical toughness.</powerSource>
    <keyAbilities>Strength, Dexterity, Wisdom, Constitution</keyAbilities>
    <armorProficiencies>Cloth, leather, hide, chainmail, scale; light shield, heavy shield</armorProficiencies>
    <weaponProficiencies>Simple melee, military melee, simple ranged, military ranged</weaponProficiencies>
    <bonusToDefense>+2 Fortitude</bonusToDefense>
    <firstLevelHitPoints>15 + Constitution Score</firstLevelHitPoints>
    <firstLevelHitPointScript>15 + root.con.current</firstLevelHitPointScript>
    <hitPointsPerLevel>6</hitPointsPerLevel>
    <healingSurges>9 + root.con.currentMod</healingSurges>
    <trainedSkills><![CDATA[
      From the class skills list below, choose three trained skills at 1st level.<br/><i>Class Skills:</i> Athletics (Str),
      Endurance (Con), Heal (Wis), Intimidate (Cha), Streetwise (Cha)
    ]]></trainedSkills> 
    <buildOptions>Great weapon fighter, guardian fighter</buildOptions>
    <classFeatures>Combat Challenge, Combat Superiority, Fighter Weapon Talent</classFeatures>
    <modifierSetName>class.fighter</modifierSetName>
  </class>
</rptools-data>
Some notes:
  • type The type of data is class. Therefore each record in the file is kept in an element named <class>.
  • name This is the unique class name. I use it in combo boxes on my Abeille form so that the user can easily pick their class. It's value has to be unique within the table or the SLOT property won't know which of the 2 records to load.
  • firstLevelHitPoints is a SCRIPT property type. In this example it has it's script defined in the <firstLevelHitPoints> of the <class> data element. But it is also possible to define the script with the property. It will become the default script for those <class> elements that do not have a <firstLevelHitPoints> element. This is also a useful way to define default values for other columns.
  • trainedSkills is a regular STRING type of data that contains html. CT does not use html directly, but some of the components that you would place on an Abeille form do recognize it. The two main ones are Labels and Editor Panes. If you try to show this value in a component that doesn't recognize html, you will see all of the markup in the component.


Top
 Profile  
 
User avatar  Offline
Giant
 
Joined: Sun Jun 22, 2008 12:23 am
Posts: 231
Location: Tampa, FL
 Post subject:
PostPosted: Mon Jun 23, 2008 6:08 pm 
Great all I need to know now is how to post a patch.

Would it be okay if I started added classes and races to the databases in the 4e game file?


Top
 Profile  
 
User avatar  Offline
RPTools Team
 
Joined: Tue Feb 07, 2006 1:07 am
Posts: 1766
Location: Austin, Tx
 Post subject:
PostPosted: Mon Jun 23, 2008 6:12 pm 
I'll start working on that tonight. You need to coordinate any 4e changes with the file owners; Fobbo, kasrith and UntoldGlory.


Top
 Profile  
 
 Offline
Kobold
 
Joined: Sun Apr 12, 2009 7:22 pm
Posts: 18
Location: Versailles, Ky
 Post subject: Re: Adoptors: Game Settings File
PostPosted: Mon Jun 08, 2009 11:50 pm 
Will character sheets for warhammer, and warhammer40k dark heresy ever be made as a patch? This would be wonderful!

Knuckledragger


Top
 Profile  
 
User avatar  Offline
RPTools Team
 
Joined: Tue Feb 07, 2006 1:07 am
Posts: 1766
Location: Austin, Tx
 Post subject: Re: Adoptors: Game Settings File
PostPosted: Sat Jun 13, 2009 2:39 pm 
I don't know anything about warhammer, so I can't do it. If you can get some people together to create one, I would be happy to add it in with the rest of the CT/IT settings files.


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Mon Sep 15, 2008 8:27 am
Posts: 1165
Location: Bristol, UK
 Post subject: Re:
PostPosted: Wed Apr 20, 2011 12:42 pm 
jay wrote:
6 Select the 3 jars in the lib directory and hit OK. They are bsf-2.3.0rc1.jar, js-1.5R3.jar and Pack200Task.jar.


I also had to locate a jar file for "net.sourceforge.jarbundler.JarBundler" so I added jarbundler-2.2.0.jar to the classpath which I downloaded separately.


Top
 Profile  
 
User avatar  Offline
Site Admin
 
Joined: Mon Jun 12, 2006 12:20 pm
Posts: 12070
Location: Tampa, FL
 Post subject: Re: Re:
PostPosted: Wed Apr 20, 2011 3:35 pm 
Jagged wrote:
I also had to locate a jar file for "net.sourceforge.jarbundler.JarBundler" so I added jarbundler-2.2.0.jar to the classpath which I downloaded separately.

That's an Apple-specific tool, right? I don't see why that requirement would've been in CharTool.

Unless... Maybe I accidentally added it?! Let me check.

Yep, looks like that's my fault. I must've checked in some version of the code that wasn't supposed to be checked in. (I've been working on and off to get the build process for OSX more automated, but Ant is not my forté.)

Okay, I've moved the JarBundler definition to the OSX-specific "app" target where it won't be used unless you specific try to build that target (that target is never part of a default build). That should remove the requirement. This is in SVN revision 5757.


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Mon Sep 15, 2008 8:27 am
Posts: 1165
Location: Bristol, UK
 Post subject: Re: Adopters: Game Settings File
PostPosted: Thu Apr 21, 2011 3:31 am 
So I am up and running with Chartool running in Eclipse but I have a few questions that the instructions in this thread don't seem to answer.
  • To run from within Eclipse I had to build the game settings files in the web\arc\tool\inittool\gamessettings (from memory so maybe not accurate) directory but when it starts it doesn't actually use those files, it downloads them from rptools.net. Is that correct?
  • Is there a way to force the application to copy my local files instead?


Top
 Profile  
 
User avatar  Offline
RPTools Team
 
Joined: Tue Feb 07, 2006 1:07 am
Posts: 1766
Location: Austin, Tx
 Post subject: Re: Adopters: Game Settings File
PostPosted: Tue Apr 26, 2011 8:19 am 
Jagged wrote:
  • To run from within Eclipse I had to build the game settings files in the web\arc\tool\inittool\gamessettings (from memory so maybe not accurate) directory but when it starts it doesn't actually use those files, it downloads them from rptools.net. Is that correct?
By default, yes.

Jagged wrote:
  • Is there a way to force the application to copy my local files instead?
You add this to the VM arguments of the debug/run configuration in eclipse:
Code:
-DgameFileUrl="file://localhost/C:/Documents and Settings/Jay/workspace/web/src/tools/inittool/gameSettings/"
Replace the url with the location of your build files.


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Mon Sep 15, 2008 8:27 am
Posts: 1165
Location: Bristol, UK
 Post subject: Re: Adopters: Game Settings File
PostPosted: Tue May 03, 2011 5:51 pm 
Cool. I have another question though ;)

Adding -DgameFileUrl="file://localhost/.. etc etc" to my vre parameters works as you describe. And when I run Chartool from Eclipse it recognises the fact that I have modified the DnD4e file and it uses my local version (updated to v34). But how do I get it to detect that I have added a new source file to the DnD4e game?

I can, of course, browse the file structure and manually select my new source, but I want a clean install to detect it.

My local version.properties file contains the following additional lines:
Code:
dnd4e-hotfl.version=100
dnd4e-hotfl.parent=dnd4e
dnd4e-hotfl.name=Heroes of the Fallen Lands


What am I missing?


Top
 Profile  
 
User avatar  Offline
RPTools Team
 
Joined: Tue Feb 07, 2006 1:07 am
Posts: 1766
Location: Austin, Tx
 Post subject: Re: Adopters: Game Settings File
PostPosted: Wed May 04, 2011 9:52 am 
I'll have to take a look at the code when I get home from work. What you have looks right. There was some stuff included in the .rpgame file as well. There is a properties file in the root directory that had some more data in it IIRC.


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Tue Jun 13, 2006 4:55 pm
Posts: 1801
Location: Oak Harbor, WA
 Post subject: Re: Adopters: Game Settings File
PostPosted: Wed May 04, 2011 2:24 pm 
I sure hope you guys can manage to make an editor for us folks who can't figure this out, lol.

_________________
Steel Rat
-----------
Helm's Deep RPG Network
Infinite Realities - RPG Supplements.
RPGMapShare.com - RPG Maps and Mapping objects.


Top
 Profile  
 
User avatar  Offline
RPTools Team
 
Joined: Tue Feb 07, 2006 1:07 am
Posts: 1766
Location: Austin, Tx
 Post subject: Re: Adopters: Game Settings File
PostPosted: Wed May 04, 2011 2:31 pm 
Yeah, it needs one. I've started modifying the old one, but I've only got far enough to break everything :P


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Tue Jun 13, 2006 4:55 pm
Posts: 1801
Location: Oak Harbor, WA
 Post subject: Re: Adopters: Game Settings File
PostPosted: Wed May 04, 2011 2:42 pm 
Well, that's, er, progress? :mrgreen:

_________________
Steel Rat
-----------
Helm's Deep RPG Network
Infinite Realities - RPG Supplements.
RPGMapShare.com - RPG Maps and Mapping objects.


Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 46 posts ]  Go to page Previous  1, 2, 3, 4  Next

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 243 on Sun Nov 04, 2012 6:14 am

Users browsing this forum: No registered users and 1 guest





cron

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman