Adding a new source: hotFLThe data for all the existing sources used in the 4e game can be found here: chartool\resources\game\dnd4e\sources
The existing sources provide plenty of examples. If you look deeper into the \phb2\property\database directory you will see loads of .rpdat files. Open these using a text or xml editor to see what info they contain.
To create a new source I first have to put something into it! I decide the first thing would be the HotFLs version of "Human". Since I need the source to be compatible with the 4e game I won't be replacing their definition, I will be creating a second "Human" option. I've decided to call it "Human(e)". The differences are small so this should be an easy first step.
- Create a new directory: chartool\resources\game\dnd4e\sources\hotfl
- Create a new directory: chartool\resources\game\dnd4e\sources\hotfl\property
- Create a new directory: chartool\resources\game\dnd4e\sources\hotfl\property\database
- Create a new file: chartool\resources\game\dnd4e\sources\hotfl\property\properties.xml
- Create a new file: chartool\resources\game\dnd4e\sources\phb2\property\database\race.rpdat
Now for the properties.xml file I just copied the one from chartool\resources\game\dnd4e\sources\phb2, edited to change the source description.
For the race.rpdat file I used the one from the 4e base game chartool\resources\game\dnd4e\property\database. I updated the source info on the 7th line and then deleted all the race data except for the human example. Then I changed the name data from "Human" to "Human(e)".
That should create a new race called "Human(e)" that behaves exactly the same a "Human". To test that I need to build my new source file and transfer it into my game directory.
- Modify chartool\build.xml to build my source file.
- Copy the source file to \Users\username\.chartool\game
To modify the build.xml I used the phb2 source as an example. After the appropriate phb2 section I added the following code:
Code:
<uptodate property="dnd4e-hotfl.uptodate" targetfile="${web.gameSettings}/dnd4e-hotfl.rpgame">
<srcfiles dir="${game.files}/dnd4e/sources/hotfl" excludes="java/**"/>
</uptodate>
and
Code:
<target name="make-dnd4e-hotfl" unless="dnd4e-hotfl.uptodate" depends="game-up-to-date">
<zip destfile="${web.gameSettings}/dnd4e-hotfl.rpgame" basedir="resources/game/dnd4e/sources/hotfl" update="true" excludes="sources/**, src/**"/>
<propertyfile file="${web.gameVersions}">
<entry key="dnd4e-hotfl.version" type="int" operation="+" value="1" default="0"/>
<entry key="dnd4e-hotfl.name" value="Heroes of the Fallen Lands"/>
<entry key="dnd4e-hotfl.parent" value="dnd4e"/>
</propertyfile>
</target>
EDIT: 4-May-2011You also need to add the new source name (dnd4e-hotfl) to the list of game versions so that it appears in the list of options for dnd4:
Code:
<target name="game-up-to-date">
<propertyfile file="${web.gameVersions}">
<entry key="games" value="d20fantasy, savageWorlds, hero, gurps, dnd4e, dnd4e-phb2, dnd4e-hotfl, dnd4e-av, dnd4e-primal-power, dnd4e-tk-macros, dnd4e-veggiesama-macros, pathfinder, eclipsePhase"/>
</propertyfile>
END EDIT: 4-May-2011Then added "make-dnd4e-hotfl" to the "build-game-files" dependancies on line 15. Hopefully that should be fairly straight forward

Then run the ant build with the "build-game-files" target and it will build all the source files.
You should now have a new source file in the \Workspace\web\src\tools\inittool\gameSettings directory. Copy the new files: dnd4e-hotfl.rpgame and version.properties to your game directory: \Users\
username\.chartool\game
You can now launch Chartool from within Eclipse. You will almost certainly not see your new source file straight away. Swap to the default game then swap back to 4e. You may even have to click "Browse" and load the "dnd4e-hotfl.rpgame" file from your game directory for it to appear. But once there the game should find it. However every time you copy a new file over you will have to "Reload the Current Game". Once the new source appears select it and new race "Human(e)" should appear. Selecting it should load the same defaults as "Human".