The compile apparently failed. Some help with interpretation would be greatly appreciated. Code was copied from monster_singletarget.nss and modified slightly.
I: 10:18:01 - ek_arcane_warrior.nss - The resource "ek_arcane_warrior.nss" has been saved.
I: 10:18:01 - No modules to process. No XML files generated.
I: 10:18:01 - Generated the campaign file.
I: 10:17:59 - Compile failed
E: 10:17:59 - ek_arcane_warrior.nss - ek_arcane_warrior.nss(106): Unexpected end compound statement
I: 10:17:59 - Compiling ek_arcane_warrior.nss...
I: 10:12:43 - ek_arcane_warrior.nss - The resource "ek_arcane_warrior.nss" has been added.
W: 07:36:42 - Could not find the definition for the identifier "MONSTER_REVENANT_MASSIVE_PULL".
W: 07:35:10 - Could not find the definition for the identifier "MONSTER_REVENANT_PULL".
Not quite sure how to do a code windown the BBCode box just puts at seemingly random places in the text above.
// -----------------------------------------------------------------------------
// ek_arcane_warrior.nss
// -----------------------------------------------------------------------------
/*
Script modifying the revenant pull talents for use by arcane warriors.
Copied and then modified from monster_singletarget.nss
*/
// -----------------------------------------------------------------------------
// Eric Kerr
// -----------------------------------------------------------------------------
#include "log_h"
#include "abi_templates"
#include "sys_traps_h"
//#include "monster_constants_h"
#include "spell_constants_h"
const int ABILITY_SPELL_ARCANE_WARRIOR_PULL = 666666;
const int ARCANE_WARRIOR_MASS_PULL = 666667;
//const resource SCRIPT_MONSTER_AOE_DURATION = R"monster_aoe_duration.ncs";
void _HandleImpact(struct EventSpellScriptImpactStruct stEvent)
{
// -------------------------------------------------------------------------
// VAR BLOCK
// -------------------------------------------------------------------------
int nScalingVector = SCALING_VECTOR_DURATION;
int nAttackingValue = PROPERTY_ATTRIBUTE_SPELLPOWER;
int nResistance = RESISTANCE_INVALID;
float fDuration = 0.0f;
float fScaledValue = 0.0f;
int nEffect = 0;
int nHandler = SPELL_HANDLER_CUSTOM;
effect eDamage;
effect eEffect;
effect[] eEffects;
// make sure there is a location, just in case
if (IsObjectValid(stEvent.oTarget) == TRUE)
{
stEvent.lTarget = GetLocation(stEvent.oTarget);
}
// -------------------------------------------------------------------------
// Handle Spells
// -------------------------------------------------------------------------
switch (stEvent.nAbility)
case ABILITY_SPELL_ARCANE_WARRIOR_PULL:
{
Log_Trace_Spell("_ApplyImpactDamageAndEffects","MONSTER_REVENANT_PULL", stEvent.nAbility, stEvent.oTarget);
effect eDamage = EffectDamage(MONSTER_REVENANT_PULL_DAMAGE_PER_LEVEL* GetLevel(stEvent.oCaster), DAMAGE_TYPE_SPIRIT);
ApplyEffectOnObject(EFFECT_DURATION_TYPE_INSTANT, eDamage, stEvent.oTarget);
// force pull character forward
effect ePull = EffectKnockdown(stEvent.oCaster, 0, ABILITY_TALENT_MONSTER_REVENANT_PULL);
ePull = SetEffectEngineFloat(ePull, EFFECT_FLOAT_KNOCKBACK_DISTANCE, -0.5f);
ApplyEffectOnObject(EFFECT_DURATION_TYPE_INSTANT, ePull, stEvent.oTarget, 0.0f, stEvent.oCaster, stEvent.nAbility);
ApplyEffectVisualEffect(stEvent.oCaster, stEvent.oTarget, 1050, EFFECT_DURATION_TYPE_INSTANT, 0.0, stEvent.nAbility);
break;
}
case ABILITY_SPELL_ARCANE_WARRIOR_MASS_PULL:
{
Log_Trace_Spell("_ApplyImpactDamageAndEffects","MONSTER_REVENANT_MASSIVE_PULL", stEvent.nAbility, stEvent.oTarget);
Ability_ApplyObjectImpactVFX(stEvent.nAbility, stEvent.oCaster);
location lCaster = GetLocation(stEvent.oCaster);
effect eDamage = EffectDamage(MONSTER_REVENANT_PULL_DAMAGE_PER_LEVEL * GetLevel(stEvent.oCaster) / 2, DAMAGE_TYPE_SPIRIT);
// pull effect
effect ePull = EffectKnockdown(stEvent.oCaster, 0, ABILITY_TALENT_MONSTER_REVENANT_PULL);
// get creatures in area
object [] oTargets = GetObjectsInShape(OBJECT_TYPE_CREATURE, SHAPE_SPHERE, lCaster, 30.0);
int nCount = 0;
int nNum = GetArraySize(oTargets);
float fKnockDistance;
float fRand;
for (nCount = 0; nCount < nNum; nCount++)
{
Log_Trace_Spell("_ApplyImpactDamageAndEffects"," Target is " + ToString(oTargets[nCount]), stEvent.nAbility, oTargets[nCount]);
// aoe doesn't harm itself
if (IsObjectHostile(stEvent.oCaster, oTargets[nCount]))
{
// Randomize 4 numbers - each number add 0.5 to the distace away from the caster
//fRand = RandomF(6, 1);
//fKnockDistance = (-1.0) - fRand * 0.5;
ePull = SetEffectEngineFloat(ePull, EFFECT_FLOAT_KNOCKBACK_DISTANCE, -0.5);
ApplyEffectOnObject(EFFECT_DURATION_TYPE_INSTANT, ePull, oTargets[nCount], 0.0f, stEvent.oCaster, stEvent.nAbility);
ApplyEffectVisualEffect(stEvent.oCaster, oTargets[nCount], 1050, EFFECT_DURATION_TYPE_INSTANT, 0.0, stEvent.nAbility);
ApplyEffectOnObject(EFFECT_DURATION_TYPE_INSTANT, eDamage, oTargets[nCount]);
}
}
break;
}
Compiler Errors
Débuté par
cirerrek
, juil. 17 2010 03:27
#1
Posté 17 juillet 2010 - 03:27
#2
Posté 17 juillet 2010 - 06:10
Some missing braces (in red). Maybe something else...
void _HandleImpact(struct EventSpellScriptImpactStruct stEvent)
{
...
switch (stEvent.nAbility)
{
case ABILITY_SPELL_ARCANE_WARRIOR_PULL:
{
...
break;
}
case ABILITY_SPELL_ARCANE_WARRIOR_MASS_PULL:
{
...
break;
}
}
}
void _HandleImpact(struct EventSpellScriptImpactStruct stEvent)
{
...
switch (stEvent.nAbility)
{
case ABILITY_SPELL_ARCANE_WARRIOR_PULL:
{
...
break;
}
case ABILITY_SPELL_ARCANE_WARRIOR_MASS_PULL:
{
...
break;
}
}
}
Modifié par _L_o_B_o_, 17 juillet 2010 - 06:12 .
#3
Posté 17 juillet 2010 - 08:29
_L_o_B_o_
You were right on the bracket thing. I believe I was missing the very last bracket. However, there may be some other things wrong too as it now says the following.
E: 15:27:15 - ek_arcane_warrior.nss - ek_arcane_warrior.nss(?): Script must contain either a main or StartingConditional
You were right on the bracket thing. I believe I was missing the very last bracket. However, there may be some other things wrong too as it now says the following.
E: 15:27:15 - ek_arcane_warrior.nss - ek_arcane_warrior.nss(?): Script must contain either a main or StartingConditional
#4
Posté 17 juillet 2010 - 09:10
Okay I believe it was complaining about me not having an void main () blah, blah, impact handling routine.
Now about the compiling. Do you have to have the file checked out when you tell it to compile?
If not, and it doesn't give you any errors, then where does it store the compiled version of the script?
Thanks,
Now about the compiling. Do you have to have the file checked out when you tell it to compile?
If not, and it doesn't give you any errors, then where does it store the compiled version of the script?
Thanks,
Modifié par cirerrek, 17 juillet 2010 - 09:11 .
#5
Posté 17 juillet 2010 - 09:14
cirerrek wrote...
E: 15:27:15 - ek_arcane_warrior.nss - ek_arcane_warrior.nss(?): Script must contain either a main or StartingConditional
Yep, that's exactly what is happening. There is no main() function in your code. If you are trying to make a custom version of monster_singletarget.nss, then you'll see that you have not copied into your code the main() function that is at the bottom.
Do you have to have the file checked out when you tell it to compile?
No, you don't need to check out.
then where does it store the compiled version of the script?
I have my compiled files here:
C:\\Users\\<UserName>\\Documents\\BioWare\\Dragon Age\\AddIns\\<MyModName>\\module\\override\\toolsetexport
Modifié par _L_o_B_o_, 17 juillet 2010 - 09:19 .
#6
Posté 18 juillet 2010 - 01:54
Ah, I just minimized my log window. It did try to compile the script when I saved it.
I'm still not quite sure where they are being stored, but that shouldn't matter at the moment.
In some ways I think there is a lot more nuance to this than I thought there would be in in that I'm trying to change a talent into a spell and basically doing it blindly. Well I never expected this would be quick.
I think I'll actually go play some and start back at this tomorrow.
Thanks for the help _L_o_B_o_
I'm still not quite sure where they are being stored, but that shouldn't matter at the moment.
In some ways I think there is a lot more nuance to this than I thought there would be in in that I'm trying to change a talent into a spell and basically doing it blindly. Well I never expected this would be quick.
I think I'll actually go play some and start back at this tomorrow.
Thanks for the help _L_o_B_o_





Retour en haut






