Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Neverwinter Nights: Enhanced Edition has been announced! Visit nwn.beamdog.com to pre-order, apply for the Head Start and check for details. NWN:EE FAQ is available.
Soundtracks for BG:EE, SoD, BG2:EE, IWD:EE, PST:EE are now available in the Beamdog store.
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

Placables limit?

tgxtgx Member Posts: 19
I seem to remember there was some kind of arbitary limit to placables. I think... it was project-wide, so if you made a series of areas highly detailed (overly detailed), you'd end up running over the limit. And the only way around that was to stop and start the new areas in a new module.

So, is this being looked at? Is my memory about this stuff even correct? It was something like that, right?

Comments

  • SherincallSherincall Member Posts: 143
    There is such a limit, but you will never hit it.

    The two hard limits you can easily hit:
    - The module can contain only 16k resources. This includes scripts, creatures, placeables, etc.. But only the actual resource files - if you make a custom creature, and place it down 10 times, it only counts as a single resource.
    - The custom palette can contain only 16k entries per type. You hit this one by avoiding the first one: because the 16k is on the module, you can bypass it by putting some items in a hak. So you put 10k custom creatures in a hak, and 10k in the module. Now your server dies when a DM joins.

    The second one is just a bug and should be fixed. The first is a limitation and needs more work to get removed.

    As for number of placeables in the entire project - if they are static, they generally only affect loading time and client rendering. Each static placeable is still in the AI master list, so it marginally eats perf.
    Oh, and each loaded placeable is around 1kb memory in the server process, so capped by your memory, that comes down to ~3 million placeables.

    LyraVrenNeverwinterWights
  • tgxtgx Member Posts: 19
    I see! Thanks for explaining all this. I admit I haven't actually worked on any sizable projects/modules. But, that might change. I just thought it might be good to revise the basic stuff while the toolset is being looked at. But, what you say explains a lot.

  • PstemariePstemarie Member Posts: 47
    @Sherincall

    Refresh my memory exactly how this module limit works, please.

    Is that 16K worth of resource files (i.e. if my Temp folder while the module is open has more than 16,000 files in it, I'm over the limit)?

  • ProlericProleric Member Posts: 173
    Exactly that.

    Plus up to 50 haks with up to 16k files each.

    Pstemarie
  • PstemariePstemarie Member Posts: 47
    Thanks, Proleric. I thought that's what it was. Glad you chimed in as I'd forgotten about the 50 HAK cap - not that I'll ever hit that.

  • SherincallSherincall Member Posts: 143
    Speaking of limits, there's also the 100 tilesets limit.

    As for the 16k resources - I'm not sure but I believe the .nss files don't count against it, just the .ncs ones. There's a few others that don't count, but they are too rare to matter.

    Pstemarie
  • virusmanvirusman Member Posts: 42
    IIRC 16k is the ERF file format limit; any files in the module/erf/hak count against it, including .nss

  • SherincallSherincall Member Posts: 143
    virusman said:

    IIRC 16k is the ERF file format limit; any files in the module/erf/hak count against it, including .nss

    The ERF format uses 32bit indexes, so you can put as much as you want into it. I think resman uses some of the key/bif logic handling when dealing with ERFs, which uses the top 12 bits to pick a .bif out of a key, then has 6 unused bits, then 14 for a resource within a bif. Because of that, resman can't load more than 16k resources out of a single ERF. But .nss is not a resource as far as resman is concerned, so it gladly swallows it.

    I just tried adding 20k uncompiled .nss files to a module and had no issues with it.

    I also found this thread detailing it a bit more: http://smf.asmodei.net/index.php?PHPSESSID=dlo7d9ok992q6as5b96hjt29m0&topic=23233.msg233436#msg233436
    and a quick look at the disassembly seems to confirm it, but I didn't go too deep.

    virusman
Sign In or Register to comment.