Senior Member
Join Date: May 2013
Posts: 1,458
|
https://github.com/EightBitz/RWImport
Please read the readme. Do not consider this a finished product. Backup your database. Make copies of your realms. This is only lightly tested, and in a limited environment. I can't guarantee anything if you run this code. I have run it several times on my own system, but I've only ever imported into empty realms, never populated ones. I'm mainly sharing this for those who have asked to see my process. Be safe and be cautious. And read the readme. |
#1 |
Member
Join Date: Jan 2016
Location: Sydney, Australia
Posts: 48
|
Had a play with this today. Only had to iron out a couple of spelling discrepancies in my CSV file (easily picked up from the errors thrown by PowerShell) and worked like a treat. Thanks!
|
#2 |
Senior Member
Join Date: May 2013
Posts: 1,458
|
|
#3 |
Senior Member
Join Date: Apr 2014
Location: Perth, Australia
Posts: 161
|
I know its probably me, and didn't follow an instruction somewhere (plus my skills at this sort of thing are what you would call, non-existent)... but I had a crack (cos I am a curious bugger!) and hit a problem (and totally get this is prototype!)
Here is what I did: 1. So I copied my realm (ok good good... no problem there) 2. Made a structure file (did the export structure from copied realm) (ok possible first mistake since my extension is rwstructure not rwexport) 3. got a copy of the spell list and made the couple of changes suggested 4. modified the texty bit (see my technical knowledge shining!) <##> $Structure_File = "d:\Jr_Structure.rwstructure" <##> $Spell_Spreadsheet = "d:\spell_full - updated 25feb2017.csv" <##> $New_XML_File = "Pathfinder_Spells.rwexport" 5. Hit run.... I get : Add-Type : Cannot add type. The type name 'objIDMap' already exists. At D:\spell_Import.ps1:1 char:1 + Add-Type @' + ~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (objIDMap:String) [Add-Type], Exception + FullyQualifiedErrorId : TYPE_ALREADY_EXISTS,Microsoft.PowerShell.Commands. AddTypeCommand and then a bucket load of errors before I finally stop it. You cannot call a method on a null-valued expression. At D:\spell_Import.ps1:12 char:5 + $NewTopic = $contents.OwnerDocument.CreateElement("topic",$con ten ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: ( [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull I went wrong at step 2 right ? |
#4 |
Member
Join Date: Jan 2016
Location: Sydney, Australia
Posts: 48
|
Hey Happydevil43,
Yeah, I did the same thing hahaha Has to be an "export" that ends in .rwexport, I got tripped up there too by the wording of EightBitz's file. Also a few things that popped up when I was running it were: A couple of spelling errors in the .csv file compared to the script - spell_resistence instead of spell_resistance and description_formated, should be description_formatted. Make sure your script, export file and csv are all in the same directory (stupidly I was running it from my downloads folder with my files in another folder ) Worked a treat after I sorted all that out. |
#5 |
Senior Member
Join Date: Apr 2014
Location: Perth, Australia
Posts: 161
|
Quote:
cheers |
|
#6 |
Senior Member
Join Date: May 2013
Posts: 1,458
|
|
#7 |
Senior Member
Join Date: May 2013
Posts: 1,458
|
Quote:
|
|
#8 |
Member
Join Date: Jan 2016
Location: Sydney, Australia
Posts: 48
|
Quote:
I have pretty basic PowerShell knowledge so it was good to have to investigate the errors to find out what was wrong. Also, no pressure (), do you have any plans to do more scripts for say Feats etc.? |
|
#9 |
Senior Member
Join Date: May 2013
Posts: 1,458
|
I do, but I've been slacking on job hunting, so I have to start managing my time. Anyone here a hiring manager? :-)
|
#10 |
|
|