I tried creating a custom injury today, which failed. I've created spells, effects and so forth but I can't seem to be able to create injuries. This is what I did:
1. I found injuries.xls in the dragon age folder
2. Removed all the lines except for the headers
3. Added my own data, look here.
4. Ran it through the processor.
5. Renamed the new GDA file to injuries_bp
6. Added it to \\Documents\\BioWare\\Dragon Age\\AddIns\\tmod\\module\\override\\
I tried giving the player the injury by using a placeable and this code. Nothing happened :---(
Creating custom injury
Débuté par
Guest_dewkl_*
, avril 23 2010 02:34
#1
Guest_dewkl_*
Posté 23 avril 2010 - 02:34
Guest_dewkl_*
#2
Posté 24 avril 2010 - 10:45
You've not specified an effect so nothing happens (well technically Injury_AddInjury calls _CreateInjuryEffect which creates and returns an empty effect and then nothing happens).
#3
Guest_dewkl_*
Posté 24 avril 2010 - 11:29
Guest_dewkl_*
I've temporarily used: DEBUG_ConsoleCommand("runscript injury add <index>");
I can find every injury except the ones I've added.
I can find every injury except the ones I've added.
#4
Posté 25 avril 2010 - 12:52
That won't work for 2 reason: first INJURY_MAX_DEFINES restricts that script injuries with an id <= 100 and second (as I said before) you've not specified an effect in your data so nothing will happen.
Modifié par Sunjammer, 25 avril 2010 - 12:54 .
#5
Guest_dewkl_*
Posté 25 avril 2010 - 01:51
Guest_dewkl_*
What exactly do you mean by that? Declaring an effect in the script or creating an effect (ability) to be associated with it? How do you specify effects for (new) injuries? I apologize if I'm being slow with this. I was trying to find some info on how injuries work instead of all the questions, but I can't find much info about them.
#6
Posté 25 avril 2010 - 01:02
An injury is defined by the injuries mda (in injuries.xls). This includes the effect that it is to produce.
Lets look at one of the existing examples: Cracked Skull:
The effect column determines the kind of effect to use. For Cracked Skull it contains the number 1012. If we look this up in the effects mda (in effects.xls) we find that this is the value for EFFECT_TYPE_MODIFY_PROPERTY. So the first you need to do, assuming you want to modify an existing property, is put 1012 in your effect column.
The effect_int1 and effect_float1 (and effect_int2 and effect_float2) are parameters for the effect constructor. In the case of EFFECT_TYPE_MODIFY_PROPERTY the constructor will be EffectModifyProperty.
For EffectModifyProperty the effect_int1 column determines which property to modify. For Cracked Skull it contains the number 5. If we look this up in the properties mda (in properties.xls) we find that this is the value for CUNNING.
For EffectModifyProperty the effect_float1 column determines how much to modify the property by. For Cracked Skull it contains the number -5. If we put this together with the other bits of the puzzle we find that this injury will apply -5 penalty to cunning.
So to get your injuries working you need to decide what effect you want them to have in game and then you have to update your injuries 2da accordingly.
I believe you'll also want to put a 1 in bot the auto_apply and auto_remove columns.
Lets look at one of the existing examples: Cracked Skull:
The effect column determines the kind of effect to use. For Cracked Skull it contains the number 1012. If we look this up in the effects mda (in effects.xls) we find that this is the value for EFFECT_TYPE_MODIFY_PROPERTY. So the first you need to do, assuming you want to modify an existing property, is put 1012 in your effect column.
The effect_int1 and effect_float1 (and effect_int2 and effect_float2) are parameters for the effect constructor. In the case of EFFECT_TYPE_MODIFY_PROPERTY the constructor will be EffectModifyProperty.
For EffectModifyProperty the effect_int1 column determines which property to modify. For Cracked Skull it contains the number 5. If we look this up in the properties mda (in properties.xls) we find that this is the value for CUNNING.
For EffectModifyProperty the effect_float1 column determines how much to modify the property by. For Cracked Skull it contains the number -5. If we put this together with the other bits of the puzzle we find that this injury will apply -5 penalty to cunning.
So to get your injuries working you need to decide what effect you want them to have in game and then you have to update your injuries 2da accordingly.
I believe you'll also want to put a 1 in bot the auto_apply and auto_remove columns.
Modifié par Sunjammer, 25 avril 2010 - 01:07 .
#7
Guest_dewkl_*
Posté 25 avril 2010 - 02:06
Guest_dewkl_*
I completely forgot there was an effect field in the xls-file. It works perfectly now, thanks!
#8
Guest_dewkl_*
Posté 29 avril 2010 - 08:37
Guest_dewkl_*
I have a slight problem. I thought setting auto_remove to 0 would remove the possibility of healing the wounds with an injury kit, but it seems that value is just for the camp.
I could just not give the player any injury kits during that part of the module (it's a short part anyway), but I think the creatures have a chance to drop these. Is there anything I can do to make it un-healable (only through scripting)? or should I attempt to modify the injury kit somehow?
I could just not give the player any injury kits during that part of the module (it's a short part anyway), but I think the creatures have a chance to drop these. Is there anything I can do to make it un-healable (only through scripting)? or should I attempt to modify the injury kit somehow?
#9
Posté 29 avril 2010 - 10:03
You might be able to do it either by modifying the item_singletarget script or override the 3 *INJURY_REPAIR_KIT entries in ABI_Base to point to a custom script.
Modifié par Sunjammer, 29 avril 2010 - 10:04 .





Retour en haut






