The main problem that Barleyman is having is that M5's do not have jumpdrives in XRM. A fast M6 might make a better explorer in XRM.
- Or, you know, like a Boreas or something that can take a beating.
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
OOS that might not be a proble, tho. And robot explorer exists out of sector most of the time.DrBullwinkle wrote:Another problem with evasion near a gate is the combination of collision detection and vanilla enemy avoidance. It is not possible to make a script that will reliably enter a gate while enemies are nearby.
Indeed. Quite fittingly, in XRM the best explorer is the Truelight Seeker. Almost as fast as a Springblossom, shielded as an heavy combat M6, with all the cargo space for a buttload of satellites so it doesn't have to waste time buying them often.DrBullwinkle wrote: A fast M6 might make a better explorer in XRM.
Kadatherion wrote:A (presuambly) cheaper alternative which IIRC is fast and reasonably shielded for an M3 is the Goner Ranger. I have several in my current game thanks to Bail Extension and some M5s running Galaxy Explorer; of course, as noted above, the M5s don't work as well without the jumpdrive.DrBullwinkle wrote: Indeed. Quite fittingly, in XRM the best explorer is the Truelight Seeker. Almost as fast as a Springblossom, shielded as an heavy combat M6, with all the cargo space for a buttload of satellites so it doesn't have to waste time buying them often.
Code: Select all
* tests the route to every single warp gate in the sector
* for the one which is most safe to fly (with max dist to enemies)
* get all gates
$i = 6
$gates = array alloc: size=0
while $i
dec $i
* NLQ Added
$gate = [SECTOR]-> get warp gate: gate id=$i
* End
if $gate-> exists
$dest = $gate-> get gate destination: return sector=1
* Below is NLQ to only add known destinations if user configs it this way
if not $dest-> is known
if $b.explore.unknown
$gate.dest = $gate-> get gate destination: return sector=[TRUE]
append $gate to array $gates
end
end
if $dest-> is known
$gate.dest = $gate-> get gate destination: return sector=[TRUE]
append $gate to array $gates
end
*end NLQ
* Remove comments to below if remove NLQ code, above
* $gate.dest = $gate-> get gate destination: return sector=[TRUE]
* append $gate to array $gates
end
end
Code: Select all
if find $sector.old in array: $dead.end.sectors.whitelist
$flying.out = get sector from universe index: x=1, y=3
$flying.out = get next sector on route from sector $sector.old to sector $flying.out
$flying.out = [SECTOR] == $flying.out
end
* tests the route to every single warp gate in the sector
* for the one which is most safe to fly (with max dist to enemies)
* get all gates
$i = 6
$gates = array alloc: size=0
while $i
dec $i =
$gate = [SECTOR]->get warp gate: gate id=$i
if $gate->exists
* only escape into known gates! No cheating!
$gate.known = $gate->is known
if $gate.known
$gate.dest = $gate->get gate destination: return sector=[TRUE]
append $gate to array $gates
end
end
end
$gates.size = size of array $gates
* If flying out of a dead end, remove gate to sector.old first!
* Else remove hostile gates first
* So if flying out, it is more important to get out of the dead end
* than to avoid hostile sectors
if $flying.out
gosub remove.old
gosub remove.hostile
else
gosub remove.hostile
gosub remove.old
end
Code: Select all
remove.old:
* remove sector.old
$i = size of array $gates
$gates.size = size of array $gates
while $i AND $gates.size > 1
dec $i =
$gate = $gates[$i]
$gate.dest = $gate->get gate destination: return sector=[TRUE]
if $gate.dest == $sector.old
remove element from array $gates at index $i
$gates.size = size of array $gates
end
end
endsub
Code: Select all
remove.hostile:
* remove hostile sectors
if !$explore.enemy
$i = size of array $gates
* special case: if there are ONLY hostile sectors left, don't remove any
* so that the safest is chosen
$only.hostile.left = [TRUE]
while $i
dec $i =
$gate = $gates[$i]
$gate.dest = $gate->get gate destination: return sector=[TRUE]
$gate.dest.owner = $gate.dest->get owner race
$gate.dest.rel = [THIS]->get relation to race $gate.dest.owner
skip if $gate.dest.rel == {Feind}
$gate.dest.rel = $gate.dest.owner->get relation to race {Spieler}
skip if $gate.dest.rel == {Feind}
$only.hostile.left = [FALSE]
end
* There's at least one friendly sector to flee to
* remove all hostile sectors
if not $only.hostile.left
$i = size of array $gates
$gates.size = size of array $gates
while $i AND $gates.size > 1
dec $i =
$gate = $gates[$i]
$gate.dest = $gate->get gate destination: return sector=[TRUE]
$gate.dest.owner = $gate.dest->get owner race
$gate.dest.rel = [THIS]->get relation to race $gate.dest.owner
skip if $gate.dest.rel == {Feind}
$gate.dest.rel = $gate.dest.owner->get relation to race {Spieler}
if $gate.dest.rel == {Feind}
remove element from array $gates at index $i
$gates.size = size of array $gates
end
end
end
end
endsub