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_functions + Get/SetDescription
Goto page 1, 2, 3, 4, 5, 6  Next
 
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux development
View previous topic :: View next topic  
Author Message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Thu Jul 20, 2006 10:57    Post subject: nwnx_functions + Get/SetDescription Reply with quote

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
View user's profile Send private message Visit poster's website Yahoo Messenger
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Fri Jul 21, 2006 17:58    Post subject: Reply with quote

I've found all Get/SetLocal* functions as well, but I don't know what to do with them yet. Smile
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Fri Jul 21, 2006 21:33    Post subject: Reply with quote

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. Wink 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. Smile
The only one question is: does anyone need it? Smile
P.S. Debugging is a very addictive thing.. Shocked
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Thu Aug 03, 2006 10:06    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website Yahoo Messenger
Papillon
x-man


Joined: 28 Dec 2004
Posts: 1060
Location: Germany

PostPosted: Thu Aug 03, 2006 14:41    Post subject: Reply with quote

Hey, that's cool! And yes, debugging can get addictive... Laughing

What are you going to use it for ?
_________________
Papillon
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Fri Aug 04, 2006 9:00    Post subject: Reply with quote

Papillon wrote:
Hey, that's cool! And yes, debugging can get addictive... Laughing

What are you going to use it for ?
Actually, I don't know yet. Smile
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
View user's profile Send private message Visit poster's website Yahoo Messenger
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Sun Aug 27, 2006 23:47    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website Yahoo Messenger
Mikel of Avalon



Joined: 29 Dec 2004
Posts: 72
Location: Germany

PostPosted: Mon Sep 18, 2006 12:01    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Mon Sep 18, 2006 19:36    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website Yahoo Messenger
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Mon Sep 18, 2006 20:16    Post subject: Reply with quote

Try this.
http://data.virusman.ru/nwn/nwnx_functions-1.6-beta.rar
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
chaoslink



Joined: 23 Aug 2006
Posts: 37

PostPosted: Tue Sep 19, 2006 1:50    Post subject: Reply with quote

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
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Tue Sep 19, 2006 9:58    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website Yahoo Messenger
Mikel of Avalon



Joined: 29 Dec 2004
Posts: 72
Location: Germany

PostPosted: Tue Sep 19, 2006 10:09    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Tue Sep 19, 2006 16:08    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website Yahoo Messenger
chaoslink



Joined: 23 Aug 2006
Posts: 37

PostPosted: Tue Sep 19, 2006 20:43    Post subject: Reply with quote

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
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, 3, 4, 5, 6  Next
Page 1 of 6

 
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