PDA

View Full Version : Custom spells does not get imported with char...



Tiqon
September 19th, 2012, 19:52
Hi.

I made a campaign to make characters, and only for that.

I export (/exportchar [name]) them afterwards and import (/importchar) them into the campaign I planned to use for... well my campaign...

Now one of my players wanted to play a Profession not in the ruleset, using spells not in the ruleset either. I found out I could just make some! and I made them on her sheet and wrote the description an all for the spells she knows.

BUT this info cannot be imported it seems... I mean her spell lists are there, named, but when I open it up the lines are blank.

I have looked in the XML and the spell decriptions are there... so its seems its the import.

Any ideas?

I figured I would just use the "Character campaign" as my regular campaign then...or?

Tiqon
September 19th, 2012, 19:55
I noticed that when I open the empty list up I cant even edit the spells on each lvl. I can for newly created spelllists....

Dakadin
September 19th, 2012, 21:16
I just sent you a PM so we can try to track down this issue.

Dakadin
September 20th, 2012, 01:38
Hi Tiqon,

I tracked down the problem and it is a pretty easy fix if you aren't intimidated by XML.

Basically when the spell list is saved in a campaign it creates a database node reference to the spell list. For Spell Law spell lists that reference is the location in Spell Law. For custom spell lists it refers back to itself in the character's spell lists. This causes a problem when exporting because the reference is using the ID in the campaign the character was exported from instead of the new ID that they were imported into.

Here is how to fix it.
* First close FG and make a backup of your campaign so you can put things back if you have any issues.
* Open db.xml in an editor of the campaign you imported the character into. (I use Notepad++)
* Go to the <charsheet> node which is in the <root> node.
* There will be a series of nodes for characters with ID numbers (for example, <id-00005>) as the names. In each of these nodes is a <name> node with the characters name. Find the node for the character.
* At the same level as the <name> node is a <spells> node. Within the <spells> node is a list of ID numbers node where each node represents a spell list.
* In the spell list node, there is an <open> node. We need to change the <recordname> node within the <open> node to point to the right location.
* Change the ID number of the charsheet to match the ID number node of the this campaign for each spell list.
* Save the db.xml file.
* Start up the campaign in FG and test it.

Here are an a small subsections of the XML showing one spell list for the character before and after the change. The ... represent additional lines not included. The part to change is in red.

Before:

<?xml version="1.0" encoding="iso-8859-1"?>
<root version="2.9" release="1.4">
...
<charsheet>
...
<id-00010>
...
<name type="string">Nijual</name>
...
<spells>
<id-00001>
<base type="number">0</base>
<chance type="number">0</chance>
<custom type="number">1</custom>
<level type="number">999</level>
<maxlevel type="number">8</maxlevel>
<name type="string">Arcane forces</name>
<open type="windowreference">
<class>spelllist</class>
<recordname>charsheet.id-00005.spells.id-00001</recordname>
</open>
<spells>
...
</spells>
<text type="formattedtext">
<p> </p>
</text>
</id-00001>
...
</spells>
...
</id-00010>
...
</charsheet>
...
</root>

After:

<?xml version="1.0" encoding="iso-8859-1"?>
<root version="2.9" release="1.4">
...
<charsheet>
...
<id-00010>
...
<name type="string">Nijual</name>
...
<spells>
<id-00001>
<base type="number">0</base>
<chance type="number">0</chance>
<custom type="number">1</custom>
<level type="number">999</level>
<maxlevel type="number">8</maxlevel>
<name type="string">Arcane forces</name>
<open type="windowreference">
<class>spelllist</class>
<recordname>charsheet.id-00010.spells.id-00001</recordname>
</open>
<spells>
...
</spells>
<text type="formattedtext">
<p> </p>
</text>
</id-00001>
...
</spells>
...
</id-00010>
...
</charsheet>
...
</root>

Please let me know if you have any questions or need any help doing this.

Dakadin
September 23rd, 2012, 06:09
This issue will be resolved in the next version of RMC. I've been testing it with campaign Tiqon provided.