Author Topic: hak vs override  (Read 1551 times)

Baaleos

  • Administrator
  • Hero Member
  • *****
  • Posts: 1916
  • Karma: +0/-0
hak vs override
« on: July 25, 2010, 10:58:45 pm »


               Question: If contents of a Hak pack, were extracted to override folder, would this allow access to the content just as easilly as it would if it were packed in a hak. Granted, I understand that overrides would be a global effect affecting potentially other modules, beyond the one intended, but I was just wondering if it was infact possible.




Eg - Some nice tilesets are out there, which are not actually that large in filesize, Im trying to avoid using hak's as much as possible, for the sake of player convenience etc.


The players of my module use an application I made, for updating their local content, which could be easilly set to distribute the contents of a hak pack I suppose.


So, original question.
Would a hakpack's content still be effective if placed in an override directory?


Note - If I do plan on proceeding with this plan, I would likely modify my application to backup the players override directory first, and give them the option to remove the downloaded content whenever desired.
               
               

               
            

Legacy_Calvinthesneak

  • Hero Member
  • *****
  • Posts: 1159
  • Karma: +0/-0
hak vs override
« Reply #1 on: July 25, 2010, 11:12:08 pm »


               It really depends on what the content is and what you're looking to modify.  You have to be careful with 2da's.  And you have to watch out because content in haks will actually override the content in overrides.
               
               

               
            

Legacy_Tarot Redhand

  • Hero Member
  • *****
  • Posts: 4165
  • Karma: +0/-0
hak vs override
« Reply #2 on: July 25, 2010, 11:59:12 pm »


               As far as I know stuff in the override directory will only override original Bioware content. So make sure that you are not trying original community made stuff in your override. For example you can't override Lord of Worms Seasonal Forest tileset but you can override the standard Rural one.



Also you don't need to write your own override manager, just check on the vault there are at least 2 nwn launcher programs that do just that.



TR
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
hak vs override
« Reply #3 on: July 26, 2010, 12:10:59 am »


               Hey,



As was said, override has lower priority than haks, so you cant add there some 2da that is already in haks you are using (CEP2). Also I would not mess with override much, many players have the override folder quite big and this could bring them big troubles if they would like to change anything.



You can use patch-hak or you can add new resources into cep2 haks, just be carefull on what you can add there and what you can not. For example you should not add tilesets there, because if client does not have he will crash... But placeables are fine, client which dont have it just wont see them etc. etc.
               
               

               
            

Baaleos

  • Administrator
  • Hero Member
  • *****
  • Posts: 1916
  • Karma: +0/-0
hak vs override
« Reply #4 on: July 26, 2010, 12:50:54 am »


               @ tarot - Im a c# Developer, so I kinda like to re-invent the wheel. Im quite pleased with my downloader application, it also has some features that the community ones likely do not have.
Eg - If you want custom sounds and voices in your module, for conversations etc. These MUST be wav format, otherwise they are not playable. But wav format is massive in filesize. I did my own tests, and 26 seconds of PCM Wav was 2mb in size, while the mp3 version of the same audio, was 128kb.

So, I made my Downloader, have a built in mp3->wav converter, which converts the mp3's it downloads, into wav on the clients machine.

This inturn, reduces the filesize of the file when being downloaded, but the client still gets the end result file.

@ShaDoOoW - Im specifically using my downloader, to distribute content that is being updated quite regularly, and hopfully without the need for haks.
While I suppose I could actually change the downloader to download a hak to the client machine instead, but then I run the risk of affecting their CEP23 stuff, if that is the hak I am using.

I feel much safer using the downloader to download to a clients override folder, because I have distributed my Downloader with a 'Delete Nosgoth Content' button, which downloads the filelist again, and this time, deletes all the files that it had downloaded in the first place.

The only file that would be deleted in this case that the player may not have wanted to lose, is the ambientmusic.2da, but the player is warned about this before they click on the confirm button etc.

All in all, I've tried to keep the downloader program as clean as possible, even programming it to be capable of recognizing files no longer required and deleting them.
Eg - a File that in the xml, has the tag TRUE. If it finds this file in the override, it will delete it, if its not present, then it just wont download it, since its been marked as delete, it is assumed it is an obsolete file.
Then it provides a report at the very end, showing all files successfully deleted,unsuccessfully deleted,downloaded, and fine.
               
               

               


                     Modifié par Baaleos, 26 juillet 2010 - 12:07 .
                     
                  


            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
hak vs override
« Reply #5 on: July 26, 2010, 12:56:09 am »


               

@ShaDoOoW - Im specifically using my downloader, to distribute content
that is being updated quite regularly, and hopfully without the need for
haks.

While I suppose I could actually change the downloader to
download a hak to the client machine instead, but then I run the risk of
affecting their CEP23 stuff, if that is the hak I am using.

Well cep2 has special hak for server-only stuff called cep2custom, its not intended for what you are trying to achieve, but it wont affect any possible cep updaters or what (i heard current cep has one) neither with clients, because clients have it empty.

also you dont have to dowload whole hak, for example tani's WorldGate is able to make/update hak, so you downloading only files in hak that were changed...
               
               

               
            

Baaleos

  • Administrator
  • Hero Member
  • *****
  • Posts: 1916
  • Karma: +0/-0
hak vs override
« Reply #6 on: July 26, 2010, 01:03:55 am »


               I do think it would be beneficial for me to learn how the update hak works.

I know cep team uses this, and it would be neater than the override directory.



However, as for the cep2_custom hak, I was orriginally using it for storing my ambientmusic.2da file, but then discovered there was issues if I had my 2da in a hak on server, and then clients had it in their override. Eg - They couldnt hear the custom music for some reason, even though they had the music bmu in their music folders.



In the end, I decided the ambientmusic.2da being in the override wasnt such a bad thing, and since then, in the hopes of avoiding hak content, which would involve players having to have the hak etc, I could just put my wav files in the override as well, since I am providing an easy method of removing them anyway.
               
               

               
            

Legacy_Estelindis

  • Hero Member
  • *****
  • Posts: 935
  • Karma: +0/-0
hak vs override
« Reply #7 on: July 26, 2010, 01:54:15 am »


               

Tarot Redhand wrote...
As far as I know stuff in the override directory will only override original Bioware content. So make sure that you are not trying original community made stuff in your override. For example you can't override Lord of Worms Seasonal Forest tileset but you can override the standard Rural one.

Not so.  At the CTP, we have often tested our tilesets in /override and they've worked just fine.  The override won't, um, override the hak version - but if you haven't associated the hak version with your module (which, I gather, the OP isn't doing), that doesn't come into play.  '<img'>
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
hak vs override
« Reply #8 on: July 26, 2010, 05:46:03 am »


               The same question was asked not to long ago in the old fourms in the scripting section.  

If you wanted to look at that post it is >> Override folder usage effects?  



the first half stays on topic. the second page is more on the subject of proper use of the CEP custom hak.  



the most usefull post in the thread is from Axe Murderer.  wich is a link to his Custom Content Mechanics - A Tutorial by Axe on the vault



Axe Murderer Posted: Tuesday, 25 May 2010 07:53PM





See if this helps explain it a bit for you.


               
               

               
            

Legacy__six

  • Hero Member
  • *****
  • Posts: 1436
  • Karma: +0/-0
hak vs override
« Reply #9 on: July 26, 2010, 09:22:52 am »


               The most important and useful feature of a hakpak is that players without them can't log in to a server/module that requires 'em. That might not sound very useful, but if you are adding content rather than simply making visual modifications, this will cause all kinds of issues and potential crashes if the player's override does not contain everything the server's does. The only exceptions to this rule are some of the 2da files that are handled entirely server side, which includes a lot of rules-related ones that I can't quite recall off the top of my head.

Case in point: if you add a new tileset to a module via override, this will completely crash the game for players as soon as the module loading screen is complete if they do not have the tileset's .set file in their override.

As for any technical limitations regarding the override, well, any file that can go in a hakpak can also work in override - the only difference is that override textures must be .tga (incidentally the uncompressed, larger, slower loading format) to overwrite ingame resources, while .dds is required to override existing content in hakpaks. Oh, and .plt files that override existing ones do not work in override.

Ultimately the choice is between risking stability for a few graphical changes in override, and potentially completely transforming the look of the game without risk with the use of hakpaks. Though I can hardly be called unbiased in that analysis ':bandit:'
               
               

               


                     Modifié par _six, 26 juillet 2010 - 08:27 .
                     
                  


            

Legacy_Tarot Redhand

  • Hero Member
  • *****
  • Posts: 4165
  • Karma: +0/-0
hak vs override
« Reply #10 on: July 26, 2010, 11:07:52 am »


               @Estelindis mmmf, mmmf, pop. Having removed my foot from my mouth thanks for the correction.



@Baaleos I think I understand what you are trying to do now. If you do decide to go down that path I would suggest that you give your players the option of which override folder to use as many of them will already have set up a number of such folders in order to play on a number of servers that have cc that players place in an override folder (custom heads, gui modifications etc).



TR
               
               

               
            

Legacy_Estelindis

  • Hero Member
  • *****
  • Posts: 935
  • Karma: +0/-0
hak vs override
« Reply #11 on: July 26, 2010, 02:25:37 pm »


               

Tarot Redhand wrote...
@Estelindis mmmf, mmmf, pop. Having removed my foot from my mouth thanks for the correction.

No need for foot in mouth!  I just pointed out that it's possible - but, as Six mentions, it isn't necessarily desirable.  There's a reason we just use this method for testing and don't post an override version of the CTP.

That said...  Six, is there any reason the game should crash on module load (in the situation you describe) if the starter area is a standard tileset, rather than a (missing) custom one?
               
               

               
            

Legacy_Calvinthesneak

  • Hero Member
  • *****
  • Posts: 1159
  • Karma: +0/-0
hak vs override
« Reply #12 on: July 26, 2010, 03:23:24 pm »


               Just as a note, the other option to Worldgate for haks, is to use the Rsync system that Brian Chung was using when the 1.69 patch was in beta testing.  I don't know anything about setting that up, but once players have the initial haks it will examine a manifest to check the contents of the haks and only update needed files inside of the haks.



For the nitty gritty technical details, I'm not sure who'd you ask on that.  Something I've wanted to toy with forever and never gotten around to.
               
               

               
            

Legacy__six

  • Hero Member
  • *****
  • Posts: 1436
  • Karma: +0/-0
hak vs override
« Reply #13 on: July 26, 2010, 04:37:39 pm »


               

Estelindis wrote...

That said...  Six, is there any reason the game should crash on module load (in the situation you describe) if the starter area is a standard tileset, rather than a (missing) custom one?

IIRC it will crash if the number of tiles, features or groups in the server's copy of the .set is different to that of the clients. Additionally if the .mdl and .wok files are not present for the first tile the player touches on entering the area, this is liable to crash too.

Walkmesh data in either a model or wok should also never be altered by an override (except possibly to change material number, but I can't guarantee this is safe). As far as tilesets go, doing anything other than reskinning and adding aesthetic features to existing tiles will either crash the game or create lots of pathing and walkmesh glitches in multiplayer, if done from override.
               
               

               


                     Modifié par _six, 26 juillet 2010 - 03:42 .
                     
                  


            

Legacy_Frith5

  • Hero Member
  • *****
  • Posts: 595
  • Karma: +0/-0
hak vs override
« Reply #14 on: July 26, 2010, 11:55:16 pm »


               The override has its uses, including modifying content in existing modules without having to rebuild that module using hak resources. Of course, if the contents of the .hak match the standard naming, etc., then that .hak will 'over ride' just as effectively any content already placed, once the hak is associated and the module built.

My question on this would be why? Why would you prefer your players to download override files instead of a .hak file? Either way requires players to download and install files in order to play, right? I can definitely see the attraction for SP games which are already built and which can use the override to automagically 'update' the look of that module. But for MP play, doesn't a .hak make more sense?

Of course, I could be wrong. Just asking. I use NWNCQ override for the OCs and other old modules, and I love it. For newer, or heavily modified with  CC modules already (like the fantasically awesome Arbor Falls!), I simply rename my override folders again to not use it. LoW already took great pains to craft his module a certain way, and I love seeing it the way he created it. Not so, some old SP module from the Vault, which is greatly improved by Chico's work (and other great overrides like Worms' and _six's).

Regards,
JFK