PDA

View Full Version : Help Creating Library Modules



rebilacx
December 3rd, 2009, 22:51
I want to create some simple library modules for 4e_JPG but I have no idea what I'm doing. I just want to set it up so that there is a book in the library window; say "powers". When opened there would be a list of all the character classes and when one of them is clicked an alphabetical list of all the powers associated with that class.

I've been searching the forums for making library modules and haven't really found anything, but maybe I'm not looking for the right thing. I even tried editing the 3.5 spell list mod and that didn't work either.

I have all the necessary 4e pdf's to copy and paste the info, I just have no idea how to get it into the library section of FG.

Any help on how to do this, or a point in the right direction towards other tutorials or threads would be greatly appreciated.

Thanks

Veldehar
December 6th, 2009, 18:25
It sounds like you are looking to create .mod files, correct? You should be able to edit .mods from other rulesets to use as your basis and then in the base.xml file for 4e, slip a little code in there. For instance:

<importinfo>
<acceptfrom ruleset="RolemasterClassic" />
</importinfo>

This will allow you to load the .mods from RolemasterClassic in this case.

Hope that helps!

Veldehar

Daeghrefn
February 1st, 2010, 00:31
I also have been trying to do this. I was looking to add another Library "book" to the Library with some common stuff that isn't already distributed with the 3.5E rule set.

I was hoping to also add a page for drag & drop combat modifiers like FGI had, but searching the forums has revealed that no one has had much luck in that regard, and/or it is above my XML/LUA capabilities (next to nothing).

Using the 3.5E Basic and 3.5E Spells as a template, I built my own 3.5E Custom .mod file, creating a definition.xml, client.xml and thumbnail.png file. The module is visible in the Module activation window, but doesn't show up in the Library.

I can post what I have (code wise) if necessary, but I followed the exact formatting of the other modules. I don't understand what isn't working right.

Any help would be appreciated. Thanks in advance.

Also, when my players connect, they see a spider web instead of the thumbnail, and no book to "open" to activate the module. I suppose this has to do with the downloading... but I'm not sure what I did wrong.

Foen
February 1st, 2010, 06:27
Hi Daeghrefn

If your module shows up in the module activation window but not in the Library, then the internal XML may be broken. Try opening the client.xml file in Internet Explorer and seeing if it throws an error. Otherwise it may be because you are using the same internal module name as another module: each module needs a distinct filename and a distinct internal name.

On the subject of what your players can see, a module built around client.xml needs to be installed on each player machine: it won't download automatically from the GM's machine. To get an auto-downloading module you need to rename the client.xml file as common.xml, or you can have both in the same module by just creating a copy of client.xml and calling the copy common.xml.

Hope that helps

Foen

Daeghrefn
February 1st, 2010, 23:17
I bet that you are correct, and it needs to be named common.xml instead of client.xml. Thank you for the help.

I've looked around, is there a manual/guide for the way FG xml files are organized? The only howtos I've seen have been for exporting game content directly from FG.

Edit: Good call Foen. I had a <b> tag and then another <b> tag instead of </b>. I really, really appreciate the tip, I will use IE to proof all of my XML from now on. Thanks again!

Foen
February 2nd, 2010, 06:04
No problem, just glad I could help. There isn't really a single source of documentation for ruleset/module developers, so the forums are your best bet while you are learning how things work.

Cheers

Foen

hdp247
February 5th, 2010, 00:38
Hi Im new to FG and just got the updated version and trying to also create modules for the 4th ed rule set, kinda like the things i see in the video tutorials. After banging my head into the wall trying to do it inside FG, I went exploring.

Looked on FUM and Wiki, saw stuff about Parser, but the tutorials are nice but i don't have the right version of it i guess, got the one that uses my ddi account. Now cant find any thing on it. I'm completely inept with this scripting and have been staring and redirected to post and links back and forth.

Getting a bit frustrated with modules trying to get a good tutorial so i can get everything going for my game on Sunday. I love this software Its learning curve is just crazy! Just trying to figure out so i can get my 4e books throguh parser which i guess converts to the right format? I dunno Been reading over and over and I need like a FG for dummies

hopelessly lost

hdp

Zeus
February 5th, 2010, 10:40
Here's an example guide to using the Parser to first scrape functional rules from the DDI compendium (requires a DDI account) and then secondly to compile the scraped files into a useable module. Its not a complete guide and will not include all the text content from the module, just the basic functional rules like powers, feats etc. Well enough to get you started with.

Scraping.

For the example, I've chosen the new Player's Handbook Races: Dragonborn module.

1. Create a Folder somewhere on your machine (anywhere will do) and call it something like PHBRaces-Dragonborn
2. Next create two subfolders in the new folder you just created and call them input and output
3. Download the latest 4EParser (v4.0.20) and Open the 4EParser.exe
4. Click on the Compendium Menu at the top and select the menu option Switch to Compendium Mode
5. Click Yes to the Warning but note you WILL need a DDI account to continue
6. The main page of the 4EParser will refresh with new configuration options, double-click the folder at the top of the page to set the location of where we want the scrape files (text files) to be generated to. Choose the input subfolder you created earlier

e.g. C:\Users\<your name>\Desktop\PHBRaces-Dragonborn\input

7. Next double-click the Login Name icon and enter your account name details for DDI. Click OK
8. Next double click the Source book Title icon and choose the Players Handbook Races - Dragonborn module from the pull down list
9. The remaining options should auto-set so next select Compendium -> Scrape from the menu at the top.
10. The 4EParser will now open a dialogue prompting you for your DDI account password, enter it and click OK.
11. The 4EParser will now open a processing output window and will login to the compendium and begin the scrape process, it should take a few minutes as its not a particularly large module. When its complete it will post a message to the processing window.
12. Now we have the source files for the module you can examine them if you wish by navigating to the input folder you created earlier. You can use these to gain a better understanding of the syntax options the 4EParser uses for the input of the various rules and options. The 4EParser Document that is bundled with the 4EParser program details all syntax options.

Parsing

Now we can take the source files we scraped earlier and input them to the 4EParser to output a useable 4E module in FGII. This is known as the Parsing process.

1. Select Parse -> Switch to Parse Mode fromt the menu
2. Double-Click the Name icon at the top and enter the name of our module, something like:

Players Handbook Races - Dragonborn

3. If you have a Thumbnail for the module you can assign it by double-clicking the Thumbnail icon and navigating to the appropriate path. As creating one of these is a process in iteself I am going to skip it, you can check the forums and videos for a guide on creating these but essentially any 100x100 png will suffice.
4. Next Double-Click the Category icon and enter the name of the category you want the module to be listed under in the Library in FGII, perhaps something like:

4E Supplement

5. Next Double-Click the Modestring icon and enter a unique name for the module. This option is being phased out in a future release however for now will ensure duplicate lists are not created within FGII:

4EPHBRDB

6. Double-Click the Temporary Directory icon and navigate to the output folder you created earlier e.g.

e.g. C:\Users\<your name>\Desktop\PHBRaces-Dragonborn\output

7. Modules Directory should auto point to your FGII App data modules path. No need to change

8. Output Format allows you to choose the type of module, client.xml (requires all players to have a local copy), common.xml (players can access via server) or db.xml (host only). As this is a players guide module we will choose client.xml.

9. We want the content to be listed in the Library of FGII so leave Output to Library selected as 'Yes'. Note if you were creating an adventure module you would likely select 'No' opting to have the content listed under the Book Icon windows (e.g. Story, Encounters, Personalities etc. etc.)

10. Now we need to tell the Parser which options we want to include, the previous scrape produced the following files:

a. armor.txt - The PHBRDB does not contain any Armor Items but the 4EParser
still produces any empty file - we can ignore it.
b. class.txt - contains necessary PC Class information for the Powers
detailed in PHBRDB
c. equip.txt - The PHBRDB does not contain any Equipment Items but the
4EParser still produces any empty file - we can ignore it.
d. mi.txt - contains all the Magical Items detailed in the module
e. powers.txt - contains all the Powers data in the module
f. race.txt - contains necessary PC Race information for the Powers
detailed in PHBRDB
g. weapon.txt - The PHBRDB does not contain any Weapons but the
4EParser still produces any empty file - we can ignore it.

So 1st lets setup Powers.

11. Scroll down to the Reference section and open the Tree for Powers/Feats/Features/Background, Double-click the Data file icon and navigate to the powers.txt file you scraped earlier e.g.

e.g. C:\Users\<your name>\Desktop\PHBRaces-Dragonborn\input\powers.txt

Next Double-Click the Class file icon and navigate to the class.txt file and finally repeat for the Race file icon choosing the race.txt file.

12. Next, Magic Items. Close the Powers/Feats/Features/Background tree and scroll back up to the Items section. Open the Magic Items tree and Double-Click the Data File icon. Navigate to the mi.txt file you scraped earlier.

The options Output to Items and Output to Library allow you to set the output path with FGII (Library or Book Icon windowlists) at a more granular level. I recommend leaving them as is for the time being but you should go back and experiment to see the different output options.

Right that should be it, we are ready to Parse (compile) our module. Before we do that you might want to click on File->Save and save the configuration of the Parser. This can be loaded back in a future session saving you having to type in and select all the options again. Great if you build your modules slowly over time rather than all at once.

OK. Now we can Parse. If you are using the 4E_JPG v1.51 ruleset simply select Parse->Parse from the menu. If you are using the newer test release of the 4E v2 ruleset first unselect the Output for 1.51 option in the Parse menu before selecting Parse.

Once Parsed the module will be automatically moved to the modules subfolder of the FGII App Data folder. Simply fire up FGII to take a look at the module.

Once FGII is up and your 4E campaign loaded, click the Modules activation button (top right, picture of an open book) and open the new Module which should be listed there.

You should then be able to open the Library (bottom right book icon). The module will be listed under the 4E Supplement section.

Hope that helps.

KSchade
February 6th, 2010, 02:09
See, this is where Doug (hdp247) and I are having the problem, or at least its where I am. When I scrape the compendium, the only two entries I get in the input folder are class.txt and races.txt, we don't get mi.txt or powers.txt. And yes, this is with the most current version. Made sure by wiping it and then reinstalling. The only thing that's happening differently is that when I go to do the scrape, I get several errors claiming a failure to authenticate the login. The username & password are correct, so I don't know where the failure's coming from.

hdp247
February 6th, 2010, 02:54
*cries* Zephp thank you, your detailed description is GREAT. I just think im dumb because i have tried a few times but unable to get it to work
I don't know if its because the scraping is cut off from what Kurt "Kschade" with Authentication issue and also only getting the class.txt and races.txt , I've been trying to get Divine powers but I'm nothing but air. However I was scuessful to some extent to get the PHB1 to actually show up in FG2 but the only issue is it doesn't work. Shows up in Module activity but it dosn't read at all :S


so what can i provide screen shots or something cause i can or will that destroy the fourms

Zeus
February 6th, 2010, 03:19
I'm not sure what to suggest, it works for me.

Are you sure you are using the correct DDI login details. DDI uses an email address as the login name, make sure your not trying to login with your username handle.

hdp247
February 6th, 2010, 03:21
trying now....

KSchade
February 6th, 2010, 03:26
Okay, I think issue solved: Zephp, I had thought of that, but that wasn't the issue. For whatever reason, my hardware firewall was blocking the ports to that particular program. I ran it in the DMZ and it worked fine. Guess I'm going to be scraping from my laptop and then reghosting at night.

hdp247
February 6th, 2010, 04:31
HUZZAH


success thanks so much!!!

This is wonderful and great!

Zeus
February 6th, 2010, 09:42
Glad you got it sorted.

Z.

Alpheus
February 10th, 2010, 22:06
Can digital versions of Gurps books be added to FGII library using the Parser tool? If not where can I find a tool that will allow me to add these books?

malfeous
February 13th, 2010, 23:42
Thanks so very much this was a great help I too was struggling with the way to do this, yours worked flawlessly

hdp247
February 14th, 2010, 02:37
this should be stickied

Oberoten
February 14th, 2010, 04:12
Would it be okay to just copy/paste the entire thread into the Wiki?

- Obe

Zeus
February 14th, 2010, 09:59
Sure, why not?

malfeous
February 14th, 2010, 14:12
is there a way to change the module from one type to another without reparsing. I decided I want three more modules to be for the players and wondered if I have to reparse them or if there is a way to just make then common now

hdp247
February 15th, 2010, 20:18
is there a way to change the module from one type to another without reparsing. I decided I want three more modules to be for the players and wondered if I have to reparse them or if there is a way to just make then common now


Good question was wondering that as well, also what would be the best ways of loading the modules locally so that I can update my characters through the "Character manger" to display all modules so i can "drop" in the attributes,feats,racials , and other equipment so i can create characters as backups in the "Just in case i get vaporized moment"

drahkar
February 15th, 2010, 20:34
Unless you deleted it you should still have the original Campaign you used to enter the information into the interface in the first place. If you have deleted it... I'm not sure if there is a way. I suspect not. At least not easily.

Foen
February 16th, 2010, 06:02
Modules can be changed between three accessibility-types by renaming the core data file:

- db.xml is used for GM-only modules
- common.xml is used for GM-hosted player modules (the player doesn't need to have the module installed)
- client.xml is used for locally-available (including visibility in the character manager)

This doesn't switch the content between the library and the various books, it just changes the general availability. To switch between library and the various books is possible, but demands a more lengthy answer.

Foen

Tenian
February 16th, 2010, 11:51
Common modules typically perform poorly once you get over 1M worth of them. They require lengthy transfer to the client (especially if you happen to update them). This transfer further delays token/map transfers.

Client modules perform much better as you can send them out in an email, leave up a FTP server, etc.

Foen
February 16th, 2010, 17:14
Common modules are essential, however, for commercial rulesets because they contain copyright material which should not be emailed/ftp'ed to players and should only be available when connected.

That said, commercial rulesets may also contain the same content as both a common.xml file and a client.xml file in the same module, so that anyone who has purchased the module can see it in the Manage Characters screen (common.xml does not display in Manage Characters, even if the module is properly installed locally).

almeidafreak
February 19th, 2010, 02:57
I've a couple questions too. I scanned some monsters from my MM2 to put them on FGII using the parser. I did one to test and it worked fine. I created a module called MM2, and it has only one mob right now. I want to add the other 3. Is there a way to do that? Better yet, is there a way to parse a lot of stuff in just one .txt file?

Tnks a bunch!

Zeus
February 19th, 2010, 09:22
almeidafreak, the 4EParser works very much like a batch processor. Each input file is designed to hold multiple entries as opposed to just one.

For NPCs/monsters, simply list each stat block one after the other in the input file. Separate each stat block by one empty line so the Parser doesn't get confused as to where an entry starts and finishes and you should be good to go.

Also, if you get yourself a D&D Insider account, you can use the Parser's scrape feature to automatically download and create the NPC/monsters file for you. You just point the Parser at the MM or MM2 rulebooks, click scrape and go make a cup of tea. By the time your done drinking your nice cuppa, the NPC/monsters should have been downloaded into the scraped file.

almeidafreak
February 20th, 2010, 02:47
This gets more andmore awesome. But my main question is: after I've done, say, 10 mobs, can I add more to the same module?

EDIT: Hm, and somehow putting the mobs one after the other is making the Parser think that the 2nd one is the 1st one's equipment! LOL! Am I doing anything wrong here? Here's what I put down on the .txt file (i'm using notepad ++):

Bugbear Bloodghost Hunter Level 8 Skirmisher
Medium natural humanoid XP 350
Initiative +9 Senses Perception +6; low light vision
HP 85; Bloodied 42
AC 22; Fortitude 21, Reflex 20, Will 19
Speed 7
m Greataxe (standard; at&#183;will) • Weapon ZZX
+13 vs. AC; 1 d12 + 5 damage (crit 1d12 + 17)
m Slayer's Assault (standard; encounter) • Weapon ZZX
The bloodghost hunter moves 7 squares before the
attack and does not provoke opportunity attacks by
moving; +15 vs. AC; 1d12 + 5 damage (crit 1d12 + 17).
Effect: The bloodghost hunter shifts 3 squares after the
attack.
X Blur of Movement (move; recharge [5, 6]) ZZX
The bloodghost hunter shifts 3 squares.
X Shadow Ghost (minor; encounter) ZZX
If the bloodghost hunter has cover or concealment, it can make a Stealth check with a +2 bonus to become hidden.
X Predatory Eye (minor; encounter) ZZX
The hunter deals 1 d6 extra damage against the next
target granting combat advantage to it.
Alignment Evil Languages Common
Skills Acrobatics +12, Athletics +12, Intimidate +6, Stealth
+14
Str 16 (+7) Dex 17 (+7) Wis 14 (+6)
Con 13 (+5) Int 10(+4) Cha 11 (+4)
Equipment hide armor, greataxe

Bugbear Skinner level 7 Skirmisher
Medium natural humanoid XP 100
Initiative +9 Senses Perception +4; low-light vision
HP 80; Bloodied 40; see also bloodied shift
AC 21; Fortitude 18, Reflex 20, Will 18
Speed 6; see also bloodied shift, horrifying mockery
m Sickle (standard; at-wlll) • Weapon ZZX
+12 vs. AC; IdB + 7 damage.
m Mocking Rend (standard; requires combat advantage against the
target; requires a sickle; recharge when an enemy within line
of sight becomes bloodied) ZZX
The bugbear skinner makes two sickle attacks against the same
target. If both attacks hit, the target takes ongoing 5 damage
(save ends) and is dazed until the end of the bugbear sklnner's
next turn.
X Horrifying Mockery (minor; recharges when an enemy within
line of sight is bloodied) • Fear ZZX
Close burst 3; targets one enemy in the burst; +10 vs. Will: the
bugbear skinner pushes the target 1 square and the bugbear
skinner shifts 3 squares.
X Bloodied Shift (free; when the bugbear skinner is hit by an attack
while bloodied; at-will) ZZX
The bugbear skinner shifts 1 square.
X Combat Advantage ZZX
If a bugbear skinner hits a creature granting combat advantage
to it with a melee attack and that creature is not already taking
ongoing damage, then the creature takes ongoing 5 damage
(save ends).
X Predatory Eye (minor; encounter) ZZX
A bugbear skinner deals 1d6 extra damage on the next attack
it makes against a creature granting combat advantage to it. It
must apply this bonus before the end of its next turn.
Alignment Evil languages Common Goblin
Skills Athletics +10. Intimidate +11. Stealth +12
Str 14 (+5) Dex 19{+7) Wls I 2(+4)
Con 16 (+6) lnt 10(+3) Cha 16(+6)
Equipment leather armor, 2 sickles

Zeus
February 20th, 2010, 09:27
If you keep a copy of the source files for your module then adding more entries to an existing module is simply achieved by adding the additional entries to your source files and re-parsing.

As for your problem with more than one entry, on the first line of the 2nd monster (Bugbear Skinner) try changing the word 'level' to 'Level'.

The Parser is very particular over the format of each entry. Read the ParserDocument.txt which should provide you the syntax you need.

almeidafreak
February 20th, 2010, 10:37
Oh, so that's where I went wrong...

Thanks again man, you guys really rock it out!

Typhus
March 1st, 2010, 17:57
almeidafreak, the 4EParser works very much like a batch processor. Each input file is designed to hold multiple entries as opposed to just one.

For NPCs/monsters, simply list each stat block one after the other in the input file. Separate each stat block by one empty line so the Parser doesn't get confused as to where an entry starts and finishes and you should be good to go.

Also, if you get yourself a D&D Insider account, you can use the Parser's scrape feature to automatically download and create the NPC/monsters file for you. You just point the Parser at the MM or MM2 rulebooks, click scrape and go make a cup of tea. By the time your done drinking your nice cuppa, the NPC/monsters should have been downloaded into the scraped file.

Hello Dr. Zeus,

i tryed to download the MM and i was succesfull. Now i have the problem to parse this files. I' dont know what options i muss select :(

EDIT: Now it Works!

BruntFCA
March 24th, 2010, 00:37
Anyone know how to get the "fluff" into the Monster Manual module. I just used DDI and that contains no fluff. I also have the MM PDF, but I'm not really sure where to start.

Is there some transform file so I can cut and paste from the PDF, and transform it into the format thats readable by the parser? I tried looking at my cut/past job in notepad++ an gvim. I thought maybe I could write regular expression to take out the "relevant" bits from the rest, but gave up.

Zeus
April 2nd, 2010, 00:00
The simplest way is to cut n paste the material from a PDF version of the MM, if you have one. WotC have since discontinued distributing PDFs so more recent rulebooks have to be hand scanned and turned into a PDF.

Assuming you do have one, here's how to get started:


Create a new text file in your module input folder (see 1st post) and call it npcfluff.txt.

Open npcfluff.txt in a text editor, I use notepad++ but any one will do.

To start a new entry we enter the following on a new line:


ZZXBEGIN

next we enter the names of the NPCs that are associated with the Fluff we are about to enter. Each NPC name must be entered on a new line and must match (case sensitive) the name of an NPC in the npcdata.txt file thats produced by the scrape function.


WotC Warrior
WotC Theurge
WotC Minion

Now we close the entry using:


ZZXEND

Now when the Parser is parsing the file any following content it encounters will be associated with the above three NPCs. The Parser will continue to try and associate content until the next ZZXBEGIN tag is encountered.

So, a quick recap, you should now have something like:


ZZXBEGIN
WotC Warrior
WotC Theurge
WotC Minion
ZZXEND

OK. The following tags can follow in any order and can be ommited if no relevant text is available. First is Fluff text, so add the following tag on a new line:


ZFluff

and underneath paste the introduction text for the npc family. e.g.


ZFluff
WoTC are creatures of the earth, as hardy and cold as stone. Industrious
and inventive, spiteful yet remarkable they live in the deepest bowls of the Nine Hells.

Next is Lore, so add the following tag on a new line:


ZLore

and as before with the fluff text, underneath paste the Lore text

Next is Tactics, so add the following tag on a new line:


ZTactics

and again as before with the fluff and lore text, paste the Tactics text underneath.

Encounter groups are split between the text part and the encounter tables. For the text part we use:


ZEncounter Groups

pasting the text underneath. For the encounter tables we use the following syntax for each table:


ZENCX
<Level> # Encounter (XP #)
? # <name of npc> (level # <role>)

e.g.


ZENCX
? 4 dwarf mongrels (level 2 soldier)
? 2 dwarf striker (level 3 lurker)
? 1 wotc theurge (level 4 artillery)


Finally we add any images and a token:


ZImage
<name of image file>


ZToken
<name of token file>

So you should now have something like:


ZZXBEGIN
WotC Warrior
WotC Theurge
WotC Minion
ZZXEND
ZFluff
WoTC are creatures of the earth, as hardy and cold as stone. Industrious
and inventive, spiteful yet remarkable they live in the deepest bowls of the Nine Hells.
ZLore
Blah Blah Blah
ZTactics
Blah Blah Blah
ZEncounter Groups
Blah Blah Blah
ZENCX
? 4 dwarf mongrels (level 2 soldier)
? 2 dwarf striker (level 3 lurker)
? 1 wotc theurge (level 4 artillery)
ZImage
WoTC creatures.jpg
ZToken
wotc warrior.png

Now if you want to assign text or a token to only one of the above NPCs you can add subsequent entries using the same approach. Underneath the previous example add the following:


ZZXBEGIN
WotC Theurge
ZZXEND
ZFluff
Some different Blah Blah Blah
ZToken
wotc theurge.png

Now repeat for all NPCs you want in your module.


To Parse:


Open your module config in the Parser if your adding to an existing module or create a new one following the instructions in the 1st post.

Click the NPCs tree and then click the Monster Stats tree:

Populate the subnodes as follows:

Data file -> point to your module/input/npcdata.txt file
Fluff file -> point to your module/input/npcfluff.txt file we just created
Token Dir -> point to your module/token folder
Image Dir -> point to your module/images folder

If your making an adventure module, select Yes for Output to Personalities.
If your making a rulebook module or you also want the NPCs to be listed in the Library, select Yes to Output to Library.


That should be it, hit Parse and sit back and wait for the module to be compiled. If you hit any errors during compilation, check the tag notation is correct in your fluff file is correct.

Any problems, let us know.

ProfMarks
June 12th, 2010, 21:22
Simple question, but something that's irritating me not being able to fix...

In the main library index, I have several modules that have chapter titles with the text of sub-sections of that chapter indented by a few spaces. My XML editor doesn't read spaces in front of the string, and I have been unable to replicate this look.

Suggestions?

Foen
June 12th, 2010, 21:41
I'm not sure which editor you are using, but XML as a format doesn't support leading or trailing whitespace, not does it support consecutive space (so two spaces, a tab and a space, two newlines etc are all treated as a single space). You might be able to insert spaces using the XML non-breaking space character & 1 6 0 ; (remove the spaces between the characters to get ampersand-one-six-zero-semicolon).

Foen

sarya
June 21st, 2010, 22:34
This might be a dumb question.. so please excuse me - but does all this parsing work for 3.5/OGL?

I have been creating all my adventure modules in a word document and then hand-pasting them and editing them in FG2... this seems like a length process if there's a way to type them up in a document and then parse them in.

Any ideas?

Zeus
June 22nd, 2010, 01:38
Simple question, but something that's irritating me not being able to fix...

In the main library index, I have several modules that have chapter titles with the text of sub-sections of that chapter indented by a few spaces. My XML editor doesn't read spaces in front of the string, and I have been unable to replicate this look.

Suggestions?

Are your referring to reference manual content from 4E modules? The index in the 4E Library is built using a windowlist structure I believe, if what your asking is how to produce this indented style within FGII?

However rather than handcrafting this in XML, I would suggest you take a look at the 4E Parser and specifically how to produce reference manual content as it's much easier using the tool.




This might be a dumb question.. so please excuse me - but does all this parsing work for 3.5/OGL?

I have been creating all my adventure modules in a word document and then hand-pasting them and editing them in FG2... this seems like a length process if there's a way to type them up in a document and then parse them in.

Any ideas?

The 4E Parser tool by Tenian was written to support the 4E ruleset, the modules it produces are keyed to that ruleset only.

I am not aware of a Parser or similar tool that will support any of the D20, D20_JPG or 3.5E rulesets.

Stitched
July 10th, 2010, 15:30
Does anyone know if there is a xml checker to find bad closing headers, etc?

I am trying to create a mod but nothing shows up in my library and I can't spot where in the xml file, the problem is occurring. Would be great if Fantasy Grounds gave feedback on why a file is failing (line number, etc.)

tdewitt274
July 10th, 2010, 15:50
I'm not sure, but this should work: https://validator.w3.org/

Zeus
July 11th, 2010, 08:41
You can also use IE to validate the correctness of the XML.

Stitched
July 11th, 2010, 08:58
Right. I decided to hunt a bit more in the forums, downloaded Notepad++, and ran the XML "spellchecker".

Problem found and solved. No more blank library entries.

Jundle
September 16th, 2010, 16:23
I have a DDI account and I have used the parser (which is awesome!).

My questions are these: I've "scraped" the players 1 hand book. When I try to parse it, it gets hung up on on "/r" characters. I went through the powers.txt file and did a search and replace for "/r" with " " (a space) and that worked find, and then parsed fine. But have I messed something up? What is the "/r" for and is removing it bad?

Also, when I do a scrape of the players hand book 1, I don't get regular equipment, regular armor, or regular weapons (I just get magical stuff). Where are they and how do I get them?

Lastly, I see refrences int eh forums and via google to some website called fourulgymonsters (or something close to that) website, but when I click links to the site, it appears that that site is gone. Is there a new site name?

I don't know if this matters but I am using windows 7 32 bit and version 2.7.1 of FG2

elydustin
September 16th, 2010, 16:49
Hey, if you guys ever finished those modules for 3.4 about general content found in the books, or that drag and drop modifier module let me know. I have been looking for some of that content. :)

Zeus
September 16th, 2010, 17:01
I have a DDI account and I have used the parser (which is awesome!).

My questions are these: I've "scraped" the players 1 hand book. When I try to parse it, it gets hung up on on "/r" characters. I went through the powers.txt file and did a search and replace for "/r" with " " (a space) and that worked find, and then parsed fine. But have I messed something up? What is the "/r" for and is removing it bad?
"/r" adds a newline. Removing them all will force all text blocks within powers to be displayed as a single block. Not ideal as some powers with multi-part descriptions benefit from having the newlines as it aids readability.

If the Parser is complaining its better to try an locate the specific instance thats causing the error rather than removing them all. Try parsing the Powers node only (right click the Powers/Feats/Features/Backgrounds Node and select Parse) and browse the outputed XML to see if you end up with any corrupted power entries, these are usually signified by powers which names include the other elements of the powers description i.e. extra long names.



Also, when I do a scrape of the players hand book 1, I don't get regular equipment, regular armor, or regular weapons (I just get magical stuff). Where are they and how do I get them?
If all is well with the DDI Compendium database then the parser should have generated armor.txt, equipment.txt, weapons.txt and magic.txt output files. These files should contain magicial and mundane items.

Note: The DDI Database was recently updated and some of the meta-data for the content changed causing referencing problems. Recent updates from the DDI service indicate the database will not be updated until October 2010 therefore it maybe sometime before your able to scrape again without problems.



Lastly, I see refrences int eh forums and via google to some website called fourulgymonsters (or something close to that) website, but when I click links to the site, it appears that that site is gone. Is there a new site name?

I believe the FourUglyMonsters or FUM site has been down for the last day or so. No news that I have seen so far on any new site details.

Jundle
September 16th, 2010, 17:16
If all is well with the DDI Compendium database then the parser should have generated armor.txt, equipment.txt, weapons.txt and magic.txt output files. These files should contain magicial and mundane items.

Note: The DDI Database was recently updated and some of the meta-data for the content changed causing referencing problems. Recent updates from the DDI service indicate the database will not be updated until October 2010 therefore it maybe sometime before your able to scrape again without problems.

It did create and armor, equipment, and weapons txt files, but they were 0 kb and nothing was in them (I have done this scrape a couple of times over the past few days to learn this process).

What I can do, though, is open the items up directly from the DDI. Is there a good smooth way to copy the info into FG2 from accessing the DDI website through my Web Browser (I.E. where all the formatting gets done for me mostly, and I'm jsut copying and pasting)?

Zeus
September 16th, 2010, 17:42
Are you running the latest version of the Parser?

If not, download the latest version (v4.0.103) from here (https://tenian.eugenez.net/Parser) and try again.

Jundle
September 16th, 2010, 17:54
I am running the latest version. I think your meta tagging comment is spot on. When I do a search (via the DDI web browser gui) for everything, then filter by playershandbook and weapon, I can't find battleaxe. but when i do a search for that specific key word, it comes up. So I'm guessing non magical items in the players hand book got fumbled up.

But would there be a way to do a copy and paste via the web site?

Also, when I look through the magic item table in FG2 (now that I've parsed my stuff from the PH1 into it), the "Enhancement" portion of the items doesn't show the "+(number)". Example: "Enhancement attack rolls and damage rolls" That was from "Magic Weapon +1" in the Magic Item Table. I assume that the formatting in the txt file is slightly off. Any suggestions on what I can do to adjust this?

Zeus
September 16th, 2010, 18:24
I guess you could hand cut n paste the content you require into the Parser specific format (see the Parser Document.txt file that accompanies the Parser for syntax and description of the content format required). However this is a somewhat longwinded approach, still if your not prepared to wait until October it might be your only option at the moment.

Jundle
September 16th, 2010, 21:27
when I look through the magic item table in FG2 (now that I've parsed my stuff from the PH1 into it), the "Enhancement" portion of the items doesn't show the "+(number)". Example: "Enhancement attack rolls and damage rolls" That was from "Magic Weapon +1" in the Magic Item Table. I assume that the formatting in the txt file is slightly off. Any suggestions on what I can do to adjust this?


In regards to the above, does anyone know what may be causing this and.or how to fix it?


Example: "Enhancement attack rolls and damage rolls" That was from "Magic Weapon +1" in the Magic Item Table

The above should have said 'Example: "Enhancement attack rolls and damage rolls" which should have been "Enhancement +1 attack rolls and damage rolls"'

halbert
September 28th, 2010, 22:18
Hi Zeuss - thx for the good work with the parser! I notice messages like 'Missing NPC token for...' while parsing DDI Material. Is there a good way to get token items from anywhere?

all the best, halbert

Jundle
October 13th, 2010, 18:18
still if your not prepared to wait until October it might be your only option at the moment.

They just did an update to their site and I tried scraping the Players Handbook again and received not data in reference to non-magical items (i.e. regular swords, regular armor, etc...)

Anyone have any ideas on how i can fix this?

davie36
November 6th, 2010, 06:23
ive also encountered problems when trying to parse player handbook.

dihmwhit
April 12th, 2011, 13:21
I'm using the latest version of the 4EParser (4.0.118.0) and am running into the following error when I try to parse a scrape of the Player's Handbook from D&DI.


4/12/2011 6:56:37 AM : ERROR:System.Xml.XmlException: The '<' character, hexadecimal value 0x3C, cannot be included in a name. Line 7, position 21.

<root version="2.2">
<!-- Modified from existing reference guide by JMnITup -->

<item>
<category name="Player's Handbook" mergeid="" baseicon="2" decalicon="1">
*** <curseforgedarmor<spanclass=_milevel_>level3uncommon_001>
<name type="string">Curseforged Armor<span class="milevel">Level 3 Uncommon +1</name>
<class type="string">Armor</class>
<subclass type="string">Chain, Scale</subclass>
<level type="number"> 1</level>
<cost type="string">680 gp</cost>

Here is what shows up in the txt file:

Curseforged Armor<span class="milevel">Level 3 Uncommon Level 1+
In ancient days, the tieflings poured their bitterness into their forges as a lesson to those who would betray them.
Price: 680 gp Armor: Chain, Scale Enhancement: +1 AC
Power (Daily): Immediate Reaction. You can trigger this power when an enemy hits you with an attack. That enemy takes a –2 penalty to attack rolls (save ends). When the enemy saves against the penalty, the enemy takes a –1 penalty to attack rolls (save ends).


All of the magic items I scraped follow the same format, so I'm sure as soon as I fix this one I'll need to fix all the rest. Any ideas as to what the fix would be?

Ictinike
April 12th, 2011, 13:24
I'm using the latest version of the 4EParser (4.0.118.0) and am running into the following error when I try to parse a scrape of the Player's Handbook from D&DI.
All of the magic items I scraped follow the same format, so I'm sure as soon as I fix this one I'll need to fix all the rest. Any ideas as to what the fix would be?
I believe the string "<span class="milevel">" is what's causing the issue. Most had the same issue so make a backup of the scrape, so you have a backup of the raw scrape, then go in with a text editor and anywhere you find the string "<span class="milevel">" replace it with a single space.

Some text editors like Notepad+ or my favorite EditPlus have a Search & Replace function where you enter the string and the replacement. Let it scan the entire doc and do it's thing then save and re-parse and see if that helps.

dihmwhit
April 12th, 2011, 13:58
For that matter, I get errors trying to parse the Monster Manual too.

4/12/2011 7:45:24 AM : ERROR:System.Xml.XmlException: The 'h1' start tag on line 23705 does not match the end tag of 'languages'. Line 23705, position 56.

<powertype type="string">M</powertype>
<mm3mode type="number">1</mm3mode>
</id-00003>
</powers>
<alignment type="string">unaligned</alignment>
*** <languages type="string">-<h1 class="atwillpower"></languages>
<skills type="string">Stealth +13</skills>

<strength type="number">22</strength>
<constitution type="number">18</constitution>
<dexterity type="number">11</dexterity>

dihmwhit
April 12th, 2011, 14:08
I believe the string "<span class="milevel">" is what's causing the issue. Most had the same issue so make a backup of the scrape, so you have a backup of the raw scrape, then go in with a text editor and anywhere you find the string "<span class="milevel">" replace it with a single space.

Some text editors like Notepad+ or my favorite EditPlus have a Search & Replace function where you enter the string and the replacement. Let it scan the entire doc and do it's thing then save and re-parse and see if that helps.

Awesome, that worked perfect. I wasn't sure if it was an element that needed to stay for the parser or not, but I guess not!

Edit: It appears removing the h1 class issue from 2 places worked, so that problem is solved too (I hope). Thanks for the speedy reply.

tdewitt274
April 12th, 2011, 14:29
You have an open H1 tag inside your languages tag. You have to have a closure because of the XML standards.
*** <languages type="string">-<h1 class="atwillpower"></languages>

Something like:

*** <languages type="string"><h1 class="atwillpower">-</h1></languages>

khersheyjr
June 29th, 2011, 03:45
I am getting this message when trying to parse the files I downloaded from DDI for the MM1. :

6/28/2011 8:27:31 PM : ERROR:System.Xml.XmlException: The 'p' start tag on line 167 does not match the end tag of 'equipment'. Line 167, position 84.

<constitution type="number">31</constitution>
<dexterity type="number">25</dexterity>
<intelligence type="number">12</intelligence>
<wisdom type="number">29</wisdom>
<charisma type="number">14</charisma>
*** <equipment type="string">lightning sword, flaming whip<p class="publishedIn"></equipment>


<token type="token">tokens/MonsterManual/balor.png@MonsterManual</token>
</balor>
<abolethlasher>

6/28/2011 8:27:31 PM : Checking XML

Thanks for any help you can provide :)

GMTroll
June 29th, 2011, 10:33
*** <equipment type="string">lightning sword, flaming whip<p class="publishedIn"></equipment>

This line of xml is missing the closing </p>. It should look something like this.

<equipment type="string">lightning sword, flaming whip<p class="publishedIn">some text</p></equipment>

The cause of the problem is the item entry in the item text file you are attempting to parse. There are many problems with the data scrapped from the Compendium that need to be tied up or fixed to parse without error.

For a quick fix you can simply edit the xml output in Notepad or other such text editor. But if you intend to use this file again in the future you should aim to fix the item entry the text file or you will get this error everytime you attempt to parse it.

ulsund
July 1st, 2011, 20:30
Hi
I just bought FG2 full license, and am now trying to using the tutorial for using the 4E Parser. I've followed the tutotrial and added my dndi password and started scraping. It starts, but after 1-2 minutes the process stops and reports the following problem (its written in norwegian, but translates something like this):

"The external server returned the following error (500) internal server error"

I get the option to ignore this error and attempt to continue, but doing so does not start or completes the process.

Has anyone else had this same problem? Any solutions?

GMTroll
July 1st, 2011, 21:58
There is a known problem when scrapping items that can cause this error using version 4.0.118.0.

Try scrapping the resource again but make sure items is set to no

See these threads for more info about the problem (https://www.fantasygrounds.com/forums/showthread.php?t=14634&page=2&highlight=parser) and forthcoming (https://www.fantasygrounds.com/forums/showthread.php?t=14634&highlight=parser) fix.

ulsund
July 2nd, 2011, 12:34
Thank you, that worked!

Only now I get another error. I'm using the tutorial in this thread, but when I start parsing I get the following error:

02.07.2011 13:19:42 : ERROR:System.Xml.XmlException: The startcode p on line 59 does not correspond to endcode for td.line 59, location 755.

<recharge type="string">Daily</recharge>
<keywords type="string">Arcane, Implement, Varies, Zone</keywords>
<action type="string">Standard Action</action>
<range type="string">Close blast 5</range>
<source type="string">Ninefold Master Attack 20</source>
*** <description type="formattedtext"><table><tr><td><b>Target:</b>Each creature in the blast</td></tr></table><table><tr><td><b>Attack:</b>Intelligence or Charisma vs. Reflex</td></tr></table><table><tr><td><b>Hit:</b>3d8 + Intelligence modifier or Charisma modifier damage. The damage is the same type as any type you can deal with your dragon breath.</td></tr></table><table><tr><td><b>Effect:</b>The blast becomes a zone that lasts until the end of your next turn. A creature that enters or starts its turn in the zone takes 10 damage of the same type as the initial attack's damage. As a move action, you can move the zone 3 squares.</td></tr></table><table><tr><td><b>Sustain Minor:</b> The zone persists. </td></tr><tr><td><p class="publishedIn"></td></tr></table><p><b>Paragon Path:</b>Ninefold Master</p></description>
<shortdescription type="string">Target: Each creature in the blast; Attack: Intelligence or Charisma vs. Reflex; Hit: 3d8 + Intelligence modifier or Charisma modifier damage. The damage is the same type as any type you can deal with your dragon breath.; Effect: The blast becomes a zone that lasts until the end of your next turn. A creature that enters or starts its turn in the zone takes 10 damage of the same type as the initial attack's damage. As a move action, you can move the zone 3 squares.; Sustain Minor: The zone persists. \r<p class="publishedIn"></shortdescription>
<class type="string">Paragon</class>
<powertype type="string">Attack</powertype>
<level type="number">20</level>
<paragonpath type="string">Ninefold Master</paragonpath>


Im not very good at this, but hopefully someone can point me to a suggestion in order to fix this?

Appreciate the help so far!

Trenloe
July 2nd, 2011, 13:05
Thank you, that worked!

Only now I get another error. I'm using the tutorial in this thread, but when I start parsing I get the following error:

02.07.2011 13:19:42 : ERROR:System.Xml.XmlException: The startcode p on line 59 does not correspond to endcode for td.line 59, location 755.

See what GMTroll says in post #60 in this thread.

You have at least one "<p class="publishedIn">" entry that doesn't have the closing </p>.

ulsund
July 2nd, 2011, 13:29
Thank you! Ill give it a try!

ulsund
July 2nd, 2011, 17:10
It worked, fantastic!

ulsund
July 2nd, 2011, 23:03
I have now tried the same with the Monster Manual. This time I get the following error:

ERROR:System.Xml.XmlException: “ is an unexpected token. Expected token is "or". Line 525, location 67.

<constitution type="number">31</constitution>
<dexterity type="number">25</dexterity>
<intelligence type="number">12</intelligence>
<wisdom type="number">29</wisdom>
<charisma type="number">14</charisma>
*** <equipment type="string">lightning sword, flaming whip<p class=“publishedIn”></p></equipment>


<token type="token">tokens/Monster Manual/balor.png@Monster Manual</token>
</balor>
<abolethlasher>


Are anyone familiar with this type of error?

Zeus
July 2nd, 2011, 23:53
@ulsund: As GMTroll and Trenloe have said.

You have at least one other instance of a <p class=“publishedIn”></p> tag in your scraped data. Note the “ ” instead of the " " characters.

Adjust your global search and remove them all.

ulsund
July 3rd, 2011, 01:15
Thank you again. It worked. You guys are fantastic!

Sorry to aks again, but I got another problem with the Monster Manual. This time:

ERROR:System.Xml.XmlException: startcode h1 on line 23705 does not correspond to the end code for languages. Line 23705, location 56.

<powertype type="string">M</powertype>
<mm3mode type="number">1</mm3mode>
</id-00003>
</powers>
<alignment type="string">unaligned</alignment>
*** <languages type="string">-<h1 class="atwillpower"></languages>
<skills type="string">Stealth +13</skills>

<strength type="number">22</strength>
<constitution type="number">18</constitution>
<dexterity type="number">11</dexterity>

Thanks in advance!

GMTroll
July 3rd, 2011, 02:09
*** <languages type="string">-<h1 class="atwillpower"></languages>

What the error message is trying to tell you is that it has found and opening and closing tag mismatch. In plain speak there is a missing </h> tag. Should look like this

<languages type="string">-<h1 class="atwillpower"></h1></languages>

In XML all tags must be closed. Most tags have open and closing pairs for example <h1> is the opening tag and </h1> is the closing tag. And the order in which this is done is also important. There are also self-closing tags which look like <selfClosing />.

More detailed discussions, examples and tutorials of XML can be found all over the net.

Zeus
July 3rd, 2011, 12:45
I would just remove the offending <h1 class="atwillpower"> tag altogether. Its not needed in the equipment field of an NPC.

ulsund
July 3rd, 2011, 13:50
Thank you again. It works now:). Still geting more errors, this time on the DMG. I will try to figure it out, as it is good for my learning curve:)