Author Topic: GUIDE- Bot Hole Customs.  (Read 5419 times)

You need create your folder Bot_NameHere

You need:
bot_namehere.cs
description.txt
icon_namehere.PNG GUIDE - How to create icons for bricks and bots automatically.
namecheck.txt
server.cs

You need edit this the script:
bot_base.cs
Server.cs


datablock fxDTSBrickData (BrickBlockheadBot_HoleSpawnData)//Rename
{
   brickFile = "Add-ons/Bot_Hole/4xSpawn.blb";
   category = "Special";
   subCategory = "Holes";
   uiName = "Blockhead Hole"; //Rename
   iconName = "Add-Ons/Bot_Blockhead/icon_blockhead"; //Rename//This for Icon on brick selection

   bricktype = 2;
   cancover = 0;
   orientationfix = 1;
   indestructable = 1;

   isBotHole = 1;
   holeBot = "BlockheadHoleBot"; //Rename
};

If you want make the model hat mount to bot's head, If you not want hat for bot then remove this.
datablock ShapeBaseImageData(ModelHatImage)//Rename// Model Hat mount to bot's head.
{
   shapeFile = "./modelhat.dts"; //Rename
   emap = true;
   mountPoint = $HeadSlot;
   offset = "0 0 0"; // replace the X, Y, and Z with actual numbers.
   eyeOffset = "0 0 0 1";
   rotation = eulerToMatrix("0 0 0");
   scale = "1 1 1";
   doColorShift = true;
   colorShiftColor = "0.000 0.500 0.250 1.000";
};
Thanks to HellHero help me this script.

datablock PlayerData(BlockheadHoleBot : PlayerStandardArmor) //Rename
{
   uiName = "";  //leave here as blank name
   minJetEnergy = 0;
   jetEnergyDrain = 0;
   canJet = 0; //Bot can fly with the jet 0-off 1-on
   maxItems   = 0; //How many bot can carry the items to limit max
   maxWeapons = 0; - //How many bot can carry the weapons to limit max
   maxTools = 0; //How many bot can carry the tools to limit max
   runforce = 100 * 90;
   maxForwardSpeed = 8; //Allow bot walk fast/slow forward speed
   maxBackwardSpeed = 4; //Allow bot walk fast/slow backward speed
   maxSideSpeed = 8; //Allow bot walk fasts/slow side speed
   attackpower = 10;
   rideable = false; //Can you ride on the bot, like a horse?
   canRide = true; //Allow bot ride on the vehicle or not

   maxdamage = 100;//Bot Health
   jumpSound = "";//Removed due to bots jumping a lot
   
   //Hole Attributes
   isHoleBot = 1;

   //Spawning option
   hSpawnTooClose = 0;//Doesn't spawn when player is too close and can see it
     hSpawnTCRange = 8;//above range, set in brick units
   hSpawnClose = 0;//Only spawn when close to a player, can be used with above function as long as hSCRange is higher than hSpawnTCRange
     hSpawnCRange = 32;//above range, set in brick units

   hType = Enemy; //Enemy,Friendly, Neutral //replace name, your choices
     hNeutralAttackChance = 0; //0 to 100, Chance that this type will attack neutral bots, ie horses/vehicles/civilians
   //can have unique types, national socialists will attack zombies but national socialists will not attack other bots labeled national socialist
   hName = "Blockhead";//cannot contain spaces
   hTickRate = 3000;
   
   //Wander Options
   hWander = 1;//Enables random walking
     hSmoothWander = 1;//This is in addition to regular wander, makes them walk a bit longer, and a bit smoother
     hReturnToSpawn = 1;//Returns to spawn when too far
     hSpawnDist = 48;//Defines the distance bot can travel away from spawnbrick
     hGridWander = 0;//Locks the bot to a grid, overwrites other settings
   
   //Searching options
   hSearch = 1;//Search for Players
     hSearchRadius = 64;//in brick units
     hSight = 1;//Require bot to see player before pursuing
     hStrafe = 1;//Randomly strafe while following player
   hSearchFOV = 0;//if enabled disables normal hSearch
     hFOVRange = 0.7; // determines the angle we can see the player at, 0.7 is about normal fov for players, if 0 we can see all in front, if 1 we could only see someone perfectly ahead, can be negative
     // hFOVRadius = 6; // no longer used, we now use searchRadius
     hHearing = 1;//If it hears a player it'll look in the direction of the sound

     hAlertOtherBots = 1;//Alerts other bots when he sees a player, or gets attacked

   //Attack Options
   hMelee = 0;//Melee
     hAttackDamage = 15;//Melee Damage
   hShoot = 1;
     hWep = "gunItem";  //replace the weapons name
     hShootTimes = 4;//Number of times the bot will shoot between each tick
     hMaxShootRange = 256;//The range in which the bot will shoot the player
     hAvoidCloseRange = 1;//
      hTooCloseRange = 7;//in brick units

   //Misc options
   hActivateDirection = 0; // 0 1 2, determines the direction you have to face the bot to activate him, both, front back
   hMoveSlowdown = 0; // bool, determines wether the bot will slow down when following enemies
   hAvoidObstacles = 1;
   hSuperStacker = 0;//When enabled makes the bots stack a bit better, in other words, jumping on each others heads to get to a player
   hSpazJump = 0;//Makes bot jump when the user their following is higher than them

   hAFKOmeter = 1;//Determines how often the bot will wander or do other idle actions, higher it is the less often he does things

   hIdle = 1;// Enables use of idle actions, actions which are done when the bot is not doing anything else
     hIdleAnimation = 1;//Plays random animations/emotes, sit, click, love/hate/etc
     hIdleLookAtOthers = 1;//Randomly looks at other players/bots when not doing anything else
       hIdleSpam = 1;//Makes them spam click and spam hammer/spraycan
     hSpasticLook = 1;//Makes them look around their environment a bit more.
   hEmote = 1;
};

function BlockheadHoleBot::onAdd(%this,%obj) //rename
{
   armor::onAdd(%this,%obj);

   //Appearance Blockhead
   %obj.llegColor =  "0.2 0 0.8 1"; //Left leg color
   %obj.secondPackColor =  "0 0.435 0.831 1"; //Second pack color
   %obj.lhand =  "0"; **code list**
   %obj.hip =  "0"; **code list**
   %obj.faceName =  "smiley"; //replace face
   %obj.rarmColor =  "0.9 0 0 1"; //Right arm color
   %obj.hatColor =  "1 1 1 1"; //Hat color
   %obj.hipColor =  "0.2 0 0.8 1";  //Hip color
   %obj.chest =  "0"; **code list**
   %obj.rarm =  "0"; **code list**
   %obj.packColor =  "0.2 0 0.8 1"; //Pack color
   %obj.pack =  "0"; **code list**
   %obj.decalName =  "AAA-None"; //replace decal
   %obj.larmColor =  "0.9 0 0 1"; //Left arm color
   %obj.secondPack =  "0"; **code list**
   %obj.larm =  "0"; **code list**
   %obj.chestColor =  "1 1 1 1"; //chest color
   %obj.accentColor =  "0.990 0.960 0 0.700"; //Accent color
   %obj.rhandColor =  "1 0.878 0.611 1"; //Right hand color
   %obj.rleg =  "0"; **code list**
   %obj.rlegColor =  "0.2 0 0.8 1"; //Right leg color
   %obj.accent =  "1"; **code list**
   %obj.headColor =  "1 0.878 0.611 1"; //head color
   %obj.rhand =  "0"; **code list**
   %obj.lleg =  "0"; **code list**
   %obj.lhandColor =  "1 0.878 0.611 1"; //Left hand color
   %obj.hat =  "0"; **code list**

   GameConnection::ApplyBodyParts(%obj);
   GameConnection::ApplyBodyColors(%obj);

   schedule(15,0,Survivorfy,%obj);//ONLY for Hat! If you not want hat for bot then remove this.
   %obj.mountimage(modelhatImage,2); //Rename//ONLY for Hat! If you not want hat for bot then remove this.
}

function BlockheadHoleBot::onBotLoop( %this, %obj ) //Rename
{
   // echo( "Blockhead onLoop" );
   // parent::onBotLoop( %this, %obj );
   //Called every cycle
   //Useful for doing unique behaviors during normal loop
}

function BlockheadHoleBot::onBotCollision( %this, %obj, %col, %normal, %speed )//Rename
{
   // echo( "Blockhead onCollision" );
   //Called once every second the object is colliding with something
}

function BlockheadHoleBot::onBotFollow( %this, %obj, %targ ) //Rename
{
   // echo( "Blockhead onFollow" );
   //Called when the target follows a player each tick, or is running away
}

function BlockheadHoleBot::onBotDamage( %this, %obj, %source, %pos, %damage, %type )//Rename
{
   // echo( "Blockhead onDamage" );
   //Called when the bot is being damaged
}

**code list**
Code: [Select]
%obj.hat
0 - NONE
1 - Helmet
2 - Pointy Helmet
3 - Flare Helmet
4 - Scout Hat
5 - Bicorne
6 - Cop Hat
7 - Knit Hat

%obj.accent
0 - NONE
1 - Visor (only if Helmet is being worn)
1 - Plume
2 - Tri Plume
3 - Sept Plume

%obj.pack
0 - NONE
1 - Armor
2 - Bucket
3 - Cape
4 - Backpack
5 - Quiver
6 - Air Tank

%obj.secondPack
0 - NONE
1 - Epaulets
2 - Epaulets Rank A
3 - Epaulets Rank B
4 - Epaulets Rank C
5 - Epaulets Rank D
6 - Shoulder Pads

%obj.chest
0 - Male Chest
1 - Female Chest

%obj.rarm/%obj.larm
0 - Arm
1 - Slim Arm

%obj.rhand/%obj.lhand
0 - Hand
1 - Hook

%obj.hip
0 - Pants
1 - Skirt

%obj.rleg/%obj.lleg
0 - Shoe
1 - Peg
Thanks to Masterlegodude gave me this details for blockhead's body.

//server.cs
//Base Blockhead guy

// only load bots if bot_hole is enabled
// people are going to have a lot of bot add-ons, you don't want them to all force bot_hole on
if(LoadRequiredAddOn("Bot_Hole") == $Error::None)
   exec("./bot_base.cs"); //Rename

If you want make the model for Bot? Look at Bot_Shark script.
Now you know what to do!
« Last Edit: March 18, 2013, 06:07:45 PM by Furling² »

This will be very useful. Thank you for posting this.

Oh cool, quite some options. :)

Code: [Select]
   rideable = false; //Can you ride on the bot, like a horse?
Fix that part pleas

This will be very useful. Thank you for posting this.
No problem!