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



Joined: 06 Jul 2006
Posts: 183

PostPosted: Fri Jul 22, 2011 0:10    Post subject: Reply with quote

I couldn't get what you posted to work so I googled backtrace for Ubuntu and followed their steps. Hopefully this helps, but if not I can try something else.

http://dl.dropbox.com/u/273755/gdb-nwserver.txt
Back to top
View user's profile Send private message
leo_x



Joined: 25 Aug 2010
Posts: 75

PostPosted: Fri Jul 22, 2011 9:09    Post subject: Reply with quote

Thanks, that works!

Looks like the error is occuring in the nwnx_levels.so plugin.

You can try removing that and seeing if things work, however it looks like it's missing a function pointer isn't getting defined, so it would be likely that the same issue will crop up elsewhere.

unfortunately the way i did things, it looks like it created some dependencies on the actual core nwnx.so, so you would need to use the one compiled by. i will try to refactor those out.

once nwnx2.8 comes out i will switch stuff to Virusman's new nwn api so the plugins are contained.
Back to top
View user's profile Send private message
Zunath



Joined: 06 Jul 2006
Posts: 183

PostPosted: Fri Jul 22, 2011 16:49    Post subject: Reply with quote

Glad to hear I could help out for a change Smile

I tried running the server with just nwnx_haks like you said but had the same result - segfault.

Quote:
unfortunately the way i did things, it looks like it created some dependencies on the actual core nwnx.so, so you would need to use the one compiled by.


Compiled by who? You? Very Happy

In any case: Hope you get it figured out, been dying to try this stuff out. If you need any more info let me know and I'll try to get it for ya!
Back to top
View user's profile Send private message
leo_x



Joined: 25 Aug 2010
Posts: 75

PostPosted: Fri Jul 22, 2011 19:26    Post subject: Reply with quote

oops left a few words out. Razz

what i meant was if you compile (or download) nwnx2.so from the main trunk and then compile nwnx_haks.so from my branch, then copy and paste both of those into your nwn it will crash because some function pointers that i stuck in the main library won't get initialized. this is the mistake i made. i can rectify it pretty easily.

so in short, you should be able to test but you'd have to copy nwnx2.so along with whatever plugins you wanted from my branch into your nwn folder for it to work.
Back to top
View user's profile Send private message
Zunath



Joined: 06 Jul 2006
Posts: 183

PostPosted: Fri Jul 22, 2011 19:53    Post subject: Reply with quote

Ah ok I'm with you now! Very Happy

I'll try that out, thanks a lot.

EDIT: Tried your version of haks, but got a segfault there too. I'll just hold off until you release an updated version.
Back to top
View user's profile Send private message
Nob



Joined: 16 Apr 2005
Posts: 21

PostPosted: Thu Aug 18, 2011 11:46    Post subject: Reply with quote

Any chance we can get a bit of documentation for specattacks?
Back to top
View user's profile Send private message
Zunath



Joined: 06 Jul 2006
Posts: 183

PostPosted: Sat Aug 20, 2011 15:13    Post subject: Reply with quote

Hey, was just wondering if you had an ETA on when those fixes will be done? Looking forward to using this! Smile
Back to top
View user's profile Send private message
leo_x



Joined: 25 Aug 2010
Posts: 75

PostPosted: Wed Oct 12, 2011 22:14    Post subject: Reply with quote

apologies for the horribly late reply. life, a couple other projects, etc. i just pushed an update to nwnx_haks, I cleaned it up a lot. I also tested it against nwnx2.so built from the main trunk and it worked fine for me, so you shouldn't see any of the segfaults you were seeing. I haven't tried it in production yet. the others still need more work before they work with a nwnx2.so built from the trunk.

you can try this one: http://dl.dropbox.com/u/32687721/nwnx_haks.7z

https://github.com/jd28/nwnx

tc,
leo
Back to top
View user's profile Send private message
Baaleos



Joined: 02 Sep 2007
Posts: 830

PostPosted: Wed Oct 12, 2011 22:41    Post subject: Reply with quote

is there any hope of a similar plugin to nwnx_haks making its way to win32?

Very Happy
Back to top
View user's profile Send private message
Zunath



Joined: 06 Jul 2006
Posts: 183

PostPosted: Fri Oct 14, 2011 3:51    Post subject: Reply with quote

Excellent - thanks! I'll give it a shot and let you know if I find any issues.
Back to top
View user's profile Send private message
Zunath



Joined: 06 Jul 2006
Posts: 183

PostPosted: Sat Oct 15, 2011 17:01    Post subject: Reply with quote

I was able to connect to my test server without one of the hidden haks on my client, so that much seems to be working.


How do I check to see if a player has a specific hak? Basically my idea is to make everyone enter a vanilla-NWN area and if they have all of the hidden haks they get sent to the real entry area.

I'm just a little fuzzy on how to use this SetPlayerEnhanced function, I guess.


Great work, once again!
Back to top
View user's profile Send private message
leo_x



Joined: 25 Aug 2010
Posts: 75

PostPosted: Sat Oct 15, 2011 22:51    Post subject: Reply with quote

Cool.

It's highly dependent on your world really.

Say someone logs into your world in the starting area for the first time. There would need to be something there that allowed them to indicate to you that they have the haks on their computer. Could be a conversation, chat command, or whatever. If they indicate that they do then you need to store that information in a database for future logins. The player will have to relog at this point or you could ActivatePortal on them to make them reconnect, since the hak list can only be sent at login.

if you want to port them to a real starting area once they have the haks, i'd do it on mod enter. I'm not sure if it's safe to do it from the pl_load_enhanced script. i forget if the character is fully initialized at that point.

Code:
#include "..."

// Tells the plugin what haks to send to the player,  if nEnhanced is less
// than or equal to 0 no hidden haks will be sent.  If greater than zero the plugin
// will send all the haks that are less than or equal to nLevel as set
// via the function: SetHakHidden(string sHak, int nLevel = 1);
void SetPlayerEnhanced(object oPC, int nEnhanced);
 
void SetPlayerEnhanced(object oPC, int nEnhanced) {
    SetLocalString(oPC, "NWNX!HAKS!SETPLAYERENHANCED", IntToString(nEnhanced));
}

// this script is run every time someone logs in.
void main () {
    object pc = OBJECT_SELF;

    // Imagine a generic database call here, testing to see if the
    // player has indicated that they have the Haks. 
    int enhanced = GetDatabaseInt(pc, "pc_enhanced");
   
    // This will tell the plugin whether to send the haks or not.  if
    // enhanced = 0 then none of the hidden haks will be sent.
    SetPlayerEnhanced(pc, enhanced);

    // You could maybe put your porting code here, but i think better to leave
    // it in mod enter and check the database again.  again not sure this is
    // safe.
    if (enhanced > 0)
        DelayCommand(5.0, PortToRealEntry(pc));
}


being able to hide haks in "levels" might make things more confusing. as an example on my server it's like this.
nLevel == 0 // CEP
nLevel == 1 // 2da Hak, custom classes, etc.
nLevel == 2 // massive amounts of custom content. at least that's the plan.

does that help?
Back to top
View user's profile Send private message
Zunath



Joined: 06 Jul 2006
Posts: 183

PostPosted: Sun Oct 16, 2011 16:55    Post subject: Reply with quote

Yeah it does, thanks. I think I misunderstood how this plugin worked but I'm following you now. It's sort of a way for players to "elect" to access the areas that require haks.


But basically you're saying the PC has to tell me (via script/whatever) which haks he has? There's not a way to get those via this script?


Thanks for the quick response, once again. Smile
Back to top
View user's profile Send private message
Baaleos



Joined: 02 Sep 2007
Posts: 830

PostPosted: Mon Oct 17, 2011 13:54    Post subject: Reply with quote

I investigated a similar question a while back.

But the answer from virusman and co, was that it isnt possible without some client modification.
Eg -With nwnCX it would be possible to make a communication protocol to communicate directly with nwnx, and perform even more complex checks.

eg- nwnx asks what haks are available
nwncx sends the list back to the server
nwnx does X depending on the answer.

However, you have to be aware, that some people would be hessitant to put a nwncs plugin on their client machines that basically sends the server a list of files in a folder (hak folder)

Receiving a File-List from the server doesnt impact any confidentiality rules or guidelines. Which is why Bioware probably elected to use that approach. Eg - Not spying on players hdd's

That being said, if you receive a file list from the clients, then that increases bandwidth usage a little, and opens up the possibilities for exploitation.
Imagine someone copies 5000 hak files into their hak directory.
Would 5000 hak names be sent to the server?

Anyway - just a little bit of speculation into a what if scenario... if such a thing were possible.
Back to top
View user's profile Send private message
Zunath



Joined: 06 Jul 2006
Posts: 183

PostPosted: Thu Oct 20, 2011 15:28    Post subject: Reply with quote

That makes sense. Thanks for clearing that up. Smile
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 Previous  1, 2, 3, 4  Next
Page 2 of 4

 
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