Destructibles

Tutorials and discussions about Mapping - Introduce your own ones!
JackGriffin
Godlike
Posts: 3766
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Destructibles

Post by JackGriffin » Mon Jun 10, 2013 6:01 am

I got the coding done for this and it's pretty much ready for anyone to use as they like. I'm going to place the readme here first so you can decide if it interests you. Hopefully in the next day or two paper and I will add a demo map with the destructible actors and you can see everything in action.
Destructibles- a simple way to make breakable stuff for your maps

Please take the time and read the instructions. There is a small learning curve but once you sort that out then the making and placing of destructibles will be quick and easy.

Installation: If you need help with this part then delete the mod and go back to Halo. Seriously.


Overview:
Destructibles have three classes- DestructibleGlass, DestructibleWood, and DestructibleStone. Choose the one closest to the material you are working with as the effects are tailored to each one.

To create:
With your map open, select the actor class browser and open the Destructibles.u package. Now, take your chosen BSP you want to make the destructible from and put your builder brush around it just like you are making a normal mover. Intersect the BSP and then right-click the "create a mover" button. You'll see three new mover classes. Select the one that is your material and the editor will make you a mover. Now place that mover where you want the destructible placed. It's almost ready for use once we adjust the properties.

Open the defaultproperties for your new Destructible mover. You will find these new settings:
ExplosionDimensions=
ChunkSize=
ChunkNumber=
ChunkTexture=
BreakingSound=

Let's do a quick rundown of these settings...

First, ExplosionDimensions sets the radius around the mover's center where the chunks will spawn. A higher number means the chunks spawn farther away. Small models will need 30-50 and larger models may need 100 or more. Experiment to see visually what looks the best given your chosen thing.
Next is ChunkSize. This is the size of the created chunks. 1 is default, 2.5 or 3 is pretty large and .25 is pretty small. Again, just test and see what works.
ChunkNumber is the number of created chunks when the object is destroyed. Don't overdo this number, try to be realistic. 3 or 4 usually works for stone, a few more for wood, and glass needs the most.
ChunkTexture is the texture the chunks will have. Does NOT need to be the same as the object being destroyed.
BreakingSound is the sound emitted from the Destructible when it breaks apart.
Lastly, there is a default setting in mover called "DamageThreshold". Don't forget to set this to whatever damage you want your object to take before it breaks apart. Consider this the 'health' setting for your Destructible.

You can see that we tried to make this mod scale from small objects to large ones by adjusting these settings. Overall it gives a good effect suite with very low overhead and minimal stress on the client and almost none on the server.

A few things to keep in mind:

Don't let your Destructible touch anything when it is placed. Because these are subclassed from mover they carry some of the weirdness too. Just give it a single unit of space and things will be fine. If you don't then the Destructible can get buggy and not work right. You were warned if you ignore this.
Also don't forget to set KeyFrame1 and move the Destructible to somewhere in the void that is outside your map. This will give the Destructible a place to go when it is triggered so that it appears it was destroyed to the player. We need to keep the mover and not destroy it since UT really doesn't like it if that happens so placing it's KeyFrame into the void accomplishes all that.

As always, improve this code if you want. Source was included so have at things. This works well for what we wanted and should fit a pretty big variety of sitations but develop on with it if you need something more particular.

Good luck!

papercoffee & gopostal
So long, and thanks for all the fish

User avatar
UTPe
Adept
Posts: 465
Joined: Sun Jul 12, 2009 7:10 pm
Personal rank: Dude
Location: Trieste, Italy

Re: Destructibles

Post by UTPe » Mon Jun 10, 2013 7:29 am

wow ! :agree1:
Personal UT99 website: http://utdatabase.gamezoo.org | Personal forum: http://fragfinity.freeforums.org/index.php
Personal file database: http://ut99files.gamezoo.org | Personal map database: http://ut99maps.gamezoo.org

"These are the days that we will return to one day in the future only in memories." (The Midnight)

User avatar
Hook
Masterful
Posts: 710
Joined: Tue Apr 22, 2008 11:21 pm
Personal rank: UT99 Promoter/Admin
Location: Minnesota USA
Contact:

Re: Destructibles

Post by Hook » Mon Jun 10, 2013 1:26 pm

I am surprised something like this hasn't been made yet - good idea, and good job! :gj:
=Hook=(Member# 626)
Active Forums: http://hooksutplace.freeforums.net
UT99 Server -> CROSSBONES Missile Madness {CMM}

* Newest Versions of: PRO-Redeemers | PRO-SNIPER-Redeemers | PRO-SEEKER-Redeemers <-(the Original)
and Now with FOOD FIGHT and Frying Pan arena !!!
IP: 68.232.181.236:7777
{CMH} CROSSBONES Monster Hunt (MH) by Mars007 (The Original) - IP: 108.61.238.93:7777

User avatar
Dr.Flay
Godlike
Posts: 3229
Joined: Thu Aug 04, 2011 9:26 pm
Personal rank: Chaos Evangelist
Location: Kernow, UK
Contact:

Re: Destructibles

Post by Dr.Flay » Mon Jun 10, 2013 1:49 pm

Sometimes it takes the ramblings of a fool, to inspire the genius to do their thang :ironic2:

...The fool has been thinking again. Be prepared :wink:

Do you think it could work with something like "HeavyMetal Drivables" ?
http://wayback.archive.org/web/20021210 ... ntro.shtml
pt_boat.jpg
Attachments
HeavyMetal_Drivables.rar
(783.45 KiB) Downloaded 164 times

JackGriffin
Godlike
Posts: 3766
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: Destructibles

Post by JackGriffin » Mon Jun 10, 2013 1:54 pm

You can make a destructible out of anything that you can make a mover out of. In my demo I made one out a medium sized nali boat.
So long, and thanks for all the fish

User avatar
Hitman
Skilled
Posts: 157
Joined: Mon Aug 16, 2010 11:01 am
Location: Sweden
Contact:

Re: Destructibles

Post by Hitman » Mon Jun 10, 2013 3:29 pm

I know that blast a regular wooden box in MH can cause a server-crash if the splitter hits a monster, could this happen with this mutator to ?
Image
Image
Image
Image

JackGriffin
Godlike
Posts: 3766
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: Destructibles

Post by JackGriffin » Mon Jun 10, 2013 3:44 pm

That crash is caused by a subroutine called CanSeeMe() and it's in all fragments, carcasses, biterfish, gibs, stuff like that. If this mod causes any sort of crash increase because of this then I'll script new fragment classes for everything. I wanted this to remain as simple as possible and use as much of the default UT stuff as I could so it remains very fast and light on everyone. I can imagine this getting heavily abused by mappers going all out on making some crazy destructible map so paper and I made it so that it has the least impact on your game that it can while still giving the desired visual effect.

So yeah, it could possibly cause problems but I'll damn sure fix it if it does.
So long, and thanks for all the fish

MrLoathsome
Inhuman
Posts: 958
Joined: Wed Mar 31, 2010 9:02 pm
Personal rank: I am quite rank.
Location: MrLoathsome fell out of the world!

Re: Destructibles

Post by MrLoathsome » Mon Jun 10, 2013 11:42 pm

Very nice stuff Jack. This has a LOT of potential.
blarg

User avatar
Dr.Flay
Godlike
Posts: 3229
Joined: Thu Aug 04, 2011 9:26 pm
Personal rank: Chaos Evangelist
Location: Kernow, UK
Contact:

Re: Destructibles

Post by Dr.Flay » Tue Jun 11, 2013 9:51 am

Very interesting :D
I had almost discarded the idea of investigating the HeavyMetal Drivables, as the physics is limited and for most occasions you need vehicles that can spawn from a factory type jobbie.

However, seeing you shoot-up the ship model made me think, if only used with slow, large driveables like ships, mobile armour, air-ships, space-ships, submarines.. that sort of thing, the combination of the 2 mods could be incredible.

JackGriffin
Godlike
Posts: 3766
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: Destructibles

Post by JackGriffin » Wed Jun 12, 2013 4:30 pm

Man I hate to take so long to get stuff done. My apologies.

OK, here's the U file and the test map.
Destructibles.zip
(242.57 KiB) Downloaded 274 times
This gives a couple of examples of destructibles for you to spawn in and bust up. This map has some errors in it but paper and I built and rebuilt over and over testing back and forth. Just note the examples and go forth to use it in your own project. Don't copy anything from this map into your stuff. It's buggy as hell honestly but that's not unexpected given the amount of changes this simple map has been through.

As always if you can find a better way then rock on with developing this. i just need to get this out of the way and released so I can work on my coop server. Have fun with it and let me know how it goes. The classes are simple but I'll post the source if anyone wants it.

paper, it's been a blast working with you again. You are such a great guy.
So long, and thanks for all the fish

User avatar
papercoffee
Godlike
Posts: 9453
Joined: Wed Jul 15, 2009 11:36 am
Personal rank: coffee addicted !!!
Location: Cologne, the city with the big cathedral.
Contact:

Re: Destructibles

Post by papercoffee » Wed Jun 12, 2013 4:38 pm

JackGriffin wrote: paper, it's been a blast working with you again. You are such a great guy.
Oh stop it you sweet-talker :oops:



:mrgreen:

User avatar
Dr.Flay
Godlike
Posts: 3229
Joined: Thu Aug 04, 2011 9:26 pm
Personal rank: Chaos Evangelist
Location: Kernow, UK
Contact:

Re: Destructibles

Post by Dr.Flay » Wed Jun 12, 2013 8:28 pm

And I gotta wait till the weekend until I get back home :(
I guess I can spend the time doing a little promoting.

Hopefully after people post some screenshots of their , it will snowball as they realise the potential :tu:

BTW. will this work in Unreal ?

JackGriffin
Godlike
Posts: 3766
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: Destructibles

Post by JackGriffin » Thu Jun 13, 2013 4:58 am

No, however it would be easy to copy what I did in the same U1 classes.
So long, and thanks for all the fish

User avatar
Dr.Flay
Godlike
Posts: 3229
Joined: Thu Aug 04, 2011 9:26 pm
Personal rank: Chaos Evangelist
Location: Kernow, UK
Contact:

Re: Destructibles

Post by Dr.Flay » Fri Jun 14, 2013 6:58 pm

OK. I will ask interested parties to come here contact you about doing a port.
It has raised interest (obviously!) at Oldunreal and UnrealSP.
We need to make sure they stay in-line and compatible if someone else does make it.

User avatar
Radi
Adept
Posts: 362
Joined: Tue Apr 16, 2013 12:41 pm
Location: DeGie - PL

Re: Destructibles

Post by Radi » Wed Aug 21, 2013 11:29 pm

Im still making (80% finished) a DM map and I thinking about using 'Destructibles' in that map, for example a some destructible fences, pipes. So I going to test it out.
.
that tutorial map crashes sometimes, I hope my map will be fine :p. Im still a noob. It is good to make destructible movers touching each other or better not ?

Post Reply