[REQ] Need script to find NPC (spoilers)

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
kilaan
Posts: 114
Joined: Mon, 26. Dec 05, 05:21
x3tc

[REQ] Need script to find NPC (spoilers)

Post by kilaan » Mon, 27. Oct 08, 06:01

Was playing the Terran Campaign and it turns out I did something wrong somewhere and the Terran storyline is bricked.
Spoiler
Show
I need to find Sgt Pearle and I need him to undock from whatever station he/she is at so I can pick him up to continue the story.
In the technical help section someone made a base script of what was needed but I really don't have the patience or motivation to try to figure it out myself myself (tried for an hour)

Link to thread : http://80.237.211.54/viewtopic.php?t=21 ... d705eae768

basic code to find him :

Code: Select all

Script glen.findpearle 
Version: 0 
for Script Engine Version: 41 

Description 
Description 
Arguments 
1: sector , Var/Sector , 'sector to search in' 
Source Text 

001   if $sector == null 
002   |return null 
003   end 
004    
005   $shiptype = Space Suit 
006   $findflags = [Find.Nearest] | [Find.Multiple] 
007    
008   $stations =  find station: sector=$sector class or type=null race=null flags=$findflags refobj=[THIS] maxdist=null maxnum=20 refpos=null 
009    
010   if $stations == null 
011   |return null 
012   end 
013    
014   $count =  size of array $stations 
015    
016   $iStation = 0 
017   while $iStation < $count 
018   |$station = $stations[$iStation] 
019   |if $station != null 
020   || 
021   ||$ship = $station -> find ship: class or type=$shiptype race=null flags=0 refobj=$station maxnum=1  with homebase=null 
022   || 
023   ||$station.name = $station -> get name 
024   ||$sector.name = $sector -> get name 
025   || 
026   ||if $ship != null 
027   |||write to player logbook: printf: fmt='found spacesuit at sector '%s' station '%s'', $sector.name, $station.name, null, null, null 
028   ||end 
029   || 
030   || 
031   |end 
032   |inc $iStation = 
033   end 
034   return null 
and basic code to boot him from the station he is residing in :

Code: Select all

Script glen.ejectpearle 
Version: 0 
for Script Engine Version: 41 

Description 
Description 
Arguments 
1: station , Var/Station , 'station' 
Source Text 

001   $pearle = $station -> find ship: class or type=Space Suit race=Terran flags=0 refobj=$station maxnum=1  with homebase=null 
002   if $pearle != null 
003 @ |= $pearle -> move to position: x=0 y=0 z=0 with precision 1000 m 
004   end 
005   return null
Not sure how much that helps. All I want it a downloadable script I can download and run and continue on with the story.
Oh Sgt. Pearle, where art thou

Free Trade Inn
Posts: 1758
Joined: Tue, 9. Dec 03, 15:29
x3tc

Post by Free Trade Inn » Mon, 3. Nov 08, 02:50

OK I found him how do I use the script to get him out?

FTI

Lancefighter
Posts: 3144
Joined: Sun, 19. Dec 04, 02:41
x4

Post by Lancefighter » Mon, 3. Nov 08, 04:59

Run the second script that was posted above from the script editor. It will tell you to pick a ship or station or null; this is the ship or station the script will run on. Hit null here.
Then it will ask you for another station; this is the one that you actually need to pick the station for. Select the station he is hiding in and hit enter... he should get the boot now.

Free Trade Inn
Posts: 1758
Joined: Tue, 9. Dec 03, 15:29
x3tc

Post by Free Trade Inn » Mon, 3. Nov 08, 06:35

I ended up using a different script but thank you anyway.

FTI

Davidov4
Posts: 43
Joined: Sun, 23. Sep 07, 06:01
x3tc

Post by Davidov4 » Sun, 28. Dec 08, 23:11

So how do I use this code?

Edit: So it turns out you dont need this as the god engine will respawn him eventually in a sector that the player ship is in. I found my replacement in Omicron Lyrae you just have to check the info of any spaesuits floating around.

hawklanzs
Posts: 13
Joined: Wed, 10. Aug 05, 06:14
x2

Post by hawklanzs » Tue, 30. Dec 08, 13:12

how do i run this script?? what do i type in the game to get the console?

kelmen
Posts: 308
Joined: Tue, 9. Dec 08, 15:11

Post by kelmen » Tue, 10. Feb 09, 09:18

Anyone know where can I dl this find-pearle script?

I try to manually type in the code using script editor, but can't even figure out how to "type" in the 1st "if" statement!

kelmen
Posts: 308
Joined: Tue, 9. Dec 08, 15:11

Post by kelmen » Wed, 11. Feb 09, 16:15

http://www.aimini.net/view/?fid=FClESpWPC87QM3hJz7SS

I chg created that script, modify to include searching the guy in open space.

run the script
when prompt for Ship or Station, select null (dunno why got prompted this)
then press Enter
click Select Sector, and the script will search all 10 jump-range sectors that you explored

User avatar
Jaga_Telesin
Posts: 435
Joined: Sat, 16. Sep 06, 22:48
x4

Post by Jaga_Telesin » Thu, 19. Feb 09, 22:01

kelmen wrote:http://www.aimini.net/view/?fid=FClESpWPC87QM3hJz7SS

I chg created that script, modify to include searching the guy in open space.

run the script
when prompt for Ship or Station, select null (dunno why got prompted this)
then press Enter
click Select Sector, and the script will search all 10 jump-range sectors that you explored
Any chance of placing this on a free host that doesn't require registration? Aimini isn't sending out confirmation emails, and I'm not in the mood to try 5 different emails with them.

FileFront is a great way to share files for free, and downloaders don't have to register.

Of course, we wouldn't have had to bother with this at all, had Egosoft either: 1) Written a concise and accurate mission briefing that included mention of Pearle, or 2) Actually tested the mission with someone who didn't write it.

User avatar
Jaga_Telesin
Posts: 435
Joined: Sat, 16. Sep 06, 22:48
x4

Post by Jaga_Telesin » Thu, 19. Feb 09, 22:05

Davidov4 wrote:Edit: So it turns out you dont need this as the god engine will respawn him eventually in a sector that the player ship is in. I found my replacement in Omicron Lyrae you just have to check the info of any spaesuits floating around.
Define "eventually". I've been sitting in a sector with SETA on 700% for nearly an hour now, and am getting eye strain trying to watch for any astronauts floating around. i.e. it hasn't spawned him in my game for roughly 7 hours without moving.

This is the kind of bug that can convince players not only to quit playing a game, but to never play a game from the author/publisher again. Amazingly frustrating, and there's no readily-available fix script for download.

'bout ready to give up here...

Davidov4
Posts: 43
Joined: Sun, 23. Sep 07, 06:01
x3tc

Post by Davidov4 » Fri, 20. Feb 09, 22:20

try leaving and re-entering the sector (maybe a few times) and check the whole sector and he should appear. I don't know the time frame and I understand the frustration as I had started a new game with a different start before I decided I would check one last time and I happened to see an astronaut and checked who he was and found it was pearle. I'm sorry that this may not be of much more help, but he will respawn somewhere nearby.

kelmen
Posts: 308
Joined: Tue, 9. Dec 08, 15:11

Post by kelmen » Mon, 2. Mar 09, 14:03

http://files.filefront.com/FindPearlexm ... einfo.html

uploaded onto filefront as suggest.

i didn't realize aimini need registration

mythal101
Posts: 8
Joined: Mon, 6. Dec 10, 11:32

how to use scripts?

Post by mythal101 » Mon, 6. Dec 10, 11:39

sorry for posting this question here, if it is answered elsewhere...
however i will first say that i have spent the last 3 days searching google and these forums for a straight forward answer to this question.

and that is:
how do you actually make use of these scripts?
i have tried saving this file as an .xml file in my /scripts/ directory but it does not show up in-game. ive tried starting/restarting the game.

is there a tool or something that i can use to copy/paste this code into and it will produce a .spk or .pck file for me that i can import into the game?

i have the x-plugin manager (the new "lite" version which is the only one ive found available) but it has no method to import plain scripts.

the old x-plugin manager that was for X3R has a script import, but i cant use it for X3TC

thanks for answering if you are able.
i am having this problem with pearle on a very old save game, i havent played X3TC for about a year now and i started it up again, went to continue my terran plot and encountered this same problem. (stuck on "fly to family zyarth")
so im going to either have to find him or use the plot reset script because most of my 4+ days playtime on this savegame were spent building up my empire and i have way too many industry complex hubs and a fleet of cruisers/carriers/battleships to start over.

mythal101
Posts: 8
Joined: Mon, 6. Dec 10, 11:32

Post by mythal101 » Fri, 10. Dec 10, 16:42

nevermind to the above post.
ive resulted to finally using plot resetters.

THE GOOD NEWS is that using plot reset and resetting the terran plot to SCENE 4 will put you right at that exact mission of picking up capt pearle in asteroid belt or wherever it was now, and going to plant sats off in family zyarth/ryk........

so, much simpler solution to this problem - just use plot resetter tool (search on this forum) and youre set.

Meklood
Posts: 5
Joined: Tue, 17. Jan 12, 19:48

Post by Meklood » Tue, 17. Jan 12, 19:50

kelmen wrote:http://files.filefront.com/FindPearlexm ... einfo.html

uploaded onto filefront as suggest.

i didn't realize aimini need registration
Can you reupload the script file?

RedAdder
Posts: 6
Joined: Tue, 3. Dec 13, 17:56

Post by RedAdder » Tue, 3. Dec 13, 18:05

For me, it worked again, i.e. the passenger appeared when docking and the family visit instructions came up, when I switched to the identical ship I had used during the rescue. Version 3.2. It is a TS class ship with a passenger freight module.

Post Reply

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