View Single Post
wiscrhino
Junior Member
 
Join Date: Feb 2017
Posts: 7

Old February 3rd, 2017, 06:17 AM
Hi all, this is my first post, so please excuse any newbie errors.

I am attempting to create a custom magic item and having a bit of trouble in the editor. I have successfully created other magic items in the editor, but running into a jam trying to create a Ring of Shield.

Now, right off the bat let me answer/address 2 questions/comments that are bound to come up:
1) Yes, I have watched the videos and read the very useful articles written by superuser Mathias on how to use the editor. I am still in a pickle and can't figure out the code needed.
2) Yes, I know a ring of shield is sort of a broken thing, that you shouldn't make it, but I want to anyway

Ok, so I have enabled data file debugging, and looked at the selection fields when the spell "Shield" is cast, to get an idea of how to do the coding. I've noticed that when the spell is enabled, the following is noted: "SpellEff.BuffAC".

Additionally, I've noted that the id for the item shield is "pShield" and when it's activated, the id "pAdjust"is activated as well, with a value of "4".

Therefore, I have tried the following code in the editor under "eval scripts":
hero.child[pShield].field[pAdjust].value += 4

However this doesn't seem to work, I get an error message when running the testing, which states:
"Syntax error in 'eval' script for Thing xxxx (Eval Script '#1') on line 1 -> Only derived fields can generally be modified via scripts (field 'pAdjust')

Therefore, I'm a bit stuck. I'd really like to know how to code this in the editor, and can't seem to figure it out. Appreciate any feedback to help me get this corrected!
wiscrhino is offline   #1 Reply With Quote