Author Topic: Toolset limits  (Read 2047 times)

Legacy_Krevett

  • Full Member
  • ***
  • Posts: 203
  • Karma: +0/-0
Toolset limits
« on: January 25, 2011, 07:09:38 pm »


               Does anyone knows about the different limits of the toolset. I heard about palette limit but can't figure at wich point you start experiencing weird behaviors or crashes?
My questions are:

How much custom blueprint can you create for a module before having some trouble (just blueprint created from the toolset nothing from haks etc...)?

Is there any limit to the number of scripts in a module?

Is there a limit to the number of area that could crash your module?

And finally how much can a module weight (in Mb and not counting haks!) and run without problems?

Thanks for your answers!!
               
               

               
            

Legacy_ehye_khandee

  • Hero Member
  • *****
  • Posts: 1415
  • Karma: +0/-0
Toolset limits
« Reply #1 on: January 25, 2011, 08:34:44 pm »


               There is a 16k Resource limit in the module and in each hak. So the total number of files in your MODULE or HAK should not exceed 16k. Other than that I've not encountered many limits and so far, my module is 186megabytes in size, covering over 1250 Areas with a plethora of custom scripts.



66.232.100.90 cep2.1 or better if you'd like a look.



Be well. Game on.

GM_ODA
               
               

               
            

Legacy_The Amethyst Dragon

  • Hero Member
  • *****
  • Posts: 2981
  • Karma: +0/-0
Toolset limits
« Reply #2 on: January 26, 2011, 01:19:27 am »


               

Krevett wrote...

Does anyone knows about the different limits of the toolset. I heard about palette limit but can't figure at wich point you start experiencing weird behaviors or crashes?
My questions are:

How much custom blueprint can you create for a module before having some trouble (just blueprint created from the toolset nothing from haks etc...)?

Is there any limit to the number of scripts in a module?

Is there a limit to the number of area that could crash your module?

And finally how much can a module weight (in Mb and not counting haks!) and run without problems?

Thanks for your answers!!


There is a limit of about 16,000 resources in a module (when not counting contents of hak files).  To see how many you are at, open your module in the toolset, go to your NWN/modules/temp0 folder and see how many files are in there.

Each script takes up 2 resources (a .nss file (script text) and a .ncs file (compiled script)).

Each item blueprint takes up 1 resource.

Each creature blueprint takes up 1 resource.

Each placeable blueprint takes up 1 resource.

Each merchant blueprint takes up 1 resource.

Each trigger blueprint  takes up 1 resource.

Each sound object blueprint takes up 1 resource.

Each encounter blueprint takes up 1 resource.

Each waypoint blueprint takes up 1 resource.

Each door blueprint takes up 1 resource.

Each area takes up 3 resources (1 .git file, 1 .gic file, and 1 .are file).

Each of the palettes adds 1 file (.itp files).

You can exceed this limit by moving script and blueprint files into a hak file (where I think the limit is also near 16k resources) that is located server-side (for a PW/online module) or on your computer (for a single-player module), and associated with your module.

There is another limitation in-game.  If there are too many total blueprints on the palettes (a combination of those stored directly in the module file and those in haks), DMs can crash their game client when they enter the running module.  Not sure of the limit here, but it might also be around 16k (I'm sure somebody else knows this limit).

My module is currently 97.5 MB with somewhere over 550 areas, hundreds of items and scripts, and it runs without any problems.

My module currently uses 13,285 resources, which I'm in the process of reducing by rewriting all of the spells and many other scripts (combining many spells into multipurpose scripts, then moving those combo scripts to a hak file) and removing many blueprints (particularly placeables) that aren't called by scripts (I usually just drop in any placeable and edit the properties for my current needs anyway rather than rely on the palette anymore).
               
               

               


                     Modifié par The Amethyst Dragon, 26 janvier 2011 - 01:25 .
                     
                  


            

Legacy_Krevett

  • Full Member
  • ***
  • Posts: 203
  • Karma: +0/-0
Toolset limits
« Reply #3 on: January 26, 2011, 03:06:49 am »


               ok thank you for your detailed answers I asked because I rely heavily on the custom palette and I want to be sure the game will run for a DM!

By the way I have another request: I also rely heavily on local variables (on creatures area and triggers) is there any downside to this?
               
               

               
            

Legacy_omen_shepperd

  • Sr. Member
  • ****
  • Posts: 347
  • Karma: +0/-0
Toolset limits
« Reply #4 on: January 26, 2011, 04:46:50 am »


               So what is the size limit for a mod in Mb ? I was under the impression it was around 150megabytes.
               
               

               
            

Legacy_The Amethyst Dragon

  • Hero Member
  • *****
  • Posts: 2981
  • Karma: +0/-0
Toolset limits
« Reply #5 on: January 26, 2011, 07:05:45 am »


               

Krevett wrote...

By the way I have another request: I also rely heavily on local variables (on creatures area and triggers) is there any downside to this?


I am a huge fan of using local variables.  I use them for everything from encounters (for an Aenea-modified version of the CEP-modified Sparky Spawner) to special creature spawning effects and treasure generation (no need to use multiple onspawn scripts) to item properties (such as my PW's custom ILR system) to persistent data storage on PCs (by setting the variables on a special item in that PC's inventory, rather than on the PC, the data is stored even over server resets).  I even use them within all of the spells I'm currently rescripting (for passing lots of information to and from an information-processing script.  There's a lot more I use them for besides these.  Anywhere I can try to use a single script to run off multiple local variables (for multiple functions), I do.

omen_shepperd wrote...

So what is the size limit for a mod in Mb ? I was under the impression it was around 150megabytes.


This one I have no idea what the real limit might be.  Probably depends on the performance of the gaming machine (for single-player modules) or server (for PWs).  Anybody know this one for sure?
               
               

               
            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0
Toolset limits
« Reply #6 on: January 26, 2011, 09:23:40 pm »


               All of these have been asked and answered many times - searching these and the old forums will yield much more thorough answers. In brief, however:

There is a limit of 16,384 resources for each hak and mod file, roughly confirmed. Why 16,384, and why only roughly confirmed? That's 0x4000 in hex. It's common to have field limits in powers of 2 (like the 32-bit limit on ints in NWN, or the 8-bit limit on ability scores, or the 0x20000 TMI limit). Roughly confirmed, because I didn't bother to check the exact count of standard resources (though The_Krit did some time back, iirc).

You can have an unlimited number of resources, simply by adding more haks. There may be a hak limit per module, but again, it's likely high enough to be irrelevant - I've yet to hear of anyone hitting it.

There is also a limit of 16,384 items in the dm palette. Some things, like scripts, don't show in the dm palette, but of the items it shows, it shows them from all the haks associated with the module, as well as the module's resources. You can avoid the palette limit by using nwnx_resman, which allows you to put them in a separate set of folders and call them up dynamically from ingame. Such resources will not show in the dm palette.

There is no real mod size limit. Performance may degrade as you add more areas, however, if gradually. This is mainly because of functions that loop over objects, though, so you can mitigate that by using GetNearest. You are unlikely to have to worry about this for years, though, as there are people out there with very large modules. Despite repeated optimizations and dumping of resources into resman, HG still weighs in at 160 megs, and there are larger ones out there.

There may be a module object count limit, but the number is likely to be obscenely high, since I've yet to hear of anyone hitting it either.

Funky
               
               

               
            

Legacy_Lazarus Magni

  • Hero Member
  • *****
  • Posts: 1837
  • Karma: +0/-0
Toolset limits
« Reply #7 on: December 16, 2013, 11:33:33 pm »


               

FunkySwerve wrote...

You can avoid the palette limit by using nwnx_resman, which allows you to put them in a separate set of folders and call them up dynamically from ingame. Such resources will not show in the dm palette.


Funky


Hi,
Can anyone answer this question? Looking for clarification on resman usage. If you have more than one file type in the external folder do you have to put them in seprate subfolders, and if so, do you need to make a change to the ini to direct resman to those different sub folders? Could someone post an example please? And is this the same for linux and windows versions of the plugin?
Much thanks.
Laz
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Toolset limits
« Reply #8 on: December 18, 2013, 01:44:03 am »


               

FunkySwerve wrote...

There is a limit of 16,384 resources for each hak and mod file, roughly confirmed. Why 16,384, and why only roughly confirmed? That's 0x4000 in hex. It's common to have field limits in powers of 2 (like the 32-bit limit on ints in NWN, or the 8-bit limit on ability scores, or the 0x20000 TMI limit). Roughly confirmed, because I didn't bother to check the exact count of standard resources (though The_Krit did some time back, iirc).


it is confirmed,  it has do do with how the resource manager handles resources as discribed in the KeyBIF_Fileformat.  The ResID is a dword split up as follows. 

Quoting the format... 
A unique ID number. It is generated as follows:

Variable: ID = (x << 20) + yFixed: ID = (x << 20) + (y << 14)

x = [Index into File Table to specify a BIF]y = [Index into Variable or Fixed Resource Table in BIF](<< means bit shift left)
... end quote 

fixed size resources where never implemented meaning the middle 6 bits in the dword are never used.   the bottom 14 bits are used for the location inside a resource file  hence the 2^14= 16384 limit to items in a resource file.

FunkySwerve wrote...
You can have an unlimited number of resources, simply by adding more haks. There may be a hak limit per module, but again, it's likely high enough to be irrelevant - I've yet to hear of anyone hitting it.


might was well be unlimited. As far as I can tell from the model above there would be a hard cap of 2^12 = 4069 BIF and Haks in a module.   There my be other limiting factors, but I do not know of anyone who has hit them.  

FunkySwerve wrote...
There may be a module object count limit, but the number is likely to be obscenely high, since I've yet to hear of anyone hitting it either.


I think the top count is at the OBJECT_INVALID line 0x7f000000 in hex, or 2,130,706,432.   Regardless of where it s I have never heard of someone hitting it either. even with the mass destruction/ creation of objects that everyone does in there modules.
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Toolset limits
« Reply #9 on: December 18, 2013, 03:34:15 am »


               

Lightfoot8 wrote...

FunkySwerve wrote...
You can have an unlimited number of resources, simply by adding more haks. There may be a hak limit per module, but again, it's likely high enough to be irrelevant - I've yet to hear of anyone hitting it.

might was well be unlimited. As far as I can tell from the model above there would be a hard cap of 2^12 = 4069 BIF and Haks in a module.   There my be other limiting factors, but I do not know of anyone who has hit them.


I do not believe the HAK limit is this low.  In my experience you can have roughly 50 HAKs. I do not recall the exact number. But I have encountered it a number of times.

There is a separate limit on the number of tilesets which I have not hit, but it is greater than 50 from what I have seen.
               
               

               
            

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
Toolset limits
« Reply #10 on: December 18, 2013, 03:46:45 am »


               <relying on...>

iirc, Trent or someone similarly official mentioned raising the hak limit to 50 and the tileset limit to 100 in one of the interviews. I can't search very efficiently on this tiny orb, but I'm really pretty sure the new limits came in either 1.68 or 1.69...

<...an old man's memory>
               
               

               
            

Legacy_Lazarus Magni

  • Hero Member
  • *****
  • Posts: 1837
  • Karma: +0/-0
Toolset limits
« Reply #11 on: December 18, 2013, 04:33:52 am »


               LOL, thanks for the responses, but none of you epic NWN Gods answered my query.... Long live the enigma of NWN (And NWNX).
               
               

               
            

Legacy_Lazarus Magni

  • Hero Member
  • *****
  • Posts: 1837
  • Karma: +0/-0
Toolset limits
« Reply #12 on: December 18, 2013, 05:47:56 am »


               P.S. Too funny

"Galleo" and "Closer I am to fine" by the Indigo Girls.
               
               

               


                     Modifié par Lazarus Magni, 18 décembre 2013 - 05:50 .
                     
                  


            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Toolset limits
« Reply #13 on: December 18, 2013, 02:18:20 pm »


               

henesua wrote...

I do not believe the HAK limit is this low.  In my experience you can have roughly 50 HAKs. I do not recall the exact number. But I have encountered it a number of times.

There is a separate limit on the number of tilesets which I have not hit, but it is greater than 50 from what I have seen.


the 1.69 release notes stated that the limit on tilesets was increased to 100.

I did not see anything about hak limits.   I think there is one I have just not seen it.    

I did find this line that I thought was interesting while looking.   

- Added new renderaabb and rendertilepathnodes DebugMode console commands to aid with building tilesets.

someone may find that usefull.   


Lazarus Magni wrote...
LOL, thanks for the responses, but none of you epic NWN Gods answered my query.... Long live the enigma of NWN (And NWNX).


Sorry,  I have never used nenx or resman, so can not even try to answer your question.   hopefully someone else will be able to help.
               
               

               
            

Legacy_Axe_Murderer

  • Full Member
  • ***
  • Posts: 199
  • Karma: +0/-0
Toolset limits
« Reply #14 on: December 27, 2013, 02:07:28 am »


               As I recall, there was at one point a limit of 10 haks max. I believe it was v1.67 that increased it to 255. It's been quite awhile and my memory is not what it used to be so it might have been only 127, but I am reasonably sure it was raised to 255 and that's the current limit. Can't imagine anybody needing more than about 50 or so regardless.