The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.7 (Linux)
File Line Function
/showthread.php 906 errorHandler->error

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Modable bots. Better factory menu.
Lests speak about making game more modable, allowing moders to add new bots to game. This is my proposition.

For now factory menu have a lot of icons - icon for every possible combination of bot and tool. There is no space to add more tools/chasis.
[Image: seKfcyj.jpg]
Lets splite bots to combination of chasis and tool. There should be two scrollable lists of parts insted and may be preview of robot with some info displayed. ( concept art level: paint )
[Image: b7ls3zp.jpg]
These should be soft coded, loaded form .txt files. Here are examples how it could look like:

Chasis code:

//Code name and tags for modders. Name is used to crete Cbot category with combination of tool name. For example TrackedBuilder.
Name = Tracked
Tags = #off-road,#slow,#armored,#basic

//We set model for our chasis.
Model = "folder1/folder2/tracked.mod"

//Adding particle effects and sound to use later in code.

//Enabling tools for this chasis. It will work two ways. Possible connetions can be set in chasis and tool files for elastic modding.
//It can accept names or tags as arguments. Tags prupose is so modders can make chasis working with tools from other mods wihout even knowing about this mods.
Tools = Grabber,#wepon
Batteries = #basic

Armor = 0.3 //reduces damage by 30%
Speed = 10 //max speed in some kind of units
Fly = no //can fly?
Dive = no //can dive?
EnergyDrain = 0.1 //how much energy costs to move x meters
MaxSlope = 45 //Max terraing slope that this chasis can beat. Bot slows as terrain slope gets near to this value. Ty to beat hills with wheeled bot if you don't know what I mean.
Regeneration = 0 //Abbility to regenerate durablity over time

//Cbot special functions to control chasis behavior in game!
creted(){ //when robot is created
playParticle("particle1","fumes",Always); //Add particle effect particle1 to bone fumes that plays whole time robot exists

destroyed(){ //when robot is destroyed
playAnim("explosion",Once); //Plays robot animation one time

always(){ //in every frame of game
if(this.isMoving() == true){
playParticle("particle2","tireL",Toggle); //New Particles stops being created if this function is not called

//There can be much more functions like damaged(),healed(),gotBattery(),recharging(),recharged() etc.

Tool code:

//Basicly like chasis code
Name = Grabber
Tags = #transport,#basic

//Model is automaticly attached to chasis bone called "tool"
Model = "folder1/folder2/grabber.mod"


Chasis = #basic //All chasis types from unmoded game

//Should have abilyty to modify chasis stats and overwrite Fly/Dive abilyty.
Armor = -0.1
Speed = 0
//Energy cost will be set in code

//Cbot functions to control tool behavior in game!
cbot:use(int where = 1){ //Special function use called by default on use (Enter key). cbot: = Usable by player in Cbot.
if(load == null){

cbot:grab(int where = 1){ //Not special function, but will be usable in game.
object o;
if(where == 1){
o = radar(Front) //Special radar mode to simulate front grab finding
else if(where == 2){
o = radar(EnergyCell);
else if(where == 3){
o = radar(Behind);
if (o != null){
abilityGrab(o); //adds object o to load and attached to transport bone

cbot:drop(int where = 1){
//... Drop code tl;dw

//Gui Buttons
AddButton("image.png",use) //Adds button to gui that calls function use

Battery code:

//Basicly like chasis code
Name = UnstableCell
Tags = #unstable

//Model is automaticly attached to chasis bone called "energyCell"
//Have animation energyLevel lets sey with 100 fames, that reflects energy level in battery. 10% battery will use frame 10 of this anim.
Model = "folder1/folder2/uCell.mod"

Chasis = #basic, Hover, #myChasisMod

EnergyLevel = 15 //how much energy have
Rechargable = no //cant be recharged
Regeneration = 0.01 //regenerates 0.01 energy over second

//Cbot functions to control battery behavior in game!
if(energyLevel == 0){
destroy(); //autodestruction
owner.destroy(); //destroys robot ovning this battery

Additionaly game should automaticly add this parts to StatCom, using decription from translation file.

PS. I know it there is many mistakes in this codes, and some things should be designed better, but this is only suposed to convey the basic idea.

Messages In This Thread
Modable bots. Better factory menu. - by Smok - 08-12-2016, 10:40 PM
RE: Modable bots. Better factory menu. - by Smok - 08-13-2016, 08:31 PM

Forum Jump:

Users browsing this thread: 1 Guest(s)