[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

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

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

Post by Gazz » Sun, 19. Oct 08, 02:20

English / Deutsch / Français


MARS Fire Control . . . Terran Conflict v1.2.1 or higher required

MARS v5.20+ is compatible with Albion Prelude.


MARS Videos ! ! ! . . . Look here.



Turret Scripts are stupid.
They gleefully fire a 30 sec salvo on an M5 when the proverbial snowball in hell would have a higher chance of hitting.
This was too depressing to watch so I set forth on my personal crusade to create the perfect turret script. (YMMV =)
One that only fires on those targets that it can hit.


MARS consists of 5 systems:
  • Fire Control (Turrets)
  • Goblins (your obedient minions)
  • Automatic cargo collection
  • Satellite deployment
  • AL Plugin, that makes MARS available for AI capital enemy ships (optional =)

    Hotkeys:
  • Launch goblin (Fighter Drone)
  • Launch goblin Mk2 (Keris, Fighter Drone Mk2)
  • Deploy Satellites (Advanced Satellites)
  • Cease fire / Ignore target
  • Set priority target
  • Fighter drones: Attack Shields
  • Fighter drones: Shutdown
! ! ! Manual / Description: MARS_EN.pdf ! ! !
English / Deutsch / Français

! ! ! The MARS FAQ. ! ! ! For those who don't read manuals. I know who you are!


[ external image ]Download: ZIP

Installation: extract the ZIP into the Terran Conflict folder. The correct folder structure is already included.
Usually, this will be enough. In case of installation problems, see the manual.


[ external image ]Download: MARS 5.24 packed by DrBullwinkle for the Plugin Manager.

Installation: No idea. I don't use the Plugin Manager myself. =)


[SCR] Missile Defense Mk2 is included in the download
This fixes critical bugs in the Egosoft Missile Defense script without noticeably increasing it's system load.
Running MARS on a freighter with a single-barrel PAC turret is just silly.

Note: an optional mod is included in the download. It is compatible to TC v2.7.
See the manual for how to install it.

Methel wrote:I'm just starting to use the script now on my Dragon, its just one turret with pretty limited weapon choices, but still working wonders. I especially love the goblins!
These little buggers keep the enemy busy for ages!
tatakau wrote:Gazz... you are my hero. This script is crazy-sexy!
wraith303 wrote:The scariest thing I've seen from MARS so far has been during one of the Final Fury escort missions...

I was cruising alongside the TSs in my Boreas when a group of about 7 or 8 Khaak clusters jumped in right on top of us. The nearest was probably 1.5 km from me, and the furthest was about 2.5 km. I heard the MARS klaxon, immediately followed by the roar of 24 FAAs firing at once. Of course, the clusters all split apart, and very quickly the sky was filled with 70 or 80 enemy scouts and fighters.

In the middle of all the near constant FAA blasts I could hear the occasional PRG chatter, and even some PBE shots. The visuals of the encounter were just insane - I'd say that at least 1/3 of my view off the starboard side was filled with flak explosions at any one time.

Within about 15 seconds the whole episode was over.
strikor wrote:Bloodthirsty is putting it lightly. I recently ran over a Strong Arms TM in a Paranid sector while emerging from a gate. Before I knew what was happening MARS had destroyed the SA escorts and several Paranid fighters that had turned hostile in response. It was beautiful.
Ymarsakar wrote:MARS is a really fun mod. The nice little touches with the "Goblin" overlord/treasure setup combined with the excellence convenience and dynamic responses (not to mention the missile defenses) make the game much more interesting in fights or just cruising between gates.

Other scripts do salvage functions and crate searches, but this one is actually fun to use and doesn't require any real micromanagement on my part.
tontonfred wrote:When I say MARS unbalances the game, it is not because MARS itself is a bad thing. It's just so much better than the other scripts involved in combat that it steals all the action :twisted:

I truly hope that your initiative will inspire others to create alternative scripts for the rest of the "fight" part, like Lucike's been doing with the "trade" part.
Jambro wrote:Amazing script... I am very impressed with what this does. You take combat to a whole nother level and those goblins are a blast to tinker with. Well done!

However I have decided to uninstall MARS. I feel that this script is so fantastic at what it does that it basically obsoletes alot of other gameplay elements in the process... Its like throwing a blood thirsty MMA cage fighter into a helpless gradeschool playground.
Hieronymos wrote:The MARS turret script has broken new ground in the X-universe, with its amazing ability to prioritize targets, and to totally negate the XTC AI's latest tactic of intensive missle-spamming. MARS has thus effectively made the Capital Ship the supreme combat arm of the (modded) XTC galaxy, relegating Fighters to almost obsolescent status.

X3:Reunion original development thread

For scripters:
To detect if MARS is currently installed in the game...

Code: Select all

001   if  read text: page id=7046, id=6422101 exists
002   |if  read text: page id=7047, id=6422101 exists
003   * MARS installed and it's setup scrip is working.
004   |end
005   end
This check can only be true after the MARS setup script has run (and loaded it's TFile) so it's a bad idea to check for that in another setup / init script.


Incompatibilities
Roger's EES / Changeling.
Only Missile Defense Mk2 and Goblin Missile Defense are affected.


Resources used:
Textfile: 7046
Textfile: 7047 (Laser data for mod-adaption)
Textfile: 7048 (Laser data - XTM version)
Textfile: 7049 (Laser data - CMOD4 version)
Textfile: 7051 (Laser data - Multi Galaxy Mod - MGM)
Textfile: 7052 (Laser data - OOSR v2 Mod)
Textfile: 7053 (Laser data - Time of the Truth / ToT / TotT Mod)
Textfile: 7054 (Laser data - X3 Rebalance Mod / XRM by paulwheeler)

Task IDs: all task IDs end with ...7046
Command slot: COMMAND_TYPE_TURRET_46 (Defense)
Command slot: COMMAND_TYPE_TURRET_47 (Standby)
Command slot: COMMAND_TYPE_TURRET_48 (Offense)
Command slot: COMMAND_TYPE_SHIP_51 (Collect cargo)
Library: lib.ut.pos.from.2.grades.and.rad
Library: lib.chem.strings
Last edited by Gazz on Mon, 5. Feb 18, 10:39, edited 188 times in total.

paintner
Posts: 33
Joined: Fri, 17. Oct 08, 00:29

Post by paintner » Mon, 20. Oct 08, 05:26

is this script for english as well?
I got an angel on my shoulder, but the devil hold's my hand ...

Gawaine
Posts: 19
Joined: Fri, 16. Dec 05, 21:05
x3tc

Post by Gawaine » Fri, 24. Oct 08, 07:51

This looks really cool, can't wait until the turrets are fully functional.

lv9pv
Posts: 63
Joined: Thu, 3. Jan 08, 05:51
xr

Post by lv9pv » Fri, 24. Oct 08, 19:48

Yeah, this is one of the most wanted script ported from X3:R. It was such a nice script and cant live with out it.

Keep up the good work.

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

Post by milp » Sat, 25. Oct 08, 16:21

Hm, im a little confused. If i install this now and buy the MARS addon for my ship, will it automatically improve the performance of my turrets? And where do i buy the goblin drones?

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

Post by Gazz » Sat, 25. Oct 08, 17:57

New MARS Videos ! ! !

Unbekannt160 has created a video specifically about MARS.
Alas he can not finish it due to real life issues at work. Therefore all you will see is the last "production demo".
What he calls demo, I call bloody amazing.

>> VIEW VIDEO 1 << (11:12, 88 MB)



Here is a much smaller video by Unbekannt160 about a relatively small missile attack. (it was the very first sample)
The barrage is small enough to only destroy the MARS ship ohh... 4-5 times?
No music but much higher quality so it's easier to see the goblins at work.

> > DOWNLOAD VIDEO 2 < <



subaluigi created a video (6:41, 84 MB) of XTM capital ships using MARS.

>> DOWNLOAD VIDEO 3 <<



Should you have trouble viewing any of those, try VideoLAN
Last edited by Gazz on Sun, 3. Feb 13, 13:05, edited 8 times in total.
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.

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

Post by milp » Sat, 25. Oct 08, 19:12

Ok i just installed the update, and no new turret commands are showing up, where do i set those new turret things?

Also i was just fighting 3 pirate ships and one Gnome (or whatever those drones are called lol) and suddenly the computer voice said "not installed" and it crashed.



Whats wrong? how do i even use MARS properly? Is there a documentation somewhere?

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

Post by Gazz » Sat, 25. Oct 08, 20:45

The Frequently Answered Questions


Q: How do I g....

A: READ THE MANUAL.
_________________________________________________________

Q: I installed it. Why does it not appear anywhere in game or why are there READ-TEXT errors everywhere?

A: READ THE MANUAL. It's no coincidence that there is a section about installation.
_________________________________________________________

Q: Why does MARS only load 1 laser into a turret when there could be 8?

A: For not doing anything, one laser is sufficient.
_________________________________________________________

Q: Why does (insert feature) not work when the ship is OOS?

A: Because turrets do not exist OOS and the game freezes all turret scripts when OOS.
Turret scripts (or the complete lack thereof) have no effect on a ship in OOS combat.
_________________________________________________________

Q: Why does MARS not fully load turrets for firing when I have too few lasers in the cargo bay?

A: Because you have too few lasers in the cargo bay.
_________________________________________________________

Q: Why does MARS use Pulsed Beam Emitter or other short range lasers before the target is fully in range?

A: This is a problem of the model geometry. Scripts can neither detect nor fix that.
_________________________________________________________

Q: How do I download MARS? The link is a HTML reference to the "Download" picture instead of the page.

A: There is no HTML link. The forum is in BB Code.
If you see HTML then something has converted BB to HTML and if the link doesn't work then something has screwed up in doing so.
_________________________________________________________

Q: How do I uninstall MARS?

A: You
- delete scripts\setup.plugin.gz.mars.xml
- in the script editor run plugin.gz.mars.uninstall
- save the game.
_________________________________________________________

Q: I use XTM or CMOD3+. How can I use the ship mod in MARS_Repair_Drones.zip?

A: Not. It's already included in XTM and the ship mod part of CMOD.
_________________________________________________________

Q: I use the XTC / X-Tended mod. . What about MARS?

A: MARS automatically detects XTC and uses the laser data file t/7048... instead of 7047 (vanilla).

This is not a very well balanced file by any means. It only provides the minimum functionality.

Vili posted an updated laser data file here.
You will have to rename it to 7048 if you want to use it.
I can not guarantee that it works but it probably will and that thread is a good place to discuss specific balancing alterations pertaining to just that one file.
_________________________________________________________

Q: I use the CMOD4 / Combat Mod 4. . What about MARS?

A: MARS automatically detects CMOD4 and uses the laser data file t/7049... instead of 7047 (vanilla).

Also see:
http://forum.egosoft.com/viewtopic.php? ... 83#3027383
http://forum.egosoft.com/viewtopic.php? ... 00#3109600
_________________________________________________________

Q: I use the Multi-Galaxy-Mod / MG-Mod. . What about MARS?

A: MARS automatically detects MGM and uses the laser data file t/7051... instead of 7047 (vanilla).
Early versions of MGM use vanilla lasers and are correctly detected and treated as "vanilla TC".
_________________________________________________________

Q: I use a ship mod already. How can I use the one in MARS_Repair_Drones.zip?

A: You will start a career in scripting and modding now.
First you need Doubleshadow's Mod Manager and X3 Editor.

Whatever mod you are using will be a .CAT file. Drag and drop TShips.txt from that one to TC\types
(there are other ways but this one works)

Drag this file onto the X3 Editor.exe.

Now locate all 3 fighter drones and add the repair (=mining) laser to their cockpit guns.
Save and enjoy your first modding project.
_________________________________________________________

Q: Would you please add add a version number to all downloadable ZIP files and
offer all previous versions for download (each with a version history) and
notify my by phone or email if you release a new version?

A: No.
_________________________________________________________

Q: How do I make my laser mod "MARS compatible"?

A: Supply a t\7047-L0??.xml for the supported languages to tell the script about the laser data that scripts cannot read from inside the game.
The TFile itself even explains what bits of data go where and what the flags are.

There is also an Open Office table where you can paste in your TLasers and TBullets and have the "MARS Data" calculated automatically. (provided you didn't radically alter the file structure)
Maybe a bit of fine tuning and then it's copy paste time to generate "your" TFiles.

To verify if your edited file contains any errors, enable DEBUG in the MARS menu and reload the data file. That will create a log file of what exactly is read and how it was interpreted.

The ship sizes are found - among other places - in a table on my download site.
_________________________________________________________

Q: How do I stop MARS from switching lasers?

A: You have to edit t\7047-L044.xml to make it stop.
That's a rather crippling operation because the script was built around that feature but if you insist...
_________________________________________________________

Q: You are mean! Not properly answering my questions and only making fun of me!

A: This is not a question.
_________________________________________________________
Last edited by Gazz on Sat, 22. Dec 12, 10:45, edited 31 times in total.
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.

Gawaine
Posts: 19
Joined: Fri, 16. Dec 05, 21:05
x3tc

Post by Gawaine » Sat, 25. Oct 08, 23:04

milp wrote:Ok i just installed the update, and no new turret commands are showing up, where do i set those new turret things?

Also i was just fighting 3 pirate ships and one Gnome (or whatever those drones are called lol) and suddenly the computer voice said "not installed" and it crashed.



Whats wrong? how do i even use MARS properly? Is there a documentation somewhere?
I get the same message 'laser not installed' a few seconds afterI set turrets to MARS offense or defense. They just default back to no command. I don't get crashes though.

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

Post by milp » Sat, 25. Oct 08, 23:57

Gawaine wrote:
milp wrote:Ok i just installed the update, and no new turret commands are showing up, where do i set those new turret things?

Also i was just fighting 3 pirate ships and one Gnome (or whatever those drones are called lol) and suddenly the computer voice said "not installed" and it crashed.



Whats wrong? how do i even use MARS properly? Is there a documentation somewhere?
I get the same message 'laser not installed' a few seconds afterI set turrets to MARS offense or defense. They just default back to no command. I don't get crashes though.
Hm how do you do that? I looked through the documentation and still have no idea, how to buy goblins or how to set up my turrets with it D:

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

Post by Gazz » Sun, 26. Oct 08, 00:34

Gawaine wrote:I get the same message 'laser not installed' a few seconds afterI set turrets to MARS offense or defense. They just default back to no command. I don't get crashes though.
I can't reproduce this with the information you supplied.

It works here...
milp wrote:Hm how do you do that? I looked through the documentation and still have no idea, how to buy goblins or how to set up my turrets with it D:
You don't buy goblins, you buy fighter drones. They and of course the MARS software is all that could be required.


Anyway...
Version 3.31 released.

Without info about the ship, lasers, and targets I can only guess what could be causing those issues.
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.

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

Post by milp » Sun, 26. Oct 08, 01:17

Gawaine wrote:
milp wrote:Ok i just installed the update, and no new turret commands are showing up, where do i set those new turret things?

Also i was just fighting 3 pirate ships and one Gnome (or whatever those drones are called lol) and suddenly the computer voice said "not installed" and it crashed.



Whats wrong? how do i even use MARS properly? Is there a documentation somewhere?
I get the same message 'laser not installed' a few seconds afterI set turrets to MARS offense or defense. They just default back to no command. I don't get crashes though.
Ok now im getting that too. Im flying a terran Vidar with EMP cannons and all fighting related extensions including MARS.

Gawaine
Posts: 19
Joined: Fri, 16. Dec 05, 21:05
x3tc

Post by Gawaine » Sun, 26. Oct 08, 01:38

I was flying the Vidar as well. On a whim I started a new game and cheated myself a Yokohama. MARS worked fine with that, so it has something to do with my saved game. Maybe the campaign messes with it, since milp had the Vidar too?

Good that it works for me though, I don't mind starting a new game.

shrikebtr
Posts: 62
Joined: Wed, 30. Jan 08, 02:00

Post by shrikebtr » Sun, 26. Oct 08, 02:53

I am getting the "Laser not available" message as well. This is with the MARS extension on an Argon Magnetar with 2 PACs in the hold. Additionally, one it says "laser not available" and disables the MARS Offense/Defense setting (setting it to "idle" instead) it continues to periodically inform me that "laser" is "not available".

It should be noted that before this most recent version, I didn't even HAVE options for "MARS Defense" and "MARS Offense". I only had the default X options.

Gawaine
Posts: 19
Joined: Fri, 16. Dec 05, 21:05
x3tc

Post by Gawaine » Sun, 26. Oct 08, 04:41

I've been playing around with MARS and it seems like right now it only works for me on the new game I started. Additionally, it only works if the fight I and fight II software are installed before I buy MARS. Once I buy it the fight softwares disappear in my ship's freight. This is independent of the ship type, it's worked for all that I have tried if I follow this sequence.

Balance-wise, it seems like it uses the matter/antimatter launcher too much for the terran ships. It can't hit m4s and m5s but it doesn't switch to the starburst or epc though I have them in my cargo.

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

Post by Gazz » Sun, 26. Oct 08, 07:08

shrikebtr wrote:It should be noted that before this most recent version, I didn't even HAVE options for "MARS Defense" and "MARS Offense". I only had the default X options.
This is not just what's described in the installation notes?

The installation of MARS is delayed for maximum compatibility and easier troubleshooting.
After "installation" it takes 2 minutes and 1 save/reload of X3 for MARS to completely activate.

I'll have to see if the Vidar does strange things.

That X3 is writing corrupt savegames is one of the many features they kept from Reunion.


PS: I managed to reproduce the "Lasers not available" thing so it can be fixed.
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.

shrikebtr
Posts: 62
Joined: Wed, 30. Jan 08, 02:00

Post by shrikebtr » Sun, 26. Oct 08, 07:47

An update:

I didn't want to have to start all over, so I decided I would try some fixes of my own.

Basically I scrounged some cash, and purchased a second magnatar. Original was from Omicron Lyrae, replacement was from Argon Prime.

The only equipment I got for the replacement was MARS and 2 PACs. This was done at purchase. I then transferred all the other freight and extensions from the old Magnatar to the Replacement Magnatar, excepting the "old" MARS Extension.

Lastly I went into the Command console, set both turrets to MARS Defense and... no errors. Set them both to MARS Offense and still no errors.

One theory (from the standpoint of someone who doesn't necessarily understand X3 scripting in the slightest) is that when I installed MARS, I was unaware of the save/reload requirement... so it is very possible I installed it, fired up X3, purchased a magnatar and/or MARS Extension, and went on my marry way... which did something to prevent the original ship w/MARS from working properly? I dunno.

Anyway so my immediate issue appears to be fixed. Thanks!

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

Post by Gazz » Sun, 26. Oct 08, 07:53

I found the (or one of the =) issue by now.

A script instruction returns a different (and quite illogical) result in TC.
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.

shrikebtr
Posts: 62
Joined: Wed, 30. Jan 08, 02:00

Post by shrikebtr » Sun, 26. Oct 08, 08:06

Gazz wrote:I found the (or one of the =) issue by now.

A script instruction returns a different (and quite illogical) result in TC.
Awesome! Glad to hear it because the problem returned. In case this is different from what you found:

After selling the old magnatar, I had the Replacement Magnatar (with no apparent issues) Jump a few sectors from Argon Prime to Cloudbase SW.. within moments of appearing in Cloudbase SW, I heard the "laser not available" notification, and checked the command console to find both turrets back at "Idle".

I retested this and found that the ship can go through gates just fine, but the moment it jumps using the Jumpdrive, it kicks out the "laser not available" message, and will persist in not working. Hope this helps :)

Thanks again for your hard work on this awesome script. Goblin auto-looting and ship claiming is brilliant BTW :)

shrikebtr
Posts: 62
Joined: Wed, 30. Jan 08, 02:00

Post by shrikebtr » Sun, 26. Oct 08, 09:10

My last update:

Given the problem above, I told the Magnetar to fly (not jump) from Argon Prime down to me around cloudbase SW.

It had no apparent issues, until it gated into the same sector as me... the moment it became In System (same system as me, the player), it threw the "laser not available" error.

Post Reply

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