You are here

Tutorial: How to patch your module or campaign

1 post / 0 new
rjshae
Tutorial: How to patch your module or campaign

 

 M. Rieder


If you have a large campaign or module to upload to the vault, uploading it again each time you make an update can become tedious.  Patching is much better.  There are two ways that you can patch without re-uploading the whole campaign or module.



1)When you release your campaign/module associate an empty hak with it and name it something like "mymodulename_patch.hak".

2)When you have to patch your campaign/module, save the module you are modifying as a folder.  Open the folder and make a .hak out of the files that contain the changes.

3)Give this the same name as your original empty .hak and upload to the vault.  



If your submission is already on the vault, a similar process can be applied with the override folder. 



1)Save the changed module as a folder.

2)Upload the changed files from that folder to the vault.

3)Instruct the players to put the changed files into their override folder.



**NOTE: As Kaldor Silverwand notes below, patches are not retroactive.  If someone has already been to the area that you patched (except in the case of a conversation or script) then the patch will have no effect.

 

 Kaldor Silverwand


This only works if someone hasn't already been in an area in the module, right? For instance, if you have your area in your game, travel into that area (which loads the module), and then save it. Then make area changes as you suggest. Then load your saved game. My guess is that the saved game will not have the changes because it is the prior version of the area that is saved with the game. 

 

 M. Rieder


As far as I understand it, that is correct.  I haven't actually ever tried it, though, so I can't speak from experience. 

 

 E.C.Patterson


Areas will not work from hak or override (or campaign). So those types of changes have to be integrated to the mod file and a new version uploaded.



Another way to patch with loose files is via the campaign folder. Better than the override IMHO. IIRC versions of files in the campaign folder will be used even in a saved game (instead of the versions in the mod file). 

 

 Eguintir Eligard


see my release for an ideal patch situation. Its only one now, but all previous patches went only to the campaign folder. Override isnt ideal... most modules require it to be emptied before playing and why keep around a bad copy of a script or conversation and override it? Put all the originals in the campaign folder and you can overwrite and remove the bad files permanently with a patch.



If you're logical enough to use module folders, you can replace to module folders as well but really there is no reason all scripts and convos cant be in a campaign folder. If you have a single module theres no reason it cant still be a campaign. 

 

 Shaughn78
 
For my release I have found that the name_patch.HAK works very well. It is quick and easy. It's only draw back is if there is an issue with an area, though most issues are conversation and script related and generally a work around can be created for an area issue.



With the HAK I have been able to post an update usually within a few hours of notification. Leading to very little downtime for players. The time would be much greater with each compressed mod likely over the 25mb limit for quick vault upload. It is also quicker and easier to download, generally being only kbs. 

 

 M. Rieder


I'm a little confused and not sure if I understand what you are saying when you say you can't patch an area. Do you mean things like adding placeables or placed effects, or other things? Last night I tested the override and .hak system on my own machine to change placed effects in an area and it worked fine. Except for the limitations already noted by Kaldor Silverwand. Perhaps I am missing something? 

 

 Eguintir Eligard


I wouldnt mess around with areas. When you have to replace any part of an area, you should be re-uploading that particular module. And even its just the one area that needs fixes, the transitions etc and other things associated with it may have changed, so again, just reupload the module. Theres patching and then there is trying to get too cute with the whole concept. 



And the more patches you have the less appealing your download becomes as they have to follow 8 different instructions to get a working game. And your email will fill up with bug reports that shouldnt exist.



If you dont believe me I can tell you statistically that with just a single patch and 1 instruction (to empty override) I have to field about 2 issues a day all but 2 of which were a failure to do one of the above. 

 

 Shaughn78


I ran into issues with an area that had a bad blueprint. I corrected the blueprint and moved the area into the patch HAK and the issue wasn't resolved. I had to upload the updated module to solve the issue, but was unable to fix it for players in game. 

 

 Guest_ElfinMad_*


Is it also possible to distribute a module in directory format instead of .mod and then patch by dropping in area/convo/script files to that directory? 

 

 M. Rieder


That's an interesting idea and worth trying. I don't know how that would work on the vault, not sure if there is that kind of access. It's worth looking into, however I would test it thoroughly before implementing. 

 

 The Fred


This system works (and, as mentioned, it works well in the Campaign folder, too) but it can be fickle, so make sure you test it thoroughly first... as always. ;-)



It's also worth noting that you need the compiled script (the .ncs file) rather than just the .nss file to override a script. 

 

 kamalpoe



Quote

ElfinMad wrote...



Is it also possible to distribute a module in directory format instead of .mod and then patch by dropping in area/convo/script files to that directory?

You can, but anyone that has already entered the module will not get the benefit. 


 

 dunniteowl


Just a note (beyond letting you know this is now Stickied) :



When I Alpha Tested Misery Stone all the updating and bug fixing was sequenced through using Tortoise SVN. I cannot tell you how cool that was. I believe this can only be done if you do distribute your work as a Directory save and not as a .mod.



I don't know how well this would work as a general updater for haks and fixes, but if folks could have it as part and parcel of at least their Alpha and Beta Testing, this would probably speed things up immeasurably during that phase of development.



Tortoise SVN is the right price (FREE!) and it was easy to set up and get going. I only add this as it seems that, if you can get folks to accept the SVN concept for that, fixing and adding to your modules, post release, could become a dream instead of the fitful rest they sometimes are.

I also believe that, if we can get a bit more information and discussion about it, the Autodownloader might also become quite useful in this regard as well -- just as much for SP as for MP modules.



Meanwhile, any other useful advice, tips, tricks and notes on patching your campaigns or modules (and I would recommend you always set them up as campaigns, just in case) would be of great use to the rest of the Community on the whole.



dunniteowl

 

 Eguintir Eligard


Is it also possible to distribute a module in directory format instead of .mod and then patch by dropping in area/convo/script files to that directory?



Thats what I did. I just never had cause to patch the module, since scripts and conversations were placed (and best placed) in campaign. 

 

 dunniteowl


I believe that's how you have to do it when running an SVN. So I believe it's completely possible.



dno 

 

 Lance Botelle


Hi,



This is something I explained in the forums in the past: 13th July 2007 and used with Soul Shaker.



ORIGINAL PATCHING POST: http://nwn.bioware.c...574566&forum=47



I also explain the usage in my own blog here: Patching A Module: http://worldofalthea...ing-module.html This is what Mat is referring to.



Reference to my original post may be helpful.



Many Thanks.



Lance.

 

 Lance Botelle



Quote

Kaldor Silverwand wrote...



This only works if someone hasn't already been in an area in the module, right? For instance, if you have your area in your game, travel into that area (which loads the module), and then save it. Then make area changes as you suggest. Then load your saved game. My guess is that the saved game will not have the changes because it is the prior version of the area that is saved with the game.



Hi Kaldor,



No, anything can be changed using the method I explained, including areas already vistsed by the player. Please see my blog post in the link above. Clarification: Objects within areas can be fixed, while area modifications (altering terrain) may not be. I have not tested it this far.



Cheers!



Lance 


 

 Lance Botelle



Quote

M. Rieder wrote...



As far as I understand it, that is correct.  I haven't actually ever tried it, though, so I can't speak from experience.



Hello Mat,



No, you are not correct in this. Patching, using a higher priority hak can change existing games, which is the point of the hak idea. There are some limitations, but not as many as you may think.



Lance. 


 

 Quillmaster
 
It's worth noting that the vault tends to remove underscores from file names, as happened with me when I released a beta of my NWN1 mod, forcing users to rename the file so that the mod could find it. 

 

  • up
    50%
  • down
    50%