I need to add a few new properties for my mod, however, I can't seem to get them to function. Am I missing any steps? I've defined them in the properties 2da, and in 2da_constants, but when I include them in a script I can't seem to get them to do anything. Not to get too deep into details, but I've added checks for these properties into some damage calculations, and I have the effects of various skills scripted to add or decrease them. I see no change in the damage when these skills are used, however. Is there something else I have to do besides defining the property to have it applied to all creatures? How does the game know what to set the default value at? Any help is greatly appreciated.
Adding new property?
Débuté par
Anomaly-
, mars 31 2010 09:46
#1
Posté 31 mars 2010 - 09:46
#2
Posté 01 avril 2010 - 09:38
if you have just defined the properties and are only reading them, they will return zero. which usually means no effect in a script. you must script the whole property including the setup, modification and execution.
it's YOU that dictate these conditions so only you know what code is needed, and that defines where it should go.
it's YOU that dictate these conditions so only you know what code is needed, and that defines where it should go.
#3
Posté 01 avril 2010 - 05:11
CID-78 wrote...
if you have just defined the properties and are only reading them, they will return zero. which usually means no effect in a script. you must script the whole property including the setup, modification and execution.
it's YOU that dictate these conditions so only you know what code is needed, and that defines where it should go.
Thanks for the reply. I'm a bit confused, though. I have defined the properties, given them a min and max, set them up in damage formulas and allowed skills to modify them. Is that not what you are talking about? I've searched any script I can think of and the only things I find are the same generic GetCreatureProperty base, modifier, total definition that applies to all properties. The only time I see more detail is concerning the six main attributes (strength, constition, etc). Do I need to compile chargen scripts? Will I have to start a new game to see functionality?
#4
Posté 01 avril 2010 - 06:26
I don't what exactly your doing with the property. but you must have a default value in chargen unless you don't want it to be 0 when you don't have the skill.
you also need to set if when you gain the ability or when you activate/deactivate it.
it's more or less a local variable that you get and set. and that for each and every creature that is going to use it. so it's not global.
you also need to set if when you gain the ability or when you activate/deactivate it.
it's more or less a local variable that you get and set. and that for each and every creature that is going to use it. so it's not global.
#5
Posté 01 avril 2010 - 07:01
Basically I'm introducing more different types of damage bonuses. I do want the default to be 0, until something modifies it. Think elemental damage bonuses, but called on the target instead of the attacker. Kind of like the opposite of a resistance.
#6
Posté 01 avril 2010 - 08:31
well beyond scripting errors the only thing that comes to mind is if you haven't compiled your properties.xls into a .gda and put it in the right folder.
#7
Posté 01 avril 2010 - 11:57
I've done that, yes. And my scripts compile without error, so I know the game recognizes the property. I just don't see any change in damage when I use a skill that is set to increase (or decrease) the value.
#8
Posté 02 avril 2010 - 02:51
Well, I give up. From what I can tell, it should be working no less than any other property. I've even defined the default value as 0 manually, and tried compiling just about every applicable script I could think of, still nothing. Going to have to give this a rest until someone else figures it out and decides to divulge the information, I guess. Thanks for the help, anyway.
#9
Posté 02 avril 2010 - 06:28
do you debug your script and check what values you get? just because a thing compile doesn't mean they work as intended.





Retour en haut






