Hello and good time of day.
In what section i should define global variables that preserve it's values between game launches?
I trying to make my mod with copying enemy abilities less game-breaking (it will be another version, first version only for fun ^__^), and now think to make all copyed talents usable only when skill on cooldown, and then this talents will be unlearned.
But with 15/30/45/60/75 % chance one random skill with 1/2/3/4/5 max rank will stay in you skill book.
And this is second question: how to execute script when ability ready to use / when X (while on cooldown) turns pass ?
Thanks in advance.
Mod page: http://te4.org/games/addons/tome/aether-operators
Pesrsistent data and planned scripted actions
Moderator: Moderator
Re: Pesrsistent data and planned scripted actions
That's an interesting question, Eliont. I also faced the quandary of where to save generated talent data when I tried to implement an ability that procedurally generated new talents!
It seems the way to go is not to store them as globals but to attach them to the actor that will use them. Then they will be picked up by the game's save process.
They way I did it was to have the talent data stored as a beneficial effect! The user would have a talent called T_GENERATED_SLOT1 or whatever, which on its own does nothing. When the info or activation functions are called, however, they check to see if the user has this temporary effect. If this is the case then it gets the talent data from the effect, instead of from the dummy, do-nothing talent definition!
I did it this way purely because it was intuitive for what I was doing, but if the ability is going to be permanent rather than available for a brief period, it doesn't make as much sense. If you use a sustain, then you can store them there easily, and have the data not go away until de-sustained. If it's a passive, well, there doesn't seem to be any easy way to reference passive data. You could potentially use talentTemporaryValue, but it would be nicer in my view to create a new table like "stored_talents" or something and attach them to your actor.
That help any? I'll explain more later, got to dash off, now!
It seems the way to go is not to store them as globals but to attach them to the actor that will use them. Then they will be picked up by the game's save process.
They way I did it was to have the talent data stored as a beneficial effect! The user would have a talent called T_GENERATED_SLOT1 or whatever, which on its own does nothing. When the info or activation functions are called, however, they check to see if the user has this temporary effect. If this is the case then it gets the talent data from the effect, instead of from the dummy, do-nothing talent definition!
I did it this way purely because it was intuitive for what I was doing, but if the ability is going to be permanent rather than available for a brief period, it doesn't make as much sense. If you use a sustain, then you can store them there easily, and have the data not go away until de-sustained. If it's a passive, well, there doesn't seem to be any easy way to reference passive data. You could potentially use talentTemporaryValue, but it would be nicer in my view to create a new table like "stored_talents" or something and attach them to your actor.
That help any? I'll explain more later, got to dash off, now!