Aller au contenu

Photo

Online Staging Tool(PW)


  • Veuillez vous connecter pour répondre
6 réponses à ce sujet

#1
KingKongTimmi

KingKongTimmi
  • Members
  • 4 messages
Hey guys, I have decided to make a contribution to this fabolous community by myself :)

A while ago we have created a serversided staging tool for our PW. That means, you do not have to stage your content offline and upload the .lzma files to your server, because they will be generated form your server content.

We have created this tool by decompiling the Toolset and extracting the staging functions. Anybody who wants to see more can have a look at the source code.

What does this Tool do?


As I have mentioned the Tool will stage all your PW content. It will grab your haks, tlk (At the moment it is limited to handle only one TLK file), .trx and music files and prepare them for the autodownloader.
Campaign files will not be handled by this tool, you have to add them (mainly the campaign.cam) manually to the autodownloader. You can do that by adding a according line into the files.txt and add the .lzma file to the according autodownloader folder.

How do I use it?

You have to create a Batch file and start the .exe in it. It needs 5 parameters (seperated by spaces)
1. The path to your module directory
2. The path to your game files (where haks, tlks etc. are)
3. The path to your client file directory (directory used by the autodownloader and the server which the folder to which your servers.xml will lead)
4. The path to a temp directory for the server files (no actual use, but the contentmanager function needs it)
5. The name of your TLK

The Batch file should look like this:

cd C:\\Updater\\
BuildDownloaderData.exe C:\\NWN2\\modules\\ModuleName C:\\NWN2 C:\\Reources\\client C:\\Reources\\temp modulename.tlk

You have to manually add the right server and download location to your servers.xml (e.g. www.mypw.de/resources/client)

Additional tools:

You can tweak this tool even more by using this one:
http://www.kivinen.i...update-ifo.html

Just add to the beginning of your batchfile...:
xcopy update-ifo.exe C:\\NWN2\\modules\\ModuleName
update-ifo.exe
del update-ifo.exe

...and it will update your module.ifo file based on the content in your diretory. Thereby you can add and delete areas easily, without staging them or updating your module.ifo offline.

Downloads:

The compiled BuildDownloaderData: www.rivin.de/BuildDownloaderData.zip
Source: www.rivin.de/BuildDownloaderData-Source.zip

I hope that little tool will make your life easier and feel free to improve it (but share it afterwards) :)

Modifié par KingKongTimmi, 05 mai 2013 - 12:06 .


#2
Tchos

Tchos
  • Members
  • 5 080 messages
Kudos for this!

#3
Nighthirster

Nighthirster
  • Members
  • 32 messages

Thank you for this! You've just saved me a ton of time :).



#4
rjshae

rjshae
  • Members
  • 4 507 messages

I don't profess to understand what goes into making a PW, but it sounds useful. Thank you for the contribution.



#5
Nighthirster

Nighthirster
  • Members
  • 32 messages

OP: I've been playing around with the code, and it's working pretty great. However, I can't help but notice that there is also a method for server file staging (as opposed to client staging, which you implemented).

 

The method is called StageServerRequiredResources and it takes a bunch of parameters, including a OEIShared ResourceManager object... for the life of me I can't get it to work!

 

I tried subclassing the ResourceManager (since it's an abstract class) and I tried just passing it ResourceManager.Instance (which is a static method to obtain a shared instance), but I'm getting null reference errors.

 

Have you figured out how to resolve this? I have little hold of a response, but thought I'd ask!



#6
Nighthirster

Nighthirster
  • Members
  • 32 messages

Figured it out! I'll post some code soon with details on how to do it, and some improvements (IMHO) on the above tool gracious provided by KingKongTimmi.



#7
Nighthirster

Nighthirster
  • Members
  • 32 messages

Hi all!

 

As promised, here is the link to the deployment tool I've been working on, inspired from KingKongTimmi's work above! To download and view instructions and source code, please visit the github page here https://github.com/n...NWN2StagingTool.

 

What's different?

1) All config and path info is now stored in a config file included called nwn2staging.ini

2) NWN2StagingTool has the ability to deploy both client and server content (the above only does client data)

3) This tool uses the exact same code as the NWN2 Toolset, and in fact includes one of it's libraries with it - leading to very high fidelity

4) It will automatically detect all haks, music, and tlk used by your mod and stage that as well (you no longer need to specify the tlk)

5) You can choose to skip staging haks and music if you so choose

6) Code has been cleaned up and improved to provide more information on what's going on

 

There's a few other differences, but that's the core of it! Enjoy, and big thank you to KingKongTimmi as well as the ALFA mod for providing some critical insight.

 

Sample Usage:

 

Will deploy all files needed by the server, including haks and tlk

DeployModule.exe -s -h

Will deploy all files needed by the client and compress them into lzma archives, including haks, music, and tlk

DeployModule.exe -c -h -m

Enjoy!