[script] Improved Xenon v0.95: Updated June 17, 2008
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
-
- Posts: 813
- Joined: Fri, 11. Nov 05, 23:18
- Tenlar Scarflame
- Posts: 3359
- Joined: Mon, 30. May 05, 04:51
looks good, can't wait to try it!
My music - Von Neumann's Children - Lasers and Tactics
I'm on Twitch! 21:15 EST Sundays. Come watch me die a lot.
I'm on Twitch! 21:15 EST Sundays. Come watch me die a lot.
I got a question about this script. When a xenon sector is surrounded by other xenon sectors is the script set up to tell that xenon sector to not try to invade the adjacent sectors? I ask this because it seems there are a million ships in newly acquired xenon sectors and it really slows the game down a lot when the xenon have a lot of sectors. When I see this im worried that the xenon are continually “invading” their own sectors and filling them up with needless amounts of ships.
-
- Posts: 813
- Joined: Fri, 11. Nov 05, 23:18
In the most recent version, no ships are created unless there is a non-xenon sector within 2 sectors marked for invasion. So if your playing XTM none of the Xenon Core sectors are close enough to enemy sectors to build and launch invasions. However, if you or some other enemy race happens to take over a sector within 2 sectors of one of the core sectors then it will eventually notice (Up to 30 minutes wait) and build/send an invasion force to that sector.
In the previous version every Xenon sector would find the closest enemy sector and invade it, cause the overflow problem you were describing.
When a sector is eventually taken over the invasion force becomes the sector defense force while the new station will build and send invasion forces. So if the sector was taken with a huge fleet on hard mode that fleet will be the defense force. If the Xenon fleet was reduced to only a couple ships but still won then the defense force will be just the limited amount that remains in the sector.
Ships that are built for the invasion will also actively defend the sector until both the invasion fleet is ready and the sector is clear of enemies. This means that invasion fleets traveling to their target sector will act as reenforcements if you happen to be assaulting a Xenon sector they are traveling through.
To reduce the number of ships generated you can lower the difficulty and/or turn off the cargo drops. You can also alter the token costs for different kinds of ships in plugin.ix.token.cost to reduce the number of ships. A higher token cost will reduce the number of ships and making carriers be an unreasonably high value (>400) will prevent the carrier swarms of ~50 ships.
Hope this helps
In the previous version every Xenon sector would find the closest enemy sector and invade it, cause the overflow problem you were describing.
When a sector is eventually taken over the invasion force becomes the sector defense force while the new station will build and send invasion forces. So if the sector was taken with a huge fleet on hard mode that fleet will be the defense force. If the Xenon fleet was reduced to only a couple ships but still won then the defense force will be just the limited amount that remains in the sector.
Ships that are built for the invasion will also actively defend the sector until both the invasion fleet is ready and the sector is clear of enemies. This means that invasion fleets traveling to their target sector will act as reenforcements if you happen to be assaulting a Xenon sector they are traveling through.
To reduce the number of ships generated you can lower the difficulty and/or turn off the cargo drops. You can also alter the token costs for different kinds of ships in plugin.ix.token.cost to reduce the number of ships. A higher token cost will reduce the number of ships and making carriers be an unreasonably high value (>400) will prevent the carrier swarms of ~50 ships.
Hope this helps
-
- Posts: 813
- Joined: Fri, 11. Nov 05, 23:18
@Iasthai
Hmmm...if your seeing them build the ships then you must have a presence in the sector. They will not invade another sector until their home sector is secure and no enemy ships/stations are in it. Perhaps this is the problem? I will look into it on my system, but I know invasions were happening in my last test run or I would not have released it . There is also a possibility that an underflow problem happening in the token list...what difficulty are you on?
As for the overabundance of L/LX ships this is because the built ships are based upon the ratio of ships in the current Xenon sector. I think I should make a change so all types are evenly chosen though, this will provide alot more variety (but increase the startup time a bit).
Hmmm...if your seeing them build the ships then you must have a presence in the sector. They will not invade another sector until their home sector is secure and no enemy ships/stations are in it. Perhaps this is the problem? I will look into it on my system, but I know invasions were happening in my last test run or I would not have released it . There is also a possibility that an underflow problem happening in the token list...what difficulty are you on?
As for the overabundance of L/LX ships this is because the built ships are based upon the ratio of ships in the current Xenon sector. I think I should make a change so all types are evenly chosen though, this will provide alot more variety (but increase the startup time a bit).
How many sectors: I was wondering, after a while with this script enabled (running XTM+XI), after noticing that Xenon had already eaten some sectors, how many more sectors would they take? Is there a radius of x jumps from Xenon ### sectors that they will capture ?
Capships: And running at Insane difficulty, I didn't notice many capships, but mostly fighters, whats up with that (there where 2 M6s for each 40 M5), I mean they don't stand a chance against my capship.
On a side note, the Xenon station in 18Bil ended up at -56km/-8km/-86km, what happened there ?
Capships: And running at Insane difficulty, I didn't notice many capships, but mostly fighters, whats up with that (there where 2 M6s for each 40 M5), I mean they don't stand a chance against my capship.
On a side note, the Xenon station in 18Bil ended up at -56km/-8km/-86km, what happened there ?
-
- Posts: 813
- Joined: Fri, 11. Nov 05, 23:18
How many sectors: If sector takeover is enabled then they will only stop taking sectors when there are no more sectors to take.
Capships: Currently the Xenon are not the smartest for choosing ship types. The sector that is causing the invasion grabs a list of all the ships in the sector and randomly selects one to make. While this allows mad-added ships to be used it also means that the proportions of ships follow the home sectors. The home sectors usually have 5-10 capships and hundreds of smaller ships, thus random chance favors the small ships.
When I get time I will rewrite it so the core inventories ship types every so often and stores an accessible array of possible ship types making the invasions more balanced. This requires a rewrite of the chooser script and a new sub-script for the core loop...so just a little scripting and alot of testing to make sure it still works
Station Coordinates: This is a side-effect of interactions with scripts, like RRF, that create temporary gates in the middle of nowhere. When the Xenon want to place a station they try to make it equidistant to all gates in the sector due to their rather strict computeriness .
The fix for this is simple, I can just place them at 0,0,0 or make an AL switch so you can enable 'Safe Station Placement'.
In other news...
Headed off to Taiwan today so responses may be slow to non-existent depending on Internet availability until I am back in Japan next week. Have a good week everyone
Capships: Currently the Xenon are not the smartest for choosing ship types. The sector that is causing the invasion grabs a list of all the ships in the sector and randomly selects one to make. While this allows mad-added ships to be used it also means that the proportions of ships follow the home sectors. The home sectors usually have 5-10 capships and hundreds of smaller ships, thus random chance favors the small ships.
When I get time I will rewrite it so the core inventories ship types every so often and stores an accessible array of possible ship types making the invasions more balanced. This requires a rewrite of the chooser script and a new sub-script for the core loop...so just a little scripting and alot of testing to make sure it still works
Station Coordinates: This is a side-effect of interactions with scripts, like RRF, that create temporary gates in the middle of nowhere. When the Xenon want to place a station they try to make it equidistant to all gates in the sector due to their rather strict computeriness .
The fix for this is simple, I can just place them at 0,0,0 or make an AL switch so you can enable 'Safe Station Placement'.
In other news...
Headed off to Taiwan today so responses may be slow to non-existent depending on Internet availability until I am back in Japan next week. Have a good week everyone
I guess thats why people use RRF, since the default race sector defense in XTM doesn't stand a chance against a Xenon invasion (Especially not on insane difficulty).7ate9tin11s wrote:How many sectors: If sector takeover is enabled then they will only stop taking sectors when there are no more sectors to take.
I lowerd ship token costs and build times, and changed
plugin.ix.station.activity
TO
(Sorry for the crappy code, couldn't find the switch/case control... is there even one?)
Will this correctly remove M5 and M4 types (and replace them with a M3/M6/M7/M2/M1) from invasion forces?
Im not sure if lowering cost/token times for all the ships was good, maybe I should only lower them for M6+ ships ?
Hope to get your feed back!
plugin.ix.station.activity
Code: Select all
098 $Invading = array alloc: size=0
099 $Activity[5] = $Invading
100 else if $time <= 0
101 if $building
102 if $debug
103 $name = sprintf: fmt='Built %s for %s invasion', $building, $sector, null, null, null
104 [THIS] -> set name to $name
105 end
106 @ skip if not [THIS] -> call script 'plugin.ix.build.ship' : Owner=$station Type=$building
TO
Code: Select all
098 $Invading = array alloc: size=0
099 $Activity[5] = $Invading
100 else if $time <= 0
101 if $building
102 if $building == M5 OR $building == M4
103 $classnum = = random value from 0 to 5 - 1
104 if $classnum == 0
105 $building = M3
106 end
107 if $classnum == 1
108 $building = M6
109 end
110 if $classnum == 2
111 $building = M7
112 end
113 if $classnum == 3
114 $building = M2
115 end
116 if $classnum == 4
117 $building = M1
118 end
119 end
120 if $debug
121 $name = sprintf: fmt='Built %s for %s invasion', $building, $sector, null, null, null
122 [THIS] -> set name to $name
123 end
124 @ skip if not [THIS] -> call script 'plugin.ix.build.ship' : Owner=$station Type=$building
(Sorry for the crappy code, couldn't find the switch/case control... is there even one?)
Will this correctly remove M5 and M4 types (and replace them with a M3/M6/M7/M2/M1) from invasion forces?
Im not sure if lowering cost/token times for all the ships was good, maybe I should only lower them for M6+ ships ?
Hope to get your feed back!
-
- Posts: 813
- Joined: Fri, 11. Nov 05, 23:18
Actually what you did just changes the times and tokens, but not the actual ship type being built. The code that chooses the ship to build is located in plugin.ix.station.activity.xml:
As I stated before I will be re-balancing it, but if you want to randomize it just replace that section with a random choice where $target is equal to a random Xenon ship type. I will be making it where it will add mod ships that are Xenon instead of having them hardcoded so it takes longer.
Code: Select all
108 else if $tokens > 0
109 * choose type
110 $target = find a random sector: startsector=$sector, jumps=100, owner=Xenon
111 skip if not $target
112 $target = find ship: sector=$target class or type=Moveable Ship race=Xenon flags=[Find.Random] refobj=$station maxdist=null maxnum=1 refpos=null
113 if not $target -> exists
114 $building = get ship array: of race Xenon class/type=Moveable Ship
115 skip if $building
116 return null
117 $target = size of array $building
118 $target = = random value from 0 to $target - 1
119 $target = $building[$target]
120 end