EnglishGermanFrenchRussianItalianSpanish
Log inRegister
 
[SCRIPT] [2012.01.21] Automated Satellite Network v2.00
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
RustInPieces



MEDALMEDAL

Joined: 13 Feb 2012
Posts: 83 on topic

Thank you for registering your game
PostPosted: Mon, 24. Sep 12, 09:36    Post subject: Reply with quote Print

This is in a2069.satnet.check.path.xml

Code:

$current.sector = $arg.start
$next.sector = $arg.start
while $next.sector != $arg.finish
  do if $debug
    = wait 1 ms
  $next.sector = get next sector on route from sector $current.sector to sector $arg.finish
  $current.sector = $next.sector
 
  skip if $next.sector->exists
    return [FALSE]
 
  if not $config.explore
    skip if $next.sector->is sector known by the player
      return [FALSE]
  end
 
  $next.sector.owner = $next.sector->get owner race
  $this.relations = [THIS]->get relation to race $next.sector.owner
 
  skip if $debug < 3
    write to log file $pageId  append=[TRUE]  printf: fmt='In check.path next sector loop: sector= "%s" owner= "%s" relations="%s"', $next.sector, $next.sector.owner, $this.relations, null, null
 
  if $config.relations AND $this.relations == {Foe}
    do if $debug
      write to log file $pageId  append=[TRUE]  value='In check.path: no path found'
    return [FALSE]
  end
 
end
do if $debug
  write to log file $pageId  append=[TRUE]  value='In check.path: Path is flyable'

return [TRUE]




I have no idea what I'm reading. Can anyone more knowledgeable in scripting tell me if there is an easy fix (to avoid enemy sectors)?

Code:

if $config.relations AND $this.relations == {Foe}
    do if $debug
      write to log file $pageId  append=[TRUE]  value='In check.path: no path found'
  end
 
end
do if $debug
  write to log file $pageId  append=[TRUE]  value='In check.path: Path is flyable'


Would this work? I think the first code forces it to always return true, doesn't it? Does the second do if $debug need some kind of else if statement?

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





Joined: 23 Jan 2011



PostPosted: Sun, 28. Oct 12, 15:52    Post subject: Reply with quote Print

Seems to be bugged. These Satellite Distributors never jump out if their shield fall below the set amound.

Say, I have 75% set as the amount of shield when the ship should jump out. Nothing happens. Once enemies start firing on the Satellite Distributors they stop dead in the track and do nothing until they're destroyed.

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





Joined: 08 Sep 2011
Posts: 11 on topic

Thank you for registering your game
PostPosted: Sat, 17. Aug 13, 00:20    Post subject: Reply with quote Print

Hi all,

There is a solution to the behavior of the sat deployers that sometimes they sit in space just before they dropped a sat, and when attacked they just stay there without jumping or flying or fighting.

Thanks

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





Joined: 18 Dec 2013
Posts: 55 on topic

Thank you for registering your game
PostPosted: Thu, 19. Dec 13, 00:31    Post subject: Reply with quote Print

I really love this script

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





Joined: 20 Mar 2013
Posts: 14 on topic

Thank you for registering your game
PostPosted: Fri, 9. May 14, 18:57    Post subject: Reply with quote Print

link is broken.

Back to top
View user's profile Send private message
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)

MEDALMEDALMEDAL

Joined: 02 Apr 2006
Posts: 20643 on topic

Thank you for registering your game
PostPosted: Fri, 9. May 14, 19:08    Post subject: Reply with quote Print

Automated Satellite Network Version on xdownloads.co.uk.


_________________
Besteht Interesse an einem Nopileos-Hörbuch?

Farnhams Legende und Nopileos als E-Books!

"People who think they know everything are a great annoyance to those of us who do." - Isaac Asimov

"If it's not impossible, there must be a way to do it." - Sir Nicholas Winton
Back to top
View user's profile Send private message Visit poster's website
Overwatch





Joined: 18 Jun 2014



PostPosted: Fri, 4. Jul 14, 02:57    Post subject: Reply with quote Print

I'm getting an error with this script after a while.

I get a mail saying "Satellite network has experienced an error. Please contact the author." Then the ship stops in place.

EDIT: I figured out that the error is just a generic one. Probably something like "I can't find anywhere to buy satellites" or "I can't find a safe route to my next sector".

In other news, the little buggers refuse to stop exploring. So I went into the script and hardcoded all the 'don't explore' checks to TRUE. This seemed to solve the problem.

Unfortunately I found another game breaking bug after fixing the above. There are some sectors that just get FILLED to the brim with satellites. I'm talking MASSIVE numbers of them. I left the game on last night (Hey, the world does not stop when my pilot sleeps. Why should it stop when I do?). When I woke up I noticed that I had 17,000ish ships. nearly 7,000 of those were satellites in Heretic's End. That was quite a mess to clean up, and millions of wasted credits since I used the cheat script to delete them instead of picking them up. I'm almost positive I did not cause it, since the logic in the statements has nothing to do with placement.

EDIT 2: I'm thinking that the issue is with collision detection. The duplicated satellites are all T1 or B1. If one goes to 20k, 20k, 20k and places a satellite, it thinks it is too close to the huge Terran station, so it puts it somewhere else 'nearby'. Unfortunately the script seems to check 20k, 20k, 20k and see there is no satellite there, so it turns around and tries again, which will make another T1, which the engine will place outside the collision area of the base AND the first T1, and repeat.

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





Joined: 10 Jun 2010
Posts: 59 on topic

Thank you for registering your game
PostPosted: Thu, 14. Aug 14, 07:51    Post subject: Reply with quote Print

Hello,

Does anyone have problem with the game freezes at a certain point in the game while having a ship using this script?

I've recently have a ship m5 auto deploy satellite all over the the universe. about 10 hours into the game it starting to freezes at exactly the right time in the game, every time. I thought it was one of the trader is overloading the script, but it wasn't it.

For example, the game time is 11:11:01, it will freeze at 11:11:50. I save a game just before that time. Reload and deactivate one ships at the time. The trader ships did not prevent freezes, but the Auto Sat did. After stopping the ship from deploying more SAT, I was able to go pass game time 11:11:50. I was able to reproduce the same freeze multiple times. If I have my ship deploy more satellite, it will freezes again at a certain time point. Unfortunately, I am unable to determine how long it would take for it to freezes again after reactivating auto sat.

Please let me know if anyone encounter similar problem and have a way to fix this. Thanks.

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





Joined: 26 Jul 2016
Posts: 58 on topic

Thank you for registering your game
modified
PostPosted: Tue, 11. Apr 17, 03:53    Post subject: Reply with quote Print

In my continuing quest of trying to fix up old mods for an old game, I couldn't resist fixing up this script.

Let me know if this is an issue and I will remove the link.

Here is an "unofficial" 2.01 that fixes a few things:

    Fix for the "Satellite network has experienced an error. Please contact the author." when unable to find an immediately accessible next sector to deploy satellites in
    Fixed an off-by-one error where the script would actually only search in a range for the number of jumps minus one (just FYI, the default search range is 50, which is used if the jump range <= 0)
    Fixed an issue where "Prioritize single deployment" caused the script to ONLY single deploy
    If searching for the next sector starts taking a while, the ship will now seek shelter before continuing to search instead of just sitting there
    Expanded the "tolerance" range for finding already placed satellites from 1km to 2km
    If emergency jump is enabled and the shield has fallen below the threshold, the ship will now attempt emergency jumping when attacked (this one has not been throughly tested, let me know if there are issues with it)


Here are some future improvements I have in mind:

    Make the "seek shelter when searching for next planet" configurable between on, off, and "small ships only"
    Make the "tolerance" range configurable (in case 2km isn't enough for some people)
    Add a new deployment mode, center, gates (if enabled), and box, in that order
    Properly do asynchronous calls so that the ship will attempt to find shelter (or more to the point, run away) while trying to emergency jump
    Prefer paths around instead of through enemy sectors (the current logic makes some attempt to do this, but as many of you may have noticed, it isn't perfect)
    Try to plan out jump and energy management so that enemy sectors are jumped over
    Try to find a way to make "prioritize single deployment" not be so slow if all the nearby sectors already have a satellite


Full zip:
AutomatedSatelliteNetwork-V2.01_TechSY730_Hack.zip:
<Link removed; this version is broken. See below for V2.04>

An spk version can be made upon request.

Only the scripts that have changed:
a2069.satnet.deploy.xml:
<Link removed; this version is broken. See below for V2.04>

a2069.satnet.attacked.xml:
<Link removed; this version is broken. See below for V2.04>



Last edited by TechSY730 on Mon, 8. May 17, 05:46; edited 1 time in total
Back to top
View user's profile Send private message
Pind





Joined: 03 Mar 2015
Posts: 71 on topic

Thank you for registering your game
PostPosted: Wed, 12. Apr 17, 08:23    Post subject: Reply with quote Print

TechSY730 wrote:
Here is an "unofficial" 2.01 that fixes a few things:


Looks awesome. Is this just an overwrite upgrade for previous version with a re-load in-game?

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





Joined: 26 Jul 2016
Posts: 58 on topic

Thank you for registering your game
PostPosted: Wed, 12. Apr 17, 08:52    Post subject: Reply with quote Print

Actually, please hold off for a bit.

I have identified a pretty glaring issue with how I "fixed" single deployment logic (it would move to place gate satillites, but not actually place them).

Plus a couple of useful new features.


But to answer your original question, yes, the zip is just a total drop in replacement, install it instead of the original (or alternatively, just extract on top of it).

You will need to reissue the command for the latest changes to take effect (something that shouldn't be needed starting in the next version)

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





Joined: 26 Jul 2016
Posts: 58 on topic

Thank you for registering your game
modified
PostPosted: Fri, 14. Apr 17, 06:18    Post subject: Reply with quote Print

Ok, here is an "unofficial" 2.02

Just unpack into your game directory. If you have an older version, just unpack right on top of it.

You will need to reissue the command to pick up changes.
Be warned, there is a new configuration option, so double check your deployment options (for me, it reset to deploying satellites in all races' sectors; I couldn't quite figure out why this happens...)

Changes from 2.01:


    For updates AFTER this one, you should no longer need to reissue the command to pick up latest changes (you WILL have to do it when upgrading from a version before this one, just not in any future versions)
    Fix for single deploy behavior where it would fly to position to place gate satellites and then not actually place the satellite
    Fixed a few places where searching for existing satellites was still using the 1km search range
    The ship does more checks before flying to position to place a satellite, which should hopefully reduce how often the ship flies to position and then does NOT place a satellite and just flies back to a station
    Seeking shelter in the process of deploying now occurs asynchronously; it will scan for a new sector and/or path to deploy to while finding shelter, and will break off seeking shelter if it finds another place to go (it will not break off if it is seeking shelter because it was attacked)
    The "seek shelter when searching sectors starts taking a long time" behavior is now customizable with a new option in the config (Off, On, and Small ships only; defaults to on) Keep in mind this behavior no longer slows down the sector search, so the cost to keep it on is much lower now
    Using the "stop" command in the config menu now more "thoroughly" uninstalls any "magic" (in particular, resets the ship attacked handler back to the global default)


    AutomatedSatelliteNetwork-V2.02_TechSY730_Hack.zip:
    <Link removed; this version is broken. See below for V2.04>

    An SPK (plugin manager) version can be made upon request.




Last edited by TechSY730 on Mon, 8. May 17, 05:46; edited 1 time in total
Back to top
View user's profile Send private message
TechSY730





Joined: 26 Jul 2016
Posts: 58 on topic

Thank you for registering your game
modified
PostPosted: Sun, 30. Apr 17, 02:06    Post subject: Reply with quote Print

Version 2.03:

Not many changes this time:

    Made the emergency jump logic emergency jump if either Emergency jump OR Auto Jump is enabled, since the Emergency Jump doesn't always appear for all ship types (unless I am hideously mistaken about this point)
    Made retreating to a station happen a bit earlier when searching for the next sector


AutomatedSatelliteNetwork-V2.03_TechSY730_Hack.zip:
<Link removed; this version is broken. See below for V2.04>



Last edited by TechSY730 on Mon, 8. May 17, 05:45; edited 1 time in total
Back to top
View user's profile Send private message
TechSY730





Joined: 26 Jul 2016
Posts: 58 on topic

Thank you for registering your game
PostPosted: Mon, 8. May 17, 05:44    Post subject: Reply with quote Print

Version V2.04
* Fixes a critical error with the script's self-restarting logic
TO NOT BREAK SHIPS CURRENTLY RUNNING THIS SCRIPT, you must reissue the deploy satellites command to all ships running this script. IF YOU DO NOT, YOUR SHIPS WILL STOP DEAD (until a new order is issued).
* Fix where the asynchronous shelter seeking logic may be cause the ship to delay other commands.

I made a critical error when I implemented the script's self-restarting logic. I tried to start a new task in a script running in that same task, without realizing that doing this deadlocks that task...

This has been fixed and a safe way to self-restart scripts has been implemented.

AutomatedSatelliteNetwork-V2.04_TechSY730_Hack.zip
https://drive.google.com/open?id=0B80_EwCApP86aEZEd3hPYmZjUGc

I have removed the links to the broken versions.

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





Joined: 26 Jul 2016
Posts: 58 on topic

Thank you for registering your game
PostPosted: Fri, 19. May 17, 02:04    Post subject: Reply with quote Print

Version 2.05:
* Dramatically increased the speed of sector searching
- The way this was done was by caching sectors that were considered but rejected in lower search radiuses when expanding the search radius, thus saving the expensive searching for existing satellites check for sectors that recently had undergone the check.
- For the programmer types among you, this is still an O(n^2) algorithm, as searching for sectors within a certain radius still "starts from scratch" for each jump search range as well as the cache being a "dumb array" requiring linear searching to find a sector in the cache. However, this avoids an inner loop that has very high constant factors with a much faster array linear search, thus resulting in great speedup. I have plans on how to make the sector search average case O(n) (by caching sectors on the "border" of the previous search range's search), but I didn't want to block this speedup on that work.
* Added a special case for the hub sector; will place only a single satellite right in the smack dab center of the sector, and will not place any gate satellites (the sector is so tiny that this one satellite still covers the whole sector)


AutomatedSatelliteNetwork-V2.05_TechSY730_Hack.zip:
https://drive.google.com/open?id=0B80_EwCApP86TWhiLVQ2MHFyZ1U

(Mods, please let me know if quintuple posting like this is a problem)

Back to top
View user's profile Send private message
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 Sat, 21. Apr 18, 23:06

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.10888 seconds, sql queries = 29