EnglishGermanFrenchRussianItalianSpanish
Log inRegister
 
[SCRIPT] Satalite Early Warning Network V1.20 : Updated 09/03/2007
Post new topic Reply to topic Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next
View previous topic :: View next topic
Author Message
ACrazyGerman





Joined: 06 Mar 2008



PostPosted: Wed, 26. Mar 08, 00:31    Post subject: Reply with quote Print

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

Back to top
View user's profile Send private message
Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)



Joined: 15 Nov 2004
Posts: 20480 on topic
Location: London
Thank you for registering your game
PostPosted: Wed, 26. Mar 08, 00:49    Post subject: Reply with quote Print

first page has been updated with working links


_________________
My Scripts | MY X3TC Scripts | X3 Plugin Manager | Custom Gui
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Pogi





Joined: 13 Apr 2006
Posts: 521 on topic

Thank you for registering your game
PostPosted: Fri, 28. Mar 08, 04:44    Post subject: Reply with quote Print

@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.
Back to top
View user's profile Send private message
spoidz





Joined: 06 Mar 2004
Posts: 607 on topic

Thank you for registering your game
PostPosted: Sat, 29. Mar 08, 08:09    Post subject: Reply with quote Print

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

Back to top
View user's profile Send private message
Pogi





Joined: 13 Apr 2006
Posts: 521 on topic

Thank you for registering your game
PostPosted: Sat, 29. Mar 08, 11:41    Post subject: Reply with quote Print

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.. Confused


_________________
X3..The most fun a man can have...With his clothes on.
Back to top
View user's profile Send private message
Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)



Joined: 15 Nov 2004
Posts: 20480 on topic
Location: London
Thank you for registering your game
PostPosted: Sat, 29. Mar 08, 14:32    Post subject: Reply with quote Print

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


_________________
My Scripts | MY X3TC Scripts | X3 Plugin Manager | Custom Gui
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
spoidz





Joined: 06 Mar 2004
Posts: 607 on topic

Thank you for registering your game
PostPosted: Sat, 29. Mar 08, 15:52    Post subject: Reply with quote Print

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:
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:
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.

Back to top
View user's profile Send private message
Pogi





Joined: 13 Apr 2006
Posts: 521 on topic

Thank you for registering your game
PostPosted: Sun, 30. Mar 08, 03:12    Post subject: Reply with quote Print

@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... Very Happy


_________________
X3..The most fun a man can have...With his clothes on.
Back to top
View user's profile Send private message
Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)



Joined: 15 Nov 2004
Posts: 20480 on topic
Location: London
Thank you for registering your game
PostPosted: Sun, 30. Mar 08, 04:30    Post subject: Reply with quote Print

spoidz wrote:

Code:
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


_________________
My Scripts | MY X3TC Scripts | X3 Plugin Manager | Custom Gui
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)



Joined: 15 Nov 2004
Posts: 20480 on topic
Location: London
Thank you for registering your game
PostPosted: Sun, 30. Mar 08, 04:35    Post subject: Reply with quote Print

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


_________________
My Scripts | MY X3TC Scripts | X3 Plugin Manager | Custom Gui
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
spoidz





Joined: 06 Mar 2004
Posts: 607 on topic

Thank you for registering your game
PostPosted: Sun, 30. Mar 08, 07:24    Post subject: Reply with quote Print

Cycrow,

Sorry for causing you more work,

Yes I didn't paste all, just wanted to show you what I cloned. It was the endsub locations I couldn't figure, one for each or one single after the last sub.

I didn't figure the distance until I found an example to know it was in meters. I'll set it back to $range or bump it up if it can't see the stations/bases.

For Pogi, yes that would work but then you have to remember to keep running it and it won't find Xenon. SEWN looked easier for me to understand/clone and it will be an automated system with recurring prompts.


------------

So basically I should have:

find
gosub sendwarning

find
gosub sendwarningxenon

find
gosub sendwarningpirates

sendwarning
end
endsub

sendwarningxenon
end
endsub

sendwarningpirates
end
endsub

return null

-----------????


As far as the Ship Array=$stations ....... entire line

Do I even have to use it if the "find" has already run against class and race?? All I care is if it sees a Xenon station or a Pirate Base. Will those two new find blocks simply run as long as plugin.sewn.running is active on a SAT? Without having to check it against validship?

Sorry, it will take some more learning before I can "read" validship to understand how to edit/clone it properly. I'm really trying to do as much of this by learning before I bug you guys.

Feel free to hit me in the head with the noob stick.

Back to top
View user's profile Send private message
Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)



Joined: 15 Nov 2004
Posts: 20480 on topic
Location: London
Thank you for registering your game
PostPosted: Sun, 30. Mar 08, 09:27    Post subject: Reply with quote Print

the validship is to check ship types againsts the filter settings, and wont be needed. you just need to check that the station array has stations in

Code:

skip if not $stations
  gosub ...



as for the end/endsub. You only need end for an if block or a while block.

end is used to "end" that block you opened previously.

endsub is to end the sub call and return it


_________________
My Scripts | MY X3TC Scripts | X3 Plugin Manager | Custom Gui
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Buck_Rogers





Joined: 21 Dec 2004
Posts: 1462 on topic
Location: Aberdeenshire
Thank you for registering your game
PostPosted: Thu, 1. May 08, 12:48    Post subject: Reply with quote Print

Hi Cycrow. Sorry to bug you (Again!) Very Happy

Just a question:

I have placed an Advance Sat. in Paranid Prime and have signed the SEWN contract on the BBS. However it has since been destroyed by some mauruding Kha'ak! Evil or Very Mad

How long does i take for the contract peeps to replace it? I lost the sat. when I left the game running overnight (WITHOUT SETA) and there has been no replacement done, so far.

I have also checked the maintenance contracts screen just to make sure I had one for Paranid Prime. Which I do.


_________________
Buck Rogers

Vice Admiral of Shadows Haven Alliance (SHA) visit us at:
SHA Forum
Feel free to join my DID
Too often we lose sight of life's simple pleasures. Remember, when someone annoys you, it takes 42 muscles in your face to frown. But only 4 to extend your arm and slap the bugger!
Back to top
View user's profile Send private message MSN Messenger
jumbled





Joined: 28 Jun 2004
Posts: 318 on topic
Location: North Carolina, USA
Thank you for registering your game
PostPosted: Tue, 22. Jul 08, 12:05    Post subject: Reply with quote Print

I have just come up on a most curious problem, and wanted to share my findings with you.

I want the replacement service in every sector where I put a sat (well, almost every sector...those that I use for trade and need to keep tabs on, which is just about every sector except for Khaak, Xenon and unknown sectors). So I've been systematically moving from one sector to another and visiting every station, multiple times, until that blasted BBS message eventually pops up offering me the contract.

So far, so good, I have a couple sections of the galaxy covered, but still a long way to go.

However, my problem now is if I visit a sector and hit the hotkey to check if the contract is active in that area, I get the message with the listing of sectors and only part of the question at the bottom on whether or not to keep the service in my current sector. The clickable buttons don't show up, only an 'ok' button.

After studying the script, and scratching my head several times, I finally figured out what happened, but only thanks to a recent experience from another script I've been writing where I had a similar "problem" come up.

I have so many sectors covered now that the list is too long for the data space in the message variable to hold it, so the bottom portion of the string (the part holding the question prompt) is getting cut off. And therefore I don't see the "do you want to keep it" buttons for 'yes' or 'no'.

Not that it matters, so long as I get coverage, I'm not cancelling anything, but I thought I'd let you know in case it hasn't happened to you yet.

I don't know how many people try to cover the whole galaxy with replacement services, but I, for one, am thoroughly tired of losing sats in all odd places around the galaxy and having to send out ships to replace them manually.

If it was only a handful of specific sectors that suffered, I could set it up in only those areas and leave it be, but it isn't, and I get messages of losing sats in MANY places, some of which are far from "danger zones" and shouldn't otherwise be an issue of concern, all because of random attacks by Khaak, Xenon or pirates who pop in for no other reason than they have nothing better to do but cause trouble.

A "global" service would be much preferred, for this point, first to give me total coverage, all at once, without having to visit every sector and waiting forever for the BBS to show the contract (which will take forever), and also to counter this new problem of variable storage space and a flunky output message.

If such a service were offered, though, I think it should also take into account (as it's setting up the parameters) any existing sector services already in effect, and merge them into the global service contract (whatever method you use to "define" such a contract, since right now you're using a myriad of global variables, one for each sector, to declare "coverage" in that area).

Maybe, instead of a zillion global variables with sector names on them, you could assign a single 2-dimensional array, to mimic the (x,y) coords of sectors in the galaxy, and assign values into elements to declare coverage and fees?

As far as the sector summary listing goes, the only thing I can suggest is a solution like what I had to settle with for my own little project, and that is to break it up into multiple messages of 'x' number of sectors per message. I also formatted the output into columns to be more compact.

I don't know what X3 thinks about it, but I am just a bit concerned over so many scripts assigning so many global variables, that it might, after a while, clutter things up so badly that X3 can't "think" any more. It already takes half an hour for my game to load... Sad

Back to top
View user's profile Send private message
Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)



Joined: 15 Nov 2004
Posts: 20480 on topic
Location: London
Thank you for registering your game
PostPosted: Tue, 22. Jul 08, 12:29    Post subject: Reply with quote Print

a global service was something i had planned at some point.

however you problem is to do with the number of lines rather than the actual data size.

you see, incomming messages have a maximum size of 100 lines.

there would be several solutions, including spliting large number of sectors to seperate messages or putting mulitple sectors on the same lines.

for global varibles, they do use memory space, and will also increase the size of your saved game.

but as long as the scripts use them sensibly then its not usually a problem.

its local varibles that are more likly to effect things, as this could be on 1000's of objects.

updates to this script will most likly come in X3TC. When it comes out, i will adapt it to work and improve on it


_________________
My Scripts | MY X3TC Scripts | X3 Plugin Manager | Custom Gui
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic Reply to topic Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
Control Panel
Login Data
The time now is Fri, 23. Feb 18, 00:30

All times are GMT + 2 Hours


Board Security

Copyright © EGOSOFT 1989-2018
Powered by phpBB © 2001, 2005 phpBB Group
Template created by Avatar & BurnIt!
Debug: page generation = 0.12208 seconds, sql queries = 29