View previous topic :: View next topic |
Author |
Message |
Antegate
Joined: 20 Apr 2012 Posts: 100
|
Posted: Fri Sep 08, 2017 13:31 Post subject: |
|
|
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 |
|
|
ShaDoOoW
Joined: 20 Aug 2005 Posts: 584
|
Posted: Fri Sep 08, 2017 13:32 Post subject: |
|
|
effecticons.2da
29 ATTACK_INCREASE ief_AttIncr 8056 _________________ Community Patch / NWNX Patch / NWNX Files / NWNX Connect |
|
Back to top |
|
|
Antegate
Joined: 20 Apr 2012 Posts: 100
|
Posted: Fri Sep 08, 2017 13:43 Post subject: |
|
|
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 |
|
|
ShaDoOoW
Joined: 20 Aug 2005 Posts: 584
|
Posted: Fri Sep 08, 2017 13:47 Post subject: |
|
|
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 |
|
|
Antegate
Joined: 20 Apr 2012 Posts: 100
|
Posted: Fri Sep 08, 2017 13:51 Post subject: |
|
|
Ok, it will be interesting |
|
Back to top |
|
|
Valgav
Joined: 28 Aug 2010 Posts: 53
|
Posted: Sat Sep 09, 2017 12:49 Post subject: |
|
|
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 |
|
|
ShaDoOoW
Joined: 20 Aug 2005 Posts: 584
|
Posted: Sat Sep 09, 2017 12:53 Post subject: |
|
|
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 |
|
|
Valgav
Joined: 28 Aug 2010 Posts: 53
|
Posted: Sat Sep 09, 2017 18:47 Post subject: |
|
|
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 |
|
|
Antegate
Joined: 20 Apr 2012 Posts: 100
|
Posted: Sat Sep 09, 2017 19:12 Post subject: |
|
|
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 ) |
|
Back to top |
|
|
ShaDoOoW
Joined: 20 Aug 2005 Posts: 584
|
Posted: Sat Sep 09, 2017 20:44 Post subject: |
|
|
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 |
|
|
Antegate
Joined: 20 Apr 2012 Posts: 100
|
Posted: Sun Sep 10, 2017 12:43 Post subject: |
|
|
ShaDoOoW, what are you currently working on? What are the plans for the future development of the plugin? |
|
Back to top |
|
|
ShaDoOoW
Joined: 20 Aug 2005 Posts: 584
|
Posted: Sun Sep 10, 2017 17:45 Post subject: |
|
|
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 |
|
|
Valgav
Joined: 28 Aug 2010 Posts: 53
|
Posted: Mon Sep 11, 2017 1:48 Post subject: |
|
|
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... |
|
Back to top |
|
|
highv priest
Joined: 01 Mar 2013 Posts: 111
|
Posted: Mon Sep 11, 2017 9:07 Post subject: |
|
|
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 |
|
Back to top |
|
|
ShaDoOoW
Joined: 20 Aug 2005 Posts: 584
|
Posted: Mon Sep 11, 2017 10:05 Post subject: |
|
|
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 |
|
|
|