load text vs alloc array

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

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

Post Reply
Orfevs
Posts: 183
Joined: Thu, 22. Jan 09, 23:03
x3tc

load text vs alloc array

Post by Orfevs » Sat, 8. Feb 14, 02:42

Could someone tell me what difference it makes to load a text page vs loading the same page into arrays?
The arrays have a global scope and will remain.

Will the memory load be the same?
(After the initial script loses its scope, mind).
TCAN TC/AP Artificial Life, Menudriven Automated Ship/Station Namer
Spex: i7 4790K@4Ghz 16Gb DDR3 GTX970Strix(4Gb)
X:R 454 Hours. 15 hours unmodded.

User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube » Sat, 8. Feb 14, 16:05

Memory load is insignificantly higher with a load text page.

Orfevs
Posts: 183
Joined: Thu, 22. Jan 09, 23:03
x3tc

Post by Orfevs » Sat, 8. Feb 14, 20:04

Cool, thanks! Saves me a whole lot of work!
TCAN TC/AP Artificial Life, Menudriven Automated Ship/Station Namer
Spex: i7 4790K@4Ghz 16Gb DDR3 GTX970Strix(4Gb)
X:R 454 Hours. 15 hours unmodded.

User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube » Sat, 8. Feb 14, 21:21

I just realized I had mistyped what I intended to say.

Memory load is insignificantly higher with arrays.

Arrays store more data than what is apparent within the game. The engine has to store more data for an array (VALUE, TYPE - per element), than what loadtext uses.

Orfevs
Posts: 183
Joined: Thu, 22. Jan 09, 23:03
x3tc

Post by Orfevs » Sat, 8. Feb 14, 23:34

Still, it's that "insignificant" word that counts.

During the load process and moving to arrays.. 1+100 of them, will be more than double initially. Once the script loses its scope, it's back to the arrays only - that's assuming the loaded page indeed is unloaded.. which I'm a bit uncertain of.

If it keeps the page loaded, then I got my work set out for me after all.
101 ref pointers isn't all that much compared to the actual data included.
TCAN TC/AP Artificial Life, Menudriven Automated Ship/Station Namer
Spex: i7 4790K@4Ghz 16Gb DDR3 GTX970Strix(4Gb)
X:R 454 Hours. 15 hours unmodded.

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”