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 
 
Hak: How to load them only on server-side?

 
Post new topic   Reply to topic    nwnx.org Forum Index -> General Discussion
View previous topic :: View next topic  
Author Message
metagamer



Joined: 30 Nov 2014
Posts: 20

PostPosted: Sat Jan 23, 2016 17:00    Post subject: Hak: How to load them only on server-side? Reply with quote

Hello everybody,

I am developing a lot of new features for the server in which I work on.

I implemented all the plugins compatible with nwnx, core v.2.8 included nwnx_haks developed by leo. NWNCX and nwnx_connect are used as well.

nwnx_haks allows the user to join a server even if he does not have the custom content required. However, it is necessary entering inside an area which is safe content (no custom features).

Drawbacks: Custom features, as well as new domains, new spells, new classes and so on are not loaded as well. Then it is necessary TO HAVE the hak, even if it is not compulsory, to unlock the new features.

The point is:
I was wondering if there exists a way to load all the haks only from server-side, allowing the player to enter inside a server with custom content and to have them unlocked, without asking him to download them.

In this way, all the haks, tlk, etc will be loaded only in the server and it will be easier for the players to join a new server.


Thanks a lot
Back to top
View user's profile Send private message Visit poster's website
Baaleos



Joined: 02 Sep 2007
Posts: 830

PostPosted: Tue Jan 26, 2016 12:03    Post subject: Reply with quote

Quote:

I was wondering if there exists a way to load all the haks only from server-side, allowing the player to enter inside a server with custom content and to have them unlocked, without asking him to download them.

In this way, all the haks, tlk, etc will be loaded only in the server and it will be easier for the players to join a new server.



nwnx_haks does not 'prevent' the loading of haks on either server or client side.

What it doe is this.
It modifies the message that the server sends to the player, advertising the haks that the player needs.
That being the case, any haks that you hide from your players will not be loaded.
It has no effect on serverside haks.

Eg:

If you have
Content1.hak
Content2.hak
Content3.hak
ServerContent1.hak

If you use nwnx_haks to hide content 2 and 3, the player will only load Content1.hak and they will attempt to load ServerContent1.hak.
It doesn't matter about the content of the hak files, it only loads them by name.
Eg: If ServerContent.hak has 60,000 resources packed into it on server side, the client version could have 1 file and still be loaded.
This would satisfy the condition that nwn sets on login.

The only way to have Custom Features such as domains, spells, classes etc and not be limited to haks, would be to use an override package.
Basically : your players could/would download the contents of the haks loose and place them within the override directory.
This makes the content truly optional (IF YOU DO IT ON THE SERVER TOO)

It means no hak is advertised as 'required'
The content becomes optional - eg: someone can login without the content
but they can also login with the content and have access to it.

The downside of course is that it is messier storing thousands of files loose in the override directory.

Note: tlk files still go in tlk directory.


Note: I have tried both solutions with nwnx_haks and non_haks

1. In my starting area, I have signs that start conversations.
The player can confirm if they have downloaded the haks and if they have, they click 'yes' on the dialogue. The nwscript then portals them to the server again, but not before using nwnx_haks to flag them has having the advanced flags. So it is a seamless transition.

2. In my Worlds of Rhun windows server, I created my own content downloaded application, that downloads rar files from my server which contain music, tilesets, models, sounds etc
They get installed in the override directory.
This makes the content 'optional' - I then hooked the onTransition script in nwn and checked the tileset in the destination area, to see if it matches any tilesets from the override. If so - it only allows the transition if the player acknowledges that they have the content. (to avoid crashes)


Basically - nwnx_haks will not let you hide the content, on player side while allowing the same player to use the content.
the plugin also has no effect on server side content, so hiding a server exclusive hak file, will have no effect on the player.
Back to top
View user's profile Send private message
metagamer



Joined: 30 Nov 2014
Posts: 20

PostPosted: Thu Jan 28, 2016 18:27    Post subject: Reply with quote

Baaleos wrote:
Quote:

I was wondering if there exists a way to load all the haks only from server-side, allowing the player to enter inside a server with custom content and to have them unlocked, without asking him to download them.

In this way, all the haks, tlk, etc will be loaded only in the server and it will be easier for the players to join a new server.



nwnx_haks does not 'prevent' the loading of haks on either server or client side.

What it doe is this.
It modifies the message that the server sends to the player, advertising the haks that the player needs.
That being the case, any haks that you hide from your players will not be loaded.
It has no effect on serverside haks.

Eg:

If you have
Content1.hak
Content2.hak
Content3.hak
ServerContent1.hak

If you use nwnx_haks to hide content 2 and 3, the player will only load Content1.hak and they will attempt to load ServerContent1.hak.
It doesn't matter about the content of the hak files, it only loads them by name.
Eg: If ServerContent.hak has 60,000 resources packed into it on server side, the client version could have 1 file and still be loaded.
This would satisfy the condition that nwn sets on login.

The only way to have Custom Features such as domains, spells, classes etc and not be limited to haks, would be to use an override package.
Basically : your players could/would download the contents of the haks loose and place them within the override directory.
This makes the content truly optional (IF YOU DO IT ON THE SERVER TOO)

It means no hak is advertised as 'required'
The content becomes optional - eg: someone can login without the content
but they can also login with the content and have access to it.

The downside of course is that it is messier storing thousands of files loose in the override directory.

Note: tlk files still go in tlk directory.


Note: I have tried both solutions with nwnx_haks and non_haks

1. In my starting area, I have signs that start conversations.
The player can confirm if they have downloaded the haks and if they have, they click 'yes' on the dialogue. The nwscript then portals them to the server again, but not before using nwnx_haks to flag them has having the advanced flags. So it is a seamless transition.

2. In my Worlds of Rhun windows server, I created my own content downloaded application, that downloads rar files from my server which contain music, tilesets, models, sounds etc
They get installed in the override directory.
This makes the content 'optional' - I then hooked the onTransition script in nwn and checked the tileset in the destination area, to see if it matches any tilesets from the override. If so - it only allows the transition if the player acknowledges that they have the content. (to avoid crashes)


Basically - nwnx_haks will not let you hide the content, on player side while allowing the same player to use the content.
the plugin also has no effect on server side content, so hiding a server exclusive hak file, will have no effect on the player.


Absolutely.
We are talking about the same things Smile

I skip the idea to put the content on override for several reasons.
Moreover, my own server has several custom contents (tilesets, cep, etc) and some areas are not totally accessible if the client does not download them.

The idea to check if client has the content before an area (transiction) is a working solution but my goal is different.

The idea: to allow client an complete and full access experience to the server without any download.
Back to top
View user's profile Send private message Visit poster's website
Baaleos



Joined: 02 Sep 2007
Posts: 830

PostPosted: Thu Jan 28, 2016 19:23    Post subject: Reply with quote

In order for the player to access the areas: they must have the content - no way around that.

In order to access the server, the player will require haks with the same name as the ones used by your server.

UNLESS : you use nwnx_haks to hide the hak's initially

Then the players will OPT in to say whether they actually have the content.
If they do have the content, they can then see the new areas, new placeables etc

If they do not OPT in, then they will not get the new goodies.


If you Use Override:
then hak's will not be required.
Your enhanced players will play just like non-enhanced players.
It makes content truely optional - but at greater risk.
The risk is that your players can crash if they go somewhere they are not meant to.

Note : there is no method in nwscript to detect if the content is installed.
At most, you can give the player the ability to declare if they have the content or not.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> General Discussion 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