logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
NWNX_Patch
Goto page Previous  1, 2, 3 ... 26, 27, 28 ... 42, 43, 44  Next
 
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows development
View previous topic :: View next topic  
Author Message
Antegate



Joined: 20 Apr 2012
Posts: 100

PostPosted: Fri Sep 08, 2017 13:31    Post subject: Reply with quote

Quote:
effect NWNXPatch_EffectModifyBAB(int nBaseAttackBonus)
{
effect eEffect = EffectHeal(nBaseAttackBonus);
eEffect = NWNXPatch_SetEffectTrueType(eEffect,EFFECT_TRUETYPE_NWNXPATCH_MODIFYBAB);
return eEffect;
}


Quote:
if(nEffectTrueType == EFFECT_TRUETYPE_NWNXPATCH_MODIFYBAB)
{
if(GetObjectType(OBJECT_SELF) != OBJECT_TYPE_CREATURE) return;
int duration_type = GetEffectDurationType(eEffect);
float fDuration = NWNXPatch_GetEffectRemainingDuration(eEffect);
effect eIcon = EffectHeal(29);
eIcon = NWNXPatch_SetEffectTrueType(eIcon,EFFECT_TRUETYPE_ICON);
if(fDuration == 0.0)
{
eIcon = NWNXPatch_SetEffectSpellId(eIcon,10000); //to identify this effect comes from
}
ApplyEffectToObject(duration_type,eIcon,OBJECT_SELF,fDuration);
}


Why is the number 29?
Back to top
View user's profile Send private message
ShaDoOoW



Joined: 20 Aug 2005
Posts: 584

PostPosted: Fri Sep 08, 2017 13:32    Post subject: Reply with quote

effecticons.2da
29 ATTACK_INCREASE ief_AttIncr 8056
_________________
Community Patch / NWNX Patch / NWNX Files / NWNX Connect
Back to top
View user's profile Send private message
Antegate



Joined: 20 Apr 2012
Posts: 100

PostPosted: Fri Sep 08, 2017 13:43    Post subject: Reply with quote

Thanks. I understood how to put my effect icon.

---

When you apply this function (NWNXPatch_SetEffectTrueType) again inside the script, does not the script run again?

When you in the NWNXPatch_EffectModifyBAB () function apply EffectHeal with the value of the base attack, where does the change happen that this will not be a treatment, but an attack? I understand that you change only the icon in 70_mod_effect.

Can you write another example, for example, with creating a new effect that lowers characteristics or anything?
Back to top
View user's profile Send private message
ShaDoOoW



Joined: 20 Aug 2005
Posts: 584

PostPosted: Fri Sep 08, 2017 13:47    Post subject: Reply with quote

imagine effect as a structure data type

its something like this:

struct effect
{
int TrueType;
int Value0;
int Value1;
etc.
}

Before you apply the effect its just a bunch of values. Only after you apply the effect it is determined whether the effect will heal or do something else.

70_mod_effects runs only when effect was applied or removed not before

I have in plan to write a proper tutorial but right now I am making few changes to effects in plugin so it has to wait.
_________________
Community Patch / NWNX Patch / NWNX Files / NWNX Connect
Back to top
View user's profile Send private message
Antegate



Joined: 20 Apr 2012
Posts: 100

PostPosted: Fri Sep 08, 2017 13:51    Post subject: Reply with quote

Ok, it will be interesting Smile
Back to top
View user's profile Send private message
Valgav



Joined: 28 Aug 2010
Posts: 53

PostPosted: Sat Sep 09, 2017 12:49    Post subject: Reply with quote

ShaDoOoW wrote:
Valgav wrote:

We can create custom lines in 2da for custom spells and custom logic for spells which will use variables from DB/object to decide about dmg, type of it's visual effect, duration, range etc. This with nwnx functions to add/remove spells gives us ability to create custom spellbook but we can't change the name.
I don't understand what are you trying to achieve?


Hijack UI texts in spellbook/shortcuts and texts like "XXX casts YYY" where YYY is name of spell
Back to top
View user's profile Send private message
ShaDoOoW



Joined: 20 Aug 2005
Posts: 584

PostPosted: Sat Sep 09, 2017 12:53    Post subject: Reply with quote

Valgav wrote:
ShaDoOoW wrote:
Valgav wrote:

We can create custom lines in 2da for custom spells and custom logic for spells which will use variables from DB/object to decide about dmg, type of it's visual effect, duration, range etc. This with nwnx functions to add/remove spells gives us ability to create custom spellbook but we can't change the name.
I don't understand what are you trying to achieve?


Hijack UI texts in spellbook/shortcuts and texts like "XXX casts YYY" where YYY is name of spell

but why, you can always make a new spell in spells.2da?
_________________
Community Patch / NWNX Patch / NWNX Files / NWNX Connect
Back to top
View user's profile Send private message
Valgav



Joined: 28 Aug 2010
Posts: 53

PostPosted: Sat Sep 09, 2017 18:47    Post subject: Reply with quote

I know but I'm thinking about some kind of spell creation process without need of modify 2da. I could use few predefined spells with custom impact spell then handle eveything inside script depending on player's vars. But it will be always displayed as Custom Spell 1, etc. Not as "My strongest fireblast"
Back to top
View user's profile Send private message
Antegate



Joined: 20 Apr 2012
Posts: 100

PostPosted: Sat Sep 09, 2017 19:12    Post subject: Reply with quote

Quote:
but why, you can always make a new spell in spells.2da?

Quote:
I know but I'm thinking about some kind of spell creation process without need of modify 2da. I could use few predefined spells with custom impact spell then handle eveything inside script depending on player's vars. But it will be always displayed as Custom Spell 1, etc. Not as "My strongest fireblast"

Valgav wants to customize the name of the spell. He only wants to change the name in the spellbook, taking information from the local variable for a needed spell. Without editing 2da.
I already asked you about something similar (The visual effect, the school, the radius of influence - everything before the start of the cast spell is taken from the local variable).

A dynamic name for skill or spell is a cool possibility.

ah, magicians would have a paradise with such opportunities Smile)
Back to top
View user's profile Send private message
ShaDoOoW



Joined: 20 Aug 2005
Posts: 584

PostPosted: Sat Sep 09, 2017 20:44    Post subject: Reply with quote

I see. It is possible but would require really lot of code patching in one of the most complicated engine function. That could be a project on its own and I don't think its worth it. For me anyway...
_________________
Community Patch / NWNX Patch / NWNX Files / NWNX Connect
Back to top
View user's profile Send private message
Antegate



Joined: 20 Apr 2012
Posts: 100

PostPosted: Sun Sep 10, 2017 12:43    Post subject: Reply with quote

ShaDoOoW, what are you currently working on? What are the plans for the future development of the plugin?
Back to top
View user's profile Send private message
ShaDoOoW



Joined: 20 Aug 2005
Posts: 584

PostPosted: Sun Sep 10, 2017 17:45    Post subject: Reply with quote

Antegate wrote:
ShaDoOoW, what are you currently working on? What are the plans for the future development of the plugin?
not sure...

i got few things on my todo list the all thats left there is extremely time-consuming and complicated

same apply for most latest requests
_________________
Community Patch / NWNX Patch / NWNX Files / NWNX Connect
Back to top
View user's profile Send private message
Valgav



Joined: 28 Aug 2010
Posts: 53

PostPosted: Mon Sep 11, 2017 1:48    Post subject: Reply with quote

ShaDoOoW wrote:
I see. It is possible but would require really lot of code patching in one of the most complicated engine function. That could be a project on its own and I don't think its worth it. For me anyway...


Yeah I though that this is to good to be possible, but there were some ideas in the past: http://www.nwnx.org/phpBB2/viewtopic.php?t=1925 So maybe one day... Wink
Back to top
View user's profile Send private message
highv priest



Joined: 01 Mar 2013
Posts: 111

PostPosted: Mon Sep 11, 2017 9:07    Post subject: Reply with quote

Hmm I run into an issue of not ever using resources that require my players to download something.

I think I may give my players a poll again whether to use CEP and we can decide if the nwn client extender is one of those.

From there I'll work on developing a universal spell system and have no problem sharing it with the community.

Sounds like a fun project Smile
Back to top
View user's profile Send private message
ShaDoOoW



Joined: 20 Aug 2005
Posts: 584

PostPosted: Mon Sep 11, 2017 10:05    Post subject: Reply with quote

DarkSet wrote:
Hi
I have a request. Can you make human race abilities to get extra feat and extra skill points usable for custom races? For now it's tied to the line in 2da as far as I know.

This seems hardcoded inside client.

I will think about how to make that dynamic but there is also a problem with ELC which is very hard to modify to respect this.
_________________
Community Patch / NWNX Patch / NWNX Files / NWNX Connect
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows development All times are GMT + 2 Hours
Goto page Previous  1, 2, 3 ... 26, 27, 28 ... 42, 43, 44  Next
Page 27 of 44

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group