[SCR] MARS Fire Control (v3.05 - 06.10.09)

The place to discuss scripting and game modifications for X³: Reunion.

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

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

Post by Gazz » Tue, 20. May 08, 12:14

Locksley wrote:Now; I had not gotten the upgrades but it went fine installing and also having the turret commands set at MARS, and they fire at ships and so on. But if it shouldn't work without the upgrades maybe the commands should be grayed out and non chooseable <sp>.
The requirement for the MARS software is not enforced in Debug mode and this beta has it on by default.
And now I've upgraded to beta 6, but I guess the main code is the same since I cant reinstall MARS (did find a better sector, 41 fps :P maybe I should uninstall/reinstall?)
The uninstall was iffy on the previous versions.

1. Stop MARS turrets on all ships.
2. Wait 60 sec.

This will terminate all running scripts.

With Beta 6+ I included an uninstall script.
It only works if all previous versions have been stopped as above.

Running the uninstall will terminate all running scripts on all MARS ships in the universe and completely eradicate the control array that stores things like the bullet speeds.

This starts over as a completely fresh install.
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 » Tue, 20. May 08, 12:26

I have been pondering whether to offer a "hardcoded" override for the laser data acquisition.

As it stands, I can not get accurate results on some lasers for various reasons. Simply not possible in a script.

However, it would be easy to write a script that reads the true values from a textfile.
That way I could get a far more accurate value for laser damage because I could use "damage per minute" and consider the rate of fire.
Mass drivers and PBE would look a lot more desirable for MARS.

The only problems are technical ones.
I would refer to the hardcoded Laser ID to avoid trouble with any sort of localisation. Full text matches are very messy.
So if someone uses modded TLaser/TBullets, they would have to edit the proper lines, regardless of how they called their special laser.

MARS accuracy and choice of weapons would get better by another notch because it's raw data would be more accurate.
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.

znix77
Posts: 6
Joined: Tue, 22. Apr 08, 13:54
x4

Post by znix77 » Tue, 20. May 08, 13:07

Gazz wrote:Note that the Titan always wins this fight.
The logfile tells you how much shield strength it lost during it and if it lost 150 % shield strength... it didn't really survive.

This test script is to see how effectively the turrets work and how quickly they destroy how many ships. Not who wins. =)

Oh, this test can be aborted "cleanly" with opening the playership's cargo bay for a few seconds.

I haven't tested cap ship opponents, yet, but I bet MARS would give them a run for their money, too.

BTW: This test script is actually a worst case scenario. All attackers attack directly from the Titan's weakest side.
If you want a more realistic initial engagement, add 3-4 km to the attacker's X and Y spawning coordinates.

Then you will see it's "forward defense" working and intercepting the attackers before they even get into firing range.
Haha.. well i first tried with 10 LX's and was kinda shocked when 2 K's appeared.. think you have a place where 2nd attacker is set to be 2 instead of 1 every 10. They got rid of the Titan so quickly that even the shield restoration that was added in couldn't help it survive. I made a change so that just 1 K + 10 falcon's got added and also got the titan to move around so that it wouldn't get hit from one side.. it did pretty well .. lost around 90++% of shields.. looking at the log.. it was making some pretty impressive target acquisitions and clearing out the enemies. Compared to the normal attack enemies command, MARS definitely works more intelligently!

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

Post by Gazz » Tue, 20. May 08, 18:53

znix77 wrote:I made a change so that just 1 K + 10 falcon's got added and also got the titan to move around so that it wouldn't get hit from one side.. it did pretty well .. lost around 90++% of shields..
As I said, I never tested cap ship opponents, yet, but apparently my formula worked because the Titan must have diverted a lot of fire to the K in order to survive.

The "difficulty" of every target is determined by only one formula.
There is no lookup table with different conditions for carriers, M6, fighters... like in some other turret scripts.
This difficulty is the colour coded number you see in the enemy ship's name when Debug is enabled.

Same with the Laser choice. One formula, one result. That decides which laser to use.

I have to test a lot more battle situations but so far it looks okay.

I'm especially curious how a MARS Python compares to a regular Python.
With super weapons like that, MARS might not be overly helpful since any trained monkey can hit a fighter with BFlak. =)


I'm not quite happy with the idea of a hardcoded list but I'll try putting "real" laser damages and speeds in there and see how it goes.
The advantage is that I could use corrected fire rates and therefore realistic damages. No laser has over 250-330 Rounds per minute in a turret which totally changes the worth of smaller lasers.
Theoretically these have 400-1200 RPM but for turrets that's just some imaginary value.
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 » Wed, 21. May 08, 12:32

HMMMM. Interesting idea...

I could change the way OOS combat works for "my" ships. =)
An M2 would no longer be limited to firing 1 salvo per 30 sec and all on one ship.
It could split turrets to attack several fighters at once.
With GPPC, attacking a fighter with "only" 8 guns should be sufficient. =)

I would balance it so the total damage output stays the same. Just more controlled...

All the core functionality such as target acquisition is there already. It would just be another way of using that target list...

OOS combat has never been fair to small and fast ships but I don't see why MARS suddenly has to act stupid just because the player leaves the sector. =)
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
Locksley
Posts: 371
Joined: Fri, 18. Mar 05, 16:26
x3tc

Post by Locksley » Thu, 22. May 08, 10:35

Gazz wrote:The "difficulty" of every target is determined by only one formula.
There is no lookup table with different conditions for carriers, M6, fighters... like in some other turret scripts.
This difficulty is the colour coded number you see in the enemy ship's name when Debug is enabled.
Hmm yeah; I've got to do some adjustment to mrcanns turret suite eventually since I am modding the laser and bullet files. Haven't wraped my head around it yet - seems straight forward if the array's are processed sequentially.

But if you do it with look up tables it would be nice if they were easy to change. But since you got such a nice way of scripting (lots of comments :) ) it will probably be quite easy to change to reflect a weapon rebalance mod anyways. EDIT - oh, and an easy way to add new weapons if a mod does that. Could just be free slots or something, there isn't that many weapons one can add, what is it, four? End EDIT

I've just spent hours hunting for a "plonking" sound that appeared in my game, had to revert to an earlier save cause I couldn't for my life figure out what was causing it :shock:

Keep up the good work!
Cheers.

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

Post by Gazz » Fri, 23. May 08, 17:42

Locksley wrote:But if you do it with look up tables it would be nice if they were easy to change. But since you got such a nice way of scripting (lots of comments :) ) it will probably be quite easy to change to reflect a weapon rebalance mod anyways. EDIT - oh, and an easy way to add new weapons if a mod does that. Could just be free slots or something, there isn't that many weapons one can add, what is it, four?
MARS doesn't contain a single fixed table.

The laser data that it needs are read from a text file.
If you mod and include a laser... put the data in there on the proper index. That's it.

Lookup tables are despicable creatures that just end up spawning exceptions, more exceptions, and special cases where other exceptions are replaced by more exceptions.
They always end up as a jungle until the next scripter rewrites the whole thing from the ground up. =)



Aaaand... version 1.00 released.

Debug mode is off.

There may be some more fine tuning but the framework is pretty solid now.
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.

IronDuke
Posts: 39
Joined: Tue, 30. Dec 03, 07:59
x3tc

Post by IronDuke » Sat, 24. May 08, 17:02

I got a weee bit question just how does this script work? I mean when ever i enter near a group of enemy ships the script empties all and yes i mean all of my weapon banks except for my forward guns.

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

Post by Gazz » Sat, 24. May 08, 22:08

Okay. so it unloads every laser from every turret?
It should not do that, even on standby.
Are you sure it unloads every laser?

Version 1.07 released.

Automatic Firepower Management
MARS continuously adapts the rate of fire of every laser to your current FPS to achieve the maximum firepower in every situation.
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.

Lancefighter
Posts: 3144
Joined: Sun, 19. Dec 04, 02:41
x4

Post by Lancefighter » Sat, 24. May 08, 22:47

so that means it doesnt matter what fps you have when you first install it?

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

Post by Gazz » Sat, 24. May 08, 22:50

That "feature" is history.
It never worked anywhere close to the accuracy I wanted.
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.

Lancefighter
Posts: 3144
Joined: Sun, 19. Dec 04, 02:41
x4

Post by Lancefighter » Sat, 24. May 08, 22:52

lol makes sence i suppose.

Now, to confirm (like to know as much as possible about a script before installing it), it works on /anything/ with a turret, correct? m3, m6, m7, anything?

User avatar
Locksley
Posts: 371
Joined: Fri, 18. Mar 05, 16:26
x3tc

Post by Locksley » Sun, 25. May 08, 00:40

Cool, a release version :D
I've been playing Age of Conan now but one bug is kinda annoying, I keep loosing levels - ha, no wonder I ain't getting anywhere :lol:

Anyhow, now I am off to play some X3 with your new script, will be very interesting how you solved modded weapons and stuff.

Maybe the ware is a bit on the cheap side; considering on how many ships one kill and how many of your own that don't get killed. Maybe pull some extra dough when you install it - or make it optional for those who don't want to pay he he. Maybe I'll do it myself, just add a few lines when it installs into a new ship to pull some more credits from the player account - but since I hardly can code myself out of a box I might skip the fail safes and checks that the player really got the funds.... then again I could copy an other script that has this function.

Oh, and by the way I did disable the debug on complex cleaner so thanks for that information - now of course I have installed you latest so it's not really an issue any longer.

Thank you for your hard work it is much appreciated.

Cheers!

IronDuke
Posts: 39
Joined: Tue, 30. Dec 03, 07:59
x3tc

Post by IronDuke » Sun, 25. May 08, 08:16

Yup it did just that every turret got unloaded im a gonna try the newer version and see how that works.

Edit: Ok it still doesnt work... what it does now is when ever i enter within firing distance any turret facing the enemy is now emptied while the others arent i only watched the thing for a few mins so I cant be sure. Any how ill list down the scripts i have running could you see if any of this is causing a conflict?

Bail Signal Extension
BBS Advertisement
BBS Extras
BBS Race Reparation
Capitol Ship Crews
Community Extended Mod Pack
Crystal Free SPP
Deathmatch Arena Redux
Explorer Software
Heavy Assault Technology
Khaak Capture Plugin
Mass-Driver Ammo Generator
Overtune BBS
Point Defence
Race Response Fleet Final
Ring of Fire
Salvage Insurance Contract
Salvage Network
Ship Jamming Device
Taxisoftware MK1
Universe Explorers
x0ne Turret Control System

siath70
Posts: 459
Joined: Sun, 11. Jan 04, 03:03
x4

Post by siath70 » Sun, 25. May 08, 09:25

Lancefighter wrote:lol makes sence i suppose.

Now, to confirm (like to know as much as possible about a script before installing it), it works on /anything/ with a turret, correct? m3, m6, m7, anything?
-- M6 or above is what it says on the first page where it explains in detail what this script does.

Iron Duke-
Even though it is a self contained script...
Well, I would say two (three if point def is a turrent script) is bad thing to have. Xone turrent and this turrent script, while they might actually work together, might be causing a conflict somewhere.

I have XTM installed and it unloads the turrents. But, when it is ready to fire it loads the weapons back and starts firing.

From what I see it unloads them all in preperation to fire and then when something gets with in range of a weapon it loads the weapon it wants into the turrent.

It sounds as though the turrents are waiting to catch a firing solution and choose a weapon. You're just not in range of a weapon it thinks it can hit with.

IronDuke
Posts: 39
Joined: Tue, 30. Dec 03, 07:59
x3tc

Post by IronDuke » Sun, 25. May 08, 09:42

Hmm ok ill remove the point defence script and see what that does. As for the weapon not being in range all I have on my M7 are AHEPT and BHEPT and when im in close quarters combat close is up to 100 meters so distance shouldnt be an issue.

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

Post by Gazz » Sun, 25. May 08, 13:31

IronDuke wrote:Hmm ok ill remove the point defence script and see what that does. As for the weapon not being in range all I have on my M7 are AHEPT and BHEPT and when im in close quarters combat close is up to 100 meters so distance shouldnt be an issue.
While I don't use any of those scripts, I'd rather suspect the capital ship crews or the Xone script.
These do more "stuff" beyond just firing lasers and you can't have more than 1 script trying to switch weapons on the same 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.

Lancefighter
Posts: 3144
Joined: Sun, 19. Dec 04, 02:41
x4

Post by Lancefighter » Sun, 25. May 08, 17:24

wow i um fail :oops:

If the restriction were to be changed to m3 ships, would the m3 pilot see an improvement in his turret effectiveness?

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

Post by Gazz » Sun, 25. May 08, 19:47

Lancefighter wrote:If the restriction were to be changed to m3 ships, would the m3 pilot see an improvement in his turret effectiveness?
I doubt that. Those turrets aren't a major part of the ship's firepower.
Try i if you like. The allowed ship class for the command is in the setup file. =)
IronDuke wrote:Yup it did just that every turret got unloaded im a gonna try the newer version and see how that works.
MARS now unloads all lasers from all turrets when on standby.
Now it should work the same way for everyone and everyone can be equally unhappy about it.
This makes it a lot easier to load the front guns you want on an M6 without the turret scripts stealing the lasers away. I always hated that.


Version 1.13 released.

Laser choice rewritten for the second time...
Looks a lot better to me now. =)

Capture Mode
We brake for... ships! Not for long mind you - MARS is a bloodthirsty god.
(Settings editable in t\xx7047.xml)

Maximum laser range around neutral stations is a no fire zone.
(Settings editable in t\xx7047.xml)
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
Locksley
Posts: 371
Joined: Fri, 18. Mar 05, 16:26
x3tc

Post by Locksley » Sun, 25. May 08, 20:53

Impressive...

I really like how much effort you put into it to make it easy to mod.

I've only been in one battle with 1.07, without changing anything yet, can't say much I was to busy staying alive - I'll get back to ya with more reports later :wink:

As of right now I am using a mod that is mainly based on Unfunf's mod for XTM with some tweaking of my own. He can do quantum physics math so I feel that the mod is at least very nicely calculated :D

What Unfunf's mod and my tweaks does is. Alot more damage per bullet shield wise (but not more damage per second), alot less rounds per minute thus saving lots of CPU power. I lowered the hull damage alot to make battles last longer and making hull count for something. Dumb missiles are alot faster, don't last long though... Anyhow, enough about me - I was going to ask if the command "set.shield.strength" (or what it's called) can set shield above 100% ? As you can imagine OOS combat takes even less time now than before since it does not take rof into considaration. Soooo, I was thinking if one could have a script that noticed when a player ship was targeted and raised the shields for all the ships involved in the furball 500% until the fight is over or they leave the sector (or if one gets IS suddenly). If it's doable one can actually manage OOS combat in a meaningful way. Other fights when the player is not involved could get solved as usual so as not to strain the CPU more than necessary when only the NPC's fights.

Eh... sorry, that was off topic - sort of. Any more thoughts on raising the price when installed first time on ship?

And I absolutely LOVE that they will have a safety distance from stations!!! How many times have one not cursed the turrets trying to get at a target THROUGH a station - stupid gits :gruebel:

Thanks again!

Post Reply

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