Further Notes on CMP to RSRD Migration, part2

From PCGen Wiki
Jump to: navigation, search

Page 2

Apologies for the formatting, this probably needs tidying up...This really is just a cut and paste from a scratch file I used whilst converting data Some of this (most?) is possibly done by PrettyLst (I wasnt using the right options initially!) Much of it was just notes I'd made as I manually updated some files, and possibly prettylst now does a healthy chunk of the below.

Several of these commands are search and replace regex expressions for VIM (my editor of choice), the concept should be clear though as to the intent (on every line, search for 'foo' and replace with 'bar'), and updating to your editor of choice. I copy the line from the scratch file, and in vim, press ':' to enter command mode, and then just paste and hit return.

Section 1

replace % with %% in descriptions

Willpower - replace with 'Will'

ADD: can't be used more than once per class line, so split it into two lines. I.e

1<tab>ADD:feat1<tab>ADD:feat2 becomes 1<tab>ADD:feat1 1<tab>ADD:feat2

Cannot have commas in names, just remove them/replace with a space.

Section 2

    • Above are confirmed as necessary following proper prettylst conversion, below still need to be validated.**

Spells File

changed all to .mod other than specific few (20 odd non-srd spells) note - we only really want the descriptions, not the mechanics..

feats file

  changed all to .mod
  note - we only really want the descriptions, not the mechanics..
  ExtraTurning - CHOOSE: nochoice Typo???!!! Type=ExtraTurnig.STACK ??? - updated to match pcgen srd original
   CHOOSE:Exotic		:- CHOOSE:PROFICIENCY|WEAPON|UNIQUE|TYPE=Exotic
  CHOOSE:Blah|1	:= CHOOSE:Blah
   PRELEVEL:x	:= PRELEVEL:MIN=x
   PREVARLT:CL=Shaaryan Hunter,6   :=   PRECLASSLEVELMAX:1,Shaaryan Hunter=5
   PREVARGTEQ:CL=Shaaryan Hunter,6   :=   PRECLASS:1,Shaaryan Hunter=6

AUTO.SHIELDPROF|TYPE := AUTO.SHIELDPROF|SHIELDTYPE CHOOSE:Martial := CHOOSE:PROFICIENCY|WEAPON|UNIQUE|TYPE=Martial CHOOSE:SKILLSNAMED|blah|1 :- CHOOSE:SKILLSNAMED|blah


feats_hidden file ADD:FEAT(blah)|x :- ADD:FEAT|x|blah SPELL:Blah|x|Innate := SPELLS:Innate|TIMES=x|Blah SPELLS:Innate|CASTERLEVEL=max(classlevel("Mage"),1)|Blah CHOOSE:NUMCHOICES=x| := CHOOSE:x|

TODO Favoured Enemy / Favoured Bonus - all disabled, seems style is quite different

Rogue Bonus - CHOOSE:SKILLS|3+INT := SELECT:3+INT CHOOSE:SKILLS

=========================

skills file changed all to .mod note - we only really want the descriptions, not the mechanics.. PREMOVE:Blah := PREMOVE:1,Blah CHOOSE:Language(Spoken) :- CHOOSE:LANGUAGE|Spoken

SA:  := SAB: AUTO.ARMORPROF|TYPE  := AUTO.ARMORPROF|ARMORTYPE

Deity File

  Tag Name: PREALIGN:x,x
  Variables Used (x):LG,LN,LE,NG,TN,NE,CG,CN,CE,Deity (Alignment abbreviation).
  Variables Used (x):0,1,2,3,4,5,6,7,8,10 (Alignment array number).
  LG,LN,LE,NG,TN,NE,CG,CN,CE, Deity
  0, 1, 2, 3, 4, 5, 6, 7, 8, 10 
  %s/	[	]*FOLLOWERALIGN:147/|PREALIGN:LN,TN,CN	/
  %s/	[	]*FOLLOWERALIGN:13457/|PREALIGN:LN,NG,TN,NE,CN	/
  %s/	[	]*FOLLOWERALIGN:258/|PREALIGN:LE,NE,CE	/
  %s/	[	]*FOLLOWERALIGN:012/|PREALIGN:LG,LN,LE	/
  %s/	[	]*FOLLOWERALIGN:125/|PREALIGN:LN,LE,NE	/
  %s/	[	]*FOLLOWERALIGN:036/|PREALIGN:LG,NG,CG	/
  %s/	[	]*FOLLOWERALIGN:013/|PREALIGN:LG,LN,NG	/
  %s/	[	]*FOLLOWERALIGN:578	/|PREALIGN:NE,CN,CE	/
  %s/	[	]*FOLLOWERALIGN:678	/|PREALIGN:CG,CN,CE	/
  %s/	[	]*FOLLOWERALIGN:367	/|PREALIGN:NG,CG,CN	/
  %s/	[	]*FOLLOWERALIGN:012345678	/|PREALIGN:LG,LN,LE,NG,TN,NE,CG,CN,CE	/
  %s/	[	]*FOLLOWERALIGN:013467	/|PREALIGN:LG,LN,NG,TN,CG,CN	/
  %s/	[	]*FOLLOWERALIGN:012345	/|PREALIGN:LG,LN,LE,NG,TN,NE	/
  %s/	[	]*FOLLOWERALIGN:3467	/|PREALIGN:NG,TN,CG,CN	/
  %s/	[	]*FOLLOWERALIGN:345678	/|PREALIGN:NG,TN,NE,CG,CN,CE	/
  %s/	[	]*FOLLOWERALIGN:0123457	/|PREALIGN:LG,LN,LE,NG,TN,NE,CN	/
  %s/	[	]*FOLLOWERALIGN:01236	/|PREALIGN:LG,LN,LE,NG,CG	/
  %s/	[	]*FOLLOWERALIGN:2458	/|PREALIGN:LE,TN,NE,CE	/
 %s/	[	]*FOLLOWERALIGN:0346	/|PREALIGN:LG,NG,TN,CG	/
 %s/	[	]*FOLLOWERALIGN:4678	/|PREALIGN:TN,CG,CN,CE	/

PREVARxx| becomes PREVARxx:Var,Value

-- Section --

  %s/|PREDEFAULTMONSTER:Y//g
  %s/MFEAT/FEAT/g
  # note - need BOTH of the following, first one splits, second one cleans
  %s/HITDICE:[0-9]*,/HD:,&HITDICE:\tHITDIE:/
  %s/,HITDICE://g
                       or just remove it completely... %s/HITDICE:[0-9]*,[0-9]*//g

>>>No Longer using HITDICE, please remove and just use MONSTERCLASS

=========================

SPELL: becomes SPELLS:Innate|TIMES=x|CASTERLEVEL=x|SpellName1,DC|SpellName2,DC

=========================

Typically replace 'Heavy blah' with 'blah (Heavy)' etc.

=========================

NOTE D:\utils\PCGen\PCGen5164\data\d20ogl\srd35\basics\rsrd_equipmods_enhancing.lst NOTE D:\utils\PCGen\PCGen5164\data\d20ogl\srd35\basics\rsrd_equipmods_base.lst

%s/Willpower/Will/g %s/ARMR_MWORK/MWORKA/g %s/ARMR_PLUS_2/PLUS2A/g %s/ARMR_STEEL/STEEL/g %s/ARMR_PLUS_3/PLUS3W/g %s/ARMR_PLUS_1/PLUS1W/g %s/SHLD_MWORK/MWORKS/g %s/SHLD_STEEL/STEEL/g %s/SHLD_WOOD/WOOD/g %s/SHLD_PLUS_1/PLUS1S/g %s/SHLD_PLUS_2/PLUS2S/g %s/WEAP_PLUS_1/PLUS1W/g %s/WEAP_PLUS_2/PLUS2W/g %s/WEAP_PLUS_3/PLUS3W/g %s/WEAP_PLUS_4/PLUS4W/g %s/WEAP_PLUS_5/PLUS5W/g %s/WEAP_STEEL/STEEL/g

%s/WEAP_MWORK/MWORKW/g

=========================

Shields get changed from Small/Large to Light/Heavy and Wooden/Steel to Wood/Metal

=========================

FRCS/ue_feats.lst - Ice Troll Berserker should modify the rage special ability for natural armor...


=========================

if you use linux, or have 'cygwin' installed under windows, you can run a bash script to do some extra conversions - note that some of this may be unnecessary as PrettyLst may fix it)

<<--start of file

#!/bin/bash
# SLong and SShort are what we *want* to have finally.
# ALong, AShort and BShort are variations of this (common typos!) that appear initially
# that we want to replace

#
# save to above commented out as version history once done
SLong="Players Guide to Faerun"
SShort="pgtfae"
ALong="Players Guide to Faerun"
ALong="players guide to faerun"
AShort="pgtfae"
BShort="PGTFAE"

Files=$( ls *.lst)

echo This script indicates the file name, and the first SOURCE entry noted therein as stdout, to allow verification of correct Sed replacement values

for File in ${Files}
do

echo ${File}
grep SOURCE ${File} |head -3 |uniq
printf "SOURCELONG:${SLong}\nSOURCESHORT:${SShort}\n" >a
printf "#Converted by SedScript $(date +%d/%m/%y)\n\n" >>a

# want to replace characters 93 & 94 (special quotes)
# but cant get sed to recognise them...
# these appear as black squares in vim..
# have to do manually in vim..
#

egrep -v "^SOURCE|^# CVS|#Converted by" $File |\
sed -e 's/Willpower/Will/g' \
-e 's/ARMR_MWORK/MWORKA/g' \
-e 's/AMMO_MWORK/MWORKA/g' \
-e 's/ARMRMW/MWORKA/g' \
-e 's/ARMR_PLUS_1/PLUS1A/g' \
-e 's/ARMR_PLUS_2/PLUS2A/g' \
-e 's/ARMR_PLUS_3/PLUS3A/g' \
-e 's/ARMR_PLUS_4/PLUS4A/g' \
-e 's/ARMR_PLUS_5/PLUS5A/g' \
-e 's/SHLD_MWORK/MWORKA/g' \
-e 's/SHLD_STEEL/STEEL/g' \
-e 's/SHLD_DARKWOOD/DARK/g' \
-e 's/ARMOR_SPIKE_BASH/SPOKE_SB/g' \
-e 's/ARMOR_SPIKE/SPIKE_S/g' \
-e 's/ARMR_STEEL/STEEL/g' \
-e 's/SHLD_WOOD/WOOD/g' \
-e 's/SHLD_PLUS_1/PLUS1S/g' \
-e 's/SHLD_PLUS_2/PLUS2S/g' \
-e 's/SHLD_PLUS_3/PLUS3S/g' \
-e 's/SHLD_PLUS_4/PLUS4S/g' \
-e 's/SHLD_PLUS_5/PLUS5S/g' \
-e 's/WEAP_PLUS_1/PLUS1W/g' \
-e 's/WEAP_PLUS_2/PLUS2W/g' \
-e 's/WEAP_PLUS_3/PLUS3W/g' \
-e 's/WEAP_PLUS_4/PLUS4W/g' \
-e 's/WEAP_PLUS_5/PLUS5W/g' \
-e 's/AMMO_PLUS_1/PLUS1W/g' \
-e 's/AMMO_PLUS_2/PLUS2W/g' \
-e 's/AMMO_PLUS_3/PLUS3W/g' \
-e 's/AMMO_PLUS_4/PLUS4W/g' \
-e 's/AMMO_PLUS_5/PLUS5W/g' \
-e 's/WEAP_BANE/BANE_M/g' \
-e 's/WEAP_STEEL/STEEL/g' \
-e 's/WEAP_VORPAL/VORPAL/g' \
-e 's/WEAP_ALCH_SILVR/ALCHM/g' \
-e 's/WEAP_ALCH_SLVR/ALCHM/g' \
-e 's/WEAP_AXIOMATIC/LAW_M/g' \
-e 's/WEAP_HOLY/HOLY_M/g' \
-e 's/ARMR_DRAGONHIDE/DRACO/g' \
-e 's/AMMO_ALCH_SLVR/ALCHM/g' \
-e 's/AMMO_COLD_IRON/C_IRON/g' \
-e 's/.WEAP_WOOD//g' \
-e 's/AMMO_ALCH_SILVR/ALCHM/g' \
-e 's/MWWEAPON/MWORKW/g' \
-e 's/WEAPMW/MWORKW/g' \
-e 's/WEAP_MWORK/MWORKW/g' \
-e 's/|PREDEFAULTMONSTER:Y//g' \
-e 's/MFEAT/FEAT/g' \
-e 's/HITDICE:[0-9]*,[0-9]*//g' \
-e"s/[|]SOURCELONG:${SLong}//" \
-e"s/[|]SOURCESHORT:${SShort}//" \
-e"s/[|]SOURCESHORT:${AShort}//" \
-e"s/[|]SOURCESHORT:${BShort}//" \
-e's/|SOURCEPAGE/SOURCEPAGE/' \
-e's/[|]SOURCELONG:${ALong}//' \
-e's/SOURCEPAGE/ SOURCEPAGE/' \
-e's/|SOURCE/\tSOURCE/' >>a
# that's a 'tab' two lines up, check when copying
mv a ${File}
done
<<--end of file-->>

Copy that to a file (remove the <<-- -->> lines) and then execute it

=========================

other manual changes:

WEAPONPROF:blah to : BONUS:WEAPONPROF:blah AUTO:WEAPONPROF|Longsword|Rapier|

BONUS:ToHIT|blah to BONUS:COMBAT:TOHIT|blah

ADD:FEAT|(blah) ADD:FEAT|(blah) to ADD:FEAT|2|blah,blah

Note that LANGBONUS (and potentially others?) take pipe (|) separators in one file but comma separators in others.

Further note that there are various typo's, particularly in 'DEFINE' variables.