View previous topic :: View next topic |
Author |
Message |
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Thu Jul 20, 2006 10:57 Post subject: nwnx_functions + Get/SetDescription |
|
|
New version of nwnx_functions plugin with Get/SetDescription (for items and placeables).
I haven't checked other functions, but SetGoldPieceValue and SetTag should work.
http://data.virusman.ru/nwn/nwnx_functions-1.0.2.rar |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Fri Jul 21, 2006 17:58 Post subject: |
|
|
I've found all Get/SetLocal* functions as well, but I don't know what to do with them yet. |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Fri Jul 21, 2006 21:33 Post subject: |
|
|
Remember Obsidian developers saying that there will be 2 new functions that work with event handlers (GetEventHandler, SetEventHandler)?
I made the same thing for NWN. I just changed a heartbeat script name on one NPC, and it worked. So it's most likely that it's possible to do the same on other events & objects.
The only one question is: does anyone need it?
P.S. Debugging is a very addictive thing.. |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Thu Aug 03, 2006 10:06 Post subject: |
|
|
It works!
Code: |
string GetEventHandler(object oObject, int nEventId);
void SetEventHandler(object oObject, int nEventId, string sValue);
const int CREATURE_EVENT_HEARTBEAT = 0;
const int CREATURE_EVENT_PERCEPTION = 1;
const int CREATURE_EVENT_SPELLCAST = 2;
const int CREATURE_EVENT_ATTACKED = 3;
const int CREATURE_EVENT_DAMAGED = 4;
const int CREATURE_EVENT_DISTURBED = 5;
const int CREATURE_EVENT_ENDCOMBAT = 6;
const int CREATURE_EVENT_CONVERSATION = 7;
const int CREATURE_EVENT_SPAWN = 8;
const int CREATURE_EVENT_RESTED = 9;
const int CREATURE_EVENT_DEATH = 10;
const int CREATURE_EVENT_USERDEF = 11;
const int CREATURE_EVENT_BLOCKED = 12;
|
Player object fires only heartbeat, onspawn, ondeath and something else I didn't figure out yet. |
|
Back to top |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Thu Aug 03, 2006 14:41 Post subject: |
|
|
Hey, that's cool! And yes, debugging can get addictive...
What are you going to use it for ? _________________ Papillon |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Fri Aug 04, 2006 9:00 Post subject: |
|
|
Papillon wrote: | Hey, that's cool! And yes, debugging can get addictive...
What are you going to use it for ? | Actually, I don't know yet.
It can be used to change a behaviour of creatures (CREATURE_EVENT_USERDEF) or set some custom scripts on a PC copy. |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Sun Aug 27, 2006 23:47 Post subject: |
|
|
I'm implementing GetFaction/SetFaction/GetFactionName/etc. functions now.
(These functions will use the real faction ID instead of comparing it between objects) |
|
Back to top |
|
|
Mikel of Avalon
Joined: 29 Dec 2004 Posts: 72 Location: Germany
|
Posted: Mon Sep 18, 2006 12:01 Post subject: |
|
|
Is there a possibility to implement a function like SetRace/GetRace so i can change this for my subraces without using nwnx_leto ? _________________ Mikel of Avalon
Kalandur - Die vergessene Welt |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Mon Sep 18, 2006 19:36 Post subject: |
|
|
Mikel of Avalon wrote: | Is there a possibility to implement a function like SetRace/GetRace so i can change this for my subraces without using nwnx_leto ? | Most likely, yes.
//By the way, GetRace is GetRacialType. |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
|
Back to top |
|
|
chaoslink
Joined: 23 Aug 2006 Posts: 37
|
Posted: Tue Sep 19, 2006 1:50 Post subject: |
|
|
I'm looking for a function that can be called from the plugin to get a raw resource data. It doesn't seem that the ones hooked for the ResMan plugin will work. Any takers? |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Tue Sep 19, 2006 9:58 Post subject: |
|
|
chaoslink wrote: | It doesn't seem that the ones hooked for the ResMan plugin will work. Any takers? | IIRC, you have to prepare the data struct before calling RetrieveResEntry and DemandRes. |
|
Back to top |
|
|
Mikel of Avalon
Joined: 29 Dec 2004 Posts: 72 Location: Germany
|
Posted: Tue Sep 19, 2006 10:09 Post subject: |
|
|
Thanx Virusman, i will try it out in the evening - i'm still at work. One Question - will i have to reboot the character after i changed the racialtype or can i leave the character on the server and play with him without a relogin? _________________ Mikel of Avalon
Kalandur - Die vergessene Welt |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Tue Sep 19, 2006 16:08 Post subject: |
|
|
Mikel of Avalon wrote: | Thanx Virusman, i will try it out in the evening - i'm still at work. One Question - will i have to reboot the character after i changed the racialtype or can i leave the character on the server and play with him without a relogin? | The latter.
New functions in 1.6 (comparing to 1.0.2):
GetFactionID (1.67 only)
SetFactionID (1.67 only)
GetEventHandler
SetEventHandler
SetRacialType |
|
Back to top |
|
|
chaoslink
Joined: 23 Aug 2006 Posts: 37
|
Posted: Tue Sep 19, 2006 20:43 Post subject: |
|
|
virusman wrote: | chaoslink wrote: | It doesn't seem that the ones hooked for the ResMan plugin will work. Any takers? | IIRC, you have to prepare the data struct before calling RetrieveResEntry and DemandRes. |
I've looked into it, but those functions don't appear to support pulling any arbitrary resource from the game. See this thread where I try to better describe the issue.
chaoslink wrote: | The server will call RetrieveResEntry for every resource, but it only seems to call DemandRes on those that RetrieveResEntry returns '1' (and fills some output arguments). The arguments to DemandRes don't appear to contain the necessary information to identify the resource demanded. |
|
|
Back to top |
|
|
|