[X3LU] Phanon Plus 4.04

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

User avatar
ltdan81
Posts: 117
Joined: Thu, 23. Feb 12, 16:35
x3ap

Post by ltdan81 » Mon, 20. Jun 16, 06:40

I've been playing a clean start with LU v1.7 with Phanon plus 4.4 and got up to phanon level 7 (I think) when it bugged out on me...

I defeated the level by destroying ships and stations until Syndex? went bankrupt while I was hammering on their HQ.
At this point the cleanup bugged out and left several stations, I waited and waited and never got the completion message with reward.

I turned off the Phanon script in the AI settings, reint the scripts, saved and reloaded and nothing happened... I waited and still nothing.

I reinstalled the vanilla scripts, reinit/save/reloaded and presto!! the wipe sound effect was heard then the reward message soon followed.

So in conclusion, I think there is a bug in the Phanon Plus cleanup script. :(
Other wise this is a fun script... however it is a bit overpowering in the first few levels, I had to turn it off until after about 2 game days.

User avatar
dizzy
Posts: 1019
Joined: Sun, 26. Sep 10, 06:00
x4

Post by dizzy » Mon, 20. Jun 16, 20:27

If you check the global scripts list you should see al.Phanon.Tick running (when it seems stuck and not doing anything). If I'm right, that means you experienced the Phanon Plus got stuck bug that I encountered and reported in here already. If so, the Phanon may have seemed alive until you took their HQ but it's possible the main logic hanged some time ago, as most of the ships have their own separate logic and can function autonomously without having the Tick script work all the time.
X3LU 1.5.2/1.7.0 Youtube series with: IEX 1.5b + LUVi, SIaF r7 (previously also used Phanon Plus 4.02, Revelation Plus 1.04, Diverse Game Starts - LU Edition)
[ external image ]

Xo3oToC
Posts: 24
Joined: Sat, 27. Apr 13, 01:19

Post by Xo3oToC » Thu, 14. Jul 16, 01:46

Where is the global script list that you are talking about? Is it under Global Commands -> Script Editor -> Global Script Tasks (which is below Script Debugger Menu and above Help)? I see "al.Phanon.Main: null" in there.

I haven't been getting regular Phanon messages anymore for about 13 hours. So I was wondering if it is still running. I think it crashed because I killed all its TS ships and it is not making any new ones.

How do I restart Phanon? Do I need to restart the game?

User avatar
dizzy
Posts: 1019
Joined: Sun, 26. Sep 10, 06:00
x4

Post by dizzy » Thu, 14. Jul 16, 02:15

Xo3oToC wrote:Where is the global script list that you are talking about? Is it under Global Commands -> Script Editor -> Global Script Tasks (which is below Script Debugger Menu and above Help)? I see "al.Phanon.Main: null" in there.
Yeah, you shouldn't see it there, sounds like it's stuck.
I haven't been getting regular Phanon messages anymore for about 13 hours. So I was wondering if it is still running. I think it crashed because I killed all its TS ships and it is not making any new ones.

How do I restart Phanon? Do I need to restart the game?
I think you can kill that script (press Backspace while you have selected it) but it will likely leave the Phanon in a weird state. The cleanest mechanism is to do an E/I. Phanon will then be starting with a lot of resources (they get an initial boost every time you restart them) but hey, that adds to the challenge.

Since you already ran into this Phanon Plus bug and now likely have to E/I, I recommend that you simply re-install your LU so you have vanilla Phanon instead of Phanon Plus then perform the Import into this installation and so not risk running into this bug again but of course that's up to you.
X3LU 1.5.2/1.7.0 Youtube series with: IEX 1.5b + LUVi, SIaF r7 (previously also used Phanon Plus 4.02, Revelation Plus 1.04, Diverse Game Starts - LU Edition)
[ external image ]

Xo3oToC
Posts: 24
Joined: Sat, 27. Apr 13, 01:19

Post by Xo3oToC » Thu, 14. Jul 16, 04:42

memeics wrote:
Xo3oToC wrote:Where is the global script list that you are talking about? Is it under Global Commands -> Script Editor -> Global Script Tasks (which is below Script Debugger Menu and above Help)? I see "al.Phanon.Main: null" in there.
Yeah, you shouldn't see it there, sounds like it's stuck.
I haven't been getting regular Phanon messages anymore for about 13 hours. So I was wondering if it is still running. I think it crashed because I killed all its TS ships and it is not making any new ones.

How do I restart Phanon? Do I need to restart the game?
I think you can kill that script (press Backspace while you have selected it) but it will likely leave the Phanon in a weird state. The cleanest mechanism is to do an E/I. Phanon will then be starting with a lot of resources (they get an initial boost every time you restart them) but hey, that adds to the challenge.

Since you already ran into this Phanon Plus bug and now likely have to E/I, I recommend that you simply re-install your LU so you have vanilla Phanon instead of Phanon Plus then perform the Import into this installation and so not risk running into this bug again but of course that's up to you.
Good advice but I am not really ready to give up on Phanon Plus. I am going to play with it a little bit to see if I can catch the error. I think it's the same error I experienced years ago with the original Phanon. Not being able to figure out why just bugs hell out of me.

al.Phanon.Tick is not currently running. Global variable PhanonCorp.CheckTickerRunning is set to 1, so al.Phanon.Tick is exiting at AreweRunningAlready check. I believe the script crash because there are no TS (trader, miner, station agent) left. When I set PhanonCorp.CheckTickerRunning to 0, the script runs again and purchased 3 TS. I added bunch of debugging codes so maybe I'll figure out why it crash next time when it happens.

Xo3oToC
Posts: 24
Joined: Sat, 27. Apr 13, 01:19

Post by Xo3oToC » Thu, 14. Jul 16, 05:11

memeics wrote:
Xo3oToC wrote:Where is the global script list that you are talking about? Is it under Global Commands -> Script Editor -> Global Script Tasks (which is below Script Debugger Menu and above Help)? I see "al.Phanon.Main: null" in there.
Yeah, you shouldn't see it there, sounds like it's stuck.
I think I misunderstood. You mean to say that al.Phanon.Main in Global Script Tasks means that al.Phanon.Tick has crashed. al.Phanon.Tick doesn't actually show up in Global Script Tasks, instead it is al.Phanon.Main that shows up?

Xo3oToC
Posts: 24
Joined: Sat, 27. Apr 13, 01:19

Post by Xo3oToC » Thu, 14. Jul 16, 07:00

I think I found the bug. When most of Phanon's TS got killed. The number of TS is lower than some minimal amount and Phanon doesn't have the required money to buy new TS. It tries to sell its own ships to get the required money to buy more TS. This is when al.Phanon.Tick which calls al.Phanon.SetShopList which calls al.Phanon.JumpOut crashed. al.Phanon.JumpOut crashed because the reference object of the script ([THIS]) tries to kill itself.

In my case, [THIS] refers to a Phanon Laser Tower

Code: Select all

[THIS]-> destruct: show no explosion=0
Crashed, change 0 to [TRUE] also crash

whereas,

Code: Select all

$ShipCurrent-> destruct: show no explosion=[TRUE]
No crash.

Since I don't care about the special effect of "jump out of existence", I simply removed all calls to al.Phanon.JumpOut.
To fix the bug, search in al.Phanon.SetShopList and al.Phanon.CleanUp, where it says

Code: Select all

@ START $ShipCurrent-> call script 'al.Phanon.JumpOut' :
replace this with

Code: Select all

$ShipCurrent-> destruct: show no explosion=[TRUE]
Last edited by Xo3oToC on Thu, 14. Jul 16, 07:08, edited 1 time in total.

Xo3oToC
Posts: 24
Joined: Sat, 27. Apr 13, 01:19

Post by Xo3oToC » Thu, 14. Jul 16, 07:04

Also found an unrelated bug in al.Phanon.SetShopList, where

Code: Select all

$Wares = $StationBuilder-> get tradeable ware array from ship
should be

Code: Select all

$Wares = $Ship-> get tradeable ware array from ship
because $StationBuilder is not defined

User avatar
dizzy
Posts: 1019
Joined: Sun, 26. Sep 10, 06:00
x4

Post by dizzy » Fri, 15. Jul 16, 00:46

Try sending a private message to Wanabe maybe he could integrate these fixes.

And you're right, when I ran into the script hanging bug (that resulted in hundreds of stuck global Tick scripts) Wanabe added a check to simply exit the Tick script if one is already running. Of course that doesn't really solve the bug, it simply avoids having many global tasks when we hit it.
X3LU 1.5.2/1.7.0 Youtube series with: IEX 1.5b + LUVi, SIaF r7 (previously also used Phanon Plus 4.02, Revelation Plus 1.04, Diverse Game Starts - LU Edition)
[ external image ]

Xo3oToC
Posts: 24
Joined: Sat, 27. Apr 13, 01:19

Post by Xo3oToC » Fri, 15. Jul 16, 08:34

memeics wrote:Try sending a private message to Wanabe maybe he could integrate these fixes.

And you're right, when I ran into the script hanging bug (that resulted in hundreds of stuck global Tick scripts) Wanabe added a check to simply exit the Tick script if one is already running. Of course that doesn't really solve the bug, it simply avoids having many global tasks when we hit it.
PM sent.

myrmidon
Posts: 150
Joined: Mon, 19. Jan 04, 07:15
x3tc

Post by myrmidon » Thu, 21. Jul 16, 05:17

I would luv to try Phanon Plus again once the reported potential bugs have been vetted/patched in...

cidhk38
Posts: 10
Joined: Fri, 9. Dec 16, 13:51
x4

Post by cidhk38 » Thu, 18. May 17, 18:02

Hi everyone,

I'm at 2 days 18 hours in game and still at the first stage, I keep destroying the traders I was getting reports every 4 hours, but I'm not getting anything since more that 14 hours now. TandiTech is still in sanctuary of darkness, I'm still harrassing them from time to time, does anyone know why I don't get those reports?

User avatar
dizzy
Posts: 1019
Joined: Sun, 26. Sep 10, 06:00
x4

Post by dizzy » Thu, 18. May 17, 19:15

Sounds like you ran into the "Phanon Plus got stuck" bug. You will need to use the Export/Import procedure to get it unstuck. Might also consider simply reinstalling LU (in a clean directory) so that you get rid of Phanon Plus if this is your first LU playthrough (or if you're wondering what the hell does this guy mean by Export/Import procedure).
X3LU 1.5.2/1.7.0 Youtube series with: IEX 1.5b + LUVi, SIaF r7 (previously also used Phanon Plus 4.02, Revelation Plus 1.04, Diverse Game Starts - LU Edition)
[ external image ]

VincentTH
Posts: 6626
Joined: Wed, 6. Nov 02, 20:31
x4

Post by VincentTH » Tue, 23. May 17, 03:45

memeics wrote:Sounds like you ran into the "Phanon Plus got stuck" bug. You will need to use the Export/Import procedure to get it unstuck. Might also consider simply reinstalling LU (in a clean directory) so that you get rid of Phanon Plus if this is your first LU playthrough (or if you're wondering what the hell does this guy mean by Export/Import procedure).
What memeics said, but if you like Phanon+ features and want to keep it, then you have to do the following workaround:

0. YOu should have 2 installations of the game, one for regular Phanon, one with Phanon+
1. Start the game with Phanon+
2. When you get stuck (after you destroy their HQ, and they don't progress(i.e. you don't receive the bounty message/reward)), do an Export with the Phanon+, but import with Phanon regular.
3. After the import, you should receive the bounty for killing phase 1 Phanon, but before it respawns phase 2, load the save using Phanon+. You then proceed to Phanon+ phase 2.

Repeat the above for the next phase

Hope this helps

rw602
Posts: 3
Joined: Tue, 12. Mar 13, 16:02

Post by rw602 » Mon, 17. Jul 17, 18:38

Here is a fix for the phanon plus cleanup script, also commented out some unnecessary lines in al.phanon.jumpout and al.phanon.tick and included the fix mentioned earlier in this thread for al.phanon.setshoplist

Download containing the 4 scripts:
PhanonPlusFix

Tested and working so far over 6 generations of phanon plus, either destroying their HQ or enough ships to cause them to 'fold' and move to the next generation, and I am unable to reproduce the 'stuck' bug since making these changes - phanon remaining ships and factories are removed, bounty reward is given and they respawn on the next generation some hours later.
(Tested in LU 1.7.2, using latest phanon plus version 4.04)

User avatar
dizzy
Posts: 1019
Joined: Sun, 26. Sep 10, 06:00
x4

Post by dizzy » Mon, 17. Jul 17, 20:37

Nice!

Note that the author of Phanon+ wasn't able to reproduce any of these issues by simply using SETA and waiting long times. You'd have to actually play at regular game speed. But if you did that (got to generation 6 through regular playing) and didn't encounter the stuck issue it definitely makes a strong case that the issue would be fixed because AFAIK it happens with a sufficiently high probability in a full playthrough.
X3LU 1.5.2/1.7.0 Youtube series with: IEX 1.5b + LUVi, SIaF r7 (previously also used Phanon Plus 4.02, Revelation Plus 1.04, Diverse Game Starts - LU Edition)
[ external image ]

Wanabe
Posts: 82
Joined: Wed, 26. Dec 07, 08:05
x4

Post by Wanabe » Mon, 25. Sep 17, 01:01

A big thank you Xo3oToC and rw602.

I haven't looked at modding X3 for quite a while now but the whole thing stalling out on the Jumpout script makes sense to me as I do recall it stalling out sometimes during the cleanup script, hence some of the extra rubbish I added to the jumpout script. I've uploaded a version of PhanonPlus with rw602's script changes and Xo3oToC's suggestion for al.Phanon.SetShopList to hopefully prevent that from occurring in future.

Thanks again guys.

User avatar
dizzy
Posts: 1019
Joined: Sun, 26. Sep 10, 06:00
x4

Post by dizzy » Mon, 2. Oct 17, 22:25

Thanks for the update Wanabe, good to see you again!
X3LU 1.5.2/1.7.0 Youtube series with: IEX 1.5b + LUVi, SIaF r7 (previously also used Phanon Plus 4.02, Revelation Plus 1.04, Diverse Game Starts - LU Edition)
[ external image ]

Ubiquitus
Posts: 1
Joined: Thu, 18. Jan 18, 06:18

Post by Ubiquitus » Thu, 18. Jan 18, 06:30

I've read largely through both this and the original Phanon threads, and I was curious about two things; one conditional on the other. They are thus: I am aware the original was intended to be it's own standalone, but I'm unsure if this one is capable of that (I am NOT running LitCube at this time.). Furthermore, if it *IS* capable of running separate from Litcube's mod, considering how close this was developed WITH LCU in mind, which would be BETTER to install?

To help, I'm not running any sort of Overhaul mod. Not XRM, not LitCube, or any other kind. Heavily modded, yes, but based on vanilla largely.

Also, if it wouldn't be too much trouble, I've seen a number of issues and self-implemented fixes in both threads. If there's any particular one that seems to consolidate the best, would you mind linking that page number -- that I might peruse it for myself?

Lone Machete
Posts: 29
Joined: Sun, 3. Dec 17, 06:01
x3ap

Post by Lone Machete » Sat, 7. Apr 18, 22:26

I welcome the thought of a stronger Phanon Corp, that's why I have installed this mod. But the fact, that all of their ships jump out before even 2 Ocelot M2 can damage an M7M's hull makes fighting against them very unsatisfying since destroying an M2 is impossible as they return with full shields and hull each time. The only ships I can regularly destroy before they jump are M6, TS and TL. All others escape before they recieve hull damage (even form my 2 Ocelots shooting at them at the same time) In fact all I can do is siege their headquarters, having their fleet multiple times jumping in and out which is just unpleasant. Can i somehow change their jumping behavior?

Post Reply

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