[Jobs] SRM[8/6] and Xtra[20/4]

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

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

Mizuchi
Posts: 806
Joined: Thu, 10. Feb 11, 05:48

Post by Mizuchi »

From my experience, there is usually a brief (but noticable) pause every time you load any save when you have a number of scripts and mods installed while the game initializes the various routines or those scripts.

Especially, as Roger points out, on a new game start.

(You may also notice that your Gravidar is blank for the duration, and then suddenly blinks to life after the pause ends and the universe populates with jobs and life).

The more things you have installed, the longer the pause tends to be. It tends to take 10 seconds or so on a new game for the pause to end on my machine, and then around 5-10 seconds after loading a save.

It usually goes:

A few seconds of basic activity -> Pause -> Continue as normal.

The only time you really have to worry about the pause is, if on starting a new game, you don't have any equipment, money, or reputation set. :)

(Edit: Or if it takes a very long time. Each machine has a different personality and equipment setup, though, so I can't speak for machines other than my own.)

I can also mirror his point on the necessity of "Thereshallbewings", as I played X3TC for a year before even realizing you were "supposed" to enable the Script Editor.

I tend to enable it these days anyhow, though. :D
User avatar
Sam L.R. Griffiths
Posts: 10522
Joined: Fri, 12. Mar 04, 19:47
x4

Post by Sam L.R. Griffiths »

Mad_CatMk2 wrote:
Roger L.S. Griffiths wrote:...
I waited for about 10-20 seconds, but I can try to wait longer to see if its just my system bottlenecking.
I would leave it for upto say 5-10 mins before completly writing it off (should not take that long in theory but it would help to rule out a complete lock-up).
Mad_CatMk2 wrote:Some plugins require the save and reload, i.e. improved races and mars. But I agree that some don't need to.
I was not refering to the Save/Reload (aka second load), I was refering to the potentially unnecesary enabling of the script editor via changing your player name to "Thereshallbewings" (something I have managed to avoid in all my games - except when editing/debugging scripts).
Lenna (aka [SRK] The_Rabbit)

"Understanding is a three edged sword... your side, their side... and the Truth!" - J.J. Sheriden, Babylon 5 S4E6 T28:55

"May god stand between you and harm in all the dark places you must walk." - Ancient Egyption Proverb

"When eating an elephant take one bite at a time" - Creighton Abrams
paulwheeler
Posts: 8132
Joined: Tue, 19. Apr 05, 13:33
x3tc

Post by paulwheeler »

If more script writers utilised the good practises preached on this forum the pauses wouldn't be so much of an issue.

All setup scripts run every time you load a save or start a new game. Once a script begins, nothing else will start until that script gets to some kind of interrupt. It is good practise to include lots of wait commands in your scripts as this will allow other scripts to continue. The pauses are due to people not adding these wait commands in so the whole game comes to a standstill until the setup script completes (which is when most of the intensive stuff is usually done).

This is all documented in the Tutorials and Resources section of this forum.

In the SRM and CMOD scripts I have lots of waits throughout the scripts, including waits in every pass when they enter any kind of big loop.
Mad_CatMk2
Posts: 518
Joined: Sun, 22. Feb 09, 20:13
x4

Post by Mad_CatMk2 »

To all: I edited my earlier post, pardon my lack of patience

Thank you paul and Roger for all the advice/tips/hints whatnot!
I fly an OWP. What about you?
User avatar
Sam L.R. Griffiths
Posts: 10522
Joined: Fri, 12. Mar 04, 19:47
x4

Post by Sam L.R. Griffiths »

[OT]
paulwheeler wrote:...
Alternatively, you can use global variables the way they should be used and not perform resource intensive initialisation un-necessarily. In the main, what you say holds water but there are times where long load times are unavoidable. Depending on what a script is trying to achieve, then putting in waits may cause undesirable issues.

The X engine unfortunatly is inherently single threaded in nature and does not explicitly support the multi-threaded concepts of mutexes, semephores, and critical sections. Instead it relies on what is commonly referred to as co-operative multi-tasking in the scripting domain. In such an environment it is upto the implementer of a given script to decide if and when it is safe to allow task-switching while their script is running. Sometimes this may not be the case and unavoidable, regardless of what may be considered best practices.[/OT]
Lenna (aka [SRK] The_Rabbit)

"Understanding is a three edged sword... your side, their side... and the Truth!" - J.J. Sheriden, Babylon 5 S4E6 T28:55

"May god stand between you and harm in all the dark places you must walk." - Ancient Egyption Proverb

"When eating an elephant take one bite at a time" - Creighton Abrams
User avatar
Locksley
Posts: 371
Joined: Fri, 18. Mar 05, 16:26
x3tc

Post by Locksley »

vkerinav wrote:
Locksley wrote:
vkerinav wrote:Respawn times;

60 = 1 Min
3600 = 1 Hour
Don't know enough about jobs to say anything about it. Besides, how does it compare to what we are using now?
Yes, perspective; I believe the current longest spawn time is 4200 for heavy M2s. Times descend from there in five minute intervals, down to M5s at 300.
Sooo, done any tests on the shorter durations?
My game is fairly memory intensive; 1.8GB at it's lowest, peaking out now with a spanking new universe at 2.8-3.1GB.
It is going to be interesting to see how different jobs are going to affect my memory total. Right now I am running the heftiest jobs file and a few scripts that add a few ships (Military Transports, Improved Races).

I am wondering what others have the games memory running at?

Cheers!
Projects:
Onhold..... time time....
vkerinav
Posts: 632
Joined: Sun, 11. Apr 10, 21:38
x3ap

Post by vkerinav »

Its on hold, for the present. I really don't want to rebuild the Terran navy, only to find out that I need to make room for another ship or two, especially since my intention is to limit each race's fleet to a specific size.
User avatar
Locksley
Posts: 371
Joined: Fri, 18. Mar 05, 16:26
x3tc

Post by Locksley »

vkerinav wrote:Its on hold, for the present. I really don't want to rebuild the Terran navy, only to find out that I need to make room for another ship or two, especially since my intention is to limit each race's fleet to a specific size.
I heard that.
Well, the more you mull things over the better it will probably come out in the end :D

It really is an interesting part of the game engine. I will have to try to learn a bit more about jobs myself. For example, what ships are part of the military skirmish in vanilla X3.

Thanks for all your work vkerinav!

Cheers
Projects:
Onhold..... time time....
builder680
Posts: 1315
Joined: Mon, 14. Feb 11, 03:58
x4

Post by builder680 »

Ok, instead of trying to figure out the converter tool and other such complex things, I was lucky enough to have somebody make a (actually modify an existing) script that kills all AI ships in the universe.

Assuming I leave your (SRM Jobs - Unleashed No Civs version) jobs file in my \types folder, those ships will respawn over time and it won't have any overly negative effects on my universe?

Basically using this as an easy "reboot" of AI ships in my universe. The idea is to just ride out this jobs file until the new streamlined SRM jobs comes out.
vkerinav
Posts: 632
Joined: Sun, 11. Apr 10, 21:38
x3ap

Post by vkerinav »

It won't do anything harmful to Jobs. I can't really speak for anything else.
builder680
Posts: 1315
Joined: Mon, 14. Feb 11, 03:58
x4

Post by builder680 »

Alrighty. Thank you!
Mad_CatMk2
Posts: 518
Joined: Sun, 22. Feb 09, 20:13
x4

Post by Mad_CatMk2 »

hey vkerinav, is argon one not supposed to have any docked ships (or much of an escort?)
I fly an OWP. What about you?
vkerinav
Posts: 632
Joined: Sun, 11. Apr 10, 21:38
x3ap

Post by vkerinav »

Mad_CatMk2 wrote:hey vkerinav, is argon one not supposed to have any docked ships (or much of an escort?)
It should have a Cyclops escort, and a full complement of fighters.
Mad_CatMk2
Posts: 518
Joined: Sun, 22. Feb 09, 20:13
x4

Post by Mad_CatMk2 »

Hmm I don't see the cyclops or fighters, should I cheat script kill it and wait for it to respawn?
I fly an OWP. What about you?
vkerinav
Posts: 632
Joined: Sun, 11. Apr 10, 21:38
x3ap

Post by vkerinav »

I'm not sure if that'll help, but you can certainly try it.
Mad_CatMk2
Posts: 518
Joined: Sun, 22. Feb 09, 20:13
x4

Post by Mad_CatMk2 »

vkerinav wrote:I'm not sure if that'll help, but you can certainly try it.
Argon One is now reconstructed and has its compliment of fighters, a Cyclops and 2 M6 escorts.

However, I noticed it has 45 ships hangar capacity but it has 90 ships landed ? :o
I fly an OWP. What about you?
HotSake
Posts: 472
Joined: Sun, 3. Jan 10, 22:15
x3tc

Post by HotSake »

Mad_CatMk2 wrote:
vkerinav wrote:I'm not sure if that'll help, but you can certainly try it.
Argon One is now reconstructed and has its compliment of fighters, a Cyclops and 2 M6 escorts.

However, I noticed it has 45 ships hangar capacity but it has 90 ships landed ? :o
I remember that when the hanger sizes were dropped, the Jobs file was spawning too many fighters for them to hold. I thought they were were updated to match the new ship stats, however...
builder680
Posts: 1315
Joined: Mon, 14. Feb 11, 03:58
x4

Post by builder680 »

SRM Jobs 3.6b, Unleashed--NoCivs:

It seems the AI M7M's don't fire their missiles. The bazillion Yaki M7M's in Savage Spur are one example, but not the only one. Xenon G's are another. I scan them, and they're loaded up with missiles, but they charge me... and then just sit there and die... rather than try to keep/gain range and shoot at me. Not one missile has been fired at me by M7M AI.

I'm not sure if Jobs can fix that in itself, but is it possible to replace M7M spawns with something that will fight?
vkerinav
Posts: 632
Joined: Sun, 11. Apr 10, 21:38
x3ap

Post by vkerinav »

I'm not keen on removing enemy missile frigates. Not firing their missiles is a script problem, which needs to be solved on that end. Which means, I suppose, that if anyone knows a scripter with some free time, they should send her(or him) my way.
builder680
Posts: 1315
Joined: Mon, 14. Feb 11, 03:58
x4

Post by builder680 »

vkerinav wrote:I'm not keen on removing enemy missile frigates. Not firing their missiles is a script problem, which needs to be solved on that end. Which means, I suppose, that if anyone knows a scripter with some free time, they should send her(or him) my way.
Understandable. It would probably be a lot of work, I'm guessing.

I'm not sure which is going to be more work though, finding a scripter who wants to do this, or changing out spawned ships. I guess the only way to find out is to put out a "LF scripter" topic...

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