I am trying to mod some abilities so that their durations are also affected by the stats of the character (whether player or slave). The first several attempts and saved games would not load, but now at least game and saved games load with the following errors:
SCRIPT ERROR: _init: Invalid get index 'person' (on base: 'Nil').
At: res://files/scripts/abilities.gd:644
SCRIPT ERROR: _init: Invalid get index 'player' (on base: 'Nil').
At: res://files/scripts/combatdata.gd:306
Here is an example of a modified ability:
sedationeffect = {
icon = load("res://files/buttons/abils/Sedation.png"),
duration = rand_range(1,5)*globals.person.stats.smaf,
name = 'Sedation',
code = 'sedationeffect',
type = 'debuff',
stats = [['speed', '-(3+,caster.magic,)']],
},
This is actually lines 681-688. The error at 644 actually refers to:
var effects = {
Which covers all the abilities.
SCRIPT ERROR: _init: Invalid get index 'player' (on base: 'Nil').
At: res://files/scripts/combatdata.gd:306
refers to starting
var enemypool = {
With the first entry following:
wolf = {
name = 'Wolf',
code = 'wolf',
faction = 'animal',
icon = load("res://files/images/enemies/wolf.png"),
special = null,
capture = null,
level = 2,
rewardpool = {bestialessenceing = (10 + (globals.player.stats.smaf*10))},
rewardgold = 0,
rewardexp = 10,
stats = {health = 25, power = 12, speed = 12, energy = 50, armor = 0, magic = 0, abilities = ['attack']},
skills = [],
},
Is there something I am missing?