• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

For those who asked to see how I'm importing spells.

EightBitz

Well-known member
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.
 
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! :)
 
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",$conten ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull


I went wrong at step 2 right ?
 
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.
 
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.

so its just a full export and not a structure? will give it a crack.

cheers
 
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.

Errr, uhhh, yeah, I uhhh ... forgot to mention those spelling corrections. *cough*
 
Errr, uhhh, yeah, I uhhh ... forgot to mention those spelling corrections. *cough*

hehehe :D

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.?
 
hehehe :D

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.?

I do, but I've been slacking on job hunting, so I have to start managing my time. Anyone here a hiring manager? :-)
 
Someone needs to do the successful import. Then export it as a Realm Works export... and post that link here ;)
 
Someone needs to do the successful import. Then export it as a Realm Works export... and post that link here ;)

I've put my public efforts on hold until I hear from Rob. I know he said he supports our efforts and has said it's fine if we continue, but I still want to see what he has to say first.
 
Please do NOT start sharing around gigantic export files until I've had a chance to coordinate with @Farling and @Eightbitz. If you do, all sorts of bad things will happen. And not all of them will be technical. There are potential IP implications here that will force us to take actions that I want to avoid.

So please give us a chance to sort things through first and coordinate things in a manner that won't cause a mushroom cloud of complications for everyone. Thanks! :)
 
Please do NOT start sharing around gigantic export files until I've had a chance to coordinate with @Farling and @Eightbitz. If you do, all sorts of bad things will happen. And not all of them will be technical. There are potential IP implications here that will force us to take actions that I want to avoid.

So please give us a chance to sort things through first and coordinate things in a manner that won't cause a mushroom cloud of complications for everyone. Thanks! :)

You got it, Boss!
 
Please do NOT start sharing around gigantic export files until I've had a chance to coordinate with @Farling and @Eightbitz. If you do, all sorts of bad things will happen. And not all of them will be technical. There are potential IP implications here that will force us to take actions that I want to avoid.

So please give us a chance to sort things through first and coordinate things in a manner that won't cause a mushroom cloud of complications for everyone. Thanks! :)

Looks like we're gonna get called into the principals office again... :D
 
With the new update, there is an option to compress the database. This should be of special interest to those who've been adventurous enough to use this script.

The resulting export file is about 6 MB, but it causes the local database to grow by about 1.2 GB.

So if you've used my script, you have a bloated database and will want to compress it.
 
Hey mate I need some help, I am repeatedly getting this error;



You cannot call a method on a null-valued expression.
At C:\RWExport-master\RWImport_Spells.ps1:59 char:9
+ $NewSpell = $SpellContainer.AppendChild($NewSpell)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull



Am I doing something wrong?
 
Back
Top