Forums Index >> Modding >> New Tank AI
Page : <1> :
One problem that might make it difficult... You are modifying the same functions over and over
(Datablock TankData(LightTank : MediumTank) is modified 4 times)
and the last ones are the original ai tanks so your new ones dont move...
Last edited: Monday, July 18, 2005 at 8:48:27 PM
So do you know anyway you can say this to me by step-by-step? :P
-CUC-
EDIT: Oh so is it like this? I have to re-name it something else?
Datablock TankData(AvengerLightTank : AvengerMediumTank)? Am I going in the right direction?
Oh and also what do you mean here:
And the last ones are the original ai tanks so your new ones dont move...
What last ones? :P
- b20
Last edited: Monday, July 18, 2005 at 9:58:43 PM
The last ones declared that have the original ai specs (the ones you didnt bold?)
And it should look like this
TankData(AvengerLightTank : MediumTank)
Last edited: Monday, July 18, 2005 at 10:55:41 PM
Oh! You mean these?
//--------------------------------------------------------
// AI Tanks
//--------------------------------------------------------
Datablock TankData(BronzeLightTank : LightTank)
{
brainShapeFile = "~/data/shapes/tanks/bot01.dts";
//damageAmount = 10.0;
ai = BronzeLightAI;
};
Datablock TankData(BronzeMediumTank : MediumTank)
{
brainShapeFile = "~/data/shapes/tanks/bot01.dts";
//damageAmount = 10.0;
ai = BronzeMediumAI;
};
Datablock TankData(BronzeHeavyTank : HeavyTank)
{
brainShapeFile = "~/data/shapes/tanks/bot01.dts";
//damageAmount = 10.0;
ai = BronzeHeavyAI;
};
Datablock TankData(SilverLightTank : LightTank)
{
brainShapeFile = "~/data/shapes/tanks/bot02.dts";
//damageAmount = 13.0;
ai = SilverLightAI;
};
Datablock TankData(SilverMediumTank : MediumTank)
{
brainShapeFile = "~/data/shapes/tanks/bot02.dts";
//damageAmount = 13.0;
ai = SilverMediumAI;
};
Datablock TankData(SilverHeavyTank : HeavyTank)
{
brainShapeFile = "~/data/shapes/tanks/bot02.dts";
//damageAmount = 13.0;
ai = SilverHeavyAI;
};
Datablock TankData(GoldLightTank : LightTank)
{
brainShapeFile = "~/data/shapes/tanks/bot03.dts";
//damageAmount = 15.0;
ai = GoldLightAI;
};
Datablock TankData(GoldMediumTank : MediumTank)
{
brainShapeFile = "~/data/shapes/tanks/bot03.dts";
//damageAmount = 15.0;
ai = GoldMediumAI;
};
Datablock TankData(GoldHeavyTank : HeavyTank)
{
brainShapeFile = "~/data/shapes/tanks/bot03.dts";
//damageAmount = 15.0;
ai = GoldHeavyAI;
};
Sorry I'm just really lame at scripting! :[
-CUC-
- b20
I have the same bot problem. Its so annoying...but there isnt much use for bots. I think its good thing becouse they dont move I can easily test my weapons with Target bots XD
For survivor, its bad thing.
I'm not sure, but I think Racer445 had a simpler and more effective plan for making a new AI. But I think Warfare is on to something and I'll see if I would hopefully fix this today. :)
-CUC-
EDIT: Oh whoopsie! Warfare is right! I needed to give the AI tanks a name!
For example Datablock TankData(AvengerLightTank : MediumTank)
But there is one thing that confuses me with this whole thing is why can't I name the MediumTank the AvengerMediumTank as well? :o
Boy I really need a big book about TSL! :P
- b20
Last edited: Tuesday, July 19, 2005 at 9:14:37 AM
Ok, quick tutorial
Datablock TankData(AvengerLightTank : MediumTank)
this is the new datablock ^.........................^ this is the datablock it is copying variables from
so if you left it like this...
Datablock TankData(AvengerLightTank : MediumTank)
{
}
AvengerLightTank would be the same thing as Medium Tank
in this case medium tank is the defualt settings for the tank
You want a book about torque?
look up 3D Game Programming all in One by Kenneth C. Finney
Ok I'll try it Warfare. Thanks. :)
- b20
Darn it all. Still not workin'! Oh well, um Warfare I sent you an e-mail one more time if you can see all the brutal errors I made! :P
-CUC-
- b20
Last edited: Tuesday, July 19, 2005 at 3:28:23 PM
First can you put up a link o where I can get the tankAI.cs file or can you send me it because this is what I get when I click on the link for it in the 'Other stuff' section
Uuh just read it little bit... But isn't there twice same datablock MediumTank? Try get all datablocks(tanks) their own unique datablock name. Read it little bit more looks like you got multiple times same name in different datablocks which is not good.
You don't have to let go of one rope before grabbing the other. But you'll have to let go of one if you want to swing forward.
So can someone make a new thread about making a new tank AI tutorial? So we start fresh? That would be great! %)
-CUC-
EDIT: Oh and for the tankAI.cs here it is:
But I have the UberBots which is the same thing with tankAI.cs so why we need this? :o
- b20
Last edited: Tuesday, July 19, 2005 at 4:53:10 PM
Cuc try this... It should work now. Make sure you change all Datablock's to datablock's. I changed the tanks names because you had same names multiple times - four times actually. So I changed three of them by adding letters A, B and C to the end of the name.
datablock TankData(MediumTankA
)
{
category = "Tanks";
shapeFile = "~/data/shapes/tanks/tank02.dts";
brainShapeFile = "~/data/shapes/tanks/brainjar02.dts";
camera = "DefaultTankCamera";
fx = "DefaultTankFx";
misc = "DefaultTankMisc";
TurnRate = 68.0; // degrees per second
accelRate = 12.0; // increase velocity this many meters per second
deccelRate = 20.0; // when breaking, decrease velocity
// this many meters per second
coastDeccelRate = 10.0; // rate of decceleration when coasting...
antiSlideRate = 11.1; // dissipate sideways velocity by this many meters
// per second
maxSpeed = 11.9; // meters per second (in forward direction)
TurretVerCenter = 2.0; // vertical resting angle of turret in degrees
turretHorRange = 58.5; // range in +/- degrees of turret horizontally
turretVerRange = 21.0; // range in +/- degrees of turret vertically
turretAutoLevel = 0.5;
SuspensionRange = 0.6; // proportion of wheel size for wheel to move up/down
SpringRangeX = 0.06;
springRangeY = 0.06;
springVelScale = 1.0;
springCorrectScale1 = 2.0;
springCorrectScale2 = 0.99;
DamageAmount = 14.0; // total amount of damage tank can withstand
damageScale = 1.0; // multiply damage we do to others by this amount
armorScale = 1.0; // multiply damage we take by this amount (note: smaller better)
fireScale = 1.0; // adjust inter-fire interval by scale (2 means twice as slow)
DefaultProjectile = "DefaultProjectile";
ai = SniperMediumAI;
};
Datablock TankData(LightTankA
: MediumTankA
)
{
shapeFile = "~/data/shapes/tanks/tank01.dts";
brainShapeFile = "~/data/shapes/tanks/brainjar01.dts";
MaxSpeed = 15.9; // meters per second (in forward direction)
accelRate = 14.0; // increase velocity this many meters per second
deccelRate = 20.0; // when breaking, decrease velocity
turnRate = 61.0; // degrees per second
antiSlideRate = 10.9;
TurretHorRange = 53.5; // range in +/- degrees of turret horizontally
turretAutoLevel = 0.92;
DamageAmount = 11.8; // total amount of damage tank can withstand
suspensionRange = 0.8; // proportion of wheel size for wheel to move up/down
DamageScale = 1.0; // multiply damage we do to others by this amount
armorScale = 1.0; // multiply damage we take by this amount (note: smaller better)
DefaultProjectile = "LightProjectile";
ai = SniperLightAI;
};
Datablock TankData(HeavyTankA
: MediumTankA
)
{
shapeFile = "~/data/shapes/tanks/tank03.dts";
brainShapeFile = "~/data/shapes/tanks/brainjar03.dts";
AccelRate = 8.5; // increase velocity this many meters per second
deccelRate = 7.85; // when breaking, decrease velocity
turnRate = 82.0; // degrees per second
antiSlideRate = 8.25;
//turretHorRange = 53.5; // range in +/- degrees of turret horizontally
turretHorRange = 68.0;
turretAutoLevel = 1.0;
turretVerRange = 24.0;
MaxSpeed = 9.1; // meters per second (in forward direction)
damageAmount = 21.0; // total amount of damage tank can withstand
DamageScale = 1.0; // multiply damage we do to others by this amount
armorScale = 1.0; // multiply damage we take by this amount (note: smaller better)
DefaultProjectile = "HeavyProjectile";
ai = SniperHeavyAI;
};
Datablock TankData(MediumTankB
)
{
category = "Tanks";
shapeFile = "~/data/shapes/tanks/tank02.dts";
brainShapeFile = "~/data/shapes/tanks/brainjar02.dts";
camera = "DefaultTankCamera";
fx = "DefaultTankFx";
misc = "DefaultTankMisc";
TurnRate = 68.0; // degrees per second
accelRate = 12.0; // increase velocity this many meters per second
deccelRate = 20.0; // when breaking, decrease velocity
// this many meters per second
coastDeccelRate = 10.0; // rate of decceleration when coasting...
antiSlideRate = 11.1; // dissipate sideways velocity by this many meters
// per second
maxSpeed = 11.9; // meters per second (in forward direction)
TurretVerCenter = 2.0; // vertical resting angle of turret in degrees
turretHorRange = 58.5; // range in +/- degrees of turret horizontally
turretVerRange = 21.0; // range in +/- degrees of turret vertically
turretAutoLevel = 0.5;
SuspensionRange = 0.6; // proportion of wheel size for wheel to move up/down
SpringRangeX = 0.06;
springRangeY = 0.06;
springVelScale = 1.0;
springCorrectScale1 = 2.0;
springCorrectScale2 = 0.99;
DamageAmount = 14.0; // total amount of damage tank can withstand
damageScale = 1.0; // multiply damage we do to others by this amount
armorScale = 1.0; // multiply damage we take by this amount (note: smaller better)
fireScale = 1.0; // adjust inter-fire interval by scale (2 means twice as slow)
DefaultProjectile = "DefaultProjectile";
ai = AvengerMediumAI;
};
Datablock TankData(LightTankB
: MediumTankB
)
{
shapeFile = "~/data/shapes/tanks/tank01.dts";
brainShapeFile = "~/data/shapes/tanks/brainjar01.dts";
MaxSpeed = 15.9; // meters per second (in forward direction)
accelRate = 14.0; // increase velocity this many meters per second
deccelRate = 20.0; // when breaking, decrease velocity
turnRate = 61.0; // degrees per second
antiSlideRate = 10.9;
TurretHorRange = 53.5; // range in +/- degrees of turret horizontally
turretAutoLevel = 0.92;
DamageAmount = 11.8; // total amount of damage tank can withstand
suspensionRange = 0.8; // proportion of wheel size for wheel to move up/down
DamageScale = 1.0; // multiply damage we do to others by this amount
armorScale = 1.0; // multiply damage we take by this amount (note: smaller better)
DefaultProjectile = "LightProjectile";
ai = AvengerLightAI;
};
Datablock TankData(HeavyTankB
: MediumTankB
)
{
shapeFile = "~/data/shapes/tanks/tank03.dts";
brainShapeFile = "~/data/shapes/tanks/brainjar03.dts";
AccelRate = 8.5; // increase velocity this many meters per second
deccelRate = 7.85; // when breaking, decrease velocity
turnRate = 82.0; // degrees per second
antiSlideRate = 8.25;
//turretHorRange = 53.5; // range in +/- degrees of turret horizontally
turretHorRange = 68.0;
turretAutoLevel = 1.0;
turretVerRange = 24.0;
MaxSpeed = 9.1; // meters per second (in forward direction)
damageAmount = 21.0; // total amount of damage tank can withstand
DamageScale = 1.0; // multiply damage we do to others by this amount
armorScale = 1.0; // multiply damage we take by this amount (note: smaller better)
DefaultProjectile = "HeavyProjectile";
ai = AvengerHeavyAI;
};
Datablock TankData(MediumTankC
)
{
category = "Tanks";
shapeFile = "~/data/shapes/tanks/tank02.dts";
brainShapeFile = "~/data/shapes/tanks/brainjar02.dts";
camera = "DefaultTankCamera";
fx = "DefaultTankFx";
misc = "DefaultTankMisc";
TurnRate = 68.0; // degrees per second
accelRate = 12.0; // increase velocity this many meters per second
deccelRate = 20.0; // when breaking, decrease velocity
// this many meters per second
coastDeccelRate = 10.0; // rate of decceleration when coasting...
antiSlideRate = 11.1; // dissipate sideways velocity by this many meters
// per second
maxSpeed = 11.9; // meters per second (in forward direction)
TurretVerCenter = 2.0; // vertical resting angle of turret in degrees
turretHorRange = 58.5; // range in +/- degrees of turret horizontally
turretVerRange = 21.0; // range in +/- degrees of turret vertically
turretAutoLevel = 0.5;
SuspensionRange = 0.6; // proportion of wheel size for wheel to move up/down
SpringRangeX = 0.06;
springRangeY = 0.06;
springVelScale = 1.0;
springCorrectScale1 = 2.0;
springCorrectScale2 = 0.99;
DamageAmount = 14.0; // total amount of damage tank can withstand
damageScale = 1.0; // multiply damage we do to others by this amount
armorScale = 1.0; // multiply damage we take by this amount (note: smaller better)
fireScale = 1.0; // adjust inter-fire interval by scale (2 means twice as slow)
DefaultProjectile = "DefaultProjectile";
ai = CowardMediumAI;
};
Datablock TankData(LightTankC
: MediumTankC
)
{
shapeFile = "~/data/shapes/tanks/tank01.dts";
brainShapeFile = "~/data/shapes/tanks/brainjar01.dts";
MaxSpeed = 15.9; // meters per second (in forward direction)
accelRate = 14.0; // increase velocity this many meters per second
deccelRate = 20.0; // when breaking, decrease velocity
turnRate = 61.0; // degrees per second
antiSlideRate = 10.9;
TurretHorRange = 53.5; // range in +/- degrees of turret horizontally
turretAutoLevel = 0.92;
DamageAmount = 11.8; // total amount of damage tank can withstand
suspensionRange = 0.8; // proportion of wheel size for wheel to move up/down
DamageScale = 1.0; // multiply damage we do to others by this amount
armorScale = 1.0; // multiply damage we take by this amount (note: smaller better)
DefaultProjectile = "LightProjectile";
ai = CowardLightAI;
};
Datablock TankData(HeavyTankC
: MediumTankC
)
{
shapeFile = "~/data/shapes/tanks/tank03.dts";
brainShapeFile = "~/data/shapes/tanks/brainjar03.dts";
AccelRate = 8.5; // increase velocity this many meters per second
deccelRate = 7.85; // when breaking, decrease velocity
turnRate = 82.0; // degrees per second
antiSlideRate = 8.25;
//turretHorRange = 53.5; // range in +/- degrees of turret horizontally
turretHorRange = 68.0;
turretAutoLevel = 1.0;
turretVerRange = 24.0;
MaxSpeed = 9.1; // meters per second (in forward direction)
damageAmount = 21.0; // total amount of damage tank can withstand
DamageScale = 1.0; // multiply damage we do to others by this amount
armorScale = 1.0; // multiply damage we take by this amount (note: smaller better)
DefaultProjectile = "HeavyProjectile";
ai = CowardHeavyAI;
};
Datablock TankData(MediumTank)
{
category = "Tanks";
shapeFile = "~/data/shapes/tanks/tank02.dts";
brainShapeFile = "~/data/shapes/tanks/brainjar02.dts";
camera = "DefaultTankCamera";
fx = "DefaultTankFx";
misc = "DefaultTankMisc";
TurnRate = 68.0; // degrees per second
accelRate = 12.0; // increase velocity this many meters per second
deccelRate = 20.0; // when breaking, decrease velocity
// this many meters per second
coastDeccelRate = 10.0; // rate of decceleration when coasting...
antiSlideRate = 11.1; // dissipate sideways velocity by this many meters
// per second
maxSpeed = 11.9; // meters per second (in forward direction)
TurretVerCenter = 2.0; // vertical resting angle of turret in degrees
turretHorRange = 58.5; // range in +/- degrees of turret horizontally
turretVerRange = 21.0; // range in +/- degrees of turret vertically
turretAutoLevel = 0.5;
SuspensionRange = 0.6; // proportion of wheel size for wheel to move up/down
SpringRangeX = 0.06;
springRangeY = 0.06;
springVelScale = 1.0;
springCorrectScale1 = 2.0;
springCorrectScale2 = 0.99;
DamageAmount = 14.0; // total amount of damage tank can withstand
damageScale = 1.0; // multiply damage we do to others by this amount
armorScale = 1.0; // multiply damage we take by this amount (note: smaller better)
fireScale = 1.0; // adjust inter-fire interval by scale (2 means twice as slow)
DefaultProjectile = "DefaultProjectile";
ai = GoldMediumAI;
};
Datablock TankData(LightTank : MediumTank)
{
shapeFile = "~/data/shapes/tanks/tank01.dts";
brainShapeFile = "~/data/shapes/tanks/brainjar01.dts";
MaxSpeed = 15.9; // meters per second (in forward direction)
accelRate = 14.0; // increase velocity this many meters per second
deccelRate = 20.0; // when breaking, decrease velocity
turnRate = 61.0; // degrees per second
antiSlideRate = 10.9;
TurretHorRange = 53.5; // range in +/- degrees of turret horizontally
turretAutoLevel = 0.92;
DamageAmount = 11.8; // total amount of damage tank can withstand
suspensionRange = 0.8; // proportion of wheel size for wheel to move up/down
DamageScale = 1.0; // multiply damage we do to others by this amount
armorScale = 1.0; // multiply damage we take by this amount (note: smaller better)
DefaultProjectile = "LightProjectile";
ai = GoldLightAI;
};
Datablock TankData(HeavyTank : MediumTank)
{
shapeFile = "~/data/shapes/tanks/tank03.dts";
brainShapeFile = "~/data/shapes/tanks/brainjar03.dts";
AccelRate = 8.5; // increase velocity this many meters per second
deccelRate = 7.85; // when breaking, decrease velocity
turnRate = 82.0; // degrees per second
antiSlideRate = 8.25;
//turretHorRange = 53.5; // range in +/- degrees of turret horizontally
turretHorRange = 68.0;
turretAutoLevel = 1.0;
turretVerRange = 24.0;
MaxSpeed = 9.1; // meters per second (in forward direction)
damageAmount = 21.0; // total amount of damage tank can withstand
DamageScale = 1.0; // multiply damage we do to others by this amount
armorScale = 1.0; // multiply damage we take by this amount (note: smaller better)
DefaultProjectile = "HeavyProjectile";
ai = GoldHeavyAI;
};
Datablock TankData(BabyBoss : MediumTank)
{
shapeFile = "~/data/shapes/tanks/tank05.dts";
brainShapeFile = "~/data/shapes/tanks/brainjar04.dts";
fx = "BabyBossFX";
MaxSpeed = 17.0; // meters per second (in forward direction)
accelRate = 15.0; // increase velocity this many meters per second
deccelRate = 16.0; // when breaking, decrease velocity
turnRate = 61.0; // degrees per second
antiSlideRate = 10.2;
TurretHorRange = 33.5; // range in +/- degrees of turret horizontally
turretAutoLevel = 0.92;
DamageAmount = 10.0; // total amount of damage tank can withstand
suspensionRange = 0.8; // proportion of wheel size for wheel to move up/down
DamageScale = 1.0; // multiply damage we do to others by this amount
armorScale = 1.0; // multiply damage we take by this amount (note: smaller better)
DefaultProjectile = "LightProjectile";
ai = GoldLightAI;
};
//--------------------------------------------------------
// AI Tanks
//--------------------------------------------------------
Datablock TankData(BronzeLightTank : LightTank)
{
brainShapeFile = "~/data/shapes/tanks/bot01.dts";
//damageAmount = 10.0;
ai = BronzeLightAI;
};
Datablock TankData(BronzeMediumTank : MediumTank)
{
brainShapeFile = "~/data/shapes/tanks/bot01.dts";
//damageAmount = 10.0;
ai = BronzeMediumAI;
};
Datablock TankData(BronzeHeavyTank : HeavyTank)
{
brainShapeFile = "~/data/shapes/tanks/bot01.dts";
//damageAmount = 10.0;
ai = BronzeHeavyAI;
};
Datablock TankData(SilverLightTank : LightTank)
{
brainShapeFile = "~/data/shapes/tanks/bot02.dts";
//damageAmount = 13.0;
ai = SilverLightAI;
};
Datablock TankData(SilverMediumTank : MediumTank)
{
brainShapeFile = "~/data/shapes/tanks/bot02.dts";
//damageAmount = 13.0;
ai = SilverMediumAI;
};
Datablock TankData(SilverHeavyTank : HeavyTank)
{
brainShapeFile = "~/data/shapes/tanks/bot02.dts";
//damageAmount = 13.0;
ai = SilverHeavyAI;
};
Datablock TankData(GoldLightTank : LightTank)
{
brainShapeFile = "~/data/shapes/tanks/bot03.dts";
//damageAmount = 15.0;
ai = GoldLightAI;
};
Datablock TankData(GoldMediumTank : MediumTank)
{
brainShapeFile = "~/data/shapes/tanks/bot03.dts";
//damageAmount = 15.0;
ai = GoldMediumAI;
};
Datablock TankData(GoldHeavyTank : HeavyTank)
{
brainShapeFile = "~/data/shapes/tanks/bot03.dts";
//damageAmount = 15.0;
ai = GoldHeavyAI;
};
Datablock TankData(CowardLightTank : LightTankC
)
{
brainShapeFile = "~/data/shapes/tanks/bot03.dts";
//damageAmount = 15.0;
ai = CowardLightAI;
};
Datablock TankData(CowardMediumTank : MediumTankC
)
{
brainShapeFile = "~/data/shapes/tanks/bot03.dts";
//damageAmount = 15.0;
ai = CowardMediumAI;
};
Datablock TankData(CowardHeavyTank : HeavyTankC
)
{
brainShapeFile = "~/data/shapes/tanks/bot03.dts";
//damageAmount = 15.0;
ai = CowardHeavyAI;
};
Datablock TankData(AvengerLightTank : LightTankB
)
{
brainShapeFile = "~/data/shapes/tanks/bot03.dts";
//damageAmount = 15.0;
ai = AvengerLightAI;
};
Datablock TankData(AvengerMediumTank : MediumTankB
)
{
brainShapeFile = "~/data/shapes/tanks/bot03.dts";
//damageAmount = 15.0;
ai = AvengerMediumAI;
};
Datablock TankData(AvengerHeavyTank : HeavyTankB
)
{
brainShapeFile = "~/data/shapes/tanks/bot03.dts";
//damageAmount = 15.0;
ai = AvengerHeavyAI;
};
Datablock TankData(SniperLightTank : LightTankA
)
{
brainShapeFile = "~/data/shapes/tanks/bot03.dts";
//damageAmount = 15.0;
ai = SniperLightAI;
};
Datablock TankData(SniperMediumTank : MediumTankA
)
{
brainShapeFile = "~/data/shapes/tanks/bot03.dts";
//damageAmount = 15.0;
ai = SniperMediumAI;
};
Datablock TankData(SniperHeavyTank : HeavyTankA
)
{
brainShapeFile = "~/data/shapes/tanks/bot03.dts";
//damageAmount = 15.0;
ai = SniperHeavyAI;
};
Datablock TankData(BossTank : HeavyTank)
{
shapeFile = "~/data/shapes/tanks/tank04.dts";
brainShapeFile = "~/data/shapes/tanks/bot03.dts";
fx = "ufoFX";
DamageAmount = 45.0;
ai = BossAI;
TurnRate = 50.0;
accelRate = 8.0;
deccelRate = 20.0;
coastDeccelRate = 10.0;
antiSlideRate = 11.1;
maxSpeed = 8;
};
Datablock ProjectileData(ZeroProjectile : DefaultProjectile)
{
count = 0;
};
Datablock TankData(TargetLight : LightTank)
{
ai = TargetLightAI;
defaultProjectile = "ZeroProjectile";
DamageAmount = 8;
maxSpeed = 15.9;
};
Datablock TankData(TargetMedium : MediumTank)
{
ai = TargetMediumAI;
defaultProjectile = "ZeroProjectile";
DamageAmount = 12;
maxSpeed = 11.9;
};
Datablock TankData(TargetHeavy : HeavyTank)
{
ai = TargetHeavytAI;
defaultProjectile = "ZeroProjectile";
DamageAmount = 18;
maxSpeed = 0.1;
};
Datablock TankData(TargetSaucer : BabyBoss)
{
ai = TargetSaucerAI;
defaultProjectile = "ZeroProjectile";
DamageAmount = 3.5;
maxSpeed = 16.0;
};
You don't have to let go of one rope before grabbing the other. But you'll have to let go of one if you want to swing forward.
^Read the main post again.
You don't have to let go of one rope before grabbing the other. But you'll have to let go of one if you want to swing forward.
Page : <1> :
Hi everybody well I'm trying to make new tank AI's for this upcoming Survivor that we are making. I thought I knew how to make new tankAIs but there was so many bugs. The bugs were that the new AI woudn't move, shoot, or respwan.
Ok here is my specs:
TankDb.cs -
Datablock TankData(MediumTank)
{
category = "Tanks";
shapeFile = "~/data/shapes/tanks/tank02.dts";
brainShapeFile = "~/data/shapes/tanks/brainjar02.dts";
camera = "DefaultTankCamera";
fx = "DefaultTankFx";
misc = "DefaultTankMisc";
TurnRate = 68.0; // degrees per second
accelRate = 12.0; // increase velocity this many meters per second
deccelRate = 20.0; // when breaking, decrease velocity
// this many meters per second
coastDeccelRate = 10.0; // rate of decceleration when coasting...
antiSlideRate = 11.1; // dissipate sideways velocity by this many meters
// per second
maxSpeed = 11.9; // meters per second (in forward direction)
TurretVerCenter = 2.0; // vertical resting angle of turret in degrees
turretHorRange = 58.5; // range in +/- degrees of turret horizontally
turretVerRange = 21.0; // range in +/- degrees of turret vertically
turretAutoLevel = 0.5;
SuspensionRange = 0.6; // proportion of wheel size for wheel to move up/down
SpringRangeX = 0.06;
springRangeY = 0.06;
springVelScale = 1.0;
springCorrectScale1 = 2.0;
springCorrectScale2 = 0.99;
DamageAmount = 14.0; // total amount of damage tank can withstand
damageScale = 1.0; // multiply damage we do to others by this amount
armorScale = 1.0; // multiply damage we take by this amount (note: smaller better)
fireScale = 1.0; // adjust inter-fire interval by scale (2 means twice as slow)
DefaultProjectile = "DefaultProjectile";
ai = SniperMediumAI;
};
Datablock TankData(LightTank : MediumTank)
{
shapeFile = "~/data/shapes/tanks/tank01.dts";
brainShapeFile = "~/data/shapes/tanks/brainjar01.dts";
MaxSpeed = 15.9; // meters per second (in forward direction)
accelRate = 14.0; // increase velocity this many meters per second
deccelRate = 20.0; // when breaking, decrease velocity
turnRate = 61.0; // degrees per second
antiSlideRate = 10.9;
TurretHorRange = 53.5; // range in +/- degrees of turret horizontally
turretAutoLevel = 0.92;
DamageAmount = 11.8; // total amount of damage tank can withstand
suspensionRange = 0.8; // proportion of wheel size for wheel to move up/down
DamageScale = 1.0; // multiply damage we do to others by this amount
armorScale = 1.0; // multiply damage we take by this amount (note: smaller better)
DefaultProjectile = "LightProjectile";
ai = SniperLightAI;
};
Datablock TankData(HeavyTank : MediumTank)
{
shapeFile = "~/data/shapes/tanks/tank03.dts";
brainShapeFile = "~/data/shapes/tanks/brainjar03.dts";
AccelRate = 8.5; // increase velocity this many meters per second
deccelRate = 7.85; // when breaking, decrease velocity
turnRate = 82.0; // degrees per second
antiSlideRate = 8.25;
//turretHorRange = 53.5; // range in +/- degrees of turret horizontally
turretHorRange = 68.0;
turretAutoLevel = 1.0;
turretVerRange = 24.0;
MaxSpeed = 9.1; // meters per second (in forward direction)
damageAmount = 21.0; // total amount of damage tank can withstand
DamageScale = 1.0; // multiply damage we do to others by this amount
armorScale = 1.0; // multiply damage we take by this amount (note: smaller better)
DefaultProjectile = "HeavyProjectile";
ai = SniperHeavyAI;
};
Datablock TankData(MediumTank)
{
category = "Tanks";
shapeFile = "~/data/shapes/tanks/tank02.dts";
brainShapeFile = "~/data/shapes/tanks/brainjar02.dts";
camera = "DefaultTankCamera";
fx = "DefaultTankFx";
misc = "DefaultTankMisc";
TurnRate = 68.0; // degrees per second
accelRate = 12.0; // increase velocity this many meters per second
deccelRate = 20.0; // when breaking, decrease velocity
// this many meters per second
coastDeccelRate = 10.0; // rate of decceleration when coasting...
antiSlideRate = 11.1; // dissipate sideways velocity by this many meters
// per second
maxSpeed = 11.9; // meters per second (in forward direction)
TurretVerCenter = 2.0; // vertical resting angle of turret in degrees
turretHorRange = 58.5; // range in +/- degrees of turret horizontally
turretVerRange = 21.0; // range in +/- degrees of turret vertically
turretAutoLevel = 0.5;
SuspensionRange = 0.6; // proportion of wheel size for wheel to move up/down
SpringRangeX = 0.06;
springRangeY = 0.06;
springVelScale = 1.0;
springCorrectScale1 = 2.0;
springCorrectScale2 = 0.99;
DamageAmount = 14.0; // total amount of damage tank can withstand
damageScale = 1.0; // multiply damage we do to others by this amount
armorScale = 1.0; // multiply damage we take by this amount (note: smaller better)
fireScale = 1.0; // adjust inter-fire interval by scale (2 means twice as slow)
DefaultProjectile = "DefaultProjectile";
ai = AvengerMediumAI;
};
Datablock TankData(LightTank : MediumTank)
{
shapeFile = "~/data/shapes/tanks/tank01.dts";
brainShapeFile = "~/data/shapes/tanks/brainjar01.dts";
MaxSpeed = 15.9; // meters per second (in forward direction)
accelRate = 14.0; // increase velocity this many meters per second
deccelRate = 20.0; // when breaking, decrease velocity
turnRate = 61.0; // degrees per second
antiSlideRate = 10.9;
TurretHorRange = 53.5; // range in +/- degrees of turret horizontally
turretAutoLevel = 0.92;
DamageAmount = 11.8; // total amount of damage tank can withstand
suspensionRange = 0.8; // proportion of wheel size for wheel to move up/down
DamageScale = 1.0; // multiply damage we do to others by this amount
armorScale = 1.0; // multiply damage we take by this amount (note: smaller better)
DefaultProjectile = "LightProjectile";
ai = AvengerLightAI;
};
Datablock TankData(HeavyTank : MediumTank)
{
shapeFile = "~/data/shapes/tanks/tank03.dts";
brainShapeFile = "~/data/shapes/tanks/brainjar03.dts";
AccelRate = 8.5; // increase velocity this many meters per second
deccelRate = 7.85; // when breaking, decrease velocity
turnRate = 82.0; // degrees per second
antiSlideRate = 8.25;
//turretHorRange = 53.5; // range in +/- degrees of turret horizontally
turretHorRange = 68.0;
turretAutoLevel = 1.0;
turretVerRange = 24.0;
MaxSpeed = 9.1; // meters per second (in forward direction)
damageAmount = 21.0; // total amount of damage tank can withstand
DamageScale = 1.0; // multiply damage we do to others by this amount
armorScale = 1.0; // multiply damage we take by this amount (note: smaller better)
DefaultProjectile = "HeavyProjectile";
ai = AvengerHeavyAI;
};
Datablock TankData(MediumTank)
{
category = "Tanks";
shapeFile = "~/data/shapes/tanks/tank02.dts";
brainShapeFile = "~/data/shapes/tanks/brainjar02.dts";
camera = "DefaultTankCamera";
fx = "DefaultTankFx";
misc = "DefaultTankMisc";
TurnRate = 68.0; // degrees per second
accelRate = 12.0; // increase velocity this many meters per second
deccelRate = 20.0; // when breaking, decrease velocity
// this many meters per second
coastDeccelRate = 10.0; // rate of decceleration when coasting...
antiSlideRate = 11.1; // dissipate sideways velocity by this many meters
// per second
maxSpeed = 11.9; // meters per second (in forward direction)
TurretVerCenter = 2.0; // vertical resting angle of turret in degrees
turretHorRange = 58.5; // range in +/- degrees of turret horizontally
turretVerRange = 21.0; // range in +/- degrees of turret vertically
turretAutoLevel = 0.5;
SuspensionRange = 0.6; // proportion of wheel size for wheel to move up/down
SpringRangeX = 0.06;
springRangeY = 0.06;
springVelScale = 1.0;
springCorrectScale1 = 2.0;
springCorrectScale2 = 0.99;
DamageAmount = 14.0; // total amount of damage tank can withstand
damageScale = 1.0; // multiply damage we do to others by this amount
armorScale = 1.0; // multiply damage we take by this amount (note: smaller better)
fireScale = 1.0; // adjust inter-fire interval by scale (2 means twice as slow)
DefaultProjectile = "DefaultProjectile";
ai = CowardMediumAI;
};
Datablock TankData(LightTank : MediumTank)
{
shapeFile = "~/data/shapes/tanks/tank01.dts";
brainShapeFile = "~/data/shapes/tanks/brainjar01.dts";
MaxSpeed = 15.9; // meters per second (in forward direction)
accelRate = 14.0; // increase velocity this many meters per second
deccelRate = 20.0; // when breaking, decrease velocity
turnRate = 61.0; // degrees per second
antiSlideRate = 10.9;
TurretHorRange = 53.5; // range in +/- degrees of turret horizontally
turretAutoLevel = 0.92;
DamageAmount = 11.8; // total amount of damage tank can withstand
suspensionRange = 0.8; // proportion of wheel size for wheel to move up/down
DamageScale = 1.0; // multiply damage we do to others by this amount
armorScale = 1.0; // multiply damage we take by this amount (note: smaller better)
DefaultProjectile = "LightProjectile";
ai = CowardLightAI;
};
Datablock TankData(HeavyTank : MediumTank)
{
shapeFile = "~/data/shapes/tanks/tank03.dts";
brainShapeFile = "~/data/shapes/tanks/brainjar03.dts";
AccelRate = 8.5; // increase velocity this many meters per second
deccelRate = 7.85; // when breaking, decrease velocity
turnRate = 82.0; // degrees per second
antiSlideRate = 8.25;
//turretHorRange = 53.5; // range in +/- degrees of turret horizontally
turretHorRange = 68.0;
turretAutoLevel = 1.0;
turretVerRange = 24.0;
MaxSpeed = 9.1; // meters per second (in forward direction)
damageAmount = 21.0; // total amount of damage tank can withstand
DamageScale = 1.0; // multiply damage we do to others by this amount
armorScale = 1.0; // multiply damage we take by this amount (note: smaller better)
DefaultProjectile = "HeavyProjectile";
ai = CowardHeavyAI;
};
Datablock TankData(MediumTank)
{
category = "Tanks";
shapeFile = "~/data/shapes/tanks/tank02.dts";
brainShapeFile = "~/data/shapes/tanks/brainjar02.dts";
camera = "DefaultTankCamera";
fx = "DefaultTankFx";
misc = "DefaultTankMisc";
TurnRate = 68.0; // degrees per second
accelRate = 12.0; // increase velocity this many meters per second
deccelRate = 20.0; // when breaking, decrease velocity
// this many meters per second
coastDeccelRate = 10.0; // rate of decceleration when coasting...
antiSlideRate = 11.1; // dissipate sideways velocity by this many meters
// per second
maxSpeed = 11.9; // meters per second (in forward direction)
TurretVerCenter = 2.0; // vertical resting angle of turret in degrees
turretHorRange = 58.5; // range in +/- degrees of turret horizontally
turretVerRange = 21.0; // range in +/- degrees of turret vertically
turretAutoLevel = 0.5;
SuspensionRange = 0.6; // proportion of wheel size for wheel to move up/down
SpringRangeX = 0.06;
springRangeY = 0.06;
springVelScale = 1.0;
springCorrectScale1 = 2.0;
springCorrectScale2 = 0.99;
DamageAmount = 14.0; // total amount of damage tank can withstand
damageScale = 1.0; // multiply damage we do to others by this amount
armorScale = 1.0; // multiply damage we take by this amount (note: smaller better)
fireScale = 1.0; // adjust inter-fire interval by scale (2 means twice as slow)
DefaultProjectile = "DefaultProjectile";
ai = GoldMediumAI;
};
Datablock TankData(LightTank : MediumTank)
{
shapeFile = "~/data/shapes/tanks/tank01.dts";
brainShapeFile = "~/data/shapes/tanks/brainjar01.dts";
MaxSpeed = 15.9; // meters per second (in forward direction)
accelRate = 14.0; // increase velocity this many meters per second
deccelRate = 20.0; // when breaking, decrease velocity
turnRate = 61.0; // degrees per second
antiSlideRate = 10.9;
TurretHorRange = 53.5; // range in +/- degrees of turret horizontally
turretAutoLevel = 0.92;
DamageAmount = 11.8; // total amount of damage tank can withstand
suspensionRange = 0.8; // proportion of wheel size for wheel to move up/down
DamageScale = 1.0; // multiply damage we do to others by this amount
armorScale = 1.0; // multiply damage we take by this amount (note: smaller better)
DefaultProjectile = "LightProjectile";
ai = GoldLightAI;
};
Datablock TankData(HeavyTank : MediumTank)
{
shapeFile = "~/data/shapes/tanks/tank03.dts";
brainShapeFile = "~/data/shapes/tanks/brainjar03.dts";
AccelRate = 8.5; // increase velocity this many meters per second
deccelRate = 7.85; // when breaking, decrease velocity
turnRate = 82.0; // degrees per second
antiSlideRate = 8.25;
//turretHorRange = 53.5; // range in +/- degrees of turret horizontally
turretHorRange = 68.0;
turretAutoLevel = 1.0;
turretVerRange = 24.0;
MaxSpeed = 9.1; // meters per second (in forward direction)
damageAmount = 21.0; // total amount of damage tank can withstand
DamageScale = 1.0; // multiply damage we do to others by this amount
armorScale = 1.0; // multiply damage we take by this amount (note: smaller better)
DefaultProjectile = "HeavyProjectile";
ai = GoldHeavyAI;
};
Datablock TankData(BabyBoss : MediumTank)
{
shapeFile = "~/data/shapes/tanks/tank05.dts";
brainShapeFile = "~/data/shapes/tanks/brainjar04.dts";
fx = "BabyBossFX";
MaxSpeed = 17.0; // meters per second (in forward direction)
accelRate = 15.0; // increase velocity this many meters per second
deccelRate = 16.0; // when breaking, decrease velocity
turnRate = 61.0; // degrees per second
antiSlideRate = 10.2;
TurretHorRange = 33.5; // range in +/- degrees of turret horizontally
turretAutoLevel = 0.92;
DamageAmount = 10.0; // total amount of damage tank can withstand
suspensionRange = 0.8; // proportion of wheel size for wheel to move up/down
DamageScale = 1.0; // multiply damage we do to others by this amount
armorScale = 1.0; // multiply damage we take by this amount (note: smaller better)
DefaultProjectile = "LightProjectile";
ai = GoldLightAI;
};
//--------------------------------------------------------
// AI Tanks
//--------------------------------------------------------
Datablock TankData(BronzeLightTank : LightTank)
{
brainShapeFile = "~/data/shapes/tanks/bot01.dts";
//damageAmount = 10.0;
ai = BronzeLightAI;
};
Datablock TankData(BronzeMediumTank : MediumTank)
{
brainShapeFile = "~/data/shapes/tanks/bot01.dts";
//damageAmount = 10.0;
ai = BronzeMediumAI;
};
Datablock TankData(BronzeHeavyTank : HeavyTank)
{
brainShapeFile = "~/data/shapes/tanks/bot01.dts";
//damageAmount = 10.0;
ai = BronzeHeavyAI;
};
Datablock TankData(SilverLightTank : LightTank)
{
brainShapeFile = "~/data/shapes/tanks/bot02.dts";
//damageAmount = 13.0;
ai = SilverLightAI;
};
Datablock TankData(SilverMediumTank : MediumTank)
{
brainShapeFile = "~/data/shapes/tanks/bot02.dts";
//damageAmount = 13.0;
ai = SilverMediumAI;
};
Datablock TankData(SilverHeavyTank : HeavyTank)
{
brainShapeFile = "~/data/shapes/tanks/bot02.dts";
//damageAmount = 13.0;
ai = SilverHeavyAI;
};
Datablock TankData(GoldLightTank : LightTank)
{
brainShapeFile = "~/data/shapes/tanks/bot03.dts";
//damageAmount = 15.0;
ai = GoldLightAI;
};
Datablock TankData(GoldMediumTank : MediumTank)
{
brainShapeFile = "~/data/shapes/tanks/bot03.dts";
//damageAmount = 15.0;
ai = GoldMediumAI;
};
Datablock TankData(GoldHeavyTank : HeavyTank)
{
brainShapeFile = "~/data/shapes/tanks/bot03.dts";
//damageAmount = 15.0;
ai = GoldHeavyAI;
};
datablock TankData(CowardLightTank : LightTank)
{
brainShapeFile = "~/data/shapes/tanks/bot03.dts";
//damageAmount = 15.0;
ai = CowardLightAI;
};
Datablock TankData(CowardMediumTank : MediumTank)
{
brainShapeFile = "~/data/shapes/tanks/bot03.dts";
//damageAmount = 15.0;
ai = CowardMediumAI;
};
Datablock TankData(CowardHeavyTank : HeavyTank)
{
brainShapeFile = "~/data/shapes/tanks/bot03.dts";
//damageAmount = 15.0;
ai = CowardHeavyAI;
};
Datablock TankData(AvengerLightTank : LightTank)
{
brainShapeFile = "~/data/shapes/tanks/bot03.dts";
//damageAmount = 15.0;
ai = AvengerLightAI;
};
Datablock TankData(AvengerMediumTank : MediumTank)
{
brainShapeFile = "~/data/shapes/tanks/bot03.dts";
//damageAmount = 15.0;
ai = AvengerMediumAI;
};
Datablock TankData(AvengerHeavyTank : HeavyTank)
{
brainShapeFile = "~/data/shapes/tanks/bot03.dts";
//damageAmount = 15.0;
ai = AvengerHeavyAI;
};
Datablock TankData(SniperLightTank : LightTank)
{
brainShapeFile = "~/data/shapes/tanks/bot03.dts";
//damageAmount = 15.0;
ai = SniperLightAI;
};
Datablock TankData(SniperMediumTank : MediumTank)
{
brainShapeFile = "~/data/shapes/tanks/bot03.dts";
//damageAmount = 15.0;
ai = SniperMediumAI;
};
Datablock TankData(SniperHeavyTank : HeavyTank)
{
brainShapeFile = "~/data/shapes/tanks/bot03.dts";
//damageAmount = 15.0;
ai = SniperHeavyAI;
};
Datablock TankData(BossTank : HeavyTank)
{
shapeFile = "~/data/shapes/tanks/tank04.dts";
brainShapeFile = "~/data/shapes/tanks/bot03.dts";
fx = "ufoFX";
DamageAmount = 45.0;
ai = BossAI;
TurnRate = 50.0;
accelRate = 8.0;
deccelRate = 20.0;
coastDeccelRate = 10.0;
antiSlideRate = 11.1;
maxSpeed = 8;
};
Datablock ProjectileData(ZeroProjectile : DefaultProjectile)
{
count = 0;
};
Datablock TankData(TargetLight : LightTank)
{
ai = TargetLightAI;
defaultProjectile = "ZeroProjectile";
DamageAmount = 8;
maxSpeed = 15.9;
};
Datablock TankData(TargetMedium : MediumTank)
{
ai = TargetMediumAI;
defaultProjectile = "ZeroProjectile";
DamageAmount = 12;
maxSpeed = 11.9;
};
Datablock TankData(TargetHeavy : HeavyTank)
{
ai = TargetHeavytAI;
defaultProjectile = "ZeroProjectile";
DamageAmount = 18;
maxSpeed = 0.1;
};
Datablock TankData(TargetSaucer : BabyBoss)
{
ai = TargetSaucerAI;
defaultProjectile = "ZeroProjectile";
DamageAmount = 3.5;
maxSpeed = 16.0;
};
And finally the prefs.cs -
$pref::Server::AdminKillMessage = " HAD HIS BRAIN POPPED BY AN ADMIN FOR BEING A PUNK";
$Pref::Server::AdminPassword = "";
$pref::Server::BanAnnouncment = " HAS BEEN BANNED";
$pref::Server::BanMessage = "YOU HAVE BEEN FROM THIS SERVER. ";
$pref::Server::Bot0 = "GoldLightTank";
$pref::Server::Bot1 = "SilverLightTank";
$pref::Server::Bot2 = "BronzeLightTank";
$pref::Server::Bot3 = "CowardLightTank";
$pref::Server::Bot4 = "AvengerLightTank";
$pref::Server::Bot5 = "SniperLightTank";
$pref::Server::Bot6 = "GoldLightTank";
$pref::Server::Bot7 = "GoldLightTank";
$pref::Server::BotName0 = "Frantice";
$pref::Server::BotName1 = "Blontor";
$pref::Server::BotName2 = "Johnver";
$pref::Server::BotName3 = "Zent";
$pref::Server::BotName4 = "Pavopo";
$pref::Server::BotName5 = "Volter";
$pref::Server::BotName6 = "Penguin";
$pref::Server::BotName7 = "Apple";
$pref::Server::BotTeam0 = "GreenTeam";
$pref::Server::BotTeam1 = "GreenTeam";
$pref::Server::BotTeam2 = "GreenTeam";
$pref::Server::BotTeam3 = "BlueTeam";
$pref::Server::BotTeam4 = "BlueTeam";
$pref::Server::BotTeam5 = "BlueTeam";
$pref::Server::BotTeam6 = "BlueTeam";
$pref::Server::BotTeam7 = "BlueTeam";
$pref::Server::ChatDeniedMessage = "NO CHAT FOR YOU";
$Pref::Server::ConnectionError = "You do not have the correct version of the Torque Game Engine or the related art needed to connect to this server, please contact the server operator to obtain the latest version of this game.";
$Pref::Server::DisplayOnMaster = "Always";
$pref::Server::FailedAdminLogin = " HAS BEEN KICKED FOR A FAILED ADMIN LOGIN ATTEMPT";
$Pref::Server::FloodProtectionEnabled = 1;
$Pref::Server::gameTypeIndex = "0";
$pref::Server::goldMessage = " HAS BEEN TURNED INTO A BOT!!";
$pref::Server::KickAnnouncment = " HAS BEEN KICKED";
$pref::Server::KickMessage = " YOU HAVE BEEN KICKED FOR BAD BEHAVIOR, YOU ARE WELCOME TO COME BACK IF YOU WILL PLAY NICELY";
$pref::Server::MaxBots = 6;
$Pref::Server::MaxChatLen = 120;
$Pref::Server::MaxPlayers = 10;
$Pref::Server::missionIndex = 4;
$pref::Server::missionWorld = 1;
$Pref::Server::Name = "CUC's PlayGround";
$pref::Server::NukeMessage = " NUKE 'EM ALL";
$pref::Server::ObserverOn = 1;
$Pref::Server::PasswordEnabled = 0;
$Pref::Server::Port = 28000;
$pref::Server::ProjectileChangers = 0;
$Pref::Server::RegionMask = 2;
$pref::Server::ReplaceBots = 1;
$pref::Server::SilenceMessage = " HAS BEEN DEEMED UNWORTHY OF CHAT";
$pref::Server::TankChangers = 0;
$pref::Server::TeamChangers = 0;
$pref::Server::UnSilenceMessage = " HAS BEEN GIVEN ANOTHER CHANCE TO USE CHAT";
So where is the problem here? Sorry for the really huge post, but I bolded the main points.
Thanks for any help.
-CUC-
- b20
Last edited: Monday, July 18, 2005 at 9:28:22 PM