Jump to content

How may SAB file can storage a mod?


Go to solution Solved by Xycaleth,

Recommended Posts

EDIT: sorry for mistake. Someone can edit the title? i wanna mean "How Many SAB files can storage a mod?"

 

 

I need to ask this question.

Because on my mod i have some hundred of sabers file (and they are melee swords, so they are many parameters like noblade, nodligth, bounceonwalls etc) i reach the cap limit very fast. so when there is a npc with a saber that overcap the SAB file cache limit, it crash.

for fix the problem i found on WP_saberload.cpp of single player this:

#define MAX_SABER_DATA_SIZE 0x80000

 

after a lot of trial, i see that the maximum value of allocating memory for sab file possible is it:

 

#define MAX_SABER_DATA_SIZE 0x40000000 // Max value original is 0x80000

that's allow me to storage something like 170 SAB files.

 

someone know something better about this memory cap? or if there is some other way for allocate more SAB  files?

Link to comment

You're allocating 1GB of memory there. If you can figure out how much space all of your sab files take up (select them all in windows explorer and it should tell you how much disk space they use) you can just set the size to that number (in bytes).

 

oh, my... a giga is really too expensive D: .

Approssimately i have 1.23 Megabyte of SAB files at moment. for what i need, i need something like 2.5 mega of allocate memory. what's is

the closest value?

Link to comment

Let's say 3mb just for ease of calculation. 3mb = 3 * 1024 * 1024 bytes. You can set this calculation as the value of max saber data size, e.g.

#define MAX_SABER_DATA_SIZE (3 * 1024 * 1024)

 

 

Done a better check. Now it's my result: for what i see, there is not  a problem of allocate memory for sab files. D:

there is a limit of the number of SAB file that is possible to storage into ext_data/sabers folder. on my engine is 154.they are loaded by Z to A.

infact, i can load all sabers by Z name to G... glyph3 is loaded.

glyph2 crashed, and crash also all blades with name included by A to glyph2. but if i remove 2 SAB file, i can load 2 SAB file more, and so can load also glyph2 and glyph1. mmm. the solution for this strange issue i think should be relatevily easy: instead of make 1 SAB file for each blade, i need to make a SAB file for every saber category. so a SAB file for axes, a SAB file for swords, a SAB file for reavers etc etc.

i need to try this way. so i can storage massive data with a lesser number of files.

Link to comment

Yes, i was right, it was also a problem of too many SAB files. D:

note for modder: better make for a mod only few SAB files, every one for a category, that not hundreds of SAB files.

example. a sab file for lightsaber, a sab file for maces, one for axes, one for shields, one for melee swords one for vibroblades 

etc etc. D:

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...