PDA

View Full Version : trouble modifying modules



Ghost_dk
November 18th, 2007, 20:07
Hi

Im trying to add new feats to the CSRDbasicrules.mod from the complete SRD files. To start and see how it works I opened the client.xml after opening the .mod file in winrar. I saved the file again and it is still within the mod file. but now the file does no longer show up in the module selection within the FG2 program.

I tried following the steps discussed elsewhere and about extracting the files with winrar modify the file and then zip and rename it again but this does not help either.

I did add some aditional strings to the decription fields in the feat entry in the client.xml. Can this be the cause of my problems?

I understand that these entries may be overwritten by an update but I want to go ahead and do it anyway so please help me do it rather then suggesting to create a new module.

any help would be much appreciated as Im groving quite frustrated by now.

Griogre
November 18th, 2007, 23:48
Adding strings may have broken the XML file if you acidently messed up the tags or used a special XML character.

How did you make the new mod file with your changes? It's not clear from your account what you did. You need to make it *exactly* the same name as it was before to do what you want (and yes it is a poor practice and I won't bother you further about it).

joshuha
November 19th, 2007, 00:36
Also, make sure when you zipped everything back into it that winrar didn't put it into a folder within the .mod file. The files should not be in any folder.

Ghost_dk
November 19th, 2007, 05:29
Adding strings may have broken the XML file if you acidently messed up the tags or used a special XML character.

How did you make the new mod file with your changes? It's not clear from your account what you did. You need to make it *exactly* the same name as it was before to do what you want (and yes it is a poor practice and I won't bother you further about it).

OK i started over again from a fresh set of modules that show up on the selection window as well as the library window when selected. Then I do the following:

1. Extract the module with winrar
2. open the client.xml with textpad.
3. Add in the following lines right after the "Acrobatic" link in the link section Im using textpad to do this.


acrobaticstrike>
<listlink type="windowreference"><class>referencefeat</class><recordname>reference.feats.acrobaticstrike@Complete SRD Basic Rules</recordname></listlink>
<name type="string">Acrobatic Strike</name>
</acrobaticstrike>

4. Add in the following lines in the reference section:


<acrobaticstrike>
<name type="string">Akrobatic Strike</name>
<type type="string">GENERAL</type>
<mult type="number">0</mult>
<stack type="number">0</stack>
<choice type ="formattedtext">
<p>-</p>
</choice>
<prerequisites type="string">Tumble 12 ranks</prerequisites>
<description type="formattedtext">
<p>Your dexterous maneuvers and skilled acrobatics allows you to slip past a foe&#180;s defenses and deliver an accurate strike against him.</p>
</description>
<benefit type="formattedtext">
<p>If you succeed in using tumble to avoid a opponents attack of opportunity, you gain a +4 bonus on the next that you make against that foe as long as the attack occours before the end of your current turn.</p>
</benefit>
<normaluse type="formattedtext">
<p>-</p>
</normaluse>
<special type="formattedtext">
<p>A fighter can select acrobatic strike as one of his fighter bonus feat.</p>
</special>
<source type="formattedtext">
<p>-</p>
</source>
</acrobaticstrike>

5. save the file with the original extension
6. using winrar i ZIP the 3 files again with the .mod extension instead of the .zip

7. copy the module file into the module directory overwrithing the old one.

8. open up Fantasy grounds. The file is selectable but when checked does NOT appear in the library.:mad:

What am I doing wrong here?

Edit: I even tried removing all lines that the regular feats dont have but still it does not show up in the library but DOES show up on the module selection window so it is not my custom strings that do the difference.

Should I use a different editor or zip program?

Any help is appreciated

sloejack
November 19th, 2007, 06:16
<recordname>reference.feats.acrobaticstrike@ Complete SRD Basic Rules</recordname>

First, you'll probably want to remove the space from between the @ and "Complete".

Second you have a lot of extra data in your reference field that doesn't fit, so to reduce errors I would limit your entry in the feats reference section to the following:



<acrobaticstrike>
<name type="string">Acrobatic Strike</name>
<type type="string">GENERAL</type>
<benefit type="formattedtext">
<p>Your dexterous maneuvers and skilled acrobatics allows you to slip past a foe´s defenses and deliver an accurate strike against him.</p>

<p>If you succeed in using tumble to avoid a opponents attack of opportunity, you gain a +4 bonus on the next that you make against that foe as long as the attack occours before the end of your current turn.</p>
</benefit>
<prerequisites type="string">
Tumble 12 ranks
</prerequisites>
<normal type="formattedtext">
<p>-</p>
</normal>
<special type="formattedtext">
<p>A fighter can select acrobatic strike as one of his fighter bonus feat.</p>
</special>
</acrobaticstrike>


From what you had, I made the following changes:

Droped the <choice> bit.
Made the <desciption> bits part of the <benefit>.
Changed <normaluse> to <normal>.
Dropped the <source> bit.

This should sort you out. When modifying these things I've found that synatax is very touch with regards to record references so you want to always make sure you don't have any excess characters in them. And as for the data you're plugging in, generally speaking FG2 should just ignore any property that it doesn't have a handler for, but that's not always true so you want to probably limit what types of markup tags you're using to what the ruleset handles.

Finally, a little advice just to save yourself some future pain and limit how much debugging you may have to do. Building a module is fairly straight forward, you may want to create a "home rules book" module to add your additional information into so that any errors that come up are A) easier to find, and B) less likely to break other things unintentionally.

Good luck.

Foen
November 19th, 2007, 06:27
Did you start the extra code exactly as quoted:

acrobaticstrike>

In which case you are missing an open angle-bracket. It should be:

<acrobaticstrike>

Stuart

Ghost_dk
November 19th, 2007, 16:01
Thanks for the pointers guys

However it did not seem to solve my problem. As stated earlier in the thread I did try and and cut out all lines besides the ones that are in the original module. Still it did not show up in the library even though it was selectable in the module selection screen.

the missing < and the excess space was just a copy paste error when making the post here and was as they should be in the files.

Ghost_dk
November 19th, 2007, 16:58
I have pretty much come to the conclusion that there must be something wrong with the way my module is saved after modifying because I tried opening the module and rezipping it without changing anything and then the problem was there. Which program do you guys use?

Griogre
November 19th, 2007, 17:12
I just use the built in zip for windows. I change the extention to zip from mod to unzip a module and when I zip the module I change the extention from zip back to mod.

It really sounds like your extention is messed up or WinRar is putting a folder in the zip. It is also possible that WinRar is not making the module a zip file but a Rar or some other type of compressed file.

Ghost_dk
November 19th, 2007, 17:36
I tried some different zip programs and finaly found one that seems to have solve the problem allthough I did have to resort to the cut down version posted earlier here as well. Guess I'll just have to add some of the other stuff I want to be listed within the given strings.

Thanx for all the feedback guys its really good to know that there is such a comunity spirit in helping each other out here.

Earthen
February 7th, 2008, 02:11
I'm having trouble myself... just got FG a couple days ago, trying to modify my own spellbook.
What I've done is change the name in the defninition, and then changed the name everywhere in the client.xml as well, including inside the <library> part and in the <spelllists> and all the links (where you see @d20Spells I changed it to @myd20Spells). However, I have the same problem with it not loading into the library even though I can open its book in the module selection screen.

Have I done something wrong or have I made a typo in a tag somewhere and that's causing my problem? This is getting frustrating and I'm about to break down and just modify the original book (keeping a copy in case an update steps on my changes), though I'd prefer not to.

Thanks.

Foen
February 7th, 2008, 06:07
If you can see the book, but it doesn't appear in the Library after you open it, then the chances are there is some badly-formed XML in there (like unpaired tags or a stray ampersand).

Try opening the client.xml file in Internet Explorer, as it will show you where any corrupt XML is.

Cheers

Stuart

Earthen
February 8th, 2008, 00:42
That was it! Thanks Foen!