[script] Improved Xenon v0.95: Updated June 17, 2008

The place to discuss scripting and game modifications for X³: Reunion.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

zazie
Posts: 3702
Joined: Mon, 7. Mar 05, 14:55
x4

Post by zazie » Wed, 28. May 08, 09:46

It does :). Thanks for explanation. I will think now about the settings I might fight against; sweet nightmares :D

7ate9tin11s
Posts: 813
Joined: Fri, 11. Nov 05, 23:18
x4

Post by 7ate9tin11s » Thu, 29. May 08, 03:32

Version 0.9 Released!
Please see the first post for downloads and changes. They should be more balanced now, but I am always open to changing the difficulty settings if anyone has suggestions :)

User avatar
Tenlar Scarflame
Posts: 3359
Joined: Mon, 30. May 05, 04:51
xr

Post by Tenlar Scarflame » Thu, 29. May 08, 04:24

looks good, can't wait to try it! :D
My music - Von Neumann's Children - Lasers and Tactics

I'm on Twitch! 21:15 EST Sundays. Come watch me die a lot.

User avatar
narn
Posts: 218
Joined: Sun, 9. Apr 06, 21:07
x3

Post by narn » Mon, 2. Jun 08, 20:38

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.

7ate9tin11s
Posts: 813
Joined: Fri, 11. Nov 05, 23:18
x4

Post by 7ate9tin11s » Tue, 3. Jun 08, 03:28

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

User avatar
mrmaigo
Posts: 46
Joined: Sat, 10. Jun 06, 11:35

Post by mrmaigo » Wed, 4. Jun 08, 18:42

Great plugin, haven't had a chance to run .9 but keep up the great work

User avatar
ezra-r
Posts: 3420
Joined: Fri, 14. Oct 05, 21:04
x4

Post by ezra-r » Fri, 6. Jun 08, 03:51

very nice script im giving it a try and Im liking it

Iasthai
Posts: 15
Joined: Sat, 17. May 08, 18:22

Post by Iasthai » Sat, 7. Jun 08, 18:11

I just updated and something weird is happening, the xenon seem to have stopped building capital ships but are building insane amounts of fighters (mostly XL and L but with some M's) they dont seem to be invading anymore either, any suggestions? :)

Eandir
Posts: 173
Joined: Wed, 27. Jun 07, 02:10
x3tc

Post by Eandir » Sat, 7. Jun 08, 18:12

How do you change difficulty, and how do you choose the optional stuff? Sorry I am kind of a newbie when it comes to scripts. I used the plugin installer, and it seems to be working. I would just like to change the difficulty.

User avatar
mrmaigo
Posts: 46
Joined: Sat, 10. Jun 06, 11:35

Post by mrmaigo » Sat, 7. Jun 08, 19:49

It's in the artificial life settings under game play or game options or whatever it's called

7ate9tin11s
Posts: 813
Joined: Fri, 11. Nov 05, 23:18
x4

Post by 7ate9tin11s » Mon, 9. Jun 08, 05:24

@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 :D . 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).

User avatar
narn
Posts: 218
Joined: Sun, 9. Apr 06, 21:07
x3

Post by narn » Mon, 9. Jun 08, 23:12

Thanks for your response, It was very helpful. I haven't noticed any problems with it I think it could use some more big ships as well. Otherwise fantastic script!

User avatar
ezra-r
Posts: 3420
Joined: Fri, 14. Oct 05, 21:04
x4

Post by ezra-r » Mon, 16. Jun 08, 01:47

In the AL Menu I see a Xenon - Core option, when I enable it it takes a while to activate it, what is it?

User avatar
mrmaigo
Posts: 46
Joined: Sat, 10. Jun 06, 11:35

Post by mrmaigo » Mon, 16. Jun 08, 02:27

That would be the the one switch, the power button if you will

User avatar
Sesk
Posts: 441
Joined: Fri, 17. Nov 06, 21:09
x4

Post by Sesk » Mon, 16. Jun 08, 07:27

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 ?

7ate9tin11s
Posts: 813
Joined: Fri, 11. Nov 05, 23:18
x4

Post by 7ate9tin11s » Mon, 16. Jun 08, 07:43

How many sectors: If sector takeover is enabled then they will only stop taking sectors when there are no more sectors to take. :D

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

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

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

User avatar
Sesk
Posts: 441
Joined: Fri, 17. Nov 06, 21:09
x4

Post by Sesk » Mon, 16. Jun 08, 08:53

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

Zoed Vega
Posts: 383
Joined: Sat, 1. Mar 08, 18:52
x3tc

Post by Zoed Vega » Mon, 16. Jun 08, 09:54

Moderator erased post
Last edited by Zoed Vega on Tue, 4. Aug 09, 18:30, edited 1 time in total.

User avatar
Sesk
Posts: 441
Joined: Fri, 17. Nov 06, 21:09
x4

Post by Sesk » Tue, 17. Jun 08, 06:44

I lowerd ship token costs and build times, and changed

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!

7ate9tin11s
Posts: 813
Joined: Fri, 11. Nov 05, 23:18
x4

Post by 7ate9tin11s » Tue, 17. Jun 08, 07:32

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:

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

Post Reply

Return to “X³: Reunion - Scripts and Modding”