Litcube's Universe

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
Huillam
Posts: 430
Joined: Fri, 16. Dec 11, 11:24
x4

Re: Litcube's Universe

Post by Huillam » Sun, 26. Apr 20, 09:13

I've been trying to force NPCs to undock from my PHQ without any success.
The issue was discussed in 2016 here: viewtopic.php?p=4640947#p4640947

While it looks like something pretty easy to fix (even for a me) I tried checking said script and it appears to be correctly referenced:

Code: Select all

START $Ship-> call script '!move.undock' :

Am I by any chance missing something super obvious here? Those squatters are annoying.


Edit: Apparently the line

Code: Select all

$Ship-> interrupt task 0 with script 'lib.interrupt' and priority 10000: arg1=null arg2=null arg3=null arg4=null
should be

Code: Select all

$Ship-> interrupt task 0 with script '!lib.interrupt' and priority 10000: arg1=null arg2=null arg3=null arg4=null
Yet that doesn't seem to work. I imagine that makes sense as the description for that file is "Does nothing!"

User avatar
Joubarbe
Posts: 4796
Joined: Tue, 31. Oct 06, 12:11
xr

Re: Litcube's Universe

Post by Joubarbe » Sun, 26. Apr 20, 09:53

That's wrong, it doesn't do nothing. !lib.interrupt (you're right, the exclamation point is important) is used to stop the task it's called upon. However, in your case, !move.undock takes precedence and runs on task 0, interrupting everything that was before running on that task.

The script you're talking about is Cmd.AuctionStation right? It only triggers when you sell the station. Also, !move.undock can take a while, and IIRC in vanilla LU, there's no safeties to make sure the ship has actually undocked. It can be stuck because of other ships executing an undocking manoeuvre at the same time. Your best move would be to undock them, and destroy them if they can't undock after some time.

EDIT: !lib.interrupt with an interrupting command doesn't do much indeed. Weird. This script should always be called directly on the task it needs to stop. It's useless in that case :)

Huillam
Posts: 430
Joined: Fri, 16. Dec 11, 11:24
x4

Re: Litcube's Universe

Post by Huillam » Sun, 26. Apr 20, 10:18

Joubarbe wrote:
Sun, 26. Apr 20, 09:53
The script you're talking about is Cmd.AuctionStation right? It only triggers when you sell the station. Also, !move.undock can take a while, and IIRC in vanilla LU, there's no safeties to make sure the ship has actually undocked. It can be stuck because of other ships executing an undocking manoeuvre at the same time. Your best move would be to undock them, and destroy them if they can't undock after some time.
Those are traders from races factions. Apparently they were on their way to my PHQ when I closed trades with NPC traders and they've been here for days (I tried switching my friend/foe settings, reopening trade but they keep idling there).

As Cmd.AuctionStation calls !move.undock, my hope was to fix that script and then write a proper one that call !move.undock without auctionning the station. Now, I'm under the impression that both scripts are working properly and that the ships themselves are the issue.


Edit:
Wrong guess. I've been running Graxster Force NPC Undocking through the script editor and those squatters do undock. There has to be a way (hopefully one I'll be confident won't mess with my save).

Edit 2:
By changing

Code: Select all

$Ship-> interrupt task 0 with script '!lib.interrupt' and priority 10000: arg1=null arg2=null arg3=null arg4=null
to

Code: Select all

$Ship-> interrupt task 0 with script '!move.undock' and priority 10000: arg1=null arg2=null arg3=null arg4=null
they did undock.
They're now idling in space but getting rid of them should be an issue.

Just to be sure: Such a small change won't break my save right? I mean it's a fix more than a change... Right?

Edit 3:
And now that I have reverted the change, the auction station thing still force those NPCs to undock. That makes no sense.

User avatar
Joubarbe
Posts: 4796
Joined: Tue, 31. Oct 06, 12:11
xr

Re: Litcube's Universe

Post by Joubarbe » Sun, 26. Apr 20, 11:51

Destroying them completely will not be an issue. These are job ships, they will artificially respawn somewhere else. Your save is ok.

Huillam
Posts: 430
Joined: Fri, 16. Dec 11, 11:24
x4

Re: Litcube's Universe

Post by Huillam » Sun, 26. Apr 20, 14:27

I was afraid of my modifications of an existing script as I've almost no knowledge of X3 scripting. But as I said even after reverting the change the NPC still undock when the station is auctioned so everything should be fine (and I probably failed to save my change after fixing the typo as that is the only explanation I can think of).
It took me almost seven hours but tomorrow I should be able to share my first contribution to the Litcube's Universe: A mod that force the NPCs to undock! Hourray!

Eetere
Posts: 7
Joined: Thu, 16. Apr 20, 01:09
x3ap

Re: Litcube's Universe

Post by Eetere » Sat, 2. May 20, 20:18

Hey there, i'm having a pretty serious issue that is making my game unplayable. I tried posting in the technical support page about it, but apparently that wasn't the right place to put it, so i'm going to copy and paste the stuff I posted there here.

I am taking massive reputation losses for no reason I can figure out. I am out of sector sitting in Y Beta. It doesn't matter if I use SETA or not. This is not a case of illegal goods because the Teladi still got angry even though I only have Ion Mine and Space Weed facilities for illegal goods. I do have rings of fire set up in varying systems, and it does seem to be only races with RoFs in them that get angry at me. The Terrans don't have a RoF in their territory and I have never had any trouble with them, even though I once had RoFs in their territory. I very frequently use the global command to reset friend/foe stuff but that never works. I even made a script to set my relations with all major factions to max and it instantly falls to -5 a few seconds later.

This issue began LONG after these changes, but I will still list them: I installed and uninstalled these mods: viewtopic.php?t=221081 and viewtopic.php?t=243418 and installed and have kept this mod: viewtopic.php?t=381439 on top of baseline LU. I had also built a Space Weed complex in Teladi space, but as mentioned above, the Teladi still get angry at me so it shouldn't be because of this.

This is my first game of X3:AP and this bug or "feature" is seriously ruining my game to the point where I will likely not play again despite the fun I have had up to this point if this issue can't be resolved. Please help me.

Huillam
Posts: 430
Joined: Fri, 16. Dec 11, 11:24
x4

Re: Litcube's Universe

Post by Huillam » Sat, 2. May 20, 20:26

Usually mod incompatibilities with LU build up behind the scene (which is why it is strongly advised to only use mods that were designed specifically for LU) and by the time you notice something is wrong your save is already messed up.

If you're absolutly certain that you removed every single file from the first two mods, you could try doing an export/import. If you have a doubt, do the same but on a clean install. That's your best bet but there's no guarantee.

User avatar
Joubarbe
Posts: 4796
Joined: Tue, 31. Oct 06, 12:11
xr

Re: Litcube's Universe

Post by Joubarbe » Sat, 2. May 20, 20:31

Did you check your friend/foe settings of your ships? If set to foe by mistake, one ship could fire its turrets against a friendly faction (even if Out Of Sector) and makes them angry.

Eetere
Posts: 7
Joined: Thu, 16. Apr 20, 01:09
x3ap

Re: Litcube's Universe

Post by Eetere » Sat, 2. May 20, 21:13

Huillam, I will try doing that next time I go to play the game. Hopefully it works.

Joubarbe, that is the weird thing, I have never once changed that from default and I frequently use the global friend/foe reset command yet this still happens.

Huillam
Posts: 430
Joined: Fri, 16. Dec 11, 11:24
x4

Re: Litcube's Universe

Post by Huillam » Sat, 2. May 20, 21:30

To go from 10 to -5 you'd have to lose at least 400k reputation (if you're using a script I imagine that may be closer to one million).
You'd have to shoot multiple M2s (as in many dozens) to go from rank -4 to -5. It shouldn't happen instantly and be it RoF or MLCC ships laying waste on the AI, Betty should spam you with "One of your ship is under attack" way before your reputation drop down allowing you to find the culprit.


To add to the list of possible culprits, if you installed the Cheat Package through the plugin manager you definitly want a clean install.

Eetere
Posts: 7
Joined: Thu, 16. Apr 20, 01:09
x3ap

Re: Litcube's Universe

Post by Eetere » Sat, 2. May 20, 22:42

Huillam, the only other mods I installed were those listed. But from what you say, something broke and as such I will be doing a clean install and export/import when I next go to play. I will post here again if that works or not.

Eetere
Posts: 7
Joined: Thu, 16. Apr 20, 01:09
x3ap

Re: Litcube's Universe

Post by Eetere » Sun, 3. May 20, 06:55

A complete reinstall has seemingly fixed the problem! I am however having a new issue, one of my SCH refuses to hold more then 500 million credits while another of the same size does not have the issue, and any credits i place into my HQ gets immediately transferred to my account no matter how much I put in. I have only approved LU submods installed, and they are all ones I had installed previously. Any idea what is going on?

EDIT: Direct deposit was on the mentioned stations for some reason. Removing that fixed it.

Eetere
Posts: 7
Joined: Thu, 16. Apr 20, 01:09
x3ap

Re: Litcube's Universe

Post by Eetere » Sun, 3. May 20, 10:09

So, while the major unplayable bugs have been fixed by the reinstall, i have just went from 10 rep with the argon to 4 within two minutes. I have looked throughout their space and found nothing that should be causing this. I am getting annoyed with this shit, though at least it is playable.

EDIT: Immediately found where stuff was happening, for some reason my RoF in Thuruk's Beard is killing civilian ships. I keep resetting the friend/foe thing yet this keeps happening.

Huillam
Posts: 430
Joined: Fri, 16. Dec 11, 11:24
x4

Re: Litcube's Universe

Post by Huillam » Sun, 3. May 20, 12:47

Eetere wrote:
Sun, 3. May 20, 10:09
EDIT: Immediately found where stuff was happening, for some reason my RoF in Thuruk's Beard is killing civilian ships. I keep resetting the friend/foe thing yet this keeps happening.
Good news: It's a well known issue with RoF bordering pirate sectors and that doesn't not indicate any issue with your save.
Bad news: I don't think anyone ever found a solution to that.

My guess is that some pirate ships are disguised a civilian ships (the kind of ships that change faction after a scan) and that for whathever reason the laser towers act as if they were well known pirate while the rest of the game threat them as civilian ships from a respectable faction. You'd best send a TL to gather the laser towers with the Retrieve Jump Beacon command.

Black0Ice
Posts: 1
Joined: Thu, 6. Sep 07, 11:57
x3

Re: Litcube's Universe

Post by Black0Ice » Thu, 7. May 20, 18:29

Hi I appear to be experiencing bugs and after extensive forum searching can't find answers. Hoping someone might be able to help. To clarify: I meticulously followed all the fresh install instructions and started a new game. I do not have any other mods/scripts installed.

Problem 1: No TL ships spawned at all. I managed to fix this with the export/import tool
Problem 2: The station agent software is not available for purchase anywhere in the universe (I can't find it, and apparently it's supposed to be common at equipment docks). I see other forum posts from people who have also experienced this but there's no current solution. Export/import did not fix this problem.

I really love this mod but can't play it without simple scripts like the dock agent working properly and I'm worried what else might be failing to generate/spawn.

Thanks

Huillam
Posts: 430
Joined: Fri, 16. Dec 11, 11:24
x4

Re: Litcube's Universe

Post by Huillam » Fri, 8. May 20, 19:44

During my last playthrough I had to manually look up at the station selling the CCDS MK3 for the software to be added to the encyclopedia. Hopefully it's the same issue here.
Here's the list of stations selling the software, check the nearest one and see if it's simply the encyclopedia not updating or if it's really missing:
https://ibb.co/Qvf1hBX
https://ibb.co/VS6M4NZ
https://ibb.co/WvC8BDY

If the software isn't available the only thing that come to my mind is a messed up install. Even if a clean install from scratch is pretty straightforward and is unlikely to be messed up as long as you don't rush things a new one is worth a try.

Eetere
Posts: 7
Joined: Thu, 16. Apr 20, 01:09
x3ap

Re: Litcube's Universe

Post by Eetere » Sat, 9. May 20, 08:38

Trying to set up MLCC for the first time, and while I have 36 M7(M) ships in various MLCC docks, only 16 have come to me to assist when I use the order. Is this as intended?

XParanid
Posts: 11
Joined: Sat, 5. Jan 13, 17:17
x4

Re: Litcube's Universe

Post by XParanid » Mon, 18. May 20, 10:23

Hi, first time setting up a fleet with MLCC. I have my HQ and a dock for reserve fighters and one for carriers ready.
I have some simple questions which I haven't found an answer yet:
- What does a carrier do when it retreats from Battle, when it has maybe some losses and a few fighters needs repairs?
Will it dock damaged ships at HQ or my reserve Dock. The losses are taken from reserve but the damaged ships where do they go?

Huillam
Posts: 430
Joined: Fri, 16. Dec 11, 11:24
x4

Re: Litcube's Universe

Post by Huillam » Tue, 19. May 20, 04:48

Carriers jump to the HQ, send their damaged ships there, go close to the reserve dock and once there call for replacements before finally going back home.

XParanid
Posts: 11
Joined: Sat, 5. Jan 13, 17:17
x4

Re: Litcube's Universe

Post by XParanid » Wed, 20. May 20, 07:11

Thank you Huillam,
that is verry good to hear. By the way I love this mod. The beauty lies in jumping with 3 carriers and a few M7 in a Xenon Sector in a beautiful line and cause havoc :twisted: .

But now i have a new question / request:
Is it possible to set up a MLCC group and limit the amount of ships jumping towards me?
Yesterday I had an encounter with a few pirates. Ok I sad I let my carriers jump in and handle it. But 3 Carriers attacking 15 Fighters and an m6 is a bit much I think.
It would be nice to setup a group to only handle 1 or 2 Carriers jump in (1 to have self chanlenge or 2 to go save, 3 is just overkill). @Litcube is there a setting for this or is something else planed? I know i could split different carriers from different races. But that would be rather difficult logistics wise at the moment than just limiting the number of ships jumping in.

Post Reply

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