[Problem] Max number of ships in sector?

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
edwardecl
Posts: 93
Joined: Mon, 8. Dec 08, 16:06
x3tc

[Problem] Max number of ships in sector?

Post by edwardecl » Sat, 21. Jan 12, 02:21

I was messing about, and thought what happens if I spawn all pirate in the universe into my sector...

So I created a script to spawn every pirate to my location in a cube formation 1k spaced apart.

It was good idea, until the game crashed that is, and that made me sad. So I thought maybe if I spawn them in another sector then jump to that sector. So I run my script again but in a sector another with one of my advanced satellites in it so I could see them spawn. All the pirates magically appeared in the correct cube formation and the game did not crash, Yay I thought

So I thought I know lets jump in and see what 2001 ships looks like. So my ship jumped... ... and that was it, the game hung.

Is there something that the AI might be doing to hang the game on me entering the sector?

I tried limiting it to 100 ships but it still crashed, 37 ships (moved all my own ships to me)... crash, but 20 works fine. All the ships I spawned were {movable ship} so no squash mines or anything like that, although a defence platform did move. But that does not explain why my own ships crash it.

Or is using "$target->put into environment $sector" not a great idea with lots of ships? I did try turning off the collision detection for all moved ships but hat did not help.

Or is moving docked ships a bad idea? (just though of that while writing this post) I don't think there are 2001 flying pirate ships (I could be wrong).

User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz » Sat, 21. Jan 12, 02:24

All those models and textures are killing X3. You need to give the memory management time to deal with it and put a WAIT between those spawns / put.environment insctructions.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.

edwardecl
Posts: 93
Joined: Mon, 8. Dec 08, 16:06
x3tc

Post by edwardecl » Sat, 21. Jan 12, 06:04

I did try that up to 500ms, but like I said I can spawn those ships instantly when out of sector, just when you enter = :( I did wait 2 mins for the sector to load but I gave up.

I might try omitting docked ships when I work out how, the only thing I can think of that would freeze the game (I know when I run that command on myself while docked it acts like the ship is still docked).

So there is no hard limit on the number of ships though?

Post Reply

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