Jump to content

Icons problem problem.


tony007

Recommended Posts

Ok, I have made a new skill, here are the scripts:

 

#include "log_h"
#include "abi_templates"
#include "ability_h"

const int ABILITY_EXAMPLE = 10999995;
const float INCREASE_IN_ATTACK_SPEED = -0.3f;
const float INCREASE_IN_RANGED_AIM_SPEED = -2.0f;
const float INCREASE_IN_MELEE_CRIT = 80.0f;
const float INCREASE_IN_RANGED_CRIT = 80.0f;
const float INCREASE_IN_MOVEMENT_SPEED = 1.5f;

// add effects
void _ActivateModalAbility(struct EventSpellScriptImpactStruct stEvent)
{
// effects
effect eEffect;
effect[] eEffects;
int bPartywide = FALSE;
int nVfx = Ability_GetImpactObjectVfxId(stEvent.nAbility);

// Remove any previously existing effects from same spellid to avoid stacking
Ability_PreventAbilityEffectStacking(stEvent.oTarget, stEvent.oCaster, stEvent.nAbility);

switch (stEvent.nAbility)
{
	case ABILITY_EXAMPLE:
	{

		//Apply the desired effect - in this case an increas in attack speed
		eEffects[0] = EffectModifyProperty(PROPERTY_ATTRIBUTE_ATTACK_SPEED_MODIFIER, INCREASE_IN_ATTACK_SPEED);
		eEffects[1] = EffectModifyProperty(PROPERTY_ATTRIBUTE_RANGED_AIM_SPEED, INCREASE_IN_RANGED_AIM_SPEED);
		eEffects[2] = EffectModifyProperty(PROPERTY_ATTRIBUTE_MELEE_CRIT_MODIFIER, INCREASE_IN_MELEE_CRIT);
		eEffects[3] = EffectModifyProperty(PROPERTY_ATTRIBUTE_RANGED_CRIT_MODIFIER, INCREASE_IN_RANGED_CRIT);
		eEffects[4] = EffectModifyMovementSpeed(INCREASE_IN_MOVEMENT_SPEED);

		DisplayFloatyMessage(stEvent.oCaster, "Maximum Power", FLOATY_MESSAGE, 15040064, 5.0);

		// activation vfx
		Ability_ApplyObjectImpactVFX(stEvent.nAbility, stEvent.oCaster);

		break;
	}
}

Ability_ApplyUpkeepEffects(stEvent.oCaster, stEvent.nAbility, eEffects, stEvent.oTarget, bPartywide);

//------------------------------------------------------------------
// Tell the targeted creature that it has been cast at
//------------------------------------------------------------------
SendEventOnCastAt(stEvent.oTarget,stEvent.oCaster, stEvent.nAbility, FALSE);

}

// remove effects
void _DeactivateModalAbility(object oCaster, int nAbility)
{
DisplayFloatyMessage(oCaster, "Maximum Power Disabled", FLOATY_MESSAGE, 15040064, 5.0);

// remove effects
Effects_RemoveUpkeepEffect(oCaster, nAbility);
}


void main()
{
event ev = GetCurrentEvent();
int nEventType = GetEventType(ev);

switch(nEventType)
{
	case EVENT_TYPE_SPELLSCRIPT_PENDING:
	{
		// hand through
		Ability_SetSpellscriptPendingEventResult(COMMAND_RESULT_SUCCESS);

		break;
	}

	case EVENT_TYPE_SPELLSCRIPT_CAST:
	{
		// Get a structure with the event parameters
		struct EventSpellScriptCastStruct stEvent = Events_GetEventSpellScriptCastParameters(ev);

		// we just hand this through to cast_impact
		SetAbilityResult(stEvent.oCaster, stEvent.nResistanceCheckResult);

		break;
	}

	case EVENT_TYPE_SPELLSCRIPT_IMPACT:
	{
		// Get a structure with the event parameters
		struct EventSpellScriptImpactStruct stEvent = Events_GetEventSpellScriptImpactParameters(ev);

		// Remove any previously existing effects from same spellid to avoid stacking
		Ability_PreventAbilityEffectStacking(stEvent.oTarget, stEvent.oCaster, stEvent.nAbility);

		// activate ability
		_ActivateModalAbility(stEvent);

		break;

	}

	case EVENT_TYPE_SPELLSCRIPT_DEACTIVATE:
	{
		// Get a structure with the event parameters
		struct EventSpellScriptDeactivateStruct stEvent = Events_GetEventSpellScriptDeactivateParameters(ev);

		// is ability active?
		if (IsModalAbilityActive(stEvent.oCaster, stEvent.nAbility) == TRUE)
		{
			_DeactivateModalAbility(stEvent.oCaster, stEvent.nAbility);
		}

		// Setting Return Value (abort means we aborted the ability)
		Ability_SetSpellscriptPendingEventResult(COMMAND_RESULT_INVALID);

		break;
	}
}
}

 

Problem is, the effect icon doesn't show up as a "positive' effect icon. It's RED borderlined and the icon itself is grayed out. here's what i mean:

 

http://www.dragonagenexus.com/imageshare/i...-1259039510.jpg

http://www.dragonagenexus.com/imageshare/i...-1259039587.jpg

http://www.dragonagenexus.com/imageshare/i...-1259088007.jpg

 

I have done some troubleshooting and have located that how the effect icon appears is being controlled by the SCRIPTS, not the .xls files. So far, i have not been able to locate this script file.

 

There's SOMETHING in the talent_modal.ncs file (or the #include files, or some other file) that sets the icon.

 

I hope someone can help.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...