Page 1 of 1

How would one create custom space destroyables?

Posted: Tue Jul 24, 2018 1:40 pm
by WoodenViking
The title basically says it all.

Re: How would one create custom space destroyables?

Posted: Tue Jul 24, 2018 7:30 pm
by Oceans14
Well, assuming by "custom" you mean a completely new prop from scratch, you're going to have to model it in some kind of 3d design software. You'd have to make the prop itself, a destroyed version, and possibly some chunks if it's big enough. The 3d modeling section and this tutorial are good places to start. In terms of the odf, you'd need something like this very basic setup:

Code: Select all

[GameObjectClass]		

ClassLabel		=	"destructablebuilding"
GeometryName	=	"my_prop.msh"


[Properties]		

GeometryName	=	"my_prop"
DestroyedGeometryName 	= "my_prop_dest"
MaxHealth       = 100

ExplosionName = "my_prop_exp" //or some other explosion you like the look of 
You can test this by substituting in stock props for the geometries, or by looking at how stock destroyables are set up (try yav_prop_blastdoor for example).


Nice avatar btw, that was mine for a while :)

Re: How would one create custom space destroyables?

Posted: Wed Jul 25, 2018 2:53 pm
by WoodenViking
Oceans14 wrote:Well, assuming by "custom" you mean a completely new prop from scratch, you're going to have to model it in some kind of 3d design software. You'd have to make the prop itself, a destroyed version, and possibly some chunks if it's big enough. The 3d modeling section and this tutorial are good places to start. In terms of the odf, you'd need something like this very basic setup:

Code: Select all

[GameObjectClass]		

ClassLabel		=	"destructablebuilding"
GeometryName	=	"my_prop.msh"


[Properties]		

GeometryName	=	"my_prop"
DestroyedGeometryName 	= "my_prop_dest"
MaxHealth       = 100

ExplosionName = "my_prop_exp" //or some other explosion you like the look of 
You can test this by substituting in stock props for the geometries, or by looking at how stock destroyables are set up (try yav_prop_blastdoor for example).


Nice avatar btw, that was mine for a while :)

Hmm, well I probably should have specified my intentions first. My goal is to make a “space” map wher the REP is defending a city on the ground and the CIS is attacking from the air. The problem isn’t me actually creating a model. It’s making it to where when you destroy enough buildings in the city, depending on what faction you choose, you win the game.

So my question is how you would make an object, when you destroy it, add points to your team score... like in space assault when you destroy the life support it adds like 18 points to your team score :)

And thanks :D I chose it because it looks like he’s about to do the hardest nae nae ever.

Re: How would one create custom space destroyables?

Posted: Thu Jul 26, 2018 8:01 pm
by Oceans14
So that's a scripting thing, then. Check out the scripts in the space_template folder, specifically the assault ones. You need to load the ObjectiveSpaceAssault script (check that one out too, it'll be in MOD_data/common/scripts) because that loads the code for adding points after destroying objects. In fact, I think it would make sense to just replace MODc_con with one of the space assault scripts and set up the level that way, since your mode is going to revolve around points and not cp captures. The quick and easy way to get this going is to just name your destructible buildings after the ship parts (shield generator, engines, whatever) because then you don't have to go in and specify new destructible objects with their own point values and stuff (just don't forget to rename the localizations, otherwise it'll still say "Our shields have been disabled" when you blow up a house).

Also I feel I should mention that A) there are probably a few ways to do what you want, and B) I have never actually done any space/points scripting - but I've poked around with the files plenty of times and am reasonably confident you'll have luck doing it this way.

Re: How would one create custom space destroyables?

Posted: Fri Jul 27, 2018 2:38 pm
by WoodenViking
Oceans14 wrote:So that's a scripting thing, then. Check out the scripts in the space_template folder, specifically the assault ones. You need to load the ObjectiveSpaceAssault script (check that one out too, it'll be in MOD_data/common/scripts) because that loads the code for adding points after destroying objects. In fact, I think it would make sense to just replace MODc_con with one of the space assault scripts and set up the level that way, since your mode is going to revolve around points and not cp captures. The quick and easy way to get this going is to just name your destructible buildings after the ship parts (shield generator, engines, whatever) because then you don't have to go in and specify new destructible objects with their own point values and stuff (just don't forget to rename the localizations, otherwise it'll still say "Our shields have been disabled" when you blow up a house).

Also I feel I should mention that A) there are probably a few ways to do what you want, and B) I have never actually done any space/points scripting - but I've poked around with the files plenty of times and am reasonably confident you'll have luck doing it this way.

Okay, thanks. This was exactly what I was looking for. Judging by how complex the ObjectiveSpaceAssualt.LUA looks it’ll be incredibly time consuming to write my own point systems and such. So I’ll probably go with renaming the already existing critical systems.