Sorry Meridian. I was in a rush, not the time to post more details.
I am trying to create two items in my game. One is a personal energy shield similar to Piratez or Dioxine's mod. It can be prime and then generate a protection field. Instead of the shield as a melee weapon. I used the motion scanner and turn it into a device that can turn on or off energy shield protection.
However, the energy shield did not work, after it is prime. I tested it on the original version from Dioxine and now my motion scanner adaptation. So, I am not 100% sure where is the problem.
In the script, everything after "extend" is a straight copy from Yankee's script in Dioxine's Piratez mod.
With the exception of.
item.getRuleItem itemRuleset;
itemRuleset.getTag changePerTurn Tag.ITEM_PSISTRENGTH_PER_TURN;
unit.getPsiStrength currentValue;
unit.getPsiStrengthMax maxValue;
set changedValue currentValue;
add changedValue changePerTurn;
limit changedValue 0 maxValue;
unit.setStun changedValue;
In line 1321.
The second device, the Psi-Shield, I was hoping to use ITEM_PSISTRENGTH_PER_TURN to boost the soldier's psi-defense stats.
This never seems to have any effect at all. Before, I uses Dioxine's original item script for STR_DRUG_DISPENSOR, now I modded it to my own version using a motion scanner to prime and turn on the Psi strength. It didn't work not surprisingly.
I was hopping someone experience modding with Yankee's scripts to help correct which ever it is not working in my script.
Sorry for the lack of details,