[SCRIPT] Satalite Early Warning Network V1.20 : Updated 09/03/2007

The place to discuss scripting and game modifications for X³: Reunion.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

User avatar
defiant1
Posts: 1141
Joined: Sun, 7. May 06, 03:53
x4

Post by defiant1 » Thu, 4. Oct 07, 02:09

i was reffering to your post about 5 posts up :P :lol: :lol:
Teladi Next Minute Shipping®

Pogi
Posts: 522
Joined: Thu, 13. Apr 06, 12:35
x2

Post by Pogi » Thu, 4. Oct 07, 02:14

:D ...Ok, do you know how to get into the "in game" script editor?
X3..The most fun a man can have...With his clothes on.

User avatar
defiant1
Posts: 1141
Joined: Sun, 7. May 06, 03:53
x4

Post by defiant1 » Thu, 4. Oct 07, 02:16

oh fun...time to unpack the game...again...yea i do...
Teladi Next Minute Shipping®

Pogi
Posts: 522
Joined: Thu, 13. Apr 06, 12:35
x2

Post by Pogi » Thu, 4. Oct 07, 02:20

Unpack the game?..What are you talking about?...Thereshallbewings..Enter the script editor..While "in the game", you know how to do this?
X3..The most fun a man can have...With his clothes on.

User avatar
defiant1
Posts: 1141
Joined: Sun, 7. May 06, 03:53
x4

Post by defiant1 » Thu, 4. Oct 07, 05:05

hmmm...not off hand (musta thought of the way its done when testing new ships in non xsp format)
Teladi Next Minute Shipping®

Pogi
Posts: 522
Joined: Thu, 13. Apr 06, 12:35
x2

Post by Pogi » Thu, 4. Oct 07, 09:18

Hmmmm...First things first...Go here read this:

http://forum.egosoft.com/viewtopic.php?t=96337
X3..The most fun a man can have...With his clothes on.

User avatar
defiant1
Posts: 1141
Joined: Sun, 7. May 06, 03:53
x4

Post by defiant1 » Thu, 4. Oct 07, 15:21

yea ive already got the "Thiershallbewings" thing enabled...and i did all that...just not exactly sure what its gonna be under (menue options,ect ect) Ive got the "general" tab (that I think is different from what your talking about?)
Teladi Next Minute Shipping®

Dungeoncrawler
Posts: 1093
Joined: Sun, 7. Dec 03, 05:32
x3tc

Post by Dungeoncrawler » Sun, 7. Oct 07, 07:28

would this conflict in any way with satellite limited universal trader script?
ie does it change the name of the satellite or anything like that?
Was this issue ever resolved? Would really like to use this script but also have the SLUT (LOL) installed. Thanks.

Dc

Pogi
Posts: 522
Joined: Thu, 13. Apr 06, 12:35
x2

Post by Pogi » Sun, 7. Oct 07, 12:00

I resolved that issue by putting two sats in my sectors..One for SEWN and the other for my MK3's...You "can" edit the SEWN files, but I just didn't feel like messing with them. Cycrow explains a little farther up the post where to edit...Cheers
X3..The most fun a man can have...With his clothes on.

Dungeoncrawler
Posts: 1093
Joined: Sun, 7. Dec 03, 05:32
x3tc

Post by Dungeoncrawler » Mon, 8. Oct 07, 00:01

Innovative idea there Pogi. I had read the earlier post but thought an update may have been made that addressed the issue. Anyhoo, your idea sounds the easiest as I also do not like messing with the scripts. Thanks for the reply.

Dc

ACrazyGerman
Posts: 99
Joined: Thu, 6. Mar 08, 07:26
x4

Post by ACrazyGerman » Tue, 25. Mar 08, 23:31

Is there a mirror for this the download won't load.

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22227
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow » Tue, 25. Mar 08, 23:49

first page has been updated with working links

Pogi
Posts: 522
Joined: Thu, 13. Apr 06, 12:35
x2

Post by Pogi » Fri, 28. Mar 08, 03:44

@Cycrow...Just an inquiry as to if you are still going to or interested in making a modified version or extention of this script to detect bailed ships...Thanks
X3..The most fun a man can have...With his clothes on.

spoidz
Posts: 607
Joined: Sat, 6. Mar 04, 20:43
x3tc

Post by spoidz » Sat, 29. Mar 08, 07:09

Okay, I am just not smart enough to figure out some of this scripting. I've tried reading the MSCI and then manually tried diff combos with the ingame MSCI.

I "can" get the plugin.sewn.running to ID Xenon Stations and Pirate Bases, but I can't figure out how to get it to use a diff warning message for each.

I copied the sendWarning code and then just relabeled the two sections and added two new text IDs to the 447545.xml.

But it will only send the first original warning. (....detected an enemy ships). I can make the first sendWarning use the new text Id by just changing the number but that's it. It won't skip that one and use the other two.

Basically I don't know enough to get multiple GoSub to execute separately when called within the same script. Probably my bad End, EndSub and Return Nulls but I'm not getting anywhere by tinkering.


Anyone kindly put me out of my misery?

Thanks

Pogi
Posts: 522
Joined: Thu, 13. Apr 06, 12:35
x2

Post by Pogi » Sat, 29. Mar 08, 10:41

Sewn was designed to identify enemy ships entering a sector..I don't understand why you would want it to identify enemy stations?..If you have a sat there already you can already see them.. :?
X3..The most fun a man can have...With his clothes on.

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22227
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow » Sat, 29. Mar 08, 13:32

there are 2 warnings, once is text to the logbook and the other is a voice.

you can change the voice by simply adding new entries into the text file.

if all your doing is changing the log entry, then u will still get the voice warning a bout the ships.

also, remember that stations dont move, so they will always be in range of the satalites, so u'll end up getting continous warnings about them

spoidz
Posts: 607
Joined: Sat, 6. Mar 04, 20:43
x3tc

Post by spoidz » Sat, 29. Mar 08, 14:52

Well I didn't want to bother you with reviewing my noobish attempt at code but I guess I'll have to to explain what I'm doing.

I'm getting SEWN to do two things,

1) Announce the respawn of the two Xenon Stations that XTM keeps running at all times.

2) Announce the respawn of a Pirate station after I kill/push-it to another sector.

To try to get there I simply copied the code block for ID a ship and changed it to ID a station.


Code: Select all

021    $stations =  find station: sector=$sector class or type=Xenon Station race=Xenon flags=[Find.Multiple] refobj=[THIS] maxdist=1000 maxnum=5 refpos=null
022 @  skip if not [THIS] -> call script 'plugin.sewn.validship' :  Ship Array=$ships
023     gosub sendWarningXenon
024    
025    $stations =  find station: sector=$sector class or type=Pirate Base race=Pirates flags=[Find.Multiple] refobj=[THIS] maxdist=1000 maxnum=5 refpos=null
026 @  skip if not [THIS] -> call script 'plugin.sewn.validship' :  Ship Array=$ships
027     gosub SendWarningPirates
I didn't know about the "station always visible" so I figured to just max the distance since the Xenon stations and Pirate bases are often way out from center. I left the plugin.sewn.validship call but I guess it may not be needed.

I changed the gosub for each to try to make it use a diff text file only.

Code: Select all

048   sendWarningXenon:
049   $time = playing time
050   if $time > $last.send
051    $sector = [THIS] -> get sector
052    write to player logbook: printf: pageid=7545 textid=29, $sector, null, null, null, null
053    $last.send = $time + 300
054    = speak text: page=13 id=1276 priority=100
055 @  $sound.num = [THIS] -> call script 'lib.cycrow.getsoundnum' :  Sector=$sector
056    = speak text: page=7 id=$sound.num priority=99
057    
058   
061   
062   SendWarningPirates:
063   $time = playing time
064   if $time > $last.send
065    $sector = [THIS] -> get sector
066    write to player logbook: printf: pageid=7545 textid=30, $sector, null, null, null, null
067    $last.send = $time + 300
068    = speak text: page=13 id=1276 priority=100
069 @  $sound.num = [THIS] -> call script 'lib.cycrow.getsoundnum' :  Sector=$sector
070    = speak text: page=7 id=$sound.num priority=99

I know the if in the warning code needs an end but I probably don't have an endsub and a return null in the right places to allow the two new warning to be accessed properly.

Unless you are going to tell me this would require some more detailed branching code, I assumed I could simply offer it more "choices" and it would adhere to the diff gosub calls.


By placing the sats in all the sectors there shouldn't be a Station/Base, I'll get an immediate signal as soon as they respawn and I can chase them around.

Pogi
Posts: 522
Joined: Thu, 13. Apr 06, 12:35
x2

Post by Pogi » Sun, 30. Mar 08, 03:12

@spoidz...I see...Well if that is what you are trying to do, in my opinion, you are tinkering with the wrong script...A much better one to do what you are wanting would be this:

http://forum.egosoft.com/viewtopic.php?t=147822

But, you know what opinions are like... :D
X3..The most fun a man can have...With his clothes on.

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22227
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow » Sun, 30. Mar 08, 04:30

spoidz wrote:

Code: Select all

021    $stations =  find station: sector=$sector class or type=Xenon Station race=Xenon flags=[Find.Multiple] refobj=[THIS] maxdist=1000 maxnum=5 refpos=null
022 @  skip if not [THIS] -> call script 'plugin.sewn.validship' :  Ship Array=$ships
023     gosub sendWarningXenon
024    
025    $stations =  find station: sector=$sector class or type=Pirate Base race=Pirates flags=[Find.Multiple] refobj=[THIS] maxdist=1000 maxnum=5 refpos=null
026 @  skip if not [THIS] -> call script 'plugin.sewn.validship' :  Ship Array=$ships
027     gosub SendWarningPirates
theres your first problem right there.
your calling the check script for ships, and sending in the ship array, not the station array.

set the ship array to $station.

althou it might be best to clone the validship and edit it for stations, althou not much editing should be needed

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22227
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow » Sun, 30. Mar 08, 04:35

Next, the max dist is wrong, its a low value for a start, also, the script uses the scanner range for the max dist.

the scanner range is longer than the 1000, as thats only 1km away, the station would have to be very close


only the gosubs, did you paste everything ? it jumps from line 58 to 61.

your missing the end in the block and your missing the endsub

the endsub is what returns it back. Without it, it will first do whats in sendWarningXenon then do whats in SendWarningPirates then continue to whats after that.

each sub block needs an endsub before the next one starts, in general

Post Reply

Return to “X³: Reunion - Scripts and Modding”