PREFAB: Mann Vs Machine Buildables

LeSwordfish

semi-trained quasi-professional
aa
Aug 8, 2010
4,102
6,597
Mann the Barricades!
Mann Vs Machine Buildables

2013-12-30_00005.jpg

These hologram whatsits turn into real things if you punch them hard enough. Use them to fight robots better. As we speak I am wrestling a leopard.
-Mann Co. CEO Saxton Hale, entirety of Holographic Defence Assets press release.

So those of you who haven't yet blocked me in chat will probably know that this is what i've been working on over the past week or so: buildable props for mvm. You put these in your map, and players can then choose which ones they want to construct. There's a whole bunch of uses for them: make new routes for players, add cover, add deathpits, etc etc etc. Bot navigation around them is a little funky, so i wouldn't try and block off whole routes as of yet.

How it works for players
In between waves, holographic props appear (think of Bioshock Infinite's "Tears"), along with instructions for their use. Attack the props to spend "build points" on them- when you have purchased a hologram it turns into a full prop. Wrenches next to props mark their cost, with props with a greater gameplay effect costing more. Like spending cash, if you pass the wave your choices are consolidated, if you fail you get to choose again.

You earn build points however the mapper wants you to. It should be at least a few per wave, though, and I would suggest giving out more for performing certain feats (killing a tank in ten seconds, airblasting three bots to death in one wave, whatever.

How it works, logic-wise
The whole thing is too complex to go into here- further details are given in the vmf. For now, suffice to say that the hologram is a prop_dynamic, math_counters are used to track points earned and spent, game_texts display information on screen (game_text_tf is prettier but only appears outside minmode HUD) and lots of logic_relays enable and disable each other so that the objects appear and dissapear as needed. A trigger_multiple is also used, touchtesting itself to prevent players getting stuck as the holograms reenable.

How to use it, as a mapper
Instructions can be found in the readme HERE and included in the download.

To use, extract to your prefabs folder in (yoursteamname)\common\Team Fortress 2\Bin\Prefabs

Notes
  • This is version one: there's a lot more to come. The sky, and the ability of entities to be disabled/enabled is the limit. I also have only tested this on my own- there may be all sorts of netcode or multiple-user oddities i haven't thought of.
  • The maximum number of build points a team can have is 15. If you want to increase this, you can set up the logic_case and the dozens of game_texts yourself, frankly.
  • Anything else that you want to happen when props are purchased should be put in the build_create entity. Remember to disable/undo it in the build_wavefailed or it won't reset if a wave is failed.
  • For gods sake, use in moderation. This is a bloated system (especially if you use the glows: glows are cool but i can't recommend them) and mvm is a bloated system. This system is as efficient as i can make it, but it's going to be heavy on your entity count.
  • Unless something is broken, version 3 will augument version 2 with sample maps.

Changelog:
08/08/2013: version 1:
---Sentry, dispenser, general prop, item, glow, and common prefabs available. First release.

17/08/2013: version 2:
---Small bug fixes.
---Replacing wrenches with sprites for usability.
---To update to this version you will need to replace any buildable prefabs, but not the "common" prefab.

26/09/2013: version 2.1: (CURRENT):
---Added "breaking prop", "spell" and "pumpkin bomb" prefabs.
---Adjusted the "Common" prefab for easier setup.
---Rewrote the readme for easier use.
---To update to this version you need not replace anything. If you have already setup the "Common" prefab the changes will be irrelevant.

Download

Talk amongst yourself about all the cool things you will be able to do with this. Also, what other dynamic special buildables would you want? Remember, the less they mess with the pathing of the bots, the better, but otherwise more or less anything goes.
 
Last edited:

LeSwordfish

semi-trained quasi-professional
aa
Aug 8, 2010
4,102
6,597
https://dl.dropboxusercontent.com/u/13673854/MVM buildables.zip

First buildables available! Includes Sentry, Dispenser, general prop, ammo pickup, plus the common entities and a prefab allowing you to make the holograms get a payload-like glow if you want.

Sentries and dispensers have triple the health, giving them roughly 600hp, but if they are destroyed they don't respawn until the end of the wave. They also have infinite ammo. I welcome suggestions as to how else this could be done: note that bots attack the buildings, so having invulnerable buildings seems a tad unfair on the bots.
 

Freyja

aa
Jul 31, 2009
2,994
5,813
This is extremely impressive. I've also toyed with this idea but didn't think it possible. Amazing work, Swordy.
 
Mar 23, 2010
1,872
1,696
someone gonna have to combine this w/ donuts turrets tho it might not actually be fun at all
 

LeSwordfish

semi-trained quasi-professional
aa
Aug 8, 2010
4,102
6,597
That might be interesting but i'm not sure what it would add, really. You- you can shoot robots under your own initiative, you know? Also, the more complex a thing is, the more complex it is to attach into the system, almost exponentially. (what happens if you disable an in-use game_ui? if you disable a brush that names and unnames players, do they remain named? Unless i think the result will be worth it i'm not really interested in this much work)
 
Last edited:

DonutVikingChap

L5: Dapper Member
Mar 15, 2013
233
139
I could probably let you use my turrets for this, I think what makes them interesting is that you can change them to shoot different things than just bullets, like my rocket turret prototype. Also, since all the turrets use trigger_hurts for the damage, no points get awarded to the player directly but you can probably count the kills somehow to implement some kind of system that gives the players additional build points or something like that. :D
 

Pocket

Half a Lambert is better than one.
aa
Nov 14, 2009
4,694
2,579
Valve needs to see this. The idea that you can add a feature like this to MvM without even a SourceMod plugin is amazing. The only thing that sucks about it is the limitations of the skin; that ghost/hologram shader I mentioned a while back would work excellently here.
 

Penguin

Clinically Diagnosed with Small Mapper's Syndrome
aa
May 21, 2009
2,039
1,484
if i may make a suggestion: illustrate the point cost with an env_sprite above the actual object, using the number textures traditionally used for overlays.

it's more intuitive.
 

Penguin

Clinically Diagnosed with Small Mapper's Syndrome
aa
May 21, 2009
2,039
1,484
you literally just use env_sprite and set the material to the overlay texture
 

RaVaGe

aa
Jun 23, 2010
733
1,210
That's really cool, I have too much projects now but this prefab is all I need for the gamemode I wanted to do before.

GNNNNNNN, I will try to do a MVM map with that, fuck it.
 

RaVaGe

aa
Jun 23, 2010
733
1,210
Also I see something like that for the walls, before you have a blueprint in front of the wall with the hologram of the wall.

2013-08-17_00003.jpg


And then when you build it.

2013-08-17_00004.jpg


I didn't implemented the point system, but idk how to make the wall in func_breakable and be able to enable it after you hit your blueprint... That's just an idea I wanted to share :p

EDIT : Now you can break it but I have no idea how to toggle it to non-solid before it's build.

EDIT2 : Now it works.
 
Last edited: