News   About   FAQ   Statistics   Player Options   Downloads   Gallery   Forums   Donate   Wiki   Staff   Jobs   Links   Contact Us

Go Back   Sundren Forums > Sundren Community > Off-Topic
Register Members List Calendar Search Today's Posts Mark Forums Read

Off-Topic Talk about whatever.


Welcome to the Sundren Forums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.
Reply
 
Thread Tools Display Modes
  #1  
Old 08-02-2017
thaelis's Avatar
thaelis thaelis is offline
Legendary Hero
 
Join Date: Jun 2008
Location: Perth, Western Australia
Posts: 1,348
Rep Power: 147
thaelis has a brilliant futurethaelis has a brilliant futurethaelis has a brilliant futurethaelis has a brilliant futurethaelis has a brilliant futurethaelis has a brilliant futurethaelis has a brilliant futurethaelis has a brilliant futurethaelis has a brilliant futurethaelis has a brilliant futurethaelis has a brilliant future
Scripting

Hi guys

Could somebody proficient in scripting please help me with the script nw_s0_acidfoga.nss please (it is the 2nd script in the folder).

https://drive.google.com/open?id=0B4...19FN19GMEpKcFk

Specifically, I'm unsure how to remove the spell resistance check without breaking anything. Do I simply comment out the following line?

if(nIgnoreSR || !MyResistSpell(GetAreaOfEffectCreator(), oTarget, fDelay))

If you have time, could you also tell me if the 3 other changes I made will break anything. The notes in capital letters by Nick are the changes that I made.

They are very simple changes so I doubt they would cause problems, but I'd like to be sure.

Thanks!
__________________
Character: Thalanis Moonshadow

Previous Characters: Altherion Goldleaf, Silverleaf, Lanathas El'thariel
Reply With Quote
  #2  
Old 08-02-2017
Kitsunestume's Avatar
Kitsunestume Kitsunestume is offline
Developer
 
Join Date: Jun 2011
Location: Tech-Central, California (UTC-8)
Posts: 1,400
Rep Power: 109
Kitsunestume has a brilliant futureKitsunestume has a brilliant futureKitsunestume has a brilliant futureKitsunestume has a brilliant futureKitsunestume has a brilliant futureKitsunestume has a brilliant futureKitsunestume has a brilliant futureKitsunestume has a brilliant futureKitsunestume has a brilliant futureKitsunestume has a brilliant futureKitsunestume has a brilliant future
The solution here would be in spells.2da in the relevant 2da hak. Whether a spell is subject to SR or not is set in that table and refferenced by the code checks later.
Reply With Quote
  #3  
Old 08-02-2017
thaelis's Avatar
thaelis thaelis is offline
Legendary Hero
 
Join Date: Jun 2008
Location: Perth, Western Australia
Posts: 1,348
Rep Power: 147
thaelis has a brilliant futurethaelis has a brilliant futurethaelis has a brilliant futurethaelis has a brilliant futurethaelis has a brilliant futurethaelis has a brilliant futurethaelis has a brilliant futurethaelis has a brilliant futurethaelis has a brilliant futurethaelis has a brilliant futurethaelis has a brilliant future
Well, that's weird.

So if you remove that line of code then SR will still be checked anyway?��

Why the redundancy? Is that line doing something else apart from a SR check?

EDIT: No worries, after much reading I figured it out and now seems to be functioning as desired Scripting is actually a lot of fun. Confusing as hell, but fun.
__________________
Character: Thalanis Moonshadow

Previous Characters: Altherion Goldleaf, Silverleaf, Lanathas El'thariel

Last edited by thaelis; 08-03-2017 at 10:56 AM.
Reply With Quote
  #4  
Old 08-03-2017
Kitsunestume's Avatar
Kitsunestume Kitsunestume is offline
Developer
 
Join Date: Jun 2011
Location: Tech-Central, California (UTC-8)
Posts: 1,400
Rep Power: 109
Kitsunestume has a brilliant futureKitsunestume has a brilliant futureKitsunestume has a brilliant futureKitsunestume has a brilliant futureKitsunestume has a brilliant futureKitsunestume has a brilliant futureKitsunestume has a brilliant futureKitsunestume has a brilliant futureKitsunestume has a brilliant futureKitsunestume has a brilliant futureKitsunestume has a brilliant future
Its not really redundancy. The 2da sets if the spell is subject to spell resistance or not (a variable declaration). The line you commented is one of the methods to check if spell resistance succeeded or not, or if that particular casting ignored SR: ie, a function call.
Reply With Quote
  #5  
Old 08-04-2017
Mournas's Avatar
Mournas Mournas is offline
Hero
 
Join Date: Jun 2011
Posts: 598
Rep Power: 97
Mournas is a splendid one to beholdMournas is a splendid one to beholdMournas is a splendid one to beholdMournas is a splendid one to beholdMournas is a splendid one to beholdMournas is a splendid one to beholdMournas is a splendid one to behold
PS: backup the original.
__________________
I give you permission to be exactly who you are, in all of your beauty and in all of your horror, and to change.
Reply With Quote
  #6  
Old 08-05-2017
thaelis's Avatar
thaelis thaelis is offline
Legendary Hero
 
Join Date: Jun 2008
Location: Perth, Western Australia
Posts: 1,348
Rep Power: 147
thaelis has a brilliant futurethaelis has a brilliant futurethaelis has a brilliant futurethaelis has a brilliant futurethaelis has a brilliant futurethaelis has a brilliant futurethaelis has a brilliant futurethaelis has a brilliant futurethaelis has a brilliant futurethaelis has a brilliant futurethaelis has a brilliant future
Yeah...I am getting the impression that there are myriad spells which would require 2DA changes if they are to resemble their PnP counterparts more closely.

I did stumble across this little gem:
https://neverwintervault.org/project...d-improvements

Seems someone already fixed and converted all the spells to 3.5e PnP, and apparently they were very thorough about it (hats off to them). It makes me wonder why we don't already use this. Is it because it contains a custom 2DA? If I started from that as a base, I'd already be 75% of the way to Pathfinderizing the spells.

If it is the case that 2DA editing is too risky, I guess even if I did Pathfinderize the spells we wouldn't be able to/allowed to use them in Sundren right?
__________________
Character: Thalanis Moonshadow

Previous Characters: Altherion Goldleaf, Silverleaf, Lanathas El'thariel
Reply With Quote
  #7  
Old 08-07-2017
Calculus's Avatar
Calculus Calculus is offline
Adventurer
 
Join Date: Jun 2016
Location: United Kingdom
Posts: 50
Rep Power: 28
Calculus has a spectacular aura aboutCalculus has a spectacular aura about
Quote:
Originally Posted by thaelis View Post
Well, that's weird.

So if you remove that line of code then SR will still be checked anyway?��

Why the redundancy? Is that line doing something else apart from a SR check?

EDIT: No worries, after much reading I figured it out and now seems to be functioning as desired Scripting is actually a lot of fun. Confusing as hell, but fun.
If you have a strong background in programming it is practically child's play. In the case of Neverwinter's scripting system and code I view it as a complete massacre. It's like they tried to duct tape all the broken code in hopes that no one notices.
__________________
~=@||:-[Game Developer]-:||@=~
~=@||:-[Software Developer]-:||@=~
~=@||:-[C/C++]<=>[Python]-:||@=~

UTC/GMT +1 hour

"The difference between ignorant and educated people is that the latter know more facts. But that has nothing to do with whether they are stupid or intelligent." Neal Stephenson
Reply With Quote
  #8  
Old 08-09-2017
thaelis's Avatar
thaelis thaelis is offline
Legendary Hero
 
Join Date: Jun 2008
Location: Perth, Western Australia
Posts: 1,348
Rep Power: 147
thaelis has a brilliant futurethaelis has a brilliant futurethaelis has a brilliant futurethaelis has a brilliant futurethaelis has a brilliant futurethaelis has a brilliant futurethaelis has a brilliant futurethaelis has a brilliant futurethaelis has a brilliant futurethaelis has a brilliant futurethaelis has a brilliant future
Well I'm glad to hear it's child's play for someone!

I sent you a PM with one of the more intractable problems I've encountered. Hopefully you can untangle the amateurish mess I made.
__________________
Character: Thalanis Moonshadow

Previous Characters: Altherion Goldleaf, Silverleaf, Lanathas El'thariel
Reply With Quote
  #9  
Old 08-14-2017
thaelis's Avatar
thaelis thaelis is offline
Legendary Hero
 
Join Date: Jun 2008
Location: Perth, Western Australia
Posts: 1,348
Rep Power: 147
thaelis has a brilliant futurethaelis has a brilliant futurethaelis has a brilliant futurethaelis has a brilliant futurethaelis has a brilliant futurethaelis has a brilliant futurethaelis has a brilliant futurethaelis has a brilliant futurethaelis has a brilliant futurethaelis has a brilliant futurethaelis has a brilliant future
Anyone know why this script doesn't work? I'm a complete noob at scripting.

It says "Unknown state in compiler" when trying to compile.

Thanks!

//::///////////////////////////////////////////////
//:: Mage Armor
//:: [NW_S0_MageArm.nss]
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Gives the target +4 AC. (Updated JLR - OEI 07/05/05 NWN2 3.5)
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Jan 12, 2001
//:://////////////////////////////////////////////
//:: Last Updated By: Preston Watamaniuk, On: April 10, 2001
//:: VFX Pass By: Preston W, On: June 22, 2001

/*
bugfix by Kovi 2002.07.23
- dodge bonus was stacking
*/


// JLR - OEI 08/23/05 -- Permanency & Metamagic changes
// BDF - OEI: 10/16/06 - added defense against stacking with Improved Mage Armor
#include "nwn2_inc_spells"


#include "nw_i0_spells"
#include "x2_inc_spellhook"

void main()
{

/*
Spellcast Hook Code
Added 2003-06-23 by GeorgZ
If you want to make changes to all spells,
check x2_inc_spellhook.nss to find out more

*/

if (!X2PreSpellCastCode())
{
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
return;
}

// End of Spell Cast Hook


//Declare major variables
object oTarget = GetSpellTargetObject();
float fDuration = HoursToSeconds(GetCasterLevel(OBJECT_SELF));
//Added by Nick
object oArmor = GetItemInSlot(INVENTORY_SLOT_CHEST, oTarget);
int nArmorType;
int nArmorAC;
int nMageAC;

if (oArmor == OBJECT_INVALID)
{
nArmorType = 0;
}
else nArmorType = GetArmorRulesType(oArmor);
int nArmorAC = StringToInt(Get2DAString(“armorrulestats”,“ACBONUS ”,nArmorType));
int nMageAC = (4 – nArmorAC);
if (nMageAC <= 0)
{
return;
}
//End of first edit by Nick

//Fire cast spell at event for the specified target
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_MAGE_ARMOR, FALSE));

//Check for metamagic extend
fDuration = ApplyMetamagicDurationMods(fDuration);
int nDurType = ApplyMetamagicDurationTypeMods(DURATION_TYPE_TEMPO RARY);


//Set the armor bonuses
effect eAC = EffectACIncrease(nMageAC, AC_ARMOUR_ENCHANTMENT_BONUS);//Changed from 4 to variable, Nick
effect eDur = EffectVisualEffect(VFX_DUR_SPELL_MAGE_ARMOR);
effect eLink = EffectLinkEffects(eAC, eDur);

//RemoveEffectsFromSpell(oTarget, SPELL_MAGE_ARMOR);
//RemoveEffectsFromSpell(oTarget, SPELL_IMPROVED_MAGE_ARMOR); // 10/16/06 - BDF
//RemovePermanencySpells(oTarget);

//Apply the armor bonuses and the VFX impact
ApplyEffectToObject(nDurType, eLink, oTarget, fDuration);
}
__________________
Character: Thalanis Moonshadow

Previous Characters: Altherion Goldleaf, Silverleaf, Lanathas El'thariel
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


Sundren - Archive - Top  
All times are GMT -4. The time now is 11:12 AM.
Sundren.org Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
All content of this website is property of its respective owners: Webmaster