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 
 
More Functions
Goto page 1, 2  Next
 
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux development
View previous topic :: View next topic  
Author Message
axs



Joined: 11 Feb 2005
Posts: 76

PostPosted: Wed Jun 10, 2009 16:03    Post subject: More Functions Reply with quote

Hello, I wrote this plugin for my own use but of course someone else can also have some purpose for using it.

In the near future I will add a few futures.

This realease functions:
Get/SetScript - Get/Set event script for Creature, Placeable, Module, Area, Door, Store, Trigger, Encounter.
I used the function from NWN engine, works even if currently the event field is empty.

CreateAreaTransitionOnLocation - This is little hack, function will create trap a change it into area transition trigger and use OnAreaTransitionClick script for jump.

(Current version 0.2.6) funcsext.tar.gz


Last edited by axs on Mon Jun 22, 2009 0:46; edited 5 times in total
Back to top
View user's profile Send private message
axs



Joined: 11 Feb 2005
Posts: 76

PostPosted: Fri Jun 19, 2009 14:54    Post subject: Reply with quote

Hm, no reports that I've screwed up.
Oh well, it's working now also with new function:

// Get surface material type from location
int GetSurface(location lLocation);


Last edited by axs on Sun Jun 21, 2009 15:41; edited 1 time in total
Back to top
View user's profile Send private message
axs



Joined: 11 Feb 2005
Posts: 76

PostPosted: Sun Jun 21, 2009 20:23    Post subject: Reply with quote

HOTFIX: Accidentally removed GetAnimation function implementation in public release.

update. Added new functions:

// Get current animation of oTarget
// Returned value isn't equal to nwscript constants, you need to check desired value for your own
int GetAnimation(object oTarget);

Timing Bar display like on rest or trap disarm.
Displayed message is hardcoded, so there is no text on bar called with this function.
Bar can't be canceled by player so you need to script it well.

// Display timing bar for creature and run sScript after delay
void StartTimingBar(object oCreature, int nSeconds, string sScript);

// Hide timing bar and run sScript if specified
void StopTimingBar(object oCreature, string sScript="");
Back to top
View user's profile Send private message
Zunath



Joined: 06 Jul 2006
Posts: 183

PostPosted: Mon Jun 22, 2009 0:26    Post subject: Reply with quote

Looks pretty cool. I'll have to check it out.
Back to top
View user's profile Send private message
axs



Joined: 11 Feb 2005
Posts: 76

PostPosted: Mon Jun 22, 2009 0:45    Post subject: Reply with quote

Hmm, it was very effective day Wink

New update with new functions and few fixes:

// Remove gold from creature without feedback message
// Return: -1 on success, 0 on failure
int RemoveGold(object oCreature, int nGold);

// Remove item from creature inventory without feedback message
// Function will fail if oItem has no possessor
// Return: -1 on success, 0 on failure
int RemoveItem(object oItem);

// Apply nVFX at vPosition for oPC (Only specified PC will see visual effect)
void AreaVisualEffectForPC(object oPC, int nVFX, vector vPosition);
Back to top
View user's profile Send private message
ShaDoOoW



Joined: 20 Aug 2005
Posts: 584

PostPosted: Mon Jun 22, 2009 3:02    Post subject: Reply with quote

Very nice tool to make many script systems more user-friendly. So although I'm win user thx for creating this plugin, amazing work.
_________________
Community Patch / NWNX Patch / NWNX Files / NWNX Connect
Back to top
View user's profile Send private message
Quixsilver



Joined: 20 Jan 2009
Posts: 30

PostPosted: Tue Jun 23, 2009 1:10    Post subject: Reply with quote

Wow, those are some really nice functions...

axs wrote:

// Apply nVFX at vPosition for oPC (Only specified PC will see visual effect)
void AreaVisualEffectForPC(object oPC, int nVFX, vector vPosition);


Any way this one could be made to apply to a target object for a duration? For example like a light vfx that "sticks" to a creature for 30 seconds.

This part is really important: (Only specified PC will see visual effect)

The particular use i have in mind is nightvision goggles. Twisted Evil
Back to top
View user's profile Send private message
acaos



Joined: 08 May 2007
Posts: 153

PostPosted: Tue Jun 23, 2009 5:01    Post subject: Reply with quote

These look very nice. Do you have any objection to me integrating them into the main nwnx_funcs plugin?

I have a number of other unreleased ones as well I haven't had time to publicize, like BroadcastProjectileToObject.

Quixsilver: I have some functions as well which will do what you want, but they are some way from being released.

Acaos
Back to top
View user's profile Send private message
axs



Joined: 11 Feb 2005
Posts: 76

PostPosted: Tue Jun 23, 2009 11:13    Post subject: Reply with quote

Quixsilver wrote:
[...]
Any way this one could be made to apply to a target object for a duration? For example like a light vfx that "sticks" to a creature for 30 seconds.

This part is really important: (Only specified PC will see visual effect)

The particular use i have in mind is nightvision goggles. Twisted Evil
It is one from few things which I'm trying to do Wink Looks little problematic, but trying.

acaos wrote:
These look very nice. Do you have any objection to me integrating them into the main nwnx_funcs plugin?

I have a number of other unreleased ones as well I haven't had time to publicize, like BroadcastProjectileToObject.

Quixsilver: I have some functions as well which will do what you want, but they are some way from being released.

Acaos
No objections, that would be nice, besides it's better when people have everything in one place Smile
Back to top
View user's profile Send private message
entropy



Joined: 23 Jun 2009
Posts: 6

PostPosted: Tue Jun 23, 2009 12:46    Post subject: Reply with quote

Wow! Those all sounds utterly great :D

Amazing how you managed to find those really cool functions for the linux servers! I have just one question... how can I figure out where the hooks for those functions are in the windows version? Is there a trick to it, or is it really just time spent studying the code?
Back to top
View user's profile Send private message
scarface



Joined: 12 Jun 2005
Posts: 94
Location: Sweden

PostPosted: Mon Jun 29, 2009 19:05    Post subject: Reply with quote

Very nice functions.

Is there any way to create a function like your AreaVisualEffectForPC() but for sound effects and/or music?
Back to top
View user's profile Send private message
brilhasti



Joined: 04 Jun 2008
Posts: 8

PostPosted: Thu Jul 02, 2009 19:54    Post subject: Reply with quote

I love the idea of subjective visual effects... I'm getting ideas Smile

Is it difficult to port this to Windows?
Back to top
View user's profile Send private message
Baaleos



Joined: 02 Sep 2007
Posts: 830

PostPosted: Tue Jul 07, 2009 10:28    Post subject: Detect Evil Etc Reply with quote

Im getting ideas of Detect Evil, or Detect Good sort of spells from Baldurs Gate 2.

Eg - Evil Characters get a visual Cue above them, that only the caster can see.
Back to top
View user's profile Send private message
Zebranky



Joined: 04 Jun 2006
Posts: 415

PostPosted: Tue Jul 07, 2009 20:56    Post subject: Reply with quote

brilhasti wrote:
I love the idea of subjective visual effects... I'm getting ideas Smile

Is it difficult to port this to Windows?

It's always difficult to port NWNX plugins Wink

But, actually, having looked at the code... probably not! If everything works right (dangerous words) it shouldn't be a difficult port at all.
_________________
Win32 SVN builds: http://www.mercuric.net/nwn/nwnx/

<Fluffy-Kooshy> NWNx plugin is to this as nuclear warheads are to getting rid of fire ants.

<ThriWork> whenever I hear nwn extender, I think what does NWN need a penis extender for?
Back to top
View user's profile Send private message Visit poster's website
Quixsilver



Joined: 20 Jan 2009
Posts: 30

PostPosted: Sat Oct 03, 2009 20:42    Post subject: Reply with quote

axs wrote:

// Get current animation of oTarget
// Returned value isn't equal to nwscript constants, you need to check desired value for your own
int GetAnimation(object oTarget);


Would it be possible to get something like SetAnimation(object oTarget, int nAnimation) that could accept the same animation values that are returned by your GetAnimation function in order to play any animation in the engine?

The bioware PlayAnimation/ActionPlayAnimation functions seems to be very limited in regards to the range of animations they will play.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux development All times are GMT + 2 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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