AI funkiness

special behaviours

I would like to implement some of the special behaviours discussed in This Topic in CTC:M. Of course, a large part of CTC:M is having AI ships that are (at least in theory) outfitted according to the options available to the player (within reason for balance issues). If I am to include these boosters for player use, then the AI needs to be able to use them, or some related AI-only booster to even the field.

In CTC, even though there are AI ships with better basic ship stats, more weaponry, and more ammunition than the player, all the outfits and weapons used are available to the player.

Is it possible to grant these abilities to the AI? If so, how?

This post has been edited by LNSU : 12 March 2008 - 09:14 PM

@lnsu, on Mar 12 2008, 08:13 PM, said in AI funkiness:

I would like to implement some of the special behaviours discussed in This Topic in CTC:M. Of course, a large part of CTC:M is having AI ships that are (at least in theory) outfitted according to the options available to the player (within reason for balance issues). If I am to include these boosters for player use, then the AI needs to be able to use them, or some related AI-only booster to even the field.

In CTC, even though there are AI ships with better basic ship stats, more weaponry, and more ammunition than the player, all the outfits and weapons used are available to the player.

Is it possible to grant these abilities to the AI? If so, how?

Im not quite sure what you mean... Like a fleet be specially outfitted or your escorts? Either way, the only way I can think of doing it is with misns or crons that trigger a syst (with specific dudes or flets) or trigger an escort, with either pointing to modified versions of the same ship... Don't know if that made sense or not....
Would be fairly easy with maybe 4 different verions of the same ships...
defensive / long-range / short-range / Carrier

8 ships, 4 versions of each, 32 bits, but if using dudes and systs, could require 64 different copies of every system... so, dont use it extensively.

I don't think that's what he meant.

The other thread dealt with special weapons and abortable missions that could give you shield boosters, power boosters, navigation boosters, and other temporary effects.
He wants the AI to be able to use them too, and there's really no way I can immediately think of to do that, since you can't change the AI ships or ship systems mid-battle.

What you're proposing is changing the dudes in a system according to what the player has bought? That seems like an overly complex way to do it, as you could use pers and toggle their appearance with mission bits. But again, that's not really what he's looking for.

Oh, I'll add this:

I experimented with a combat/ship construction system that allowed the purchase of multiple "special" systems.
Everything used power. Every system had its own power demands. You could buy bigger and better generators to combat this drain, but you couldn't stop it.

Because of this, the player needed tools and outfits to deal with this, like:
Emergency power, reserve power, auxiliary power, etc.
These were only available to the player, but I justified it in two ways:

  1. AI ships didn't need to conserve power to get to the next system, or save the high energy weaps for the important target, while the player does.
  2. The player is the hero.

Also, there were some special weapons:

  1. Guns that could change firing characteristics in-flight.
    There was a turret that could switch between manual fire and PD fire.
    And some that could switch between long-range fire and spread fire.
  2. Weapons that could share ammo

In the case of sharing ammo, I just split it up. This weapon is allocated 100 rounds, and this weapon is allocated 200, etc.
For the mode changing weapons, I'd ether pick a mode, or maybe split them for multiple weaps. It depended what else the ship had, and what it's role was.

In all cases, when the player acquired the same ship, everything would work as it should.

How did you do the multiple-characteristic guns? That could be cool.

Also, I can't say "the player is the hero" and give him superpowers in my plug. Its ColosseumTC:Medium Ships. The only advantage the player has over the AI is brainpower. There are no special weapons or abilities for the player that the AI cant use. Actually, it will end up that in many cases, the AI ships will be statistically superior to the player. As far as special weapons go, I could just give them low ammo (5 shots or so), but my main idea was a temporary energy/shield boost and a temporary engine boost, each of which could be used once per round of battle, but unless I can figure out a way to make the AI balance against this, I can't implement it.

I understand "player is the hero" might not be suitable in your plug.
It made sense in mine because the AI could use 100% of the ships resources/energy to try and kill you, whereas the player didn't have the same luxury, so it kind of balanced out.

Multi-mode weaps work like this:
In short, you have multiple weaps and swap the ammo, so only one can fire.
You can also do this by swapping the weaps themselves, (easier to implement) but this limits you to only purchasing one weap.

The player gets an abortable mission that controls the weapon mode. All weapons of the same type will be in the same mode, though you can make similar weapons and call one Group A, and the other Group B, and control the groups independently.
It's also important to remember that you'll need to get rid of these missions when the player gets a new ship.

Say a weap is to have two modes. You make two weaps, one for each mode, and invisible ammo for each.
Make the starting mode the visible on in the outfitter, the other is invisible. The starting mode is the one that takes up mass, gun slots, etc.
When you buy it, it does four things:

  1. Grants both weapons
  2. Deletes both ammos
  3. Grants ammo for the starting mode
  4. Starts a mission

Selling:

  1. Deletes both weapons
  2. Does not delete ammo
  3. Aborts the missions

One cron (0-0-1) that detects for neither weapon but some ammo, then deletes the ammo.

The missions look like this:
128 "APC Turret: AUTO" OnAbort: s129
129 "APC Turret: Starting Manual..." OnShipDone: a129 s130 dAmmo1 gAmmo2
130 "APC Turret: MANUAL" OnAbort: s131
131 "APC Turret: Starting Auto..." OnShipDone: a131 s128 dAmmo2 gAmmo1

Optional 132 "Clear APC Missions" a128 a129 a130 a131 (auto-aborting)
You can type this into the OnSell field of the outfit, but I found it to be easier to simply s132 when I need to clear everything.

You need a self-destructing dude for the missions that have OnShipDone. Takes 3-4 secs for a weapon to change modes this way.
Side note: Only one mode needs to change using OnShipDone, all other modes can start instantly by simply starting the next mission in the OnAbort field. There needs to be a spot in the mission chain to break-out using Axxx so the missions can be scrapped. Fxxx is, and always has been, broken.

The weaps themselves use their respective ammo, but give them a burst count of 3,000 or so, and only use ammo at the end of the burst. This is so that the weap only needs one ammo outfit, and so the player is unlikely to run out of ammo. Make sure that (burst count * number of weaps) doesn't exceed 32,767. At 3,000 I can have 10 weaps max.

The reason the outfits delete ammo first when buying, is to keep the ammo at one unit. And the outfits do not delete ammo when selling, so that you don't delete the only ammo when reducing the number of weaps. The cron will clear it when you take off after you sell the last weap.

You can give AI ships these weapons, but you'll have to predetermine what mode it is to be in. Give both weapons (the inactive on can be granted in outfits, if need be) and one of the appropriate ammo.
In the OnPurchase and OnCapture fields, you start the matching mission.

FYI, if the ship is to be an "escape ship" the OnPurchase and OnCapture fields won't trigger.

This post has been edited by Desprez : 14 March 2008 - 07:58 PM

seems kinda complex, especially the 3-4 second reload. Hmm, I could give it a shot. I was thinking that I could make the gun switch between a short range, wide-angle tight-spread gun and a long-range straight shot high-damage gun.

Of course, the AI would only have one or the other, and his would take some balancing, but it could work.

As far as PD/manual guns go, It would work for the player. Maybe I can work out some way to make the switch faster. For AI ships, I would just make the player's ships vulnerable to PD fire, and give the AI a PD weap.

I'll think about it.

@lnsu, on Mar 15 2008, 12:39 AM, said in AI funkiness:

seems kinda complex, especially the 3-4 second reload. Hmm, I could give it a shot. I was thinking that I could make the gun switch between a short range, wide-angle tight-spread gun and a long-range straight shot high-damage gun.

You can, same principal.

Quote

Of course, the AI would only have one or the other, and his would take some balancing, but it could work.

As far as PD/manual guns go, It would work for the player. Maybe I can work out some way to make the switch faster. For AI ships, I would just make the player's ships vulnerable to PD fire, and give the AI a PD weap.

I'll think about it.

Only one step needs the 3-4 sec delay. So in the turret example, you make the switch from auto to manual instant.

The reason for the delay is that there needs to be a way to clear the missions. If they all have something in OnAbort, then you can never clear them because they keep starting each other. All you need though, is one of the missions to have nothing in the OnAbort field, and that's where you end the abort chain when you want to clear them.

If Fxxx actually cleared out the missions, you could use that. But it doesn't, so you can't.

I'm not sure why you're making the player vulnerable to PD fire. Wouldn't you have to make every ship the player could get also vulnerable? Wouldn't that screw thing up?

What I usually did is if AI was in more of a stand-off role, gave it the PD weap. If they were an in-you-face attack ship, gave the normal weap.
If they had two weaps, maybe one of each.

There are only 3 (maybe 4) ships that the player can use. There will probably only be 3 ship rles anyways. All the AI ships are "variants" on those 3. For manual/pd weaps, the player won't know the difference between them when the AI uses them, and thus I might as well use a PD turret.

So the player can't capture ships?

Not in CTC.