Zeus
July 26th, 2012, 14:10
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.
NOTE: At present there is a current and known problem with scraping Item data from DDI using the Parser. Advise unticking the Item options for scraping until a fix and new relase of the Parser is made available.
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.
NOTE: At present there is a current and known problem with scraping Item data from DDI using the Parser. Advise unticking the Item options for scraping until a fix and new relase of the Parser is made available.
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.