Discussion 0m/s seta lag IS combat freezes
Moderators: Scripting / Modding Moderators, Moderators for English X Forum
-
- Posts: 4254
- Joined: Fri, 20. Oct 06, 19:02
Alright, here's the complete list of offenders and safe capital ships:
Culprit:
M2: K, Titan, Akuma, Boreas, Brigantine, Odysseus, Phoenix, Python, Ray
M1: Condor, Raptor, Woden, Odin
Safe:
M2: Destroyer, Osaka, Tye, Valhalla
M1: J, Collossus, Galleon, Hoshi, Carrier, Shark, Tokyo, Zeus
I'm now trying to figure out a correlation.
Culprit:
M2: K, Titan, Akuma, Boreas, Brigantine, Odysseus, Phoenix, Python, Ray
M1: Condor, Raptor, Woden, Odin
Safe:
M2: Destroyer, Osaka, Tye, Valhalla
M1: J, Collossus, Galleon, Hoshi, Carrier, Shark, Tokyo, Zeus
I'm now trying to figure out a correlation.
-
- Sith Lord
- Posts: 8255
- Joined: Wed, 6. Nov 02, 20:31
bumping this is fine but "edit" is better than posting 2x in an hour 
you should also delve into the vanilla !.fight scripts. They are seriously cpu heavy as could be the turret scripts
I re-wrote the RRF fight scripts and this helped greatly.

you should also delve into the vanilla !.fight scripts. They are seriously cpu heavy as could be the turret scripts
I re-wrote the RRF fight scripts and this helped greatly.
LV's TC Scripts
Readme's For All My Scripts
I felt a great disturbance in the forum, Like millions of voices cried out in terror, then were silenced
si tacuisses, philosophus mansisses
Readme's For All My Scripts
I felt a great disturbance in the forum, Like millions of voices cried out in terror, then were silenced
si tacuisses, philosophus mansisses
-
- Posts: 4254
- Joined: Fri, 20. Oct 06, 19:02
Yup, I agree. But my tests ran above all ran the same fight and turret scripts. With 150 argon ships fighting the Xenon in a sector in a controlled test, I can SETA 600% with Js and not have a single 0/ms. If I do the same thing with Ks, I'll get 50% 0m/s, both K and J using the same scripts.LV wrote:you should also delve into the vanilla !.fight scripts. They are seriously cpu heavy as could be the turret scripts
My goal is to find out what's causing this.
I'll bet if you run an RFF fight in a sector without any capital ships except J or Colossus (listed safe ships), including anything smaller, you won't see a 0m/s.
=================
EDIT:
=================
I found the correllation, and have solved the 0m/s issue. Ask me how.

-
- Posts: 2035
- Joined: Wed, 18. Aug 10, 14:28
-
- Posts: 4254
- Joined: Fri, 20. Oct 06, 19:02
Thanks for biting. LV would destroy me in the face if I'd posted again. 
I am pretty sure I have solved the 0m/s issue:
I found the correlation between the above ships 'safe' and 'culprits', and surprisingly, it's the loadout. Ammunition based weapons are causing the 0m/s issue. I ran a script to generate every ship in the game to see if it was carrying an ammo weapon based on $ship -> add default items to ship:
This list should look very familiar. Most of those ships are in my culprit list. Gauss Cannons, Mass Drivers, Matter/AntiMatter launchers, and Energy Bolt Chainguns cause enough to a turret fire lag, that they stop other scripts from functioning long enough to fall out of the CPU queue.
I can spawn 300 ships, M1, M2, M3, M4, M5, M6, M8, all running vanilla fight scripts and turret scripts, and not have a single 0m/s provided none of them are equipped with ammo based weapons.
Throw in 3 capitals with ammo based weapons, and bam: 20% - 50% 0m/s at random intervals.
That's the command that causes the lag with ammo based weapons.

I am pretty sure I have solved the 0m/s issue:
I found the correlation between the above ships 'safe' and 'culprits', and surprisingly, it's the loadout. Ammunition based weapons are causing the 0m/s issue. I ran a script to generate every ship in the game to see if it was carrying an ammo weapon based on $ship -> add default items to ship:
Code: Select all
Array Offenders, Size: 113
0 Terran Spitfyre offended for Prototype Matter/Anti-Matter Launcher turret 1
1 Aegir offended for Matter/Anti-Matter Launcher turret 5
2 Aegir offended for Matter/Anti-Matter Launcher turret 4
3 Aegir offended for Matter/Anti-Matter Launcher turret 3
4 Aegir offended for Matter/Anti-Matter Launcher turret 2
5 Aegir offended for Matter/Anti-Matter Launcher turret 1
6 Argon Astraeus Hauler offended for Mass Driver turret 2
7 Argon Astraeus Hauler offended for Mass Driver turret 1
8 Teladi Tern Sentinel offended for Gauss Cannon turret 3
9 Teladi Tern Sentinel offended for Gauss Cannon turret 2
10 Teladi Tern Sentinel offended for Gauss Cannon turret 1
11 Yaki Akuma offended for Gauss Cannon turret 4
12 Yaki Akuma offended for Gauss Cannon turret 3
13 Yaki Akuma offended for Gauss Cannon turret 2
14 Yaki Akuma offended for Gauss Cannon turret 1
15 Argon Notus Hauler offended for Mass Driver turret 2
16 Argon Notus Hauler offended for Mass Driver turret 1
17 Teladi Shrike offended for Gauss Cannon turret 3
18 Teladi Shrike offended for Gauss Cannon turret 2
19 Teladi Shrike offended for Gauss Cannon turret 1
20 Terran Osaka offended for Matter/Anti-Matter Launcher turret 6
21 Terran Osaka offended for Matter/Anti-Matter Launcher turret 5
22 Terran Osaka offended for Matter/Anti-Matter Launcher turret 4
23 Terran Osaka offended for Matter/Anti-Matter Launcher turret 3
24 Terran Osaka offended for Matter/Anti-Matter Launcher turret 2
25 Terran Osaka offended for Matter/Anti-Matter Launcher turret 1
26 Terran Katana offended for Matter/Anti-Matter Launcher turret 2
27 Terran Katana offended for Matter/Anti-Matter Launcher turret 1
28 Vali offended for Matter/Anti-Matter Launcher turret 3
29 Vali offended for Matter/Anti-Matter Launcher turret 2
30 Vali offended for Matter/Anti-Matter Launcher turret 1
31 Terran Lasertower offended for Matter/Anti-Matter Launcher turret 1
32 Valhalla offended for Matter/Anti-Matter Launcher turret 6
33 Valhalla offended for Matter/Anti-Matter Launcher turret 5
34 Valhalla offended for Matter/Anti-Matter Launcher turret 4
35 Valhalla offended for Matter/Anti-Matter Launcher turret 3
36 Valhalla offended for Matter/Anti-Matter Launcher turret 2
37 Valhalla offended for Matter/Anti-Matter Launcher turret 1
38 Goner Truelight Seeker offended for Mass Driver turret 1
39 Terran Tokyo offended for Matter/Anti-Matter Launcher turret 6
40 Terran Tokyo offended for Matter/Anti-Matter Launcher turret 5
41 Terran Tokyo offended for Matter/Anti-Matter Launcher turret 4
42 Terran Tokyo offended for Matter/Anti-Matter Launcher turret 3
43 Terran Tokyo offended for Matter/Anti-Matter Launcher turret 2
44 Terran Tokyo offended for Matter/Anti-Matter Launcher turret 1
45 Tyr offended for Matter/Anti-Matter Launcher turret 5
46 Tyr offended for Matter/Anti-Matter Launcher turret 4
47 Tyr offended for Matter/Anti-Matter Launcher turret 3
48 Tyr offended for Matter/Anti-Matter Launcher turret 2
49 Tyr offended for Matter/Anti-Matter Launcher turret 1
50 Woden offended for Matter/Anti-Matter Launcher turret 6
51 Woden offended for Matter/Anti-Matter Launcher turret 5
52 Woden offended for Matter/Anti-Matter Launcher turret 4
53 Woden offended for Matter/Anti-Matter Launcher turret 3
54 Woden offended for Matter/Anti-Matter Launcher turret 2
55 Woden offended for Matter/Anti-Matter Launcher turret 1
56 Paranid Brigantine offended for Gauss Cannon turret 4
57 Paranid Brigantine offended for Gauss Cannon turret 3
58 Paranid Brigantine offended for Gauss Cannon turret 2
59 Paranid Brigantine offended for Gauss Cannon turret 1
60 Odin offended for Matter/Anti-Matter Launcher turret 6
61 Odin offended for Matter/Anti-Matter Launcher turret 5
62 Odin offended for Matter/Anti-Matter Launcher turret 4
63 Odin offended for Matter/Anti-Matter Launcher turret 3
64 Odin offended for Matter/Anti-Matter Launcher turret 2
65 Odin offended for Matter/Anti-Matter Launcher turret 1
66 Xenon K offended for Gauss Cannon turret 4
67 Xenon K offended for Gauss Cannon turret 3
68 Xenon K offended for Gauss Cannon turret 2
69 Xenon K offended for Gauss Cannon turret 1
70 Teladi Phoenix offended for Gauss Cannon turret 4
71 Teladi Phoenix offended for Gauss Cannon turret 3
72 Teladi Phoenix offended for Gauss Cannon turret 2
73 Teladi Phoenix offended for Gauss Cannon turret 1
74 Paranid Odysseus offended for Gauss Cannon turret 4
75 Paranid Odysseus offended for Gauss Cannon turret 3
76 Paranid Odysseus offended for Gauss Cannon turret 2
77 Paranid Odysseus offended for Gauss Cannon turret 1
78 Split Python offended for Mass Driver turret 5
79 Split Python offended for Gauss Cannon turret 4
80 Split Python offended for Gauss Cannon turret 3
81 Split Python offended for Gauss Cannon turret 2
82 Split Python offended for Gauss Cannon turret 1
83 Boron Ray offended for Gauss Cannon turret 4
84 Boron Ray offended for Gauss Cannon turret 3
85 Boron Ray offended for Gauss Cannon turret 2
86 Boron Ray offended for Gauss Cannon turret 1
87 Teladi Condor offended for Gauss Cannon turret 4
88 Teladi Condor offended for Gauss Cannon turret 3
89 Teladi Condor offended for Gauss Cannon turret 2
90 Teladi Condor offended for Gauss Cannon turret 1
91 Argon Boreas offended for Gauss Cannon turret 4
92 Argon Boreas offended for Gauss Cannon turret 3
93 Argon Boreas offended for Gauss Cannon turret 2
94 Argon Boreas offended for Gauss Cannon turret 1
95 Argon Titan offended for Gauss Cannon turret 4
96 Argon Titan offended for Gauss Cannon turret 3
97 Argon Titan offended for Gauss Cannon turret 2
98 Argon Titan offended for Gauss Cannon turret 1
99 Terran Yokohama offended for Matter/Anti-Matter Launcher turret 4
100 Terran Yokohama offended for Matter/Anti-Matter Launcher turret 3
101 Terran Yokohama offended for Matter/Anti-Matter Launcher turret 2
102 Terran Yokohama offended for Matter/Anti-Matter Launcher turret 1
103 Split Raptor offended for Gauss Cannon turret 4
104 Split Raptor offended for Gauss Cannon turret 3
105 Split Raptor offended for Gauss Cannon turret 2
106 Split Raptor offended for Gauss Cannon turret 1
107 Skirnir offended for Matter/Anti-Matter Launcher turret 3
108 Skirnir offended for Matter/Anti-Matter Launcher turret 2
109 Skirnir offended for Matter/Anti-Matter Launcher turret 1
110 Terran Mobile Mining Base-Ship offended for Matter/Anti-Matter Launcher turret 3
111 Terran Mobile Mining Base-Ship offended for Matter/Anti-Matter Launcher turret 2
112 Terran Mobile Mining Base-Ship offended for Matter/Anti-Matter Launcher turret 1
This list should look very familiar. Most of those ships are in my culprit list. Gauss Cannons, Mass Drivers, Matter/AntiMatter launchers, and Energy Bolt Chainguns cause enough to a turret fire lag, that they stop other scripts from functioning long enough to fall out of the CPU queue.
I can spawn 300 ships, M1, M2, M3, M4, M5, M6, M8, all running vanilla fight scripts and turret scripts, and not have a single 0m/s provided none of them are equipped with ammo based weapons.
Throw in 3 capitals with ammo based weapons, and bam: 20% - 50% 0m/s at random intervals.
Code: Select all
= [THIS]->fire lasers on target $victim using turret $turretid
-
- Posts: 7754
- Joined: Mon, 12. Oct 09, 21:54
-
- Posts: 2035
- Joined: Wed, 18. Aug 10, 14:28
-
- Posts: 4254
- Joined: Fri, 20. Oct 06, 19:02
Good question.
I just ran a test with 100 versus 100 mamba sentinels all equipped with only mass drivers (there's no turrets in these).
With mass drivers: Averaged 5 - 12 0m/s
With PACs: Absolutely no 0m/s.
While the effect and cause are still there, it's probably minimised by the reduced length in time the mambas are lined up to fire.
So yes. As the main gun is a turret, all ammo based usage causes this.
I just ran a test with 100 versus 100 mamba sentinels all equipped with only mass drivers (there's no turrets in these).
With mass drivers: Averaged 5 - 12 0m/s
With PACs: Absolutely no 0m/s.
While the effect and cause are still there, it's probably minimised by the reduced length in time the mambas are lined up to fire.
So yes. As the main gun is a turret, all ammo based usage causes this.
-
- Posts: 2035
- Joined: Wed, 18. Aug 10, 14:28
Well that's a bit of a problem then...
Especially seeing as I altered stats to increase the ammo based weapons viability compared to the laser based weapons.
That being the case I'll just disable ammo usage on them until it can be fixed
EDIT: On a semi-related note, could you look into Beam weapons at the same time? The FPS lag they generate is way beyond the actual poly count used and causes tremendous slow down ingame...
Especially seeing as I altered stats to increase the ammo based weapons viability compared to the laser based weapons.
That being the case I'll just disable ammo usage on them until it can be fixed

EDIT: On a semi-related note, could you look into Beam weapons at the same time? The FPS lag they generate is way beyond the actual poly count used and causes tremendous slow down ingame...
"If you’re not prepared to be wrong, you’ll never come up with anything original."
Sir Ken Robinson
Sir Ken Robinson
-
- Posts: 1383
- Joined: Sun, 25. Dec 05, 10:42
-
- Posts: 7150
- Joined: Fri, 8. Apr 05, 19:09
@Topic
I doubt that it's only the ammo based weapons. I've had this issue before as well and there was no fight going on at all in that sector. I deemed the cause to be the many script I had installed, which turned out to be true as after I deinstalled a bunch, I could reload the savegame and didn't notice any 0 m/s anymore.
As for solving the problem with ammo based weapons, I think Gazz wrote a script a while back to give NPC ships unlimited ammo. That would probably be the simplest solution to the problem. That is of course, if this issue is due to ships not having ammo to fire. If it's another problem with ammo-based weapons then the unlimited ammo obviously isn't going to do much.
I doubt that it's only the ammo based weapons. I've had this issue before as well and there was no fight going on at all in that sector. I deemed the cause to be the many script I had installed, which turned out to be true as after I deinstalled a bunch, I could reload the savegame and didn't notice any 0 m/s anymore.
As for solving the problem with ammo based weapons, I think Gazz wrote a script a while back to give NPC ships unlimited ammo. That would probably be the simplest solution to the problem. That is of course, if this issue is due to ships not having ammo to fire. If it's another problem with ammo-based weapons then the unlimited ammo obviously isn't going to do much.

Beam weapons are a totally different thing from what I can tell. The problem here is usually the continuous impact effect that has to be displayed when a ship is hit. But I'm no expert on that field.TrixX wrote:EDIT: On a semi-related note, could you look into Beam weapons at the same time? The FPS lag they generate is way beyond the actual poly count used and causes tremendous slow down ingame...
-
- Posts: 4254
- Joined: Fri, 20. Oct 06, 19:02
Hi, Enenra! While you can get this issue with a poop load of poorly written scripts, in a vanilla environment, or with a few well written scripts, this issue should not occur. However, in a vanilla environment, ammo based weapons do exist, and cause the 0 m/s issue. The ammo based cause is an unavoidable condition. Lumping your game with poorly written scripts is entirely avoidable.enenra wrote: I doubt that it's only the ammo based weapons. I've had this issue before as well and there was no fight going on at all in that sector. I deemed the cause to be the many script I had installed, which turned out to be true as after I deinstalled a bunch, I could reload the savegame and didn't notice any 0 m/s anymore.
You're latter assertion is correct. The only way to remedy this issue is to remove the ammunition requirement from TBullets.txt.enenra wrote: As for solving the problem with ammo based weapons, I think Gazz wrote a script a while back to give NPC ships unlimited ammo. That would probably be the simplest solution to the problem. That is of course, if this issue is due to ships not having ammo to fire. If it's another problem with ammo-based weapons then the unlimited ammo obviously isn't going to do much.
TrixX, are you asking from a standpoint of the 0 m/s issue? There is no 0m/s issue with beam weapons. I tested this. There was some FPS drop, but it's important to note that:TrixX wrote:EDIT: On a semi-related note, could you look into Beam weapons at the same time? The FPS lag they generate is way beyond the actual poly count used and causes tremendous slow down ingame...
Very low FPS does NOT have anything to do with the 0 m/s issue. In fact, the two are experiences mututally exclusive of each other. When the 0 m/s issue is present, depending on the severity, you'll actually experience an increase in FPS, as the ships are paused, and not doing anything.
These issues are all non-SETA. The ammo based 0 m/s issue doesn't require SETA to present.nap_rz wrote:pardon me but why would anyone turning SETA on during IS massive combat situation except for running away?
-
- Posts: 285
- Joined: Sun, 8. Nov 09, 18:41
A bit old and i'm not up enough on scripts to know if my idea is relevant but:
Couldn;t you solve the issue by making a script run that checks ammo status every few seconds and as soon as the total drops to 1 unit of the ammo item remaining it sets the turrets orders to "none" and sends an output to the standard turret orders script that tells it to ignore that turret till the flag is removed.
Then set the initial fast traking ammo counter script to disable itself and enable a second script that checks ammo status any time the contents of the freight bay change. If it gets more ammo somehow it will then re-enable the turret and fast check script. Preferablly it should set the turret to it's old orders.
ALso i saw several people saying they'd put together cleaned up and seperated out scripts that gave significant scripting overhead performance improvments. I'm running a modified game myself. A mixture of a self made mod and 3 scripts, (cheat mod, race rep display mod, and scorps mapping mod), and since i installed the 3 scripts i've noticed my OOS ships tend to freeze up if i look at them in the map, (they run fine if i don;t watch them though).
Only one IS issue so far, (autopiliot tends to come to a dead halt when using SETA after avoding somthing).
Couldn;t you solve the issue by making a script run that checks ammo status every few seconds and as soon as the total drops to 1 unit of the ammo item remaining it sets the turrets orders to "none" and sends an output to the standard turret orders script that tells it to ignore that turret till the flag is removed.
Then set the initial fast traking ammo counter script to disable itself and enable a second script that checks ammo status any time the contents of the freight bay change. If it gets more ammo somehow it will then re-enable the turret and fast check script. Preferablly it should set the turret to it's old orders.
ALso i saw several people saying they'd put together cleaned up and seperated out scripts that gave significant scripting overhead performance improvments. I'm running a modified game myself. A mixture of a self made mod and 3 scripts, (cheat mod, race rep display mod, and scorps mapping mod), and since i installed the 3 scripts i've noticed my OOS ships tend to freeze up if i look at them in the map, (they run fine if i don;t watch them though).
Only one IS issue so far, (autopiliot tends to come to a dead halt when using SETA after avoding somthing).
-
- Posts: 1383
- Joined: Sun, 25. Dec 05, 10:42
-
- Posts: 4254
- Joined: Fri, 20. Oct 06, 19:02
@Carl99:
Your idea is a good one, however, it won't solve the issue. The issues isn't caused by the turrets not having ammo. The freeze happens due to ammo based weapons firing, and not just from absence of ammo in an ammo based weapon. Enenra said something similar one post above yours.
@nap_rz:
It's possible you can experience this when there's a stack overflow of scripts (too many scripts waiting for their turn to fire), but in a properly written environment, this shouldn't happen.
This freeze happens more than people realize. I watched a few videos of a tournament that happened in the X-Universe forum, and in every one, I saw the 0 m/s issue. Oddly, all 50 or so people in the thread didn't make mention of it or see it.
Your idea is a good one, however, it won't solve the issue. The issues isn't caused by the turrets not having ammo. The freeze happens due to ammo based weapons firing, and not just from absence of ammo in an ammo based weapon. Enenra said something similar one post above yours.
@nap_rz:
It's possible you can experience this when there's a stack overflow of scripts (too many scripts waiting for their turn to fire), but in a properly written environment, this shouldn't happen.
This freeze happens more than people realize. I watched a few videos of a tournament that happened in the X-Universe forum, and in every one, I saw the 0 m/s issue. Oddly, all 50 or so people in the thread didn't make mention of it or see it.
-
- Posts: 472
- Joined: Sun, 3. Jan 10, 22:15
Any insight into why, exactly, firing ammo-based weapons causes other scripts to drop out of the queue? Is there some kind of cascading series of signals and calls relating to ammo/cargo that could seize the script engine? It seems odd that just a few ships with ammo-based weapons can cause problems of this magnitude.
-
- Posts: 4254
- Joined: Fri, 20. Oct 06, 19:02
-
- Posts: 285
- Joined: Sun, 8. Nov 09, 18:41
Ahh, sorry, i miss read it as being down to ammo based weapons which are ut of amo atempting to fire.@Carl99:
Your idea is a good one, however, it won't solve the issue. The issues isn't caused by the turrets not having ammo. The freeze happens due to ammo based weapons firing, and not just from absence of ammo in an ammo based weapon. Enenra said something similar one post above yours.
It's probably down then to whatever code eithier A) checks the weapn has ammo to fire with when a fire command is given, or B) moves the counter down one notch with every shot, possibbly both. I'd guess it's because one script has to run per weapon being fired, effectivlly multiplying the scripting overhead by several times the normal numbers.
To determine if it's B, simply re-run the tests with two diffrent ammo using weapons, Say EBC's and Mass drivers.
Also sorry to bug you with this but not getting any other anwsers anywhere else i asked:
Is there any threads out there explaining scripting basics. What i need really is:
1. A tutorioul for getting a script in game once written.
2. A tutorioul for defining the target. omone's allready given me some basics here but a more detaild formating description would be helpful, (as i understand it define a sector via it's in game coordinates, then define a target by it's ID within that sector).
3. A list or somthing like of the avalibile commands, their effects, and the format they have to be placed in.
-
- Posts: 4254
- Joined: Fri, 20. Oct 06, 19:02
-
- Posts: 285
- Joined: Sun, 8. Nov 09, 18:41