View previous topic :: View next topic |
Author |
Message |
axs
Joined: 11 Feb 2005 Posts: 76
|
Posted: Sat Jun 27, 2009 14:23 Post subject: nwnx_dmactions |
|
|
Ok, it's something that I really miss in NWN, log of dm actions.
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 |
|
|
FunkySwerve
Joined: 02 Jun 2005 Posts: 377
|
Posted: Sun Jun 28, 2009 0:59 Post subject: |
|
|
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 |
|
|
axs
Joined: 11 Feb 2005 Posts: 76
|
Posted: Sun Jun 28, 2009 1:38 Post subject: |
|
|
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
- 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 |
|
|
FunkySwerve
Joined: 02 Jun 2005 Posts: 377
|
Posted: Tue Jun 30, 2009 5:07 Post subject: |
|
|
Thanks.
Funky |
|
Back to top |
|
|
Asparius
Joined: 18 Sep 2007 Posts: 52
|
Posted: Fri Jul 03, 2009 11:05 Post subject: |
|
|
Great news - Any chance for Windows port?... |
|
Back to top |
|
|
Zebranky
Joined: 04 Jun 2006 Posts: 415
|
Posted: Fri Jul 03, 2009 19:16 Post subject: |
|
|
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 |
|
|
ExileStrife
Joined: 14 Mar 2008 Posts: 21
|
Posted: Mon Jul 06, 2009 5:36 Post subject: |
|
|
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 |
|
|
Baaleos
Joined: 02 Sep 2007 Posts: 830
|
Posted: Tue Jul 07, 2009 10:27 Post subject: Cool |
|
|
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 |
|
|
Zebranky
Joined: 04 Jun 2006 Posts: 415
|
Posted: Tue Jul 07, 2009 20:51 Post subject: |
|
|
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 |
|
|
axs
Joined: 11 Feb 2005 Posts: 76
|
Posted: Wed Jul 08, 2009 1:19 Post subject: |
|
|
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 |
|
|
Baaleos
Joined: 02 Sep 2007 Posts: 830
|
Posted: Tue Jul 28, 2009 12:58 Post subject: Hi Guys |
|
|
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?
) |
|
Back to top |
|
|
axs
Joined: 11 Feb 2005 Posts: 76
|
Posted: Sun Aug 02, 2009 13:43 Post subject: |
|
|
Fixed segfault with GiveGold. |
|
Back to top |
|
|
jec2
Joined: 17 Jul 2008 Posts: 49
|
Posted: Tue Aug 11, 2009 2:31 Post subject: Re: nwnx_dmactions |
|
|
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 |
|
|
scarface
Joined: 12 Jun 2005 Posts: 94 Location: Sweden
|
Posted: Wed Aug 12, 2009 2:03 Post subject: |
|
|
Do I have to add anything to the nwnx2.ini for this to work? |
|
Back to top |
|
|
Zebranky
Joined: 04 Jun 2006 Posts: 415
|
Posted: Wed Aug 12, 2009 3:32 Post subject: |
|
|
@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 |
|
|
|