[SCR] MARS Fire Control (v5.25 - 16.02.13)

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

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

User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz »

Oh, if you're flying a fighter you might not quite... appreciate... the AI ships using MARS.
But it might do wonders for your evasive skills and maybe make you reevaluate speed and nimbleness on one hand versus shields that are measured in gigajoules on the other. =P

Something smaller scale would be the Missile Defense Mk2 script I wrote.
It really only works for missiles but that is just about the greatest weapon imbalance in TC.
The stock MD scripts are completely helpless against things like M7M or "Missile Barrage". No way in hell.
Yet they are (officially) "Missile Defense"...
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.
semiliterate
Posts: 357
Joined: Sat, 13. Dec 08, 22:02

Post by semiliterate »

i meant more for a random percentage - similar to how TLs sometimes spawn with Hull Polarising and stuff. i'd like to fight a MARS ship - but the A is the important part. it's the three Centaurs with it enabled plus the Brig that gives me the problem - the fact that in a normal fight, they do okay 'cause of weight of fire. yeah, they're still not way dangerous, but ALL MARS is too much so. so, i was thinking, maybe some MARS is the answer!

but um, i suspect it's not easy.
User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz »

Well, what exact rule should it be?

How much randomness with what part of a fixed percentage?
How many min and max and how would it be defined? Based on the player owned ships with the most hull points nearby? On ship classes and if so how?
etc. etc...

"Only" 2 PX can fry a player M4 easily enough.
Now a player M2 would just casually swat them in passing without actually "engaging" them.
Kinda like a kid with a magnifying glass. The ant wasn't dangerous or attacking at all. It just was at the wrong place at the wrong time.
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.
semiliterate
Posts: 357
Joined: Sat, 13. Dec 08, 22:02

Post by semiliterate »

hmm. well, tell you what. i will think about it a bit more than when i first suggested it. as of now, the only rule that's entered my head is "one or two per fight" which means the only idea i have is can it be enabled for one to three ships per, well, sector, since i guess "battle" isn't something a script can identify, perhaps with MARS transferring to another ship after the first is destroyed? how CPU-loady is that (in terms of light, medium, ludicrous), and how about adding a selection of weaponry as well? i suppose this still has the problem of squishing me if i dare to venture into an M3 (more a problem for everybody else, 'cause honestly i'd never fly anything smaller than an M6) so i dunno.

can it do 0 (heavily weighted - say 80-90%) to 1 if there's less than (about) five player M3s in sector, 0 (70-80%) to 2 if there's an M6 up to, say an M7...

i'm gonna stop there because that set of nested rules already looks ugly to me and i haven't even started to account for enemy ships. hmm. the only way i can see to figure this out is to test it and that's a lot of work. i'm tempted to just say "fake it - do a stock like thirty percent chance and let me deal with it", but... yeah, i doubt all the fighter-jockies would love it.

um, yeah, i'll think about it.
User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz »

Well, a complicated lookup table or a huge number of nested conditions is very likely to break under stress. (and it's a nightmare to adapt to mods...)
And I'm not gunna implement it anyway so developing one would be for your entertainment only. =)

If something has to be evaluated reasonly quickly you need to find a few meaningful variables and work with those only.

MARS heavily relies on actual ship size and speed.
A bigger target is easier to hit. Wow. Whadda revelation!
A big target is also either a) valuable and a quick, safe kill and/or b) dangerous.
A faster target means firing with a huge lead where the slightest course change translates into a miss.

You toss these into a pre-balanced formula and get one ballpark value out. Good target, bad target.

You should just try to come up with something simple. (keeping it simple is always the hard part)
Ship size, shields, laser generator, hull points, number of turrets... some quickly computed "danger rating".

If the Sharks to the east have 5 broken bottles and 2 bicycle chains, you can then quickly figure out how many baseball bats you need to give to the Jets on the west side to make it an interesting fight.
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.
kelmen
Posts: 308
Joined: Tue, 9. Dec 08, 15:11

Post by kelmen »

After I applied the latest ver, I noticed 2 of my ships cannot fly at their max speed

noted that I run CMOD too

eg: Octupus Raider, max is 690, but after new MARS is near 600, 58* something
and Fenrir (I got this due to a ATF shipyard mod) max is 210, but chg to around 180 something

after I revert back to 4.28 MARS, all back to normal
semiliterate
Posts: 357
Joined: Sat, 13. Dec 08, 22:02

Post by semiliterate »

does this reversion involve removing the tships from the /types folder? 'cause that might change the speed from CMod's if you're using CMod's improved ships plugin.
User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz »

Well, yeah. The ship mod would... mod ships.

If you want both you should edit the CMOD Tships and add Repair Laser (mining laser) capacity to all 3 fighter drones. That's it.
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.
kelmen
Posts: 308
Joined: Tue, 9. Dec 08, 15:11

Post by kelmen »

can some new features to be include in next release?

1. for cargo-collect-drone: To chk if current ship cannot accomodate 1 of the floating cargo, skip it. else drone will keep wasting time to pick them in

2. if i set auto-collect-on on cargo ship, whenever the ship is flying cross a sector, drones will be auto release to pick any avail free cargo, however sometime the cargo ship will continue its course, and may left out the drone when jumping to next sector
maybe some distance chking onto cargo ship which is about to cross the gate, like within 5 km, all drones which in the space cannot retrieve cargo by the time the ship jump, will auto-recall-them-back-now and abort any furhter cargo picking
User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz »

kelmen wrote:2. if i set auto-collect-on on cargo ship, whenever the ship is flying cross a sector, drones will be auto release to pick any avail free cargo, however sometime the cargo ship will continue its course, and may left out the drone when jumping to next sector
maybe some distance chking onto cargo ship which is about to cross the gate, like within 5 km, all drones which in the space cannot retrieve cargo by the time the ship jump, will auto-recall-them-back-now and abort any furhter cargo picking
That would be possible but I'm not using complicated rules like that if not necessary.
(Every collector would constantly have to check all possible gates in the sector...)

New rule: No cargo collection if the ship's speed is > 0.
Any of your ships randomly passing through will not mess with the assigned collector's job.

It will actually save quite a bit of CPU power so I'll do it anyway.

1. for cargo-collect-drone: To chk if current ship cannot accomodate 1 of the floating cargo, skip it. else drone will keep wasting time to pick them in
Even if drones can not possibly bring the cargo aboard, they can tow them out of the main traffic lanes and out of battles, saving the goods from destruction.

Easy solution: bring a bigger collection ship.
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
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz »

Version 4.33 released.

Automatic cargo collection will not collect while the ship is moving.

Since this is generally not desirable while ships go about their business throughout the universe this saves another chunk of CPU time.
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
Zayltsin
Posts: 52
Joined: Sun, 15. Feb 09, 21:19
x4

Post by Zayltsin »

Will the drones still pull the stuff out of combat zones / high traffic zones so they dont get destroyed so you can collect them after the fight or not? im presuming not though.
System: Intel Core i7-4790k, 16Gb DDR3 2400Mhz G.Skill Trident X RAM, Nvidia GTX1070.
kelmen
Posts: 308
Joined: Tue, 9. Dec 08, 15:11

Post by kelmen »

Gazz wrote:Version 4.33 released.

Automatic cargo collection will not collect while the ship is moving.

Since this is generally not desirable while ships go about their business throughout the universe this saves another chunk of CPU time.
will this create a possible problem if the cargo too far away, any drone sent in will always abort in the middle to reach them, and cargo ship is stop, distance is not reduce, and drones being keep repeat send-in, abort, return, and sent-in, repeat.... ?
DaveyP
Posts: 986
Joined: Mon, 7. Nov 05, 19:06
x3tc

Post by DaveyP »

Quick question. Sorry if it's already been asked and answered.

Does MARS take into account ammo levels? If I equip my ship with gauss cannon, will the weapon selection try to use them in the turrets even if there's no ammo?

[EDIT]

...and if there's another new version, would it be possible to get goblins to collect astronauts as well as cargo?

Thanks.
Last edited by DaveyP on Fri, 20. Mar 09, 16:39, edited 1 time in total.
User avatar
Locksley
Posts: 371
Joined: Fri, 18. Mar 05, 16:26
x3tc

Post by Locksley »

Hi Gazz!

About AI ships using MARS and how to insert some randomness.

Does TC still use "combat skill" on the AI pilots? As I recall it was a value from 1 to about 30. One could check on that and if the ships captain got a high value they get MARS installed; being as they are a skilled and trusted pilot.

And then one got the "morale" points, guess one might use that too. Low bravado gets no MARS - such cowards :P

EDIT: Morale, aggression and fight skill are three things that could affect if the ship got MARS or not.

Also the breakpoint of these numbers could be adjustable in the xml as much of the rest is.

Cheers

EDIT: 1. It says in the manual that MARS uses fast lasers to hit fast targets but in the xml to adjust lasers the speed is marked as obsolete - does the script know the speed of the bullet automatic?
2. Also - since e.g. massdriver only affects hull; does the script take this into account somehow?
3. The area effect setting, what does the settings imply? Since there are three.
4. How does the script "brake for ships"? Is there a capture switch or do the weapons just take a short break when they dropped the shield?

Reason why I ask these questions is that I haven't got any time to play yet :( so I can't check it out myself; and besides I am just starting out in TC.
User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz »

DaveyP wrote:If I equip my ship with gauss cannon, will the weapon selection try to use them in the turrets even if there's no ammo?
LOL!
Would you?
...and if there's another new version, would it be possible to get goblins to collect astronauts as well as cargo?
No. I doubt they would... cooperate.

Locksley wrote:Morale, aggression and fight skill are three things that could affect if the ship got MARS or not.
Interesting approach but I don't think that the skill of the captain should govern what the ship's owner built into it.

If I add some randomness (and that's a big if) I might look at the job IDs. A military ship would have a higher chance than some civilian or a traveling arena.
3. The area effect setting, what does the settings imply? Since there are three.
They imply that these lasers work completely differently.
Kinda like how soldiers are taught that a knife works not the same way as a grenade even though both can be thrown.
Subtle differences y'know?
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
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz »

Version 4.34 released.

MARS did not shut down as intended when OOS. (was a side effect of the repair feature)

Goblins can be sent to attack mines, making them the only ships in X3 that can do that.
It's not much of a career choice, though, given the blast range and all.
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.
StormRazor52
Posts: 74
Joined: Sat, 9. Jun 07, 19:19
xr

Post by StormRazor52 »

Hey Gazz, I love this script for it really takes defense and offense to a new level for a ship captain, and your right about the goblins attacking the mines. not much of a career choice. Hopefully the little buggers don't turn cylon on us. Cheers guy, just really enjoy your scripts. keep it up
User avatar
Locksley
Posts: 371
Joined: Fri, 18. Mar 05, 16:26
x3tc

Post by Locksley »

Locksley wrote:
Morale, aggression and fight skill are three things that could affect if the ship got MARS or not.

Gazz answered:
Interesting approach but I don't think that the skill of the captain should govern what the ship's owner built into it.

If I add some randomness (and that's a big if) I might look at the job IDs. A military ship would have a higher chance than some civilian or a traveling arena.
Yeah, I see your point (actually I have a hard time justifying any military ship going without MARS)

The reasons why I thought about those values is that there already there and other scripts can easily affect them AND one could write a script for using the scanner to check the pilots ratings; to check the opposition as well as deciding attacking a ship with MARS. On the other hand, if MARS is installed on an AI ship is the commodity installed aswell? In that case it would be sufficient with a regular scan I guess.
Quote:
3. The area effect setting, what does the settings imply? Since there are three.

They imply that these lasers work completely differently.
Kinda like how soldiers are taught that a knife works not the same way as a grenade even though both can be thrown.
Subtle differences y'know?
:P I will investigate. I actually got some time to play now - this is a fun game!
StormMagi
Posts: 1335
Joined: Sat, 17. Mar 07, 03:53
x4

Post by StormMagi »

Gazz wrote:Version 4.34 released.

MARS did not shut down as intended when OOS. (was a side effect of the repair feature)

Goblins can be sent to attack mines, making them the only ships in X3 that can do that.
It's not much of a career choice, though, given the blast range and all.
Any chance we can make the shutdown OOS optional? Or does it not do anything OOS?
MOD XR Show Skills

Flying spaceships since 1993.

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