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_haks

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux development
View previous topic :: View next topic  
Author Message
leo_x



Joined: 25 Aug 2010
Posts: 75

PostPosted: Fri Feb 24, 2012 14:19    Post subject: nwnx_haks Reply with quote

nwnx_haks controls the visibility of Haks and the TLK when a player logs in. It's main use is allowing people to log into worlds with a lot of custom content that are willing to make a safe loading area that doesn't use custom content. So a new players could actually speak in game with other players, read information documents, etc, before committing to big hak downloads.

Changes:
-- Added SetEnhanceScript so the script that's called at client enter is no longer hard coded.
-- Modified this plugin so that it can be built with the new core2.8 build system.

If anyone is interested in integrating it into the main repo I can create a patch. It does modify some headers in /include/structs and a small patch to nwnx_extend. If not, no biggie here is the source to my feature branch on my local copy:
https://github.com/jd28/nwnx2-linux/tree/nwnx_haks-2.8/plugins/haks

Download for so and nss files/examples:
nwnx_haks-2.8.7z

Code:
// Sets the script to be called when a player logs in.  If this function is not
// used the default script will be called which is "pl_load_enhance"
void SetEnhanceScript(string sScript);

// 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);
// - oPC : Target PC
// - nEnhanced : Determines which has the player can see depending on its
//               level as set by SetHakHidden
void SetPlayerEnhanced(object oPC, int nEnhanced);

// Sets a Fallback TLK that will be visible if the player logging in cannot
// see any hidden haks.  If unset the player will receive no tlk.  As if
// none were set in module properties "Custom TLK".  Mainly useful if you
// expect a player to have the CEP tlk, for example, but not your custom
// version of it.
// - sTLK : TLK file.
int SetFallBackTLK(string sTLK);

// Sets a Hak to be visible at a specified level.  Used in conjunction with
// SetPlayerEnhanced.  If the value passed to the latter function is greatre than
// or equal to nLevel that hak will be visible to the player.
// - sHak : Name of the hak file to hide.
// - nLevel : Level at which the hak is visible.  See SetPlayerEnhanced.
//   (Default: 1)
int SetHakHidden(string sHak, int nLevel = 1);

_________________
the awakening (PW Action)


Last edited by leo_x on Sat Feb 25, 2012 16:16; edited 1 time in total
Back to top
View user's profile Send private message
elven



Joined: 28 Jul 2006
Posts: 259
Location: Germany

PostPosted: Fri Feb 24, 2012 16:42    Post subject: Reply with quote

Patches against core-2.8 are always welcome. Saves me the work. Twisted Evil
Back to top
View user's profile Send private message
Tyndrel



Joined: 07 Apr 2012
Posts: 1

PostPosted: Sat Apr 07, 2012 11:32    Post subject: Reply with quote

Leo, I'm so glad you have released this to the community, having played on your "The Awakening" server I know how good this is and should I ever become intelligent enough to use it (or find someone who is) it will allow me to add custom tilesets to my current project and scrap my plan of having to link to a second server.

Thank you,

Tyndrel.

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



Joined: 10 Apr 2012
Posts: 2

PostPosted: Tue Apr 10, 2012 2:27    Post subject: Reply with quote

So I understand this is for linux users only, is there a solution for Windows at the moment?
Back to top
View user's profile Send private message
Wallack



Joined: 30 Apr 2012
Posts: 27

PostPosted: Wed May 23, 2012 14:58    Post subject: Reply with quote

Any windows port available ?
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
Page 1 of 1

 
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