[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

7ate9tin11s
Posts: 614
Joined: Sat, 12. Nov 05, 00:18

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: 432
Joined: Fri, 17. Nov 06, 22:09

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: 259
Joined: Sat, 1. Mar 08, 19:52

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: 432
Joined: Fri, 17. Nov 06, 22:09

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: 614
Joined: Sat, 12. Nov 05, 00:18

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

User avatar
Sesk
Posts: 432
Joined: Fri, 17. Nov 06, 22:09

Post by Sesk » Tue, 17. Jun 08, 07:40

So, the modification I did and quoted in my previous post was correct (as far as the idea goes) ? I just want to make sure I don't screw up anything (Tho 50 M2s would be cool).

And considering my modification to the tokens and build times, I just made the invasions harder, the hard way :lol:

7ate9tin11s
Posts: 614
Joined: Sat, 12. Nov 05, 00:18

Post by 7ate9tin11s » Tue, 17. Jun 08, 09:35

Minor release that makes ship choices more random and less weighted towards small ships. There were no changes to the token or times files so you can save those and use your own versions if you have customized them.

Oh, and fixing the randomization has made life more difficult...poor universe... :twisted:

Enjoy!

Zoed Vega
Posts: 259
Joined: Sat, 1. Mar 08, 19:52

Post by Zoed Vega » Wed, 18. Jun 08, 14:58

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

7ate9tin11s
Posts: 614
Joined: Sat, 12. Nov 05, 00:18

Post by 7ate9tin11s » Wed, 18. Jun 08, 16:29

Your welcome :D

A5PECT
Posts: 4653
Joined: Sun, 3. Sep 06, 02:31

Post by A5PECT » Mon, 7. Jul 08, 08:40

7ate, I think I broke your script. :(

The AL option to activate/deactivate the Improved Xenon plugin appears to be stuck on Shutting down...

I can't toggle the plugin on or off anymore, and reinstalling the script files didn't work.
Admitting you have a problem is the first step in figuring out how to make it worse.

milp
Posts: 100
Joined: Sat, 26. Jul 08, 20:39

Post by milp » Mon, 4. Aug 08, 04:03

This is awesome.


Would it be possible to make something like this for pirates too?

NOO3TASTIC
Posts: 148
Joined: Sat, 28. Apr 07, 15:56

Post by NOO3TASTIC » Fri, 8. Aug 08, 22:25

Awesome script mate. Brilliant. Xenon are truly a threat now.

I have one question though. Xenon in my game captured sector Scale Plate Green and they were going deep space from Getsu Fune (which I got back from them recently).

Image

Is that the shortcut to Scale Plate Green from Getsu Fune?

46852
Posts: 84
Joined: Mon, 16. Jan 06, 19:17

Post by 46852 » Fri, 10. Oct 08, 11:41

7ate9tin11s, are you still improving your IX and IK scripts?

Anticept
Posts: 135
Joined: Sat, 18. Mar 06, 05:47

Post by Anticept » Wed, 15. Oct 08, 20:34

I have a small problem. During a mission I had, there were a buttload of xenon in a sector that I was trying to do. The problem is, I set the xenon core to disable for the duration of the mission, and an hour later, after finally finishing, I realized the plugin was still trying to shut down...

Anyway to find out what it's doing?

EDIT:

Nevermind, apparently something happened that caused all my scripts to just dead-stop. Gotta restart the game again :(
Signature.

zombie-uk
Posts: 182
Joined: Tue, 4. Nov 08, 03:54

Post by zombie-uk » Thu, 23. Apr 09, 04:38

I love this script. Makes the Xenon THE Force to be rekoned with. And also try this Sript by nividium (hes a sript creator too)

Xenon Assimilator Virus:

http://www.freewebs.com/nividium/morex3scripts.htm

(Scroll towards the bottoma nd you will find it)
It has a load of other scripts for you to have with if you desire them.

Just thought this script and The Xenon Assimilator one are possibly the best Xenon Universe Take over Gameplay possible. And DAMN tricky to clean up as the Non-Xenon ships infected with the Virus infect uninfected ships anywhere in the X-universe. Try it out and see for your self if you want to have to have a Xenon Conlflict like never seen before. (best to have a few M0s to start with and have ships that have a long range of fire power.)

Zombie.
Nvidia GeForce 9500GT



X3 Reunion i love it.

Post Reply

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