Author Topic: Community Patch discussion and development thread  (Read 21013 times)

Baaleos

  • Administrator
  • Hero Member
  • *****
  • Posts: 1916
  • Karma: +0/-0
Community Patch discussion and development thread
« Reply #870 on: May 26, 2016, 11:58:35 pm »


               

I need to first maintain a server-client plugin communication to enable this in multiplayer


 



 


Do you mean a persistent connection between server and client, like on another port?


 


 


I had a similar issue when I was building nwscript functionality that could trigger screenshots on the client. (So I could get screenshots triggered on boss deaths etc, which were auto-uploaded to our facebook page)


The client has to connect to the server, because the server cannot be guaranteed to have connectivity back through firewalls and routers etc to the client.


I tried to keep those connections alive in a collection (c# code) - but I found that the unused tcp connections invariably got auto disposed/closed when inactive.


I think I had some moderate success with sending a pulse/heartbeat (keepalive) message along the connection, but tbh - there is probably better protocols than what I was using.


 


Doesnt nwnx_connect utilize the nwn networking protocol itself to send custom messages?


Couldn't custom messages be sent via the server plugin, to the client, and the client could respond in kind to specific messages?


               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Community Patch discussion and development thread
« Reply #871 on: May 27, 2016, 12:06:00 am »


               


Doesnt nwnx_connect utilize the nwn networking protocol itself to send custom messages?


Couldn't custom messages be sent via the server plugin, to the client, and the client could respond in kind to specific messages?




yes indeed - another reason to takeover nwnxcx_connect and add it into my plugin...


               
               

               
            

Legacy_Gruftlord

  • Sr. Member
  • ****
  • Posts: 490
  • Karma: +0/-0
Community Patch discussion and development thread
« Reply #872 on: May 27, 2016, 12:34:49 pm »


               


Maybe.


But releasing it as a standaloe plugin is not a solution either.


I guess the best would be to remove nwnx plugins from a CPP release and maitain them serapately.


It would allow you more freedom in the development of new features for the plugins, the moment it is no longer that strongly related to fixing bugs. I say go for it. Your creative energy seems to be focussed on enabling new/missing features for nwn atm. You'd get a much clearer and new focus for that project detangling it from the main patch project imho. It would have a smaller userbase, but would attract one, that is more open to experimentations and forward thinking features, without risking to alienate the more conservative part of the CPP users.
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Community Patch discussion and development thread
« Reply #873 on: May 28, 2016, 05:33:51 am »


               


It would allow you more freedom in the development of new features for the plugins, the moment it is no longer that strongly related to fixing bugs. I say go for it. Your creative energy seems to be focussed on enabling new/missing features for nwn atm. You'd get a much clearer and new focus for that project detangling it from the main patch project imho. It would have a smaller userbase, but would attract one, that is more open to experimentations and forward thinking features, without risking to alienate the more conservative part of the CPP users.




Thats true. It would definitely allowed me more freedom and it would be easier to maintain.


 


However. All this is problem because the nwnx plugin architecture. And making this separate plugin will only make the problem worse.


 


See, when NWNX was made, having separated plugins made sense. It allowed better controll for user and easier debugging/error finding.


 


This does not apply for NWNCX though, user doesn't need to manipulate with plugins, in fact, user doesn't want to mess with them at all, he just want to run NWNCX_Loader and enjoy new features provided by those who made the module.


 


And then there is the problem that plugin A needs same functionality as plugin B or in my case plugin A needs to run code when plugin B executes something.


 


Personally I think there needs to be only single nwnx plugin containing all the current features. Only thing that needs to be in separate plugin are experiments and unfinished features.


 


Anyway, this is not possible to do because other nwnx plugin creators doesn't share my concept.


 


Unfortunately the current problem I need to solve will not be any easier if I port the functionality I need it for into new separated plugin (and project).


 


My goal is to provide a fully functional plugin which will allow all these extra features along witth bugfixes without any side effects. This is not yet accomplished, but if it will be whats the problem that there are not only bugfixes but also new features in this plugin? Afterall all of that is optional - and you don't even need to run nwn via NWNCX if you don't want to.


               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Community Patch discussion and development thread
« Reply #874 on: May 28, 2016, 05:40:15 am »


               


yes indeed - another reason to takeover nwnxcx_connect and add it into my plugin...




So I did it.


 


I need more testing before I will release it but in new version my patch plugin will contain connect features.


 


Nwnx_patch plugin is sending user different message than original nwnx_connect, This is because I can't tell players to delete nwncx_connect. So nwncx_connect will still be running for them but will do nothing. Instead the functionality of nwncx_connect will be handled inside nwncx_patch.


 


Server admin needs to just remove nwnx_connect as that would send haks twice then and idk what could happen then (probably loong lag in character selection window).


 


 


With this functionality in my plugin, I established the server-client communication and the NWNXPatch_PlayMovie function is working in multiplayer as well.


 


I might be now able to provide much more, like SetTexture/SetTileAnimLoop etc.



               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Community Patch discussion and development thread
« Reply #875 on: May 28, 2016, 04:25:48 pm »


               


I might be now able to provide much more, like SetTexture/SetTileAnimLoop etc.




SetTileReplaceTexture probably won't be in my abilities


SetTileAnimLoop was extremely hard to do in client without reloading area but I did it and when doing so I also figured out how to rotate tile and I can also be able to provide function to set tile position, is there any possible usage for these two functions or its not worth the effort?



               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Community Patch discussion and development thread
« Reply #876 on: May 28, 2016, 07:44:00 pm »


               

wow, that sounds amazing, Shadooow. I assume this is nwncx stuff. How'd you pull this off?



               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Community Patch discussion and development thread
« Reply #877 on: May 28, 2016, 08:05:56 pm »


               


wow, that sounds amazing, Shadooow. I assume this is nwncx stuff. How'd you pull this off?




Yes this is nwncx stuff. To make it work, server must run nwnx_patch and use NWNXPatch_SetTileAnimLooop function and client needs to run nwncx with nwncx_patch which will receive the request from nwnx_patch and change the start or stop animloop animation. Same with PlayMovie.


 


How I did this? I don't know. Somehow I did it, if I should explain how I am doing all these nwnx features I wouldn't know what to say really.


               
               

               
            

Legacy_R_TEAM

  • Newbie
  • *
  • Posts: 22
  • Karma: +0/-0
Community Patch discussion and development thread
« Reply #878 on: May 28, 2016, 08:10:59 pm »


               

Hi,


 


have found 2 more bugs in v13 (v12 fine) :


 


If i summon my animal and rest, at "normal" if i summon the already here animal again - the already here vanish and is re-summon - so only every time one of his is here ..


but with v13, i can summon another animal , without naming, and even one more (3 in total - have not more tested ..) - and the already here dont vanish ..


 


The other bug is on an shop - if i buy one thing (have happen on scrolls and potions only), and it is 2 of this in the shop, and after buy the first, i try to buy the second, the server crash ...


 


Regards



               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Community Patch discussion and development thread
« Reply #879 on: May 28, 2016, 08:45:37 pm »


               


Hi,


 


have found 2 more bugs in v13 (v12 fine) :


 


If i summon my animal and rest, at "normal" if i summon the already here animal again - the already here vanish and is re-summon - so only every time one of his is here ..


but with v13, i can summon another animal , without naming, and even one more (3 in total - have not more tested ..) - and the already here dont vanish ..


 


The other bug is on an shop - if i buy one thing (have happen on scrolls and potions only), and it is 2 of this in the shop, and after buy the first, i try to buy the second, the server crash ...


 


Regards




I fixed the missing name of the animal companion when he is summoned after rest when you already have one. However I was not able to reproduce their stacking. Probably fixed already...


 


As for shop issue I have troubles understand your description and given how many variables there can be I will need either savegame or the shop you tested with in erf if its possible. If not then I need exact store content to reproduce this.


EDIT: Ok found it. Fixed.



               
               

               
            

Legacy_R_TEAM

  • Newbie
  • *
  • Posts: 22
  • Karma: +0/-0
Community Patch discussion and development thread
« Reply #880 on: May 29, 2016, 06:24:04 pm »


               

HI,


 


glad you fix the problem with the shop ...


it was no problem to give you an savegame (modul was the actual version von "Eye of the Beholder" ...) , but i have so many things in overide - i dont know that you can play it with the many overide files ... ?


 


Regards


 R-TEAM



               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Community Patch discussion and development thread
« Reply #881 on: May 29, 2016, 07:08:27 pm »


               

New version of nwncx_patch and nwnx_patch for download.


I wanted to make another 1.72beta but I have no other content than nwnx_patch update so just this for now.


 


This is the version with server-client communication and hak loading in char select window.


 


That functionality can be disabled by DisableConnect = 1 under [Community Patch] section in nwnplayer.ini (which is probably preffered on servers without any custom content for players so when they join with nwncx they dont receive haks which causes this short lag).


 


It also containst updated PlayMovie and Get/SetTileAnimLoop however I forgot to add 70_inc_nwnx into the package, will provide tomorrow.


 


Please try running multiplayer/singleplayer modules with this plugin and report anything unusual.



               
               

               
            

Legacy_R_TEAM

  • Newbie
  • *
  • Posts: 22
  • Karma: +0/-0
Community Patch discussion and development thread
« Reply #882 on: May 29, 2016, 08:03:47 pm »


               

Thanks for this quick fix and DL content ..btw.


Here you wrote : "Server admin needs to just remove nwnx_connect as that would send haks twice then and idk what could happen then (probably loong lag in character selection window)."


is this now the case ? Or is this still wip and not ready to download ...


 


Regards



               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Community Patch discussion and development thread
« Reply #883 on: May 29, 2016, 08:34:20 pm »


               


Thanks for this quick fix and DL content ..btw.


Here you wrote : "Server admin needs to just remove nwnx_connect as that would send haks twice then and idk what could happen then (probably loong lag in character selection window)."


is this now the case ? Or is this still wip and not ready to download ...


 


Regards




yes, if you are hosting a server then this apply to you


 


to clarify it will work nevertheless and theres also possibility to disable sending haks in nwnx_patch and use nwnx_connect but I see absolutely no advantage in that... but its possibility


               
               

               
            

Legacy_Quevy

  • Jr. Member
  • **
  • Posts: 92
  • Karma: +0/-0
Community Patch discussion and development thread
« Reply #884 on: May 29, 2016, 08:45:45 pm »


               
I ask one thing perhaps absurd, are not a programmer so I can not understand what you can do or what not.

 

It would not be possible with a patch edit the code so that the parts of walkmash not walkable tile sets him become once placed a positionable containing walkmash? This would open up many avenues for mapper.

I read about this on another topic, I forget which, and I thought of proposing that one.