I'm trying to refine my personal FTL balance mod to put on the workshop, part of that involves tweaking the bypasses, for wormholes I'm looking to do two things:
I'm looking at hooking in to an on_action to do this:
achievement.4 is:
Now that block is called "on_entering", and seems to mostly reference the fleet entity doing the FTL jump, though looks like it could be re-routed to the host system, then back down to select (and delete) the wormhole.
But my main concern is if I tie in to that and instruct the game to delete a wormhole "on_entry" it might delete the wormholes before the ship can make the jump, or it might delete the WH whilst the ship is jumping (in the 1 day it takes) which may cause a crash... it may also be totally fine and i've mis-interpreted how this thing works. If nothing else adding a 2 day delay would be a (messy) solution I guess.
Wondering if anyone else has tried using this on action to screw with wormholes? before I get started and pin an event to it.
Essentially my event would:
- Have an N% chance to delete a wormhole after a ship has flown through it.
- Spawn another pair of wormholes somewhere else in the galaxy (in systems that dont already have wormholes... or L-cluster flags, I guess).
I'm looking at hooking in to an on_action to do this:
Code:
# Called upon entering FTL (on-action name scripted on the Bypass type)
# THIS = Fleet
# FROM = System jumping to
# FROMFROM = System jumped from
on_entering_wormhole = {
events = {
achievement.4
}
}

Now that block is called "on_entering", and seems to mostly reference the fleet entity doing the FTL jump, though looks like it could be re-routed to the host system, then back down to select (and delete) the wormhole.
But my main concern is if I tie in to that and instruct the game to delete a wormhole "on_entry" it might delete the wormholes before the ship can make the jump, or it might delete the WH whilst the ship is jumping (in the 1 day it takes) which may cause a crash... it may also be totally fine and i've mis-interpreted how this thing works. If nothing else adding a 2 day delay would be a (messy) solution I guess.
Wondering if anyone else has tried using this on action to screw with wormholes? before I get started and pin an event to it.
Essentially my event would:
- fire each time a ship or fleet enters the WH and roll a 1-20.
- if it rolls 2-20 (95% chance) nothing happens, event aborts.
- if it rolls a 1 (5% chance), trigger wormhole is destruction, new WH pair creation.
- if a 1 was rolled,
- fire event 2 - delete the wormhole pair (use from/fromfrom to scan for wormhole entities, need to double check how wormhole creation is handled and work backwards to prevent orphans)
- then fire event 3 - pick two other random star systems, which do not have wormholes already and are at least 2 systems apart, and spawn a new WH pair.
- if this spawned in your space maybe throw a notification at top of screen mentioning a new wormhole has appeared and is ready to be explored.
Last edited: