[LIST] Streamlining X3 with ease of use modifications

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
User avatar
Jack08
Posts: 2971
Joined: Sun, 25. Dec 05, 11:42
x3tc

Post by Jack08 » Mon, 9. Apr 12, 18:45

but I am not certain that it is all that reliable.
SIGNAL_KILLED & SIGNAL_CAPUTRED are the two singals that are 100% reliable, if they were not, both the XTL mod and Litcubes Phanon Corp would stop functioning within just a few game hours.
Image
"One sure mark of a fool is to dismiss anything that falls outside his experience as being impossible."
―Farengar Secret-Fire

User avatar
DrBullwinkle
Posts: 5704
Joined: Sat, 17. Dec 11, 02:44
x3tc

Post by DrBullwinkle » Mon, 9. Apr 12, 18:47

Jack08 wrote:SIGNAL_KILLED & SIGNAL_CAPUTRED are the two signals that are 100% reliable
Cool. Thanks, Jack!

Teleth
Posts: 286
Joined: Sat, 31. Mar 12, 06:39

Post by Teleth » Tue, 10. Apr 12, 05:43

DrBullwinkle wrote:
Teleth wrote:maybe have the drone carrier manage itself.
Lots of extra code with no benefit, IMHO. Even Lucike fakes it, which I take as an indication that it is not worth attempting. :)
Have you thought about maybe hooking it up to MARS goblins
I have tinkered with goblins a bit. I gave enemy ships Mk2 goblins that are tweaked to fly as fast a Mk1 drones. Two things became clear:

- Goblins are harassers; not killers. They try to entice enemies to come within range of MARS guns (which do the killing).
I don't think it would be TOO much of a stretch to have MARS make an exception for drone carriers granting them higher drone range and extra goblins. The max count for goblins seems to change per ship class as it is (12 in an M1).
The harassment you speak of is likely MARS trying to prevent drone losses by retreating drones that are under fire. I imagine it would not be hard to change.
DrBullwinkle wrote:
You could try MARS style renaming them, or holding an array of launched drone IDs
Renaming might work, but my experiments with creating the array of ships in-sector resulted in a huge performance hit. I have since learned more about find flags, so maybe that could be improved.
Don't search; this is a highly intensive activity.
You need but record the ship ID when you create a drone upon launch and add it to an array. Maintaining the ID array should be low cost.
If re-sizing the array is for some reason intensive, create an empty 30 in the array at initialization.

Plugin.LSDC.Drone.Engage:

Code: Select all

$drone = create ship
You should be able to append this to an array that is local to the ship. This will allow you to keep track of specific drone orders, drones that no longer exist etc.
DrBullwinkle wrote: Unlike you, once I got the hack to be good enough to play, I stopped coding and played the game. :)

My hacked LSDC v2.02
Well I'm still playing the game, and fully intend to throw a hundred or more hours away, I just want to get it a few more things right before continuing.. and also make a few small mods of my own along the way.
I will give your modified version of LSDC a good look over, thanks!

Some of my findings with the various carrier set-ups.

Automated Carrier Software: The concept is pretty good, and the system does work.. unfortunately in order to prevent the player from selling the drone ships, the drones are actually neutral to the player.
While this works, I have the feeling important things like the bounty system in XRM do not work with it. Construction was a bit buggy but it did mass produce real equipped fighters with a minimum of fuss.
Sadly I was not able to accurately gauge it as an OOS system due to the (believed) interference from Anarkis Defense System. (which I have for Pirates Guild.. and now use myself.)

One interesting feature in ACS is that it can actually pull the resources for construction off any transport ship within 5KM. This greatly simplifies logistics while remaining 'realistic'. No more having to personally dock with the carrier in question. I would still be in favor of cutting down resource types even still.

It was also not friendly with other carrier systems due to drone faction settings. Anarkis Defense System was not able to use the drones until I edited the script to produce friendly ships and even then they were fighting for drone control I suspect.

Which leads me to ADS. ADS itself is pretty damn good. It was able to painlessly manage multiple carriers, all of which are MARS compatible. ADS still has a few oddities, like every carrier software it seems, though these mainly stem from me constantly changing their orders more than anything. It has a pretty good interface for management.
With that said I'm tempted to edit ADS or MARS to support drone fabrication and have MARS manage the drones.

One of the reasons I'm not terribly fond of the traditional drones in X3 is having to use high numbers as performance suffers heavily with high numbers.
Are drone stats editable or anything? I notice Fighter drones are equipped with a weapon, and that they are responsive to super-tuning via the cheat package. Do you think there is any merit in increasing the volume of fighter drones (carry less) and making them twice or more powerful to cut down on drone numbers?

User avatar
DrBullwinkle
Posts: 5704
Joined: Sat, 17. Dec 11, 02:44
x3tc

Post by DrBullwinkle » Tue, 10. Apr 12, 06:34

Teleth wrote:The harassment you speak of is likely MARS trying to prevent drone losses by retreating drones that are under fire.
Nope. Goblins are designed for harassment. That's what they do. It is explained in the manual or the MARS OP. They don't really fight. They sneak up behind an enemy, and take a shot. If the enemy targets the goblin, he runs back to his ship... and the MARS-controlled turrets.

You could re-write the script, but it would be a major rewrite. There would be no point in using MARS, other than for some ideas.

Goblins *do* evade much better than vanilla ships. They excel at that. :)

But goblins do not really fight.
You need but record the ship ID when you create a drone
Yes! That's the ticket!
Automated Carrier Software
As you said, make the fighters player-owned. So what if the player cheats? The player can use the Cheat Package anytime he wants... there is no point in trying to make a script cheat-proof. :)

ACS, ADS, and CODEA are all similar carrier-management scripts. It is not surprising that they would compete with each other.

Please do not refer to ACS fighters as "drones". That was a poor choice of words on LV's part, which he (mostly) retracted. It's confusing. :)
With that said I'm tempted to edit ADS or MARS to support drone fabrication and have MARS manage the drones.
See? You even confused yourself. :) MARS does not manage fighters at all.
One of the reasons I'm not terribly fond of the traditional drones in X3 is having to use high numbers as performance suffers heavily with high numbers.
Agreed about large numbers hurting performance. But 30 will kill any single ship, and most squadrons. If your game cannot handle 30 ships in a furball, then you will have trouble with many combat situations.

A larger concern about drones is that they are too cheap and too powerful. For example, consider your use case of OOS freighters under attack. You get the signal_attacked warning. Then, instead of *going* to their aid, just call up the attacked frieghter in the Property screen. It will be the one blinking red. Tell it to eject 30 drones. Then relax, sip a beverage, and watch as your wussy freighter destroys an attacking Q squadron with all of its escorts. As a bonus: Thirty drones cost less than a single, fully-equipped, M4.
Are drone stats editable or anything?
Sure. They are just ships (Mk1 and Mk2 are Argon). The only caveat about editing them is that the standard Mk1, Mk2, and Keris drones are used by both enemies and friendlies.

You could, of course, *add* your own drone types. Or you can equip them or tune them in your script.
Do you think there is any merit in increasing the volume of fighter drones (carry less) and making them twice or more powerful to cut down on drone numbers?
No. Yes. :)

I think there is merit in making *enemy* drones more powerful, but not in changing their volume. If you want powerful friendly drones then use Mk2's. Their twin PAC's have 8 times the killing power of Mk1's single IRE. Plus the Mk2's have shields, like cheap, little, M5's.

As for cargo space; no. The *only* way (that I can think of) to use drones on a special-purpose drone carrier is to hard-limit the number of drones allowed on the carrier. Treat the capacity as if it were hangar slots. You must do this with the drone-carrier-management script -- there are no built-in stats that suffice.

When you look at my hacked LSDC, you will see that I vigorously limit the drones on board, to the point where you could transfer more drones to the ship and the software would delete them. The way that I did it is cheesy, but it does have most of the desired effect. The biggest "problem" with the way that I did it is that it makes the Griffon nearly invulnerable as an OOS patrol ship. Some might think that over-powered. But, as I mentioned, one might also consider it "more fair". You will have to decide for yourself. :)

User avatar
Jack08
Posts: 2971
Joined: Sun, 25. Dec 05, 11:42
x3tc

Post by Jack08 » Tue, 10. Apr 12, 06:46

You need but record the ship ID when you create a drone
Yes! That's the ticket!
Errm... What? ... i must be missing something

Why are you storing the drones ID tag when you could just store the reference the drone object itself... ? after all to get the ID tag you already have the actual drone object.
Image
"One sure mark of a fool is to dismiss anything that falls outside his experience as being impossible."
―Farengar Secret-Fire

User avatar
DrBullwinkle
Posts: 5704
Joined: Sat, 17. Dec 11, 02:44
x3tc

Post by DrBullwinkle » Tue, 10. Apr 12, 06:51

Jack08 wrote:i must be missing something
Haha! No, I/we were just being imprecise. The code segment that Teleth posted saves the reference to the drone object, rather than the ID. That was the part that I was agreeing with.

But, yeah, thanks for keeping us in line, Jack. I'm obviously a noobie, and Teleth is too busy scripting to play the game. ;)

(Just kidding, Teleth)

(Probably) ;)

User avatar
jack775544
Posts: 1118
Joined: Tue, 13. Dec 11, 09:27
x4

Post by jack775544 » Tue, 10. Apr 12, 06:52

It was mentioned earlier that someone wanted to add Kha'ak to UFJD sectors. It is relativly easy to to in one of the director files called 'Sector Managment' ( it has some numbers in front of it) there is a line of code that is commented out and a reason below it saying "Disbled since Kha'ak unavaible in AP" (or somthing along those lines :) ) simply uncomment that line of code and you will have Kha'ak in UFJD sectors. I would do this myself but I am away from my computer for the next couple of days.

Note: All the MD commenting I have seen is in English.

Note 2: MD is designed to be written in Microsoft Visual Web Developer, not notepad. Notepad++ can suffice however. If you really want to write MD unpack the director folder from 02.cat and there shall be some helpful tools im there the most important of them being the director schema (which allows for much easier editing and creating of MD files) and director.htm (which needs to be opened in Internet Explorer) which has the complete list of MD commands and conditions.
1940s - Various "computers" are "programmed" using direct wiring and switches. Engineers do this in order to avoid the tabs vs spaces debate.

User avatar
DrBullwinkle
Posts: 5704
Joined: Sat, 17. Dec 11, 02:44
x3tc

Post by DrBullwinkle » Tue, 10. Apr 12, 06:56

jack775544 wrote:'Sector Managment' ( it has some numbers in front of it) there is a line of code that is commented out and a reason below it saying "Disbled since Kha'ak unavaible in AP" (or somthing along those lines :) ) simply uncomment that line of code and you will have Kha'ak in UFJD sectors.
Excellent tip, Other Jack. (Jack[2]?). Thanks!

Teleth
Posts: 286
Joined: Sat, 31. Mar 12, 06:39

Post by Teleth » Tue, 10. Apr 12, 07:15

DrBullwinkle wrote:Automated Carrier Software

As you said, make the fighters player-owned. So what if the player cheats? The player can use the Cheat Package anytime he wants... there is no point in trying to make a script cheat-proof. :)
I did!.. but ACS will fight for control, it is not like ADS or CODEA that will only function if you turn it on.. it is actively trying to prevent 'ACS Fighters' from becoming player property.
I think I'd best make one from scratch or work on your edited LSDC.
DrBullwinkle wrote: Please do not refer to ACS fighters as "drones". That was a poor choice of words on LV's part, which he (mostly) retracted. It's confusing. :)
Yeah my bad.
DrBullwinkle wrote:
With that said I'm tempted to edit ADS or MARS to support drone fabrication and have MARS manage the drones.
See? You even confused yourself. :) MARS does not manage fighters at all.
Sorry that is me confusing you; I did infact mean ordinary drones here.
DrBullwinkle wrote: Agreed about large numbers hurting performance. But 30 will kill any single ship, and most squadrons. If your game cannot handle 30 ships in a furball, then you will have trouble with many combat situations.
My game can handle 30 fine, but can it handle several drone carriers holding dozens of sectors? Probably not well.
I would like full use of drone carriers, preferably limited by my in-game pocket and not how far I overclock my i7. This is why I proposed increasing drone sizes and their individual strengths; you are of course right that if you fill a freighter just with drones you are going to have a monster either way.
DrBullwinkle wrote:
Are drone stats editable or anything?
Sure. They are just ships (Mk1 and Mk2 are Argon). The only caveat about editing them is that the standard Mk1, Mk2, and Keris drones are used by both enemies and friendlies.

You could, of course, *add* your own drone types. Or you can equip them or tune them in your script.
I'm led to believe this is actually impossible. You cannot create new drone types. Equipping and tuning them via script, maybe. I'd actually love to have some different drones similar to EVE.
There is a rather large drone mod that goes quite overboard with new drone types, but sadly I think these are just fake drones similar to ACS.
I'm honestly not even sure what the difference is. The AI probably can't use anything but the three ordinary drones.
DrBullwinkle wrote: When you look at my hacked LSDC, you will see that I vigorously limit the drones on board, to the point where you could transfer more drones to the ship and the software would delete them. The way that I did it is cheesy, but it does have most of the desired effect. The biggest "problem" with the way that I did it is that it makes the Griffon nearly invulnerable as an OOS patrol ship. Some might think that over-powered. But, as I mentioned, one might also consider it "more fair". You will have to decide for yourself. :)
Personally, I am trying to keep things 'fair' in my game. One of the reasons I use MARS drones is so I don't just deploy a thousand each time I feel like dominating a sector. There's just no balance with these things.
I really like the idea of drone carriers and enjoy automating things however so I would like something to go my M7s that I don't have to babysit.
jack775544 wrote: 'Sector Managment' ( it has some numbers in front of it) there is a line of code that is commented out and a reason below it saying "Disbled since Kha'ak unavaible in AP" (or somthing along those lines Smile ) simply uncomment that line of code and you will have Kha'ak in UFJD sectors.
Hah, I'm glad Egosoft are either kind or lazy. I was going to merge the X3TC and X3AP versions, but I guess there's no need now! This will be going on to my game, thanks! :)
I know I should install proper XML software.. I'm just a glutton for punishment it seems :/
Jack08 wrote: Errm... What? ... i must be missing something

Why are you storing the drones ID tag when you could just store the reference the drone object itself... ? after all to get the ID tag you already have the actual drone object.
I did mean the reference, I was just trying to talk in english. I am pretty sloppy with these terms eh..

User avatar
DrBullwinkle
Posts: 5704
Joined: Sat, 17. Dec 11, 02:44
x3tc

Post by DrBullwinkle » Tue, 10. Apr 12, 07:44

Teleth wrote:ACS will fight for control, ... it is actively trying to prevent 'ACS Fighters' from becoming player property.
OIC (Oh, I See). Perhaps there is a reason that ADS is maybe the most popular of the three carrier managers that we have talked about.
My game can handle 30 fine, but can it handle several drone carriers holding dozens of sectors?
Probably. It is unlikely that more than 2 will be fighting at any time. In my first game, I had an extremely hostile universe (Xtreme mode jobs) and two Griffons plus a few other captured ships were able to handle the patrols fairly well. No performance problems when the drone carriers are limited to 30 each.
editable drone stats
I see what you are asking. Yes, you can create new types. No, the AI will not fly them. :)

So, yeah... unless you want to modify the vanilla scripts, there are only three drone types that function autonomously.

Of course, you could always write your own scripts. That is, essentially, what MARS does with goblins. Goblins are so heavily controlled that you could probably create your own types and they would work fine.

They still would not fight, though. :)
Personally, I am trying to keep things 'fair' in my game.
Depending on your definition of "fair"... my current hack is fair in that you can actually defend your OOS assets with Griffon patrols.

If you want it to be "fair" in that the enemies can win, then you have an excellent opportunity to improve on my code. Either way, you win. :)

Right now, I don't count the drones launched. I just force the drones on board to always be 30. If under 30, we replicate more. If over thirty, that was probably a script error, so we delete the extras. Also, I do not charge credits for drone production because we replicate too many.

You could make that more sophisticated by counting the drones, and limiting the drones in the "air". Then it would make sense to charge for drone replication.

If you could also remove the existing user interface for drone production, that would be great. Or maybe re-purpose it, as you see fit.
I would like something ... that I don't have to babysit.
Then you have come to the right place. :) My hacked LSDC definitely requires little to no babysitting. The only way the drone carriers ever die is if the LSDC software gets stopped and is not started again (probably happens during script updates).
I know I should install proper XML software..
Any XML editor will do what Jack[2] described. However, that is still kind of lame, compared to a decent WYSIWYG editor (like Exscriptor).

If you get tired of not playing the game (or are just curious about MD), there is a thread about a hypothetical MD Editor that Apricotslice started a couple of weeks ago. The thread has 10x too many words, but there are some good tidbits of information there:

MD Editor
Last edited by DrBullwinkle on Tue, 10. Apr 12, 17:00, edited 3 times in total.

User avatar
jack775544
Posts: 1118
Joined: Tue, 13. Dec 11, 09:27
x4

Post by jack775544 » Tue, 10. Apr 12, 08:20

I found a link to the mission director guide here i know there is a topic covering it on the forum somewher but I am to lazy to find it :wink: . It is for X3R but it is still relavent to MD coding in TC/AP.
1940s - Various "computers" are "programmed" using direct wiring and switches. Engineers do this in order to avoid the tabs vs spaces debate.

User avatar
DrBullwinkle
Posts: 5704
Joined: Sat, 17. Dec 11, 02:44
x3tc

Post by DrBullwinkle » Tue, 10. Apr 12, 08:23

jack775544 wrote:i know there is a topic covering it on the forum somewher but I am to lazy to find it
It is in the link that I posted four centimeters above your post. :)

Specific Post about the MD docs

MD Editor thread

User avatar
Gazz
Posts: 12430
Joined: Fri, 13. Jan 06, 17:39
x3tc

Post by Gazz » Tue, 10. Apr 12, 12:12

DrBullwinkle wrote:Nope. Goblins are designed for harassment. That's what they do. It is explained in the manual or the MARS OP. They don't really fight. They sneak up behind an enemy, and take a shot. If the enemy targets the goblin, he runs back to his ship... and the MARS-controlled turrets.
In MMO terms, MARS drones do both CC and pulling.
They are quite effective at distracting fighters so that the mothership can pick off the number it wants to deal with.

The only time when multiple drones are launched against a target is when a capital ship is trying to swat the last enemy fighter buzzing around it.


I don't recommend trying to alter the drone control or drone fight script. It's not for the faint of heart. But that's your headache...
The drone fight script is actually far more primitive than the vanilla fighter script. It's basically doing nothing but attack runs. The smarts are in the drone control script that dictates when to do that.



As for the AP drone carriers, they were balanced on the premise that they would (somehow) be able to "do something with" the drone type(s) that were attached to them as built-in wares.
These drones are ships when docked, not wares.
Some DC are stronger but have weaker drone types attached (split), while other DC are far weaker but have a better drone type or even multiple ones.
Drone production is always balancable - somehow.
The key is that there is no infinite production but a drone produced by DC #1 stays attached to DC #1 until and unless it's docked to a different DC that can use this drone type and has an open "control slot".
That way the drones always require a mothership and cannot simply be used as cheap fighters for a generic player-owned carrier.
Another idea was that the hull of drones slowly detoriates if not docked on "their" DC but would automatically be repaired if they are.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.

User avatar
DrBullwinkle
Posts: 5704
Joined: Sat, 17. Dec 11, 02:44
x3tc

Post by DrBullwinkle » Tue, 10. Apr 12, 16:49

Oh, right... I forgot about the "last fighter" behavior of goblins. Thanks, Gazz.
Gazz wrote:As for the AP drone carriers, they were balanced on the premise that they would (somehow) be able to "do something with" the drone type(s) that were attached to them as built-in wares.
I have not been thinking about AP drone carriers at all. My POV was based more on the Final Fury Griffon lore from TC. Now that you mention the AP drone carriers, it might be interesting to try to provide some support software for them (unless somebody else is working on it?). The fact that the new drone types behave as ships when docked is a good thing in that it solves the problem of limiting the number of drones available.

However, the part about "somehow do something with the AP drones" sounds like a fairly large gap. Are you saying that there are no scripts at all that fly AP drones?
a drone produced by DC #1 stays attached to DC #1 until and unless it's docked to a different DC that can use this drone type and has an open "control slot".
OK, that makes sense. Is there more detail available regarding the design intentions of AP drone carriers in public somewhere? Or is it all discussed in some secret designers-only club? I am specifically curious about what needs to be done that does not already have a development team assigned to the task.

User avatar
Gazz
Posts: 12430
Joined: Fri, 13. Jan 06, 17:39
x3tc

Post by Gazz » Tue, 10. Apr 12, 17:35

Those "drones" are simply ships. M5 or so. They use generic fighter scripts.
DrBullwinkle wrote:OK, that makes sense. Is there more detail available regarding the design intentions of AP drone carriers in public somewhere? Or is it all discussed in some secret designers-only club? I am specifically curious about what needs to be done that does not already have a development team assigned to the task.
AFAIK, noone is implementing "the" AP DC so that's simply my approach on how it could work.
The core item is that the number of drones per carrier must be limited and that unlike "real" fighters, drones should somehow rely on their mothership for maintainance, charge, repairs, or whatnot.

As for the resource micromanagement, I'd limit it to "credits only". It's just no fun to constantly be ferrying ore, hull plating, or whatthehellever to every single one of your DC to keep the production going.
Rather have the production drain laser and shield energy instead, making it a choice between production/maintainance and direct combat.
That's why the drone selection is limited to begin with.

I imagine the DC more like Protoss carriers. True carriers but the minimum possible micromanagement.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.

Post Reply

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