Question about Geometry Asset Handle Numbers

The place to discuss scripting and game modifications for X4: Foundations.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

NightIntruder
Posts: 86
Joined: Tue, 24. Apr 18, 22:50
x3tc

Question about Geometry Asset Handle Numbers

Post by NightIntruder »

CBJ wrote: Mon, 16. Dec 24, 20:40 The crash is telling you that the game is out of handles for geometry assets. This can happen when there are too many different assets for the game to track, and is quite a common problem with mods that add a lot of different new models to the game.
As it happens will be increasing the capacity for this in an upcoming 7.50 Public Beta, but it won't necessarily help if your mods are still adding too many models, or if they are not compatible with 7.50 yet.
By asset do you mean a single model with its material assigned to it, a single component (or model with merged multiple materials) or something else? Do LODs of the same asset count as separate entities in this regard?
What is the limit of trackable assets beyond those that are part of the vanilla game in 7.50? Please, give a rough number or at least an order of magnitude (hundreds, thousands) if you cannot say the exact number for some reasons. I am asking for that because I work on multiple bases/outposts, each one custom, pre-made, with very little shared assets between them to retain unique vibes and feels.
Do I understand it correctly that the best practices for modders to follow is to limit the amount of materials per model/component/addon and as wide reusability of assets within different components (or even mods) as possible?
Alan Phipps
Moderator (English)
Moderator (English)
Posts: 31678
Joined: Fri, 16. Apr 04, 19:21
x4

Re: Question about Geometry Asset Handle Numbers

Post by Alan Phipps »

Split from an old Tech Sp thread.
A dog has a master; a cat has domestic staff.
NightIntruder
Posts: 86
Joined: Tue, 24. Apr 18, 22:50
x3tc

Re: Question about Geometry Asset Handle Numbers

Post by NightIntruder »

Alan Phipps wrote: Fri, 27. Jun 25, 12:24 Split from an old Tech Sp thread.
Thanks Alan. I didn't intend to hijack the original thread, but since CBJ was active in it with replies, I thought the information I am asking about may be useful to us, modders. Sorry for the inconvenience.
Alan Phipps
Moderator (English)
Moderator (English)
Posts: 31678
Joined: Fri, 16. Apr 04, 19:21
x4

Re: Question about Geometry Asset Handle Numbers

Post by Alan Phipps »

Well CBJ was last active in that thread round about last Christmas and would probably not be monitoring it anymore now. :wink: I have given him a prod about your new question though.
A dog has a master; a cat has domestic staff.
CBJ
EGOSOFT
EGOSOFT
Posts: 54091
Joined: Tue, 29. Apr 03, 00:56
x4

Re: Question about Geometry Asset Handle Numbers

Post by CBJ »

Please don't dredge up old threads or drag them off topic just to try to get a developer's attention. And modding questions are often interesting to answer, but they do not belong in Tech Support.

I'm afraid I can't give you exact numbers for how many handles are used by the unmodified game as they are only allocated on demand, so the numbers used vary wildly, and the pool sizes are tweaked from time to time to deal with worst case scenarios that we encounter. A few pieces of more general information about it:

- There are various asset types, e.g. shaders, meshes, textures, materials, navmeshes, animations, collision shapes, etc.
- The asset handle pool size for each asset type is different, ranging from small (about 500) to large (about 64K).
- You specifically asked about the meshes: that's currently at the top end of that scale, and yes, each LOD has a separate asset handle.

Reusing assets wherever possible - especially textures, materials and meshes - is definitely a good idea, not just to stay within the asset handle limits, but because it will improve performance and reduce memory consumption, and thereby make your mods accessible to players with a wider range of hardware. :)
NightIntruder
Posts: 86
Joined: Tue, 24. Apr 18, 22:50
x3tc

Re: Question about Geometry Asset Handle Numbers

Post by NightIntruder »

CBJ wrote: Sat, 28. Jun 25, 12:21 :)
This is useful information. Thanks for the detailed answer, CBJ! Now I have a bit more knowledge on how to approach modeling and texturing custom assets. It's not as bad as I feared as long as the pool of handles for shaders, materials and textures isn't at the bottom end of the scale :) I appreciate you guys constantly improve the game engine and follow needs of modders.
CBJ
EGOSOFT
EGOSOFT
Posts: 54091
Joined: Tue, 29. Apr 03, 00:56
x4

Re: Question about Geometry Asset Handle Numbers

Post by CBJ »

Shaders are very much at the bottom end of the scale, so you'll want to reuse those as much as possible. Pools for textures and materials are near the top end.

Return to “X4: Foundations - Scripts and Modding”