Build To Survive Gamemode

Author Topic: Build To Survive Gamemode  (Read 19247 times)

A gamemode where bad things happen.

Description
This is a survival-based mod centred around teamwork and free building.
The goal is to build yourself a base and hide in it from a selection of random disaster scripts that I wrote on the toilet.

You get points for surviving, and lose all of these points either upon dying or upon the server crashing due to a pure virtual function call. Build something sturdy - when a brick is blown up in this mode, it is permanently destroyed (if destruction is on).

Some GUI

Limited wrench GUI for people with the mod


Say /admin to open this.

Screenshots of people's terrible bases







Extensibility
There's a cool system for adding your own disasters.
Code: [Select]
function rocketDisaster() {
    // spawn rocket in relation to a player 100 TUs above them with random offset
    %clientCount = ClientGroup.getCount();
    if(%clientCount > 0) {
        %client = ClientGroup.getObject(getRandom(0, %clientCount-1));
        
        %player = %client.player;
        
        if(isObject(%player)) {
            %playerPos = %player.getPosition();
            %rocketBaseSpawnPos = vectorAdd(%playerPos, getRandom(-100, 100) SPC getRandom(-100, 100) SPC getRandom(50, 140));
            
            %proj = new projectile() {
                datablock = CannonBallProjectile;
                
                initialposition = %rocketBaseSpawnPos;
                initialvelocity = getRandom(-10, 10) SPC getRandom(-10, 10) SPC -40;
                
                client = %client;
            };
            
            %scaleFac = getRandomF(0, 3.5);
            
            %proj.setScale(%scaleFac SPC %scaleFac SPC %scaleFac);
            missionCleanup.add(%proj);
        }
    }
    
    $Disasters::CurrentDisasterLoop = schedule(1000, 0, rocketDisaster);
}

registerDisaster("A Barage Of Meteorites", 40, "rocketDisaster");

The function syntax is registerDisaster(%name, %startFunction, %stopFunction, %isMajorDisaster).
$Disasters::CurrentDisasterLoop is a utility variable and meant to hold the currently running disaster.
Please note that unlimiting the wrench in the admin gui is not supported and I'm not responsible for what happens.

Download
Mod
Disasters Pack
« Last Edit: December 18, 2015, 08:13:11 AM by chrisbot6 »

Blockland becomes evolutioned. Also i have one question: why this is gamemode-based, not like GCat's Thunderstorms add-on which is could be easily turned on\off?
« Last Edit: December 18, 2015, 08:54:42 AM by Halmet »

0/10 my base isn't in the screenshots!

Blockland becomes evolutioned. Also i have one question: why this is gamemode-based, not like GCat's Thunderstorms add-on which is could be easily turned on\off?
It was originally a script but I was INSPIRED.

I was INSPIRED.

The problem is that the gamemode system isn't really thought out. You should be able to enable more bricks, management add-ons, and stuff like that without having to edit the gamemode file.

The problem is that the gamemode system isn't really thought out. You should be able to enable more bricks, management add-ons, and stuff like that without having to edit the gamemode file.
that would be a great toggleable feature for gamemodes

that would be a great toggleable feature for gamemodes
it would be nice if you selected a gamemode and still had the option to enable more addons
and addons that the gamemode.txt requires would be grayed out or something

kinda like how the addon presets work except you can't disable the required enabled addons
« Last Edit: December 18, 2015, 11:58:09 AM by MikkelDude »

Neat gamemode. I wanted to make a disaster gamemode but I suck at coding and this seems better than what I had in mind anyways.

I'll try it out but I kind of want it without the gamemode package.

Is there a list of all the disasters?

custom game compatible version please!

very cool, will have to try this out

the "move!" disaster is completely broken
it just kills everyone, even those who are moving
just a heads up if you'd mind fixing it

the "move!" disaster is completely broken
it just kills everyone, even those who are moving
just a heads up if you'd mind fixing it
Are you sure everyone is moving FORWARD? That's all the disaster detects.

It's a bit of a silly test one though, I might remove it.

Are you sure everyone is moving FORWARD? That's all the disaster detects.

It's a bit of a silly test one though, I might remove it.
yes i'm certain that we were all moving forward, the disaster had occured a multitude of times and moving forward didn't let anyone live