[SCR] [X3:TC/AP] [v1.9.8.12] [03/23/14] Galaxy Explorer

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

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

Post Reply
gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator » Fri, 3. Feb 12, 01:26

jeah. death by feature creep. I KNOW exactly what you mean.

I worked at an advanced enemy avoidance routine until now. I wanted the explorers to actively fly around hostiles.
but all that task management killed me. I got the directions ... at least the one away from the enemy.

I now settled on just escaping into the nearest gate if there is any aggressor close to me.
but it's not good enough, yet ...
have to find at least a suitable gate to avoid enemy.

we'll see... tomorrow :)

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle » Fri, 3. Feb 12, 01:45

The ability to escape would be a nice additional feature, but don't torture yourself trying to make it work. Galaxy Explorers are already limited by the inability to use a jump drive for defense. I understand the problem with the eCells, and agree that it seems like a lot of extra effort for questionable additional benefit.

Kestrels or Spitfyres are alternative solutions to the problem. :)

gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator » Sat, 4. Feb 12, 11:04

yes ... I had a test run tonight which should show if the current avoid routine was any better.

well - it didn't. All explorers dead.

So I'll implement another Idea to it I had this morning. If that is no help either, I'll remove it totally.

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle » Sat, 4. Feb 12, 16:23

After giving the avoidance problem more thought, I think that lightly-armed ships have only two viable defenses:

1) Outrun (and avoid) assailants. A fast ship helps.

2) Jump.

Both of these behaviors are in vanilla flight scripts that the NPC's use. So how much of it can you reuse in your scripts?

I understand your reluctance to add refueling code to Galaxy Explorers. Again, is there are way to reuse vanilla scripts to do the job?

I am just brain-storming here. If there is no vanilla code that you can re-use, then don't worry about it. I was just looking for an "inexpensive" way to get the behaviors that you seek (inexpensive in terms of your time).

gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator » Sat, 4. Feb 12, 17:09

Well there are no built in mechanisms I know of - at least not when it comes to totally avoiding to get in range of aggressors.

So I wrote a little routine myself and was successful.
Explorers now scan for enemies in range and as soon as one tries to attack, the explorers flee into a gate away from the enemy if possible.

Downside is: The enemies have to get very close for the script to recognize them as a threat because I want to make sure they are trying to attack ME.
Still, I can escape before they shoot - most of the time :)

When there are lots of enemies in the sector there are still chances to have the explorer killed. But they DO avoid at least single threats pretty well now.

All in all I think this is an improvement and as good as possible with the game - so I'm happy with it :)

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle » Sat, 4. Feb 12, 19:45

Sounds good. I will give it a try.
gnasirator wrote:I think this is ... as good as possible with the game
Oooh... dangerous words. :) SOMEBODY will always find a way to prove you wrong! :)

For example, the game allows jumping. :P

But I understand what you mean.

Somebody wrote a script that scans enemy intentions (presumably by scanning the scripts on their stack). Could you scan enemy ships in range to see if they have the Explorer targeted (following... or killing...)?

Slightly off-topic: Want to know how *I* would approach the problem? I would make them jump. And I would spawn energy cells over time. Forget buying them! Energy cells (for ships), in my opinion, are only fun early in the game. After a couple of dozen ships they become tedious rather than challenging. And carriers that cannot carry enough energy cells for the fleet are absurd.

Personally, I use a modified version of Capital Ship Energy Cell Generator (CSecG). I modified it to work on all ships rather than just capitals. (I use Version *2* only. Version 1 is buggy and Version 3 is bloated.)

But that's just me... other folks may have different opinions on that! :)

gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator » Sat, 4. Feb 12, 23:18

DrBullwinkle wrote:Somebody wrote a script that scans enemy intentions (presumably by scanning the scripts on their stack). Could you scan enemy ships in range to see if they have the Explorer targeted (following... or killing...)?
That's just how I did it at first. I scanned enemies for script lib.ship.attack.std on stack. But then it could be that they weren't attacking me or that they were running tortuga and wouldn't use that script at all so I settled to use "enemy -> get attack target" to find if they are trying to attack me.
downside is, it has a very limited range.

About your cheating habits - I don't want that for me :)
I hate spawning anything if avoidable.

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle » Sat, 4. Feb 12, 23:49

Yeah, how and when to cheat are very personal things. Even the people who play "vanilla" usually cheat by using exploits, such as looking up locations of abandoned ships and nividium rock clusters. Or cloning weapons instead of taking the time to stimulate the economy to build them.

That is the brilliance of X3 and the script editor. People can cheat exactly as much as they like. And "cheats" can make things more difficult rather than easier.

The things that I simplify are redundant, tedious tasks, such as equipment handling and complex building. After doing them the vanilla way 50 or 100 times, they just are not fun anymore.

But I spend more time adjusting combat difficulty so that there is more challenge. X3 is quite weak in combat. So I increased hulls, gave MARS only to enemies, and tweaked the Opponent Balancing System (OBS.xml) to quadruple the difficulty of missions.

The result is that a pair of MARS-equipped Q's are almost scary in their ferocity. They are even more intimidating when escorted by barrage-firing M8's. That is the way that it should be, IMHO. I don't want to be able to kill a Q with my M3, or win every mission the first time I try, as in the vanilla game.

It's big fun to have to try a combat mission a few times in order to survive. (Well, it's fun for me!)

(See? I told you this was off-topic. :) )

gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator » Sun, 5. Feb 12, 11:51

DrBullwinkle wrote:(See? I told you this was off-topic. :) )
Yeah got it :)
Sounds really nice! Even though I wouldn't want to miss MARS on my ship anymore. Still, if you have tweaked your game enough that you think it would be worth sharing, I'd be interested.

But right, off topic :)

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle » Sun, 5. Feb 12, 17:16

I do want to share what I have cooked up. It needs some clean-up before it will be easy to share.

As for MARS, I do use Goblins for non-combat tasks. They are a lot of fun... more fun than I expected! For my turrets, I use Missile Defense 2. So I am not completely defenseless against missiles, and my turrets will independently track targets. However, the enemies get superior firepower.

masskaos
Posts: 14
Joined: Sat, 20. Feb 10, 21:01
x3tc

Post by masskaos » Sun, 5. Feb 12, 22:52

[...So I wrote a little routine myself and was successful.
Explorers now scan for enemies in range and as soon as one tries to attack, the explorers flee into a gate away from the enemy if possible.

...When there are lots of enemies in the sector there are still chances to have the explorer killed. But they DO avoid at least single threats pretty well now.

All in all I think this is an improvement and as good as possible with the game - so I'm happy with it :)[/quote]

Well, I was watching in sector while my kestrel was doing its best to avoid two pirates in Rye's Desire. It was doing well right up until it plowed into an asteroid :shock: !

The next kestrel in sent in a bit later didn't live much longer. It seems the planet killed it while it was trying to place satellites over the eastern gate. Any why of setting the distance off axis for satellite placement?

Other than this minor self killing issue. I rather like your explorer script.

Playing AP by the way.

Cheers

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle » Sun, 5. Feb 12, 23:14

masskaos wrote:I was watching in sector while my kestrel ... plowed into an asteroid
Yeah, I should have mentioned that very fast ships, like the Kestrel and Spitfyre, work best OUT of Sector. In-Sector, they crash into things. Frequently.

It is better to watch them on the Navigation map.

Litcube's Bounce reduces the problem by turning off collisions for AI ships when In-Sector.

If you have a carrier (including TM or TL), there is a similar problem with a different solution: Gazz's Docking Lockup Fix. It allows your fighters to use a docking computer.

gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator » Mon, 6. Feb 12, 00:13

masskaos wrote:Any why of setting the distance off axis for satellite placement?
That is because most AI ships stay around center height and have a max aggro range of ~15km. Therefore placing sats above or below that reduces their chance of getting killed in drive by shootings.

nice to hear btw that my script works :)

masskaos
Posts: 14
Joined: Sat, 20. Feb 10, 21:01
x3tc

Post by masskaos » Mon, 6. Feb 12, 01:54

DrBullwinkle wrote:
masskaos wrote:I was watching in sector while my kestrel ... plowed into an asteroid
Yeah, I should have mentioned that very fast ships, like the Kestrel and Spitfyre, work best OUT of Sector. In-Sector, they crash into things. Frequently.

It is better to watch them on the Navigation map.

So the whole running into the planet and dying thing was because I was in sector? I can send the scout in OOS to map it without death planet syndrome? OK, will give that a go...

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle » Mon, 6. Feb 12, 02:05

masskaos wrote:So the whole running into the planet and dying thing was because I was in sector? I can send the scout in OOS to map it without death planet syndrome?
Yes.

Collisions are turned off when ships are OOS. They dock faster, fly straight through asteroid fields, etc. It is well-known autopilot behavior. You must be new around here... welcome to the X-Verse!

Similary, OOS combat is calculated differently than IS. Instead of which "bullet" hits what, all guns and shields are combined, then each ship gets a "turn" to shoot. The "turn" last 30 seconds if you do not watch the map, or 5 seconds if you do watch. As a result, you might make different choices about ships and loadouts. Heavy is better. Maneuverability is irrelevant. Missile defense is irrelevant.

An odd side-effect is that a TL (like an Elephant or a Ryu) is as good as a corvette when OOS. Sometimes better (more guns). (Even without fighters).

Another odd side-effect is that it takes a turn for even the biggest ship to kill even the smallest ship. So a large wing of M5's (or 30-50 drones) can kill even the largest destroyer.

nap_rz
Posts: 1383
Joined: Sun, 25. Dec 05, 10:42
x3tc

Post by nap_rz » Mon, 6. Feb 12, 16:21

hello I'm using this with XRM 1.17, what software do I need? explorer software, where to buy? my true light seeker from the goner start don't have it but can have explore galaxy command... :? :? :?

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle » Mon, 6. Feb 12, 17:07

nap_rz wrote:hello I'm using this with XRM 1.17, what software do I need? explorer software, where to buy?
I am sorry but, if you do not know where to buy Explorer Command Software, then you should play the game. Modify it later.

If XRM changes where Explorer Command Software is sold, then you should ask on the XRM thread.

gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator » Mon, 6. Feb 12, 17:08

well I can't give XRM support as I don't use it. My script was just found to be working there.

But you actually shouldn't have an Explore Galaxy command without the explorer software ... can't to be honest.
But hey, see it this way:
better have a command without software than having the software without command ;)

User avatar
Erenar
Posts: 279
Joined: Sat, 24. Dec 11, 00:24
x4

Post by Erenar » Wed, 8. Feb 12, 13:28

Nap......

*shakes head*

Truelight seeker's inbuilt software is Explorer command and Military scanner.... kinda the purpose of an exploration M6.

Slow.... down... and... read :P :D

gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator » Wed, 8. Feb 12, 19:21

aha! that explains a lot :)

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”