[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

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.

Anubitus
Posts: 693
Joined: Fri, 21. Jan 05, 00:44
x4

Post by Anubitus » Mon, 27. Jul 09, 05:07

hi,

i love the idea of this script but when i use it ingame, it dont work for some reason.. :s tried to shut it off and restart it, have only the weaponcheat on but it still dont work.. as for the "taking less damage" cheat, im not too sure but the ammo cheat deffo dont work

i spawned in two titans, made one argon and one xenon, gave them both weapons that need ammo and 1 box of ammo to see if the script did its job, but after a short while both of them stopped shooting..

could it be its not working cos i changed the lasernames..?
should it work with lasers that hadnt ammo requirements befor..? (i did some modding of the weapons)
is the script ment to work only with weapons called "mass driver", "gaus cannon" and "enegy bolt chaingun"..? if this is the case, how do i change that..?

thanks in advance..

User avatar
imperium3
Posts: 3120
Joined: Fri, 5. Jun 09, 18:55
x3tc

Post by imperium3 » Mon, 27. Jul 09, 11:36

Damage mitigation is a cool idea (I've always thought capship fights are way too short). However...
Any ship with hangars is a carrier.
These are faster ships which are not intended to take damage but run away.
Carriers do not have damage mitigation.
I'm a bit worried about this. Does this mean that any M7/M6 with hangars has no damage mitigation whatsoever? Including ships like the Shrike (which is so slow it'd have difficulty running away from anything) and Deimos, Hyperion etc? So doesn't this punish the player for picking a ship which can carry his personal M5 as well?

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

Post by Gazz » Mon, 27. Jul 09, 12:09

Anubitus wrote:i spawned in two titans, made one argon and one xenon, gave them both weapons that need ammo and 1 box of ammo to see if the script did its job, but after a short while both of them stopped shooting..
Did you spawn them properly? A Xenon ship would have a patrol/fight/whatever script, not just turret scripts.


Anubitus wrote:could it be its not working cos i changed the lasernames..?
No. I don't do "hardcoded" scripts like that.


imperium3 wrote:So doesn't this punish the player for picking a ship which can carry his personal M5 as well?
Hardly. The players strafe ability alone can be a several hundred % bonus for damage reduction.
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.

Anubitus
Posts: 693
Joined: Fri, 21. Jan 05, 00:44
x4

Post by Anubitus » Mon, 27. Jul 09, 15:59

Did you spawn them properly? A Xenon ship would have a patrol/fight/whatever script, not just turret scripts.
well, first i spawned them player owned, using a cheat, then i cheated them some weapons wich require ammo, gave them 1 box of ammo, set them to attack all enemies, set the turret to attack all enemies and then i changed the ownership to resp argon and xenoon.. after a while they just stopped shooting.. but i dont think it matters wether i spawned them or not cos after a while some other argon cap ships came to join the fight, GOD spawned them with my weapons and they too stopped fireing after a while.. :(

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

Post by Gazz » Mon, 27. Jul 09, 16:52

I tried it again but I find no way to break it.
Spawned a nekkid Xenon Yokohama, gave it 20 MAM lasers. No ammo.

As soon as it got into a fight... it started shooting back and slowly gaining ammo. *shrug*

On ships that don't actually fight this script never runs. That would be a pointless waste of CPU time.

Anubitus wrote:should it work with lasers that hadnt ammo requirements befor..? (i did some modding of the weapons)
is the script ment to work only with weapons called "mass driver", "gaus cannon" and "enegy bolt chaingun"..?
There is not a single ware name mentioned in the script so that's not possible.
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”