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 
 
Dynamic names
Goto page Previous  1, 2, 3, 4, 5  Next
 
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux development
View previous topic :: View next topic  
Author Message
Fireboar



Joined: 17 Feb 2008
Posts: 323

PostPosted: Fri Apr 10, 2009 13:20    Post subject: Reply with quote

http://xkcd.com/292/
Back to top
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Fri Apr 10, 2009 20:03    Post subject: Reply with quote

Yes, it's just assembler written in C. Smile And I didn't have any symbols back then, so I had to guess the purpose of every function.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Ne0nx3r0



Joined: 29 Nov 2006
Posts: 36

PostPosted: Fri Apr 17, 2009 1:45    Post subject: Reply with quote

<3

and awesome comic.
Back to top
View user's profile Send private message
Ne0nx3r0



Joined: 29 Nov 2006
Posts: 36

PostPosted: Sun Apr 19, 2009 3:06    Post subject: Reply with quote

I dunno if I'm doing the right thing wrong, or the wrong thing right, but I get:
Code:
nwserver:home/nwserver/nwnx2-linux/trunk/plugins/names# make
g++  -mcpu=i386 -I..  -c -o CCustomNames.o CCustomNames.cpp
`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
CCustomNames.cpp: In member function âvoid CPlayerNames::DeleteByObjectID(dword)â:
CCustomNames.cpp:92: error: âmemcpyâ was not declared in this scope
CCustomNames.cpp: In member function âvoid CCustomNames::DeletePlayer(dword)â:
CCustomNames.cpp:170: error: âmemcpyâ was not declared in this scope
make: *** [CCustomNames.o] Error 1
nwserver:home/nwserver/nwnx2-linux/trunk/plugins/names#


when trying to run make. I tried including <cstring> in CCustomNames.cpp, and still end up with:
Code:
nwserver:/home/nwserver/nwnx2-linux/trunk/plugins/names# make
make: *** No rule to make target `../NWNXBase.o', needed by `nwnx_names.so'.  Stop.

.. and a few pages of depreciated warnings that I didn't catch, but I can't find NWNXBase.o, and honestly I don't know how to make it from NWNXBase.h/cpp.

Is there something obvious I'm missing here?


**edit***

Looks like I got it, I just copied the files ./install.sh makes while it's running and used those to compile it... We'll see how this works out though O.o
Back to top
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Mon Apr 20, 2009 22:56    Post subject: Reply with quote

Fixed
http://nwn.virusman.ru/trac/nwnx2-linux/changeset/238/
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
kucik



Joined: 11 Feb 2009
Posts: 19
Location: Czech Republic

PostPosted: Thu Apr 23, 2009 18:02    Post subject: Reply with quote

I thing there is a bit mistake, beacause in
names/NWNXNames.h is:
Code:
#include "../NWNXBase.h"
#include "../gline.h"

but in Makefile on line 14 is:
Code:
NWNXDIR = ../..


So if I put names into plugins directory, I'll get
Code:
NWNXNames.h:23:25: error: ../NWNXBase.h: No such file or directory             
NWNXNames.h:24:22: error: ../gline.h: No such file or directory


So I need to place names/ into trunk/ and change
NWNXDIR = ../..
to
NWNXDIR = ..

or change lines 23 and 24 to
Code:
#include "../../NWNXBase.h"
#include "../../gline.h"

in header and let names in plugins/


(Or make better haeder and Makefile Very Happy )
I'm looking forward to test this plugin. Thanks for Your great job. Wink
Back to top
View user's profile Send private message Visit poster's website
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Thu Apr 23, 2009 21:19    Post subject: Reply with quote

Fixed
http://nwn.virusman.ru/trac/nwnx2-linux/changeset/239
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Ne0nx3r0



Joined: 29 Nov 2006
Posts: 36

PostPosted: Mon Dec 07, 2009 22:57    Post subject: Reply with quote

virusman wrote:
I've uploaded the sources for this plugin today.
http://nwn.virusman.ru/trac/nwnx2-linux/browser/branches/names
It's still a mess and half of the hooks don't work, but at least it doesn't crash after login. Smile


I toyed with this a while back, but I wanted to ask before I try to implement anything... Can you set the name of an area for players (really all players would see the same name ideally) with this? I saw "SetDynamicName(object oPlayer, object oObject, string sName);", but it's difficult enough for me to tinker in compiling with Linux so before I get lost in it I wanted to double check and see if it is functional.

Even if the names have to be set for each player, that's still usable, I could always setup some reference point for when players login.
Back to top
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Tue Dec 08, 2009 16:32    Post subject: Reply with quote

Ne0nx3r0 wrote:
I toyed with this a while back, but I wanted to ask before I try to implement anything... Can you set the name of an area for players (really all players would see the same name ideally) with this? I saw "SetDynamicName(object oPlayer, object oObject, string sName);", but it's difficult enough for me to tinker in compiling with Linux so before I get lost in it I wanted to double check and see if it is functional.
Yes, technically it's possible to change the name of any object for a player using this hook, but I'm not sure if the current implementation allows it. It may require some modifications to the plugin code.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Ne0nx3r0



Joined: 29 Nov 2006
Posts: 36

PostPosted: Wed Dec 09, 2009 2:55    Post subject: Reply with quote

virusman wrote:
Yes, technically it's possible to change the name of any object for a player using this hook, but I'm not sure if the current implementation allows it. It may require some modifications to the plugin code.


No matter how I toy with this I can't seem to get it to work... I compiled it alright, and I don't see any errors in bash or the logs, but nothing else seems to happen either. I was playing around with the areas plugin, and that works fine, but I can't even seem to set the name of an item with this one.

Do you have an example script I could reference to test with? Just to make sure I'm not misunderstanding how to implement this in nwscript.
Back to top
View user's profile Send private message
Ne0nx3r0



Joined: 29 Nov 2006
Posts: 36

PostPosted: Thu Dec 24, 2009 2:18    Post subject: Reply with quote

*whimper*
Back to top
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Fri Jan 08, 2010 21:54    Post subject: Reply with quote

I've enabled this system on my PW, so it's improving very fast. When I implement persistent storage for names, I'll release it as a package.
_________________
In Soviet Russia, NWN plays you!
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: Sat Jan 09, 2010 15:01    Post subject: Reply with quote

NWNX Names 1.0
First release.
The package contains an NWScript include and an example of a persistency library.
http://data.virusman.ru/nwn/nwnx_names-1.0-linux.rar
_________________
In Soviet Russia, NWN plays you!
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Ne0nx3r0



Joined: 29 Nov 2006
Posts: 36

PostPosted: Sat Jan 09, 2010 17:25    Post subject: Reply with quote

Am I missing something as to where this function comes from?

Code:
SetNamesEnabled(oPC);


I still can't get it to work, but to make it compile I've had to add
Code:
182: [b]const[/b] char *GetServerFuncName(dword Addr)


Seemed harmless, but I've yet to make it work once. It looks like a lot of improvements though.
Back to top
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Sat Jan 09, 2010 17:53    Post subject: Reply with quote

Ne0nx3r0 wrote:
Am I missing something as to where this function comes from?

Code:
SetNamesEnabled(oPC);
Updated nwnx_names.nss in SVN and download package:
http://nwn.virusman.ru/trac/nwnx2-linux/browser/trunk/plugins/names/nwnx_names.nss
_________________
In Soviet Russia, NWN plays you!
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux development All times are GMT + 2 Hours
Goto page Previous  1, 2, 3, 4, 5  Next
Page 3 of 5

 
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