Hi All,
I dowloaded the Combat Tweaks source code: http://dragonage.nex...ods/354#content
Dennis Lee made mana clash rank-dependent. So for instance, bosses only lose 20% of mana and take 20% damage, elites only lose 50%, normals take 100% loss. He also added a stamina drain. However, I would like to revert mana clash to vanilla (which was 100% loss). Well, the stamina drain is also pretty cool too. I opened the spell_aoe_instant.nss file, and found the mana_clash section. I bolded the lines I changed below (yes, I know, I could just delete the if statement, but I was lazy).
Anyways, i editted the .nss file in Notepad because I couldn't open it directly with the Toolset. I know I need to compile using the toolset. So after making the text edits, I opened the Toolset and checked out the spell_aoe_instant.nss file from the demo core scripts, pasted the editted .nss file into the Toolset and "Exported Without Dependencies".
It almost compiled, but stated it could not find the include file "#include "plt_ct_spellcombo2"". I also couldn't find the file, so I'm a bit stuck. Does anyone know how to handle this?
Alternatively, is it possible to just open the .nss file from the mod files directly, edit them and compile the mod on its own? I'm new to scripting and modding.
Thanks!
%%%%%%%%%%%%%%%%%%%%%%%
case ABILITY_SPELL_MANA_CLASH: { // if hostile if (IsObjectHostile(stEvent.oCaster, oTarget) == TRUE) { if (IsMagicUser(oTarget) == TRUE) { float fMana = IntToFloat(GetCreatureMana(oTarget)); // CHANGE: remove denl combat tweaks to old, 100% mana clash // denl: boss ranks only get drained 20% mana if (IsCreatureBossRank(oTarget)) { // fMana *= 0.2f; fMana *= 1.0f; } // denl: player and lieutenants get drained half else if (IsCreatureSpecialRank(oTarget)) { // fMana *= 0.5f; fMana *= 1.0f; }
eEffect = EffectModifyManaStamina(-1.0*fMana); ApplyEffectOnObject(EFFECT_DURATION_TYPE_INSTANT, eEffect, oTarget, 0.0f, stEvent.oCaster, stEvent.nAbility);
// CHANGE: return old damage factor to fMana // denl: cap damage factor at 1 //float fDamage = fMana * MinF((MANA_CLASH_DAMAGE_FACTOR_BASE + (GetCreatureSpellPower(stEvent.oCaster) * MANA_CLASH_DAMAGE_FACTOR)), 1.0f); float fDamage = fMana * (MANA_CLASH_DAMAGE_FACTOR_BASE + (GetCreatureSpellPower(stEvent.oCaster) * MANA_CLASH_DAMAGE_FACTOR)); eEffect = EffectDamage(fDamage, DAMAGE_TYPE_SPIRIT, DAMAGE_EFFECT_FLAG_NONE, Ability_GetImpactObjectVfxId(stEvent.nAbility)); ApplyEffectOnObject(EFFECT_DURATION_TYPE_INSTANT, eEffect, oTarget, 0.0f, stEvent.oCaster, stEvent.nAbility);
} else { // denl: added stamina drain for non-magic users float fStaminaDamage = (100.0f + GetCreatureSpellPower(stEvent.oCaster)) * MANA_CLASH_STAMINA_DAMAGE_FACTOR;
eEffect = EffectModifyManaStamina(-1.0*fStaminaDamage); ApplyEffectOnObject(EFFECT_DURATION_TYPE_INSTANT, eEffect, oTarget, 0.0f, stEvent.oCaster, stEvent.nAbility); }
bHostile = TRUE; }
break; }
%%%%%%%%%%%%%%%%%%%%%%%
Tweaking Combat Tweaks Mod - .nss file and compiling
Débuté par
Horus_Heresy
, sept. 14 2012 01:49
#1
Posté 14 septembre 2012 - 01:49
#2
Posté 14 septembre 2012 - 01:51
Hmmm, the code didn't post very well. Try #2.
- case ABILITY_SPELL_MANA_CLASH:
- {
- // if hostile
- if (IsObjectHostile(stEvent.oCaster, oTarget) == TRUE)
- {
- if (IsMagicUser(oTarget) == TRUE)
- {
- float fMana = IntToFloat(GetCreatureMana(oTarget));
- // CHANGE: remove denl combat tweaks to old, 100% mana clash
- // denl: boss ranks only get drained 20% mana
- if (IsCreatureBossRank(oTarget))
- {
- // fMana *= 0.2f;
- fMana *= 1.0f;
- }
- // denl: player and lieutenants get drained half
- else if (IsCreatureSpecialRank(oTarget))
- {
- // fMana *= 0.5f;
- fMana *= 1.0f;
- }
- eEffect = EffectModifyManaStamina(-1.0*fMana);
- ApplyEffectOnObject(EFFECT_DURATION_TYPE_INSTANT, eEffect, oTarget, 0.0f, stEvent.oCaster, stEvent.nAbility);
- // CHANGE: return old damage factor to fMana
- // denl: cap damage factor at 1
- //float fDamage = fMana * MinF((MANA_CLASH_DAMAGE_FACTOR_BASE + (GetCreatureSpellPower(stEvent.oCaster) * MANA_CLASH_DAMAGE_FACTOR)), 1.0f);
- float fDamage = fMana * (MANA_CLASH_DAMAGE_FACTOR_BASE + (GetCreatureSpellPower(stEvent.oCaster) * MANA_CLASH_DAMAGE_FACTOR));
- eEffect = EffectDamage(fDamage, DAMAGE_TYPE_SPIRIT, DAMAGE_EFFECT_FLAG_NONE, Ability_GetImpactObjectVfxId(stEvent.nAbility));
- ApplyEffectOnObject(EFFECT_DURATION_TYPE_INSTANT, eEffect, oTarget, 0.0f, stEvent.oCaster, stEvent.nAbility);
- }
- else
- {
- // denl: added stamina drain for non-magic users
- float fStaminaDamage = (100.0f + GetCreatureSpellPower(stEvent.oCaster)) * MANA_CLASH_STAMINA_DAMAGE_FACTOR;
- eEffect = EffectModifyManaStamina(-1.0*fStaminaDamage);
- ApplyEffectOnObject(EFFECT_DURATION_TYPE_INSTANT, eEffect, oTarget, 0.0f, stEvent.oCaster, stEvent.nAbility);
- }
- bHostile = TRUE;
- }
- break;
- }
Modifié par Horus_Heresy, 14 septembre 2012 - 01:53 .
#3
Posté 14 septembre 2012 - 01:54
Ok, so I have no idea how to post/paste code here. If anyone has any trouble reading it, I'm not sure what I can do.
#4
Posté 15 septembre 2012 - 07:32
Surround it with
[code][/code] tags. You should get this:
[code]<-EXAMPLE CODE HERE->
#include "events_h"
#include "plt_clear_The_hut"
#include "wrappers_h"
void main()
{
event ev = GetCurrentEvent();
int nEventType = GetEventType(ev);
switch(nEventType)
{
case EVENT_TYPE_TEAM_DESTROYED:
{
if(GetEventInteger(ev,0) == 1)
{
WR_SetPlotFlag(PLT_CLEAR_THE_HUT, MONSTERS_SLAIN, TRUE);
}
break;
}
}
HandleEvent(ev, RESOURCE_SCRIPT_AREA_CORE);
}
Modifié par DarthParametric, 15 septembre 2012 - 07:38 .





Retour en haut






