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_dmactions
Goto page 1, 2, 3  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: Sat Jun 27, 2009 14:23    Post subject: nwnx_dmactions Reply with quote

Ok, it's something that I really miss in NWN, log of dm actions. Smile

I've didn't test it on public server but locally it was stable.

Actions can be now prevented.

Currently fully supported actions with data returning are:
GiveXP
GiveLevel
GiveGold

CreateItem (in Placeable/Creature or on Area) (If prevented you must Destroy item in script if no more needed in other case it will stay in limbo or somewhere)
Heal
Rest
RunScript
CreatePlaceable
CreateCreature
Invulnerability
Immortality

Others actions can only be caught by type and prevented e.g.:
dm_set*, dm_dump*, dm_g/setvar*, changing difficulty etc.

Actions not yet caught because engine treat them as cheats not DM action:
dm_visualeffect
most likely more...

It's behave similarly to NWNX_EVENTS, 'dmaction' script is fired on DM, name of script can be changed for each action separately with SetDMActionScript scripting function.
For examples, header nwnx_dmactions.nss file and more info look into nss directory in tarball.

v0.2.2:
- Fixed crash with GiveGold


Last edited by axs on Thu Mar 24, 2011 17:51; edited 14 times in total
Back to top
View user's profile Send private message
FunkySwerve



Joined: 02 Jun 2005
Posts: 377

PostPosted: Sun Jun 28, 2009 0:59    Post subject: Reply with quote

Very nice. If you could hook dm heal, it'd be pretty nice - the default behavior has irritating side effects, like stripping effects, so our dms have to cast the heal spell instead. Likewise with dm rez - we have code we need to run when a player comes back to life, so dms have to cast the ressurection spell instead. Just minor things, but would be nice touches.

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



Joined: 11 Feb 2005
Posts: 76

PostPosted: Sun Jun 28, 2009 1:38    Post subject: Reply with quote

FunkySwerve wrote:
Very nice. If you could hook dm heal, it'd be pretty nice - the default behavior has irritating side effects, like stripping effects, so our dms have to cast the heal spell instead. Likewise with dm rez - we have code we need to run when a player comes back to life, so dms have to cast the ressurection spell instead. Just minor things, but would be nice touches.

Funky
Hm, It's done in my private version, quick release for you Wink

- Normal heal behavior is omitted, so you need to script it totally.
- Multiselect is supported, script will be fired for each target.

dmlogs_priv.tar.gz
Back to top
View user's profile Send private message
FunkySwerve



Joined: 02 Jun 2005
Posts: 377

PostPosted: Tue Jun 30, 2009 5:07    Post subject: Reply with quote

Thanks. Smile

Funky
Back to top
View user's profile Send private message
Asparius



Joined: 18 Sep 2007
Posts: 52

PostPosted: Fri Jul 03, 2009 11:05    Post subject: Reply with quote

Great news - Any chance for Windows port?...
Back to top
View user's profile Send private message
Zebranky



Joined: 04 Jun 2006
Posts: 415

PostPosted: Fri Jul 03, 2009 19:16    Post subject: Reply with quote

BioWare might deserve some hate mail for writing a function with a flow graph like this...


Anyway, I have Win32 addresses for everything but GiveXP (which is a little trickier because gcc and MSVC++ optimized it very differently).
_________________
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
ExileStrife



Joined: 14 Mar 2008
Posts: 21

PostPosted: Mon Jul 06, 2009 5:36    Post subject: Reply with quote

Oh my gosh, this is wondrous. Now I don't have to extrapolate DM granted XP by recording everything else and then taking the difference from the current...
Back to top
View user's profile Send private message
Baaleos



Joined: 02 Sep 2007
Posts: 830

PostPosted: Tue Jul 07, 2009 10:27    Post subject: Cool Reply with quote

Is there going to be a windows release of this?

I've always wanted something like this, cause I have had a bad spat of luck with DM's that I recruited, they either spawn Items that wreck the treasure distribution system, or they spawn bosses that use persistence which then result in players being unable to undertake th boss fight again.

Etc.

This plugin would be a real problem solver, or at least, a Problematic DM detector.
Back to top
View user's profile Send private message
Zebranky



Joined: 04 Jun 2006
Posts: 415

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

Following the theme of the post I just made in another thread...

From an idealistic standpoint, you shouldn't be hiring DMs that are going to abuse their power (and you should train them well enough that they don't make catastrophic mistakes).

From a practical standpoint, it shouldn't be that hard to script some tools to detect problematic staff.

From a being-a-NWNX-nerd standpoint, I'm looking into it. Can't promise anything about the GiveXP hook, as I mentioned, but all the others seem quite doable.
_________________
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
axs



Joined: 11 Feb 2005
Posts: 76

PostPosted: Wed Jul 08, 2009 1:19    Post subject: Reply with quote

I really want to port it, but I don't know how to start on windows :/
When I tried, I've lost a lot of hairs ;(

Only hope is in Zebranky.

Meanwhile new version and name change.
More in first post
Back to top
View user's profile Send private message
Baaleos



Joined: 02 Sep 2007
Posts: 830

PostPosted: Tue Jul 28, 2009 12:58    Post subject: Hi Guys Reply with quote

I was wondering if there is any chance of getting even a partial version of this for windows?

I know the XP Grant hook is apparently bit more complicated in windows than linux, however I would really love the ability to hook functions on DM Spawn items.


My server uses an artifact system, which spawns Artifact items ONCE and only once, I'd like the ability to apply a local variable to any item/object spawned by a DM to return out of the artifact system, so to prevent its acquisition from being counted as a legitamit found artifact, and prevent it from being recoreded in the database.

Thus allowing another dedicated player, to still randomly find the artifact in the legitamit fassion.


Is there any possiblity, or anyone interested on working on a windows port of this?
Surprised)
Back to top
View user's profile Send private message
axs



Joined: 11 Feb 2005
Posts: 76

PostPosted: Sun Aug 02, 2009 13:43    Post subject: Reply with quote

Fixed segfault with GiveGold.
Back to top
View user's profile Send private message
jec2



Joined: 17 Jul 2008
Posts: 49

PostPosted: Tue Aug 11, 2009 2:31    Post subject: Re: nwnx_dmactions Reply with quote

Quote:
(v. 0.2.2) dmactions.tar.gz


getting this..

NWNXdmactions.cpp: In member function ‘int CNWNXdmactions::FireAction(nwn_objid_t, int)’:
NWNXdmactions.cpp:147: error: ‘nwn_ExecuteScript’ was not declared in this scope
make[1]: *** [NWNXdmactions.o] Error 1
make[1]: Leaving directory `/home/server/downloads/nwn/nwnx2-linux/trunk/plugins/dmactions'
make: *** [plugins/dmactions] Error 2

any ideas?
thanks..
Back to top
View user's profile Send private message
scarface



Joined: 12 Jun 2005
Posts: 94
Location: Sweden

PostPosted: Wed Aug 12, 2009 2:03    Post subject: Reply with quote

Do I have to add anything to the nwnx2.ini for this to work?
Back to top
View user's profile Send private message
Zebranky



Joined: 04 Jun 2006
Posts: 415

PostPosted: Wed Aug 12, 2009 3:32    Post subject: Reply with quote

@jec2: Edit NWNXdmactions.h and add right before the closing #endif:
extern void nwn_ExecuteScript(const char *scr, nwn_objid_t oid);

@scarface: No, but you do need a hook handler script in your mod, and you need to use NWNX!DMACTIONS!SET_ACTION_SCRIPT to let the plugin know what the script is called.
_________________
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
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, 3  Next
Page 1 of 3

 
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