Creating Haks
#1
Posté 16 septembre 2012 - 07:34
#2
Posté 16 septembre 2012 - 07:45
Jenna WSI wrote...
I'm looking at moving loot items and such into a hak in order to preserve module space, but still having the scripts access them in the pallet with it pointing to the items stored in the hak instead of inside the module. How is the hak created for this to work correctly? I know with CEP if you try to edit certain items that are stored in the hak while in the module it tells you that it won't work. I understand why, but not how to do that myself for our server's haks. Thankee.
Simple answer:
Just load them into the hak and remove them from the module so fee up you space in the module. That all there is to it.
Extemded answer:
Within the NWN engine there is a critter called the Resource Manager It is the job of the resource manager to keep track of all of the Content that the Game has access to. It does this by making a list of the files and where they are located.
The way the list is built is what determins what file is used when there are two files of the same name and type. The manager first builds the list from all of the fils located is the Key/Bif files (The base content for the game)
Once the Key/Bif files are loaded It then adds the content from the override folder. If any of the files where of the same name and type, They are simply overritten with the new information.
The Files in the module are then added to the list. Once again overriting any that already exsisted with there new location to load from.
Then the files in the Haks are loaded into the list. They are loaded in order from the Bottom of the list to the Top.
The reason the toolset gives you the warning about the file being in a hak, is because the version that is saves into the module will have its file location information overritten, in the resource manager when the hak resources are added to the Resource List.
Modifié par Lightfoot8, 16 septembre 2012 - 08:02 .
#3
Posté 16 septembre 2012 - 07:54
And it is true that moving items into a hak will free the resource cap for a module, just to double check through you guys? (as per the dm crash bug)
Modifié par Jenna WSI, 16 septembre 2012 - 07:54 .
#4
Posté 16 septembre 2012 - 08:12
Jenna WSI wrote...
Simple... in nwn? >.<
And it is true that moving items into a hak will free the resource cap for a module, just to double check through you guys?
Yep, Just that simple.
(as per the dm crash bug)
Well, Umm, No!!
This is not a problem with resources in the module, Per the resource Manger. It a a Problem with how many resources are listed in the palettes. Reguardless of where you move the resources to thy will still be included in the palette. I think the simplest solution there is to find the offending Palette and edit it by removing items unused by the DM and placing the edited copy into the top hak.
I am sure that others have other opinions on that one.
Modifié par Lightfoot8, 16 septembre 2012 - 08:12 .
#5
Posté 16 septembre 2012 - 09:09
It's actually pretty simple to do with anything spawned only via script, and allows for those resources to be altered while the module is up and running.
If you aren't using nwnx, as Lightfoot8 said, you have to remove unneeded resources to push the count down.
#6
Posté 16 septembre 2012 - 09:20
#7
Posté 17 septembre 2012 - 06:27
I did two things to counter this issue:
- I put PLC palette stuff that DM's don't really need in a builder hak (why would a DM need 100 different trees?). You hook that up to a module to build areas. This has another bonus: you don't have to mess with erfs just to start building stuff. It also makes the palette less bewildering in game.
- I took a good look at the item palette, and trashed tons of old stuff that wasn't used. Then I took a good look again, and used scripts to generate random loot, crafting items (these can number in the hundreds, and are generally all the same except for portrait, tag and name).
A third approach, which is cool for techheads: store stuff in a mysql db. Many of you already do this for shops and whatever, but you can put a few hundred items on the floor, let a script put 'm in the db, and use their resrefs as a key for respawning them when needed. I did so with rings for all the deities (FR should have been monotheistic, much easier), which were infused in the loot system. Mind that this setup makes changing the items after they are in the db a lot harder.
#8
Posté 17 septembre 2012 - 06:30
Just a ghost wrote...
@Lightfoot8 : Mind that hitting "build palettes" once will put you back to zero if you try that approach. Pretty dangerous, I'd say.
Does not matter if you hit it or not. The version in the Hak will override the version on the module no matter what .
#9
Posté 17 septembre 2012 - 06:35
#10
Posté 17 septembre 2012 - 06:48
Just a ghost wrote...
O, sorry. I misinterpreted you. I though you wanted to keep the resources in the module/hak, just not on the palette (as in: add hak, don't build palette). Not sure if that's even possible, but that was my interpretation of your post.
Yes, That is pretty much what I said. The game itself does not need the use of the palette to run. The Palette is only used for Human interface. DM/Builder being able to select things. If you take and edit the Palette (.itp) File and place them in a Hak. You freeze them in that State. At that point rebulding the palette is just like trying to edit a blueprint that is in a hak.
Just keep in Mind that the Game does not use the Palette to Find resources.
#11
Posté 17 septembre 2012 - 07:59
#12
Posté 17 septembre 2012 - 06:00
Modifié par Jenna WSI, 17 septembre 2012 - 06:08 .
#13
Posté 18 septembre 2012 - 02:31
Modifié par Jenna WSI, 18 septembre 2012 - 02:31 .
#14
Posté 18 septembre 2012 - 07:17
However, such blueprints will normally still appear in the game palettes and can be spawned by a DM. There is an additional ~16k limit to these blueprints in the palettes, and the ones in haks DO count toward this limit. Passing this limit can cause the DM client to crash when a DM tries to log into the server.
Blueprints, conversations, and scripts are all server-side only, so they can all be moved to cep2_custom.hak if you wish (as long as you don't plan on having to edit the one's you're moving). You can even store certain types of 2da files in there (ones that are accessed only by the server and never the player client).
#15
Posté 18 septembre 2012 - 04:07
#16
Posté 18 septembre 2012 - 08:56
#17
Posté 19 septembre 2012 - 09:55
#18
Posté 19 septembre 2012 - 09:55
#19
Posté 19 septembre 2012 - 05:27
I am just baffled at this point though.... removed a lot of stuff and the dm client login works. However, it seems that if I add 1 script or 100.... it goes back to crashing again. I swear nwn trolls me. At this point I'm at a loss for why.
Modifié par Jenna WSI, 19 septembre 2012 - 05:27 .
#20
Posté 20 septembre 2012 - 06:34
#21
Posté 20 septembre 2012 - 06:27
12,233
Edited version that doesn't work - 12,239
Post edit: Okay a bare bones module with nothing but areas, with scripts added to a hak does allow dms to login. After going back to the old mod, removing all the scripts except core scripts, dialogue files also gone, only monsters and some items still in the module... it's crashing again. FML.
Modifié par Jenna WSI, 20 septembre 2012 - 09:17 .
#22
Posté 21 septembre 2012 - 06:15
Mind that each hak also has a 16K limit.
Modifié par Just a ghost, 21 septembre 2012 - 06:16 .
#23
Posté 21 septembre 2012 - 04:05
Modifié par Jenna WSI, 21 septembre 2012 - 04:05 .
#24
Posté 21 septembre 2012 - 04:42
#25
Posté 24 octobre 2012 - 04:29
Modifié par Jenna WSI, 24 octobre 2012 - 04:35 .





Retour en haut






