how to determine what scripts are run on a npc ship?

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

Thechosenone92
Posts: 29
Joined: Fri, 4. Feb 11, 09:54
x3ap

how to determine what scripts are run on a npc ship?

Post by Thechosenone92 »

hello, i am trying to determine what script is running on a particular npc ship. the ship in question is a Kha'ak Scout. the reason i am trying to find what scripts are running on it is because whenever this particular Kha'ak Scout is killed my game locks up, from my understanding that is because its trying to access a corrupt script. if that is not the case then what would be causing this lock up?
User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 25130
Joined: Sun, 2. Apr 06, 16:38
x4

Post by X2-Illuminatus »

Thechosenone92 wrote:how to determine what scripts are run on a npc ship?
Activate the script editor, then open it and set "Additional debug information" to On. Afterwards target the khaak ship, open its ship info menu and scroll down. You should see a list of scripts that are running on the ship.
Thechosenone92 wrote:if that is not the case then what would be causing this lock up?
Which scripts and mods are you using?
Nun verfügbar! X3: Farnham's Legacy - Ein neues Kapitel für einen alten Favoriten

Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)

Neuauflage der fünf X-Romane als Taschenbuch

The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!
Thechosenone92
Posts: 29
Joined: Fri, 4. Feb 11, 09:54
x3ap

Post by Thechosenone92 »

X2-Illuminatus wrote:
Thechosenone92 wrote:how to determine what scripts are run on a npc ship?
Activate the script editor, then open it and set "Additional debug information" to On. Afterwards target the khaak ship, open its ship info menu and scroll down. You should see a list of scripts that are running on the ship.
Thechosenone92 wrote:if that is not the case then what would be causing this lock up?
Which scripts and mods are you using?

[ external image ]

1-12=Vanilla
13=complex cleaner
14=SRM main
15=SRM hull med
16=CMOD
17=alpha ppc
18=SRM Trials
19=lowpolly roids
20=no ads/small rocks(sniper wolf mod from pui_
21=aldrinrockresize
22=shadders(ss_t_tc_performance_boost)
23=emp
24=nostation wrecks
25=comm range
26=black HUD
27=sunblade's flat galaxy map tri


yaki armada
USC merchant marines(merged with srm jobs)
tradeoverview
nofog/extra view distance
lost numbers
srm weapons dealers
srm shipyards
srm jobs
amurph0 shipyards
no ad signs
Morgans_CCExtension_0.9
missile safety
no rep loss from gates
enhanced equipment spawner
enhanced communication system
dockware manager
convoy control
cmod fac scripts
auto aim
ai ammo cheat
Anarkis Defense System
pirate guild
plot reset
out of system damage rebalance
MARS
numeric ranks
turbo booster (from the bonus pack)
mosquito missile defense (from the bonus pack)




wirtchaftshaendler
warenlogistiksoftware
waffensystem_codea
waffensystem_mefos
schifffunktionstasten
militaertransport
handelsvertretung
grundgehalt
befehlsbiblionthek
personaltransporter

sorry for all the german there from lucike

EDIT: i checked what scripts where running on the khaak scout, noting different from the other khaak scouts in the area

EDIT2: i have tried destroying all the other khaak scouts in the universe using X3 map by Scorp(to find them) and cycrow's cheat scripts (to destroy them) the only ones that cause my game to lock up are the ones in the unknown sector under menelaus' oasis. in the unknown sector in question is a 3 way battle fought by pirates atf and khaak. this battle was initiated by rrf (pirates vs unknown), in the message i receive from the pirates it says the sector was claimed from the Kha'ak although the initial fight was against unknown.
User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Re: how to determine what scripts are run on a npc ship?

Post by Gazz »

Thechosenone92 wrote:the reason i am trying to find what scripts are running on it is because whenever this particular Kha'ak Scout is killed my game locks up, from my understanding that is because its trying to access a corrupt script. if that is not the case then what would be causing this lock up?
Nope.
When the scout is destroyed, any and all scripts that are running on it are terminated. They don't get a chance to access anything.

Some other script (global or running on another object) must be observing that scout and apparently goes into an infinite loop without a wait when it is destroyed.

There is no direct way to show which script is looking at that particular object. All trial and error...

Maybe you can check the local variables that are saved on that scout. Many scripts leave a signature when they create objects.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
Thechosenone92
Posts: 29
Joined: Fri, 4. Feb 11, 09:54
x3ap

Re: how to determine what scripts are run on a npc ship?

Post by Thechosenone92 »

Gazz wrote:
Thechosenone92 wrote:the reason i am trying to find what scripts are running on it is because whenever this particular Kha'ak Scout is killed my game locks up, from my understanding that is because its trying to access a corrupt script. if that is not the case then what would be causing this lock up?
Nope.
When the scout is destroyed, any and all scripts that are running on it are terminated. They don't get a chance to access anything.

Some other script (global or running on another object) must be observing that scout and apparently goes into an infinite loop without a wait when it is destroyed.

There is no direct way to show which script is looking at that particular object. All trial and error...

Maybe you can check the local variables that are saved on that scout. Many scripts leave a signature when they create objects.
how would i go about doing that i tried

Code: Select all

$wasd = get player tracking aim
$ret = $wasd->get local variables: regular expression=[THIS]
write to log file 1234  append=$wasd  value=$ret
return null
with no avail it just returned null.

EDIT: i fixed my script my using

Code: Select all

$wasd = get player tracking aim
$ret = $wasd->get local variables: regular expression='.'
write to log file 1234  append=$ret  value=$ret
return null
however the ship that crashes my game wipes the log and returns null. there where a few others like this (70+ khaak scouts in the system only about 5 cause me to crash). some others actually returned data. any ideas?

EDIT2: i tried using JMCorp's kill all ships script located here and it actually destroyed the ships without a freeze! any idea what this means?

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