Author Topic: Breakable Bricks (V6) [Baseplates, Cubes & Rounds]  (Read 12560 times)

Breakable Bricks
Bricks that break apart when you shoot them!



Breakable Brick Packs:

Modding Support



DOWNLOAD
Changelog


Version 5
Version 4
Version 3
Version 2
Version 1

Mirror 1: Mediafire - Direct Download   (Version 6)
Mirror 2: Mediafire - Spammy Ad Page   (Version 6)


This pack contains a breakable version of every default brick in the "Bricks" and "Plates" tabs of the Brick Selector menu.
Except for the prints, of course.

When any of these bricks are hit by any projectile, they'll split apart into smaller breakable bricks.
They will only work if you shoot them or if someone else shoots them in a minigame with Brick Damage enabled.



Changelog
Back to Top

Version 6:
  • Breakable resetting added.
  • Reset with minigame option added.
  • Minigames own explosions and cancel them before resetting breakable bricks.

Version 5:
  • Event copying has been added.
  • Effects copying has been added.
  • createBrick is now deprecated - use breakBrickSpecial instead.

Version 4:
  • Breakable bricks are no longer fakekilled by explosions
  • Explosion damage can now be scaled - choose from linear or cubic.
  • Event explosions and explosive weapons now work correctly.
  • Added /cement command and an option to make it admin-only.
  • Added /cementAll command - SA/host only.
  • Added /clearBreakableBricks command - SA/host only.

Version 3:
  • Added optional impact damage - this uses the explosion radius cap.
  • Improved explosion calculation so that large explosions don't take hours.

Version 2:
  • Fixed an error with the breakable 1x16F brick.
  • Added optional explosion damage and an explosion radius cap.



Breakable Baseplates
Back to Top

These are the default baseplates, except breakable.
They're under the Breakable category in the Baseplate tab.
Mirror 1: Google - Direct Download
Mirror 2: Mediafire - Direct Download
Mirror 3: Mediafire - Spammy Ad Page


Breakable Cubes
Back to Top

These are the Large Cubes, except breakable.
They're under the Breakable category in the Baseplate tab.
Mirror 1: Google - Direct Download
Mirror 2: Mediafire - Direct Download
Mirror 3: Mediafire - Spammy Ad Page

Breakable Rounds
Back to Top

These are some of the Rounds, except breakable.
They're under the Breakable category in the Rounds tab.
Mirror 1: Google - Direct Download
Mirror 2: Mediafire - Direct Download
Mirror 3: Mediafire - Spammy Ad Page


Modding Support
Back to Top

Making a brick breakable is easy. Breaking it up isn't always as simple.
Here's what you need to have.

Code: [Select]
datablock fxDtsBrickData(brickXData)
{
breakableBrick = 1;
unbreakableEquiv = "brickYData";   //If brickYData doesn't exist, don't worry. It won't break anything.
};

function brickXData::breakAt(%data, %brick, %breakAtPos)
{
//Breaking code here
//There are two functions you can use. One is the premade breakBrick:
//breakBrick(%brick, %breakIntoData, %relativePosList, %breakAtPos, %angleID);
//breakBrickSpecial(%brick, %data, %breakAtPos);   (V5's replacement for createBrick)
//The %data is a tab-delimited list of the following data.
//...%angleID TAB %breakIntoData SPC %relativePosItem SPC %angleID TAB %breakintoData...
//
//createBrick(%brick.getGroup(), %breakIntoData, %placePos, %colorID, %angleID);   (Deprecated)
//Don't worry about whether or not these functions exist. They're all part of the mod,
//so either they'll already exist or your ::breakAt function will never be called.
}


Here's an example for you.

Code: (Brick_Breakable/Bricks/1x.cs   Lines 1-13) [Select]
datablock fxDtsBrickData(brickBreakable1x1Data : brick1x1Data)
{
breakableBrick = 1;
category = "Breakable";
subcategory = "1x";
uiName = "1x1 Breakable";
unbreakableEquiv = "brick1x1Data";
};

function brickBreakable1x1Data::breakAt(%data, %brick, %pos)
{
breakBrick(%brick, brickBreakable1x1fData.getID(), "0 0 -0.2\t0 0 0\t0 0 0.2", %pos);
}
« Last Edit: September 12, 2012, 10:24:27 PM by Xalos »

When any of these bricks are hit by any projectile, they'll split apart into smaller breakable bricks.

HOLY stuff WHAT

oh my god, really gotta try this out
« Last Edit: July 27, 2012, 11:24:03 AM by MrLoL² »



Well, will the broken brick stay like that for ever

I just tested this out, this is loving great

good job.

Yeah, could we have an option that makes them stay broken forever unless we respawn them?

Holy stuff yes.
MUST DOWNLOAD

Does this use up a lot of datablocks?

Does this use up a lot of datablocks?

Unfortunately, yes. It uses just shy of 70 datablocks.

Unfortunately, yes. It uses just shy of 70 datablocks.

So if I were to use this in my castle of 20,000+ bricks would my game crash?

Unfortunately, yes. It uses just shy of 70 datablocks.

Damn. Well, still, great, hopefully this works as well as I expect it to.

So if I were to use this in my castle of 20,000+ bricks would my game crash?

Datablocks are not bricks.

So if I were to use this in my castle of 20,000+ bricks would my game crash?


......

no

datablocks are the "boxes" that hold all of the values for the actual brick

ingame objects will never add to the datablock count on your server

Xalos, this google docs thing is asking me to sign up in order for me to download the file

edit: it seems to be fixed now

edit2: after playing with it for a minute, I realised you could have optimized it like crazy, and using the default bricks, possibly checking for a variable that the host sets, toggling the breakability of the regular default bricks
« Last Edit: July 27, 2012, 12:09:21 PM by Conservative »

Ok, so the way this works is it turns bricks into smaller bricks, then removes the brick that you shot at. What would be nice is if you made it so that when the brick turns into smaller bricks, the brick that you shot would be fake killed, and before it respawns, it's destroyed so that you could have nice effect instead of everything just turning into holes. Also, would there anyway you could work on this so that bricks that can turn into a bigger brick would turn into it, like the trench mod?