[SCR] AI Ammo Cheat + DMG Mitigation (v1.08 - 17.12.11)

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

User avatar
apricotslice
Posts: 14129
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice » Wed, 3. Jun 09, 01:01

Well beyond my scripting ability.

All I'm saying is that the game is hard enough, so giving the enemy ships an advantage over the player isnt a good idea, imo. But I dont mind plugging a hole with something realistic.

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

Post by Lancefighter » Wed, 3. Jun 09, 03:02

Bringing an m2 with full racks of gauss cannons and... a grand total of 3 crates of ammo is NOT something the player would do.
It should spawn them with at least 5 boxes per gun.... (1000 salvoes or so)

User avatar
apricotslice
Posts: 14129
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice » Wed, 3. Jun 09, 03:09

If the player cannot find the ammo, then sure they would. :D

They may not necessarily have an alternative gun available either until they find a steady ammo supply.

I have a number of 'salvaged' ships fitted out with salvaged guns, where the ship has no ammo for them. Until I find enough guns to fit them out properly, they get what is findable. If the gun cant fire, thats just a problem to be sorted at some point.

If those ships find themselves in major combat, they are going to be at a huge disadvantage in not having a decent gun loadout, but thats a player decision. Ideally, you dont allow them into combat, but shit happens.

Whos to say pirates dont make bad decisions ? :D

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

Post by Gazz » Wed, 3. Jun 09, 04:09

apricotslice wrote:When do they get supplied with ammo ?

If they get an automatic resupply in the middle of a battle, then thats making things a lot harder. They SHOULD be able to run out in a battle, same as the player can.
Nah.
The player would bring 50 crates of EBC ammo for an M7. The AI spawns with 1 or 2. Or none at all.

Ships do use ammo OOS so all the bigger race ships you meet have long run out of ammo.

The ammo cheat runs IS as well because I wanted it to be simple and some ships just don't have the cargo space for a workable supply of gauss ammo. Ammunition seems to be an optional extra.
The AI spawns whole fleets out of thin air - and that's IS...
So a little ammo is hardly going to break the game.

apricotslice wrote:Well beyond my scripting ability.
*shrug*
A script will be as complicated as you like.
The problem with this one was that I insisted on making it signal driven. That reduces the overhead to a minimum because it only ever checks the few ships that actually get into a fight and not thousands of ships that never do.
Alas, this particular signal is buggy so I had to invent a wholly new signal handler... but other than that it was pretty simple. =)
Last edited by Gazz on Wed, 3. Jun 09, 04:15, edited 1 time 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.

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

Post by Lancefighter » Wed, 3. Jun 09, 04:10

first of all, this is xenon...

Second of all, its a frakking xenon invasion mission! WHy would xenon invade a sector with NO AMMO?!

thunderai
Posts: 374
Joined: Fri, 17. Apr 09, 04:40
x3tc

Post by thunderai » Wed, 3. Jun 09, 06:17

Lancefighter wrote:first of all, this is xenon...

Second of all, its a frakking xenon invasion mission! WHy would xenon invade a sector with NO AMMO?!
Wasn't Microsoft responsible for the botched patch upgrade, I think one of the release notes mentions something about a new ammo handle driver.

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

Post by Gazz » Wed, 3. Jun 09, 06:39

Lancefighter wrote:Would it be too much to ask for a similar script for m7m/m8 resupply purposes?
I decided against it because even if those had missiles, they either
- wouldn't do anything with them or
- would fire 100 Hammers against the first enemy ship they come across.
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 » Wed, 3. Jun 09, 06:42

Gazz wrote:
Lancefighter wrote:Would it be too much to ask for a similar script for m7m/m8 resupply purposes?
I decided against it because even if those had missiles, they either
- wouldn't do anything with them or
- would fire 100 Hammers against the first enemy ship they come across.
ok, i didnt think of that :(
Suppose it was for the best then

User avatar
wyvern11
Posts: 1703
Joined: Sat, 15. Jul 06, 20:59
x3

Post by wyvern11 » Wed, 3. Jun 09, 08:33

nice one, gazz

I get it that this is s'posed to work OOS too, because having no ammo on AI-ships OOS really sucks
Redest du noch - oder denkst du schon ?

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

Post by Gazz » Wed, 3. Jun 09, 12:03

wyvern11 wrote:I get it that this is s'posed to work OOS too, because having no ammo on AI-ships OOS really sucks
Yes, it works universe-wide so it will fix at least that OOS bug.
That and general CPU load was why I insisted on the signal system. Routinely checking thousands of ships would have been uhh... uncool. =)

The bugfix part wasn't the intention, though. I was promised a case of beer for writing this script. =P
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 » Sat, 13. Jun 09, 19:14

Version 1.05 released.

Damage Mitigation as an optional feature.


This is actually a spin-off from the OOS Combat Rebalance thread but I felt that this would be a good addition to IS-combat as well.

Effectively this is a mini-CMOD3 - as a mere script and without radically altering the whole game.

It increases the duration of capital ship battles but only for non-carriers, which are supposed to endure damage without blowing up after 15 seconds.

Right now it's only a small bonus so now it's like... 22 seconds. =)
But it's just a percentage value that I inserted based on gut feel. It can be any value.
The "heavy armour" of M2 is probably the most noticable. They can take 3 times as much hull damage as before without requiring a higher (modded) hull value that also drives up the repair bill.


If you'd like another value:
al.plugin.gz.ai.ammo.cheat, line 268.

I could even give AI ships a bonus when IS. But that would be mean, right? =P
(unless it's small enough so noone notices =)))
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.

Hieronymos
Posts: 830
Joined: Fri, 30. Dec 05, 22:14
x3

Post by Hieronymos » Sun, 14. Jun 09, 05:33

I really like the concept of this script Gazz. Beefing up combat bigship hull and shielding is totally right on. As is cheating the ai ammo.

But about the M7M & M8 resupply, this is really a problem. npc M7M's spawning with 3 Flails are utterly disgusting, worse than useless..

And M8's firing off swarms of Tomahawk Heavy Missles (speed 196m/s) at M5's that it cannot possibly hit is not the Bombers' fault. Such stupidity will only be corrected when someone writes a script ensuring that ships only launch missles against targets that said missles can actually hit, and can actually cripple or kill.

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

Post by Gazz » Sun, 14. Jun 09, 08:45

Come to think of it, I could actually create difficulty settings with that.
X3 never had any way to set the game to easy or hard. It was always... if favour of the player.

AI ships rarely have full shields or a weapon loadout that is as optimised as on a playership.

This however, would provide a way to say:
This game is "hard". All enemy ships take 20% less damage.
Or "easy" where all player ships take less damage... but it would be far easier to just limit the shields aboard enemy ships to achieve the same.
Besides, I'd rather create a "harder" setting than "easy". =P

It would still be limited to big ships plus maybe all ships that [PLAYERSHIP] attacks personally.
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.

someone else
Posts: 2972
Joined: Sun, 18. Jun 06, 13:37
x3tc

Post by someone else » Sun, 14. Jun 09, 11:05

Gazz wrote:Come to think of it, I could actually create difficulty settings with that.
and other blahblah
naaah... that is quite useless imho

even if a NPC ship takes 20% (or even 99%) less damage we could kill it easily.

let's make an example:
Vanilla: random M3, move to its tail, the idot cannot evade, he goes BOOM

with your "hard mode" script: random M3, move to its tail, the idot cannot evade, he goes BOOM in double or thrice the time. Just the time you hold down the trigger is changed.

I think that the Hardenss of the game is determined mostly by smartness of the AI. Take the AI to the flight school and even a crippled M5 will royally Kick your arse.

Give a player a random NPC ship (except TS/TM/TL/TP of course), even if it has only IREs he can kill M3s (with some careful and loooooong firing)
so why the AI is so pityful even on the best equipped ships?

(not to mention the M7M and M8 that try to kill you with their rear turret when they are fully loaded with deadly missiles...)
Trade, Fight, Build, Think, Modify.
Ship Rebalance Mod
OOS Rebalance
Resized Aldrin Big Rock
SIDE/TOP/FRONT Ship Size Comparison
Remember young Padawan: money stolen can be, time cannot.

User avatar
wyvern11
Posts: 1703
Joined: Sat, 15. Jul 06, 20:59
x3

Post by wyvern11 » Mon, 15. Jun 09, 08:01

the time to hold down the trigger per single ship does not really matter as you said. but in a brawl with ten enemies a factor of 1,3 on each opponent really matters on the amount of fire you take (sometimes they *do* hit)
Redest du noch - oder denkst du schon ?

someone else
Posts: 2972
Joined: Sun, 18. Jun 06, 13:37
x3tc

Post by someone else » Mon, 15. Jun 09, 11:24

yeah... the fight lasts more, but it remains boring imho. :(

I already fended off waves upon waves of PBE-equipped tinbots or endless pirates/yakis and the tactic is the same:
they open fire
I cut the engines and turn on enemy
I go to full thrust pointing them
all the shooters go evasive (collision avoidance, they are too close)
one of them goes BOOM
the survivors open fire
I cut the engines and turn on enemy
I go to full thrust pointing them
all the shooters go evasive
one of them goes BOOM

Rinse and repeat. Forever. :goner:
No difference from Xenon to Pirate to Kha'ak, nor from M5 to M4 to M3 to M6. Always the same identical stupid AI is in the cockpit. It can become invulnerable but still is too easy to fool.
I did the same with M3 (various) and M6 (vidar).
(the "fly between 2 M2 and watch them shooting each other to death" is another example)
Trade, Fight, Build, Think, Modify.
Ship Rebalance Mod
OOS Rebalance
Resized Aldrin Big Rock
SIDE/TOP/FRONT Ship Size Comparison
Remember young Padawan: money stolen can be, time cannot.

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

Post by Gazz » Mon, 15. Jun 09, 12:34

Collision avoidance and break off speed/distance are hardcoded into the low level flight instructions.
Scripts can neither change them nor turn off the collision avoidance part.

With very expensive (CPU wise) workarounds you can let a few ships fly using your collision rules but this won't do for an "AI upgrade".

That part of the AI is not changeable with scripts but other items are, like for how long they evade afterwards.
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.

someone else
Posts: 2972
Joined: Sun, 18. Jun 06, 13:37
x3tc

Post by someone else » Mon, 15. Jun 09, 12:44

I was a bit heavy, but I hope you got my point. :D

I'm not against collision avoidance, that is ok, it is the evading that is too long and easy to exploit and the "attacking manouvers" that are simple and easy to fool. (Ok, they can kill you if they are too much... but well, they need to be hudreds... and that is a bit too epic for just a "patrol sector" mission)

and maybe different tactics used by different ships... now we have only one tactic:
Move straight to enemy and shoot, launch a missile sometimes. Even if the ship that uses them is a TS.

I hope that scripts can change that a bit... :?
Trade, Fight, Build, Think, Modify.
Ship Rebalance Mod
OOS Rebalance
Resized Aldrin Big Rock
SIDE/TOP/FRONT Ship Size Comparison
Remember young Padawan: money stolen can be, time cannot.

Hieronymos
Posts: 830
Joined: Fri, 30. Dec 05, 22:14
x3

Post by Hieronymos » Mon, 15. Jun 09, 21:41

AI ships rarely have full shields or a weapon loadout that is as optimised as on a playership.
The DDRS mod for 3R and now DDTC mod for TC created a jury-rigged workaround for this problem: all npc ship hardpointss spawn with 2 sets of weapons--one for best anti-fighter, second for best anti-bigship--and have a simple weaponswitcher script that swaps in the appropriate weapon based on target type. Crude but surprisingly effective.

Also, by ensuring that all npc aggressors spawn with full engine, rudder, & cargo tunings; DDTC ensures they become much harder to hit. They still have the same braindead ai, but at least have more mojo to play with :wink:
...........

The next step would be to create a simple "missleswitcher" script, that would load up ships with 3 or perhaps 4 missle types: best anti-M5/M4; best anti-M4+/M3; best anti-M3+/M6; best anti-TL/M7/M1/M2...and fire the appropriate missle only at its matching target type.

someone else
Posts: 2972
Joined: Sun, 18. Jun 06, 13:37
x3tc

Post by someone else » Mon, 15. Jun 09, 21:52

Also, by ensuring that all npc aggressors spawn with full engine, rudder, & cargo tunings
that would be a very cool addition to your script, Gazz... any time a ship is engaged it gets ammo and max tunings/.
The next step would be to create a simple "missleswitcher" script
I think that it would be fairly simple to create a "Missile cheat", all fighters that engage enemy get their cargo bay cleaned of missiles and at Gazz's (script's) discretion a missile will be summoned and launched.
Just to add a bit more realism we can say that the number of missiles "summoned and launched" will be proportional to the ship's cargo bay.
Trade, Fight, Build, Think, Modify.
Ship Rebalance Mod
OOS Rebalance
Resized Aldrin Big Rock
SIDE/TOP/FRONT Ship Size Comparison
Remember young Padawan: money stolen can be, time cannot.

Post Reply

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