Expensive Vanilla Scripts

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

User avatar
joelR
Posts: 2008
Joined: Mon, 9. Jul 07, 23:33
x3tc

Post by joelR »

Litcube wrote:
joelR wrote: 1. Can the logging be triggered if one of those files ended up in a different folder

2. Is it only those 4 ?

Gotta be in your game's script directory, the directory under which the .exe is launched.

There has only ever been 4 files, but at version 28 I compressed the follow script into a .pck. I thought you might have missed this and still had the .xml in your script dir, which is why I asked.

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

Post by Litcube »

joelR wrote:AHA! Thats it....
What's it?
User avatar
joelR
Posts: 2008
Joined: Mon, 9. Jul 07, 23:33
x3tc

Post by joelR »

Litcube wrote:
joelR wrote:AHA! Thats it....
What's it?
Oh sorry that was in response to your post.

I had the .pck and .xml in there. Im not sure how I managed to do that but its fixed. And it runs even better than before hahaha.
User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube »

joelR wrote:I had the .pck and .xml in there.
But did't I jus --.... But didn't we spend days.. ..


YOU GO TO YOUR ROOM
User avatar
joelR
Posts: 2008
Joined: Mon, 9. Jul 07, 23:33
x3tc

Post by joelR »

Litcube wrote:
joelR wrote:I had the .pck and .xml in there.
But did't I jus --.... But didn't we spend days.. ..


YOU GO TO YOUR ROOM
BHAHHA. Well I HAVE been working 14 hour days lately....

Seriously though. At least we know for certain now that the issue was me and not your scripts lol.
bobxii
Posts: 591
Joined: Mon, 9. Feb 09, 00:46
x3tc

Post by bobxii »

Haha I lol'd IRL hahaha
User avatar
THE_TrashMan
Posts: 723
Joined: Mon, 25. Apr 11, 12:05
x4

Post by THE_TrashMan »

Can haz scipts plz?

[ external image ]
- Burning with Awesomeness

- Pontifex Maximus Panaidia Est Canicula Infernalis
glenmcd
Posts: 920
Joined: Sat, 16. Oct 10, 11:07
x3tc

Post by glenmcd »

THE_TrashMan wrote:Can haz scipts plz?
There's a link to V0.29b on bottom of page 7 of this thread. Works nice for me.
User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube »

One of the neat side effects of this script is the efficiency of the wing command initiation. There's no waiting for loops, so the wings tend to synchronize a little better.

Here's a screenshot of a wing of about 25 pirates in a patrol. I happened upon them while Sunday driving through a pirate sector I haven't been to before.

[ external image ]

I had my ass handed to me with 3GJ of full shielding. They just unloaded everything at the same time.
shinyclef
Posts: 32
Joined: Sun, 2. Sep 07, 13:25

Post by shinyclef »

I've read every page of this thread in anticipation, and after keeping an eye on these forums for ages, I finally decided to post again to give my appreciation. If the results are as good as the testers have indicated, this is one of the most exciting scripts I've seen.

At the risk of being really annoying, I'm going to ask anyway...
Will it be difficult to use this in conjunction with, let's say... a big mod? :|
User avatar
joelR
Posts: 2008
Joined: Mon, 9. Jul 07, 23:33
x3tc

Post by joelR »

shinyclef wrote:I've read every page of this thread in anticipation, and after keeping an eye on these forums for ages, I finally decided to post again to give my appreciation. If the results are as good as the testers have indicated, this is one of the most exciting scripts I've seen.

At the risk of being really annoying, I'm going to ask anyway...
Will it be difficult to use this in conjunction with, let's say... a big mod? :|
Not sure what you mean by "a big mod" but If you go back to page 10 you'll see a giant list of mods and scripts that I use with this and have no issues that I am aware of.
glenmcd
Posts: 920
Joined: Sat, 16. Oct 10, 11:07
x3tc

Post by glenmcd »

I've been exploring an issue in which particular sectors (HQ) get filled with particular ships. For example in Legends Home, Argon Buster ships spawn at OTAS Shipyard and then dock at OTAS HQ. Their home is OTAS. They never get deleted and the sector eventually has hundreds of Argon Busters doing the same thing (nothing!). Once they fill up all docking points, they hang around the HQ. Extensive tests with and without other mods, new games and existing games point to follow replacement V0.29b. I've done some new starts where nothing has happened for hours, yet in other new starts I've seen up to 15 Argon Busters appear only seconds into the start. It's unfortunate that it's such a sporadic problem and that's one of the reasons it's taken me so long to pin it down to a single mod. If it wasn't for joelR having the same issue and also using follow replacement V0.29b, I would have waited until a few more days of (painful) testing.

@joelR: in an existing game, look for the Argon Busters in Legends Home. Watch the sector for a while to confirm that they are spawning in shipyard and fly to OTAS HQ only. Once confirmed, uninstall Litcubes follow replacement, reload the same save and watch the sector again. If the Busters stop spawning I'd call that an independant confirmation. If not then this will need something else to confirm / deny. Litcube perhaps you've got a game with Legends Home visible and with satellite? Look for docked Busters as well as Busters in space near HQ. If you don't have the issue in Legends Home but do in Heretics End or Thyns Excavation, try the above test there. In Thyns Excavation, you should see Split Scorpions breeding. I haven't tested all HQ sectors exhaustively yet.
User avatar
Jack08
Posts: 2993
Joined: Sun, 25. Dec 05, 10:42
x3tc

Post by Jack08 »

glenmcd, the problem in question is caused by the god engine, it can happen in many cases, but here a just a few:

Reason A):
When a ship dies, A signal script nullify the home base, because this was a job ship the job engine gets confused, and instantly spawns another one to take its place, however due to all this confusion the god engine spawns it without job information
in sort: the signal script is causing a number of ships to spawn directly proportional to the number that died

Reason B):
A (script)ship died with a home base set to a carrier, or station... Because it had a home base the god engine decided to create a new one to refill that slot on the home based ship - if that ship dies, the new ship floats in space for no reason and is ignored by the god engine


This is only 2 of the possible causes that i know of.

Likely Culprit:

Code: Select all

  if [THIS]->has same environment as $Lead
    if $Lead->is docking possible of [THIS]
>>>  [THIS]->set homebase to $Lead <<<<
      = [THIS]->call script '!ship.cmd.movestation.std' : object=$Lead 
      if [ENVIRONMENT] == $Lead 
        [THIS]->set pirate cover state to [FALSE]
        = wait 999999 ms
      end
      continue
    end
    [THIS]->set pirate cover state to [FALSE]
    = [THIS]->escort ship $Lead
  end
[ external image ]
"One sure mark of a fool is to dismiss anything that falls outside his experience as being impossible."
―Farengar Secret-Fire
User avatar
joelR
Posts: 2008
Joined: Mon, 9. Jul 07, 23:33
x3tc

Post by joelR »

Glen,

There seems to be a relationship to v29 and the issue were having. The problem only happens with v29. I tried it with the vanilla follow and it doesnt happen. I also tried deleting the terracorp HQ and they still spilled out of argon prime into HoL. Its worth noting that starting a new game with v29 i begin with roughly 12k running script processes. With vanilla move its 9k. The 12k quickly goes up. I stopped testing at 14k running processes. When i use a script to kill all npc ships there are still roughly 2k running processes. When killing ships with the vanilla move script its about 200.

Edit: i should mention that the ship spawning issue is in any sector with a HQ
glenmcd
Posts: 920
Joined: Sat, 16. Oct 10, 11:07
x3tc

Post by glenmcd »

joelR wrote:Glen,

There seems to be a relationship to v29 and the issue were having. The problem only happens with v29. I tried it with the vanilla follow and it doesnt happen. I also tried deleting the terracorp HQ and they still spilled out of argon prime into HoL. Its worth noting that starting a new game with v29 i begin with roughly 12k running script processes. With vanilla move its 9k. The 12k quickly goes up. I stopped testing at 14k running processes. When i use a script to kill all npc ships there are still roughly 2k running processes. When killing ships with the vanilla move script its about 200.
Wow that's a huge difference. I noticed the "nuisance" ships in Legends Home spawn immediately after kill all ships, but only when the game had reached that point that the issue was "active".
User avatar
Jack08
Posts: 2993
Joined: Sun, 25. Dec 05, 10:42
x3tc

Post by Jack08 »

well you could try commenting out the line i point out in my post...
[ external image ]
"One sure mark of a fool is to dismiss anything that falls outside his experience as being impossible."
―Farengar Secret-Fire
User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube »

Jack08 wrote:well you could try commenting out the line i point out in my post...
I'm going to run a test on this too. The line might not be necessary. I'm also experiencing the same thing Joel and Glen are reporting. I am likely the cause. I am sorry.
User avatar
joelR
Posts: 2008
Joined: Mon, 9. Jul 07, 23:33
x3tc

Post by joelR »

Thats why were testing it litcube! Im perfectly happy with ruining this savegame. Im just happy youre trying to improve the games performance and if that means discovering bugs like that then im glad to help. It is worth noting that in spite of the additional rogue ships the game still runs better.
User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube »

Vanilla Rewrite 0.30b:
[ external image ]

- Removed homebase assignments. Fixes confused job engine spawning corp HQ ships.
User avatar
joelR
Posts: 2008
Joined: Mon, 9. Jul 07, 23:33
x3tc

Post by joelR »

Litcube wrote:Vanilla Rewrite 0.30b:
[ external image ]

- Removed homebase assignments. Fixes confused job engine spawning corp HQ ships.
Im on it. Ill let you know if anything pops up.

Starting a new game.

EDIT: Litcube. Can you point me in the direction of a good tutorial for editing jobs? I just need to know what i'm looking at. Sadly I dont own Excel so im going to have to do some tweaking via notepad.

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