Skip to content

Barak's conversion script

Barak's 5.12 -> 5.14 Conversion Script

Barak's conversion script automates much of the process of upgrading data files from 5.12 to 5.14. However, there are some things that cannot be converted. The script creates a log file and will note any of these items (and the file and line # within that file) in that log, as well as the recommended action to deal with them.

Below are the docs for the script.

FUNCTION: Update PCGen data files (.lst) from version 5.12 to 5.14

INSTALLATION: A) Get Perl if you don't already have it... any standard distribution with version 5.8 and over should work.
B) Once Perl is installed on your computer, put the script in the directory of your choice. C) To run the script all you have to do is type "perl convert_514.pl" with the proper parameters to make it work.

COMMAND LINE PARAMETERS: -S --> Create generic shieldprof file (Optional) -I="" --> input directory (Required) -O="" --> output directory (Required) directory names must be in double quotes if they contains spaces

NOTES:

1) If you specify the same output directory as input directory your files will be overwritten, so make sure to backup your files in another location if you choose to do this. NOTE: This is NOT the recommended method

2) The script will remove CHOICE tags that do not have targets that are schools, subschools or descriptors. It will log these occurrences.

3) Any CHOOSE tag with only one choice (like the old "CHOOSE:+3 HP" for the Toughness feat) will be converted to CHOOSE:NOCHOICE

4) Any CHOOSE tag that does not have a first parameter that matches one of the documented ones will be converted to CHOOSE:STRING (in a non-equipmod file) or CHOOSE:STRING|...|TITLE=yyy in an equipmod file (the title will be the text between the colon and the first pipe)

5) Any tags that need to be manually updated will be passed through as is and noted in the log file (line numbers given reference input files)

6) Recommended usage is in two steps:

A) Point the script at your existing gamemode directory and direct output to the 5.14 gamemode directory B) Point the script at your existing data directory and direct output to the 5.14 data directory

TAG CONVERSIONS/ADDITIONS:

SA -> SAB (Logs those that need manual conversion - basically SA:.CLEAR)

PROFICIENCY -> PROFICIENCY:|

AUTO:ARMORPROF|TYPE -> AUTO:ARMORPROF|ARMORTYPE=

AUTO:SHIELDPROF|TYPE -> AUTO:SHIELDPROF|SHIELDTYPE=

FEATAUTO -> AUTO:FEAT

REPEATLEVEL -> :REPEATLEVEL

PREDEITY -> PREDEITY:x,y,y

PRETEMPLATE -> PRETEMPLATE:x,y,y

PRERACE:y -> PRERACE:x,y,y

PRELEVEL: -> PRELEVEL:MIN=#

PRELEVELMAX -> PRELEVEL:MAX=#

CONTAINS:-1 -> CONTAINS:UNLIM

MOVECLONE:w,x,y,z -> MOVECLONE:x,y,z (Logs those that need manual conversion)

PRETYPE: -> PRETYPE:x,y,y

ADD:SA -> ADD:SAB

KNOWNSPELLS:.CLEAR -> KNOWNSPELLS:.CLEAR|

PREHD:#-# -> PREHD:MIN=x,MAX=y

CHOICE -> CHOICE:SCHOOL

CHOICE -> CHOICE:SUBSCHOOL

CHOICE -> CHOICE:DESCRIPTOR

FAVCLASS -> FAVCLASS:.

FAVOREDCLASS -> FAVOREDCLASS:.

Create Armorprof file from armor.lst files

PRECLASS -> PRECLASS:#,y,y conversion

PREMOVE -> PREMOVE:#,y,y conversion

PREWIELD -> PREWIELD:#,y,y conversion

PREWEAPONPROF -> PREWEAPONPROF:#,y,y conversion

PRESPELLSCHOOL:Abjuration,1,5 -> PRESPELLSCHOOL:1,Abjuration=5

PRESPELLSCHOOLSUB:Healing,1,5 -> PRESPELLSCHOOLSUB:1,Healing=5

PRESPELLDESCRIPTOR:Evil,1,5 -> PRESPELLDESCRIPTOR:1,Evil=5

CHOOSE:Language() -> CHOOSE:LANGUAGE|

CHOOSE:SKILLSNAMED|...|# -> CHOOSE:SKILLSNAMED|... SELECT:#

SPELLS:|TIMES:-1 to SPELLS:|TIMES:ATWILL

NUMCHOICES=1 not allowed in CHOOSE:SPELLLEVEL

CHOOSE: in EqMod with Title as first argument is deprecated -> CHOOSE:||TITLE=</p> <p>REMOVE:FEAT(<feat1>,<feat2>)# -> REMOVE:FEAT|<feat1>,<feat2>|#</p> <p>CHOOSE:<blah text1>|<blah text2> -> CHOOSE:STRING|<blah text1>|<blah text2></p> <p>CHOOSE:CCSKILLLIST|x,x -> CHOOSE:SKILLSNAMED|CROSSCLASS</p> <p>CHOOSE:NONCLASSSKILLLIST|x -> CHOOSE:SKILLSNAMED|CROSSCLASS|EXCLUSIVE</p> <p>CHOOSE:SKILLIST|x,x -> CHOOSE:SKILLSNAMED|x|x</p> <p>CHOOSE:SKILLIST|LIST -> CHOOSE:SKILLSNAMED|ALL</p> <p>CHOOSE:Martial -> CHOOSE:PROFICIENCY|WEAPON|UNIQUE|TYPE.Martial</p> <p>CHOOSE:Exotic -> CHOOSE:PROFICIENCY|WEAPON|UNIQUE|TYPE.Exotic</p> <p>CHOOSE:SPELLLEVEL arguments may not contain ,</p> <p>LIST in some CHOOSEs no longer used</p> <p>ADD:FEAT(blah,blah1)# -> ADD:FEAT|#|blah,blah1</p> <p>ADD:CLASSSKILLS(blah,blah1)# -> ADD:CLASSSKILLS|#|blah,blah</p> <p>ADD:SPELLCASTER(blah,blah1)# -> ADD:SPELLCASTER|#|blah,blah </p> <p>PRESPELLTYPE:Arcane,1,5 -> PRESPELLTYPE:1,Arcane=5</p> <p>RESIZABLEEQUIPTYPE -> Add default to miscinfo.lst</p> <p>WEAPONREACH -> Add default to miscinfo.lst</p> <p>FOLLOWERALIGN -> PREALIGN </p> <p>PREVIEWDIR:d20/fantasy -> added to miscinfo.lst as a commented out example</p> <p>PREVIEWSHEET:preview.html -> added to miscinfo.lst as a commented out example</p> <p>VISION:Low-light,Darkvision -> VISION:Low-light|Darkvision</p> <p>CLASSES:Sorcerer=1[PRExxx] -> CLASSES:Sorcerer=1<tab>PRExxx</p> <p>PRESA:Wild Empathy -> PRESAB:Wild Empathy</p> <p>WT:- -> <tab></p> <p>ADD:Language -> ADD:LANGUAGE</p> <p>BONUSFEATS:1 -> BONUS:FEAT|POOL|1</p> <p>PREEQUIP:<equipment> -> PREEQUIP:#,<equipment></p> <hr /> <p><em>Source: <a href="http://pcgen.org/w/index.php/Barak%27s_conversion_script">Barak's conversion script</a> (original PCGen wiki)</em></p> </article> </div> <script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script> </div> <button type="button" class="md-top md-icon" data-md-component="top" hidden> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8z"/></svg> Back to top </button> </main> <footer class="md-footer"> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-copyright"> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <script id="__config" type="application/json">{"annotate": null, "base": "..", "features": ["navigation.instant", "navigation.top", "navigation.prune", "search.suggest", "content.code.copy"], "search": "../assets/javascripts/workers/search.2c215733.min.js", "tags": null, "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": null}</script> <script src="../assets/javascripts/bundle.d7400e89.min.js"></script> </body> </html>