"Gacha" Mecha Dispenser

In the Let’s Build: Mecha thread @Huffa had asked about a Formula for generating Mecha. My entries had mostly been generated via Free Association and whatever was going on in my brain at the time, and there’s a special kind of magic when one does that, but there’s also a special kind of magic in a handy tool for generating things and the ideas we impose on top of the collection of those parts.

So I eventually came up with the idea for “Gacha” Mecha (I erroneously called them “Gatcha” in the Let’s Build). This “Gacha” Mecha Generator is still a WIP, I’ll eventually make a full blog post on it given any feedback I receive, so please let me know what you think!

Also, it’s loosely intended for Get into the machine, Shinji! but should hopefully be useful for any rules-light game.

The idea is that there’s a Mecha manufacturing corporation that sells Mecha via Gachapon. They’re generally more expensive and the randomized nature makes them sub-optimal for building a uniform military, but one lucky draw can be of monumental value, so they’ve become favored by gangs, mid-tier corporations, prospective heroes going for a hail mary, and rebel groups.

You can ignore all that and just use this generator for ideas, but this framing device makes it almost like a micro-setting unto itself and allows for disparate and hopefully interesting Mecha for each player in a way that makes sense within the setting.

Unfortunately, to the best of my knowledge it is not possible to post HTML arbitrarily as a User, which makes sense I think, so you’ll have to copy this into a text editor, save it as a .html file, and then open it in a browser.

Also for reference, I used Slight Adjustment’s List to HTML Generator

If you’re skeptical, here are a few randomly-generated Mecha. You may or may not notice that duplications are possible and certain things are weighted- I’m not great with javascript and I’m just using Spwack’s tool mostly as-is, so if you get a redundant piece, you can just look at the table and reroll manually.

Mecha One

Head: Horns
Core: Armored
Upper: Extra-Long Arm, Claw
Lower: Treads
Special: Prehensile Tail, Wormhole Jump Engine

Mecha Two

Head: Prehensile Trunk / Head Tentacle
Core: Quadrupedal or other Non-Humanoid
Upper: Tentacle, Multi-Tool
Lower: Legs (Bipedal)
Special: Shoulder-Mounted Gauss Pistol, Advanced Autonomous AI

Mecha Three

Head: Tank Cannon (Plasma)
Core: Biological
Upper: Plasma Cannon, Psionic/Magical Shotgun
Lower: Legs (Tripedal or more)
Special: Alternate Form, Autonomous Drones

I can already tell that there needs to be more variety and there are a few edge cases where the results are funky, but otherwise, I’m pretty happy with it so far, these are not bad. You can tell that as-is they also lack some of the magic of the free association ones, but that stuff can get written on top of these, but they’re a good starting point.

The Code:

<button onclick='selectRandom_mecha_ku9()'>Mecha</button> <button onclick='showTables_mecha_ku9()'>Show tables</button>
<div id='outputText_mecha_ku9'></div>


function expandString(str, map) {
	var recur_limit = 20
	while (str.match(/{.*?}/) && recur_limit > 0){
		str = str.replace(/{.*?}/g, (match) => {
			var input = match.toLowerCase().replace(/ /g, '_').replace(/[^a-z0-9_-]/g,'').split('_-')
			var key = input[0]

			if (!map.hasOwnProperty(key))
				return key

			if (input.includes(`u`)) {
				key_u = key+`_unique`
				if (!map.hasOwnProperty(key_u) || map[key_u].length == 0)
					map[key_u] = map[key].slice()
				return map[key_u].splice(Math.floor(Math.random() * map[key_u].length), 1);

			return map[key][Math.floor(Math.random() * map[key].length)]
		recur_limit -= 1
	return str

var lists_mecha_ku9 = {
	head: [`Tank Cannon ({Ammo})`, `Head Miniguns ({Ammo})`, `{Pointy Thing}`, `Prehensile Trunk / Head Tentacle`, `Advanced Sensors`, `Advanced Sensors`, `Advanced Communications Array`, `Advanced Communications Array`],
	pointy_thing: [`Fangs`, `Tusks`, `Horns`, `Spikes`],
	core: [`Ejectable Fightercraft Cockpit`, `Biological`, `Quadrupedal or other Non-Humanoid`, `Fusion-Powered (or other means of near-infinite energy)`, `Armored`, `Energy Barrier`],
	upper: [`{Ammo} {Gun}`, `{Ammo} {Gun}`, `{Material} {Melee}`, `{Material} {Melee}`, `Claw`, `Tentacle`, `Extra-Long Arm`, `Multi-Tool`],
	gun: [`Rifle`, `SMG`, `Sniper Rifle`, `Shotgun`, `Pistol`, `Cannon`],
	ammo: [`Laser`, `Plasma`, `Gauss`, `Smart`, `Bio`, `Psionic/Magical`],
	melee: [`Sword`, `Axe`, `Hammer`, `Mace`, `Flail`, `Whip`, `Lance`, `Shield`],
	material: [`High-Frequency`, `Laser`, `Metallic`, `Bio`, `Electric`, `Psionic/Magical`],
	lower: [`Legs (Bipedal)`, `Legs (Bipedal)`, `Legs (Bipedal)`, `Legs (Bipedal)`, `Treads`, `Hoverjet`, `Wheels`, `Legs (Skates/Skis/etc.)`, `Legs (Unipedal)`, `Legs (Tripedal or more)`],
	special: [`Sensor-Jamming`, `Sensor-Jamming`, `Camouflage`, `Camouflage`, `Prehensile Tail`, `Prehensile Tail`, `Autonomous Drones`, `Autonomous Drones`, `Advanced Autonomous AI`, `Advanced Autonomous AI`, `Alternate Form`, `Alternate Form`, `Combination of several Mecha`, `Combination of several Mecha`, `Shoulder-Mounted {Ammo} {Gun}`, `Holographic`, `Wormhole Jump Engine`, `Extra-Dimensional`, `Psionic/Magical`, `Mecha-Buster Power Armor or Environment Suit (ignore or adapt the rest of the "Mecha" sheet accordingly)`],

function selectRandom_mecha_ku9() {
	document.getElementById('outputText_mecha_ku9').innerHTML = expandString(`Head: {Head}<br />Core: {Core}<br />Upper: {Upper}, {Upper}<br />Lower: {Lower}<br />Special: {Special}, {Special}<br />`, lists_mecha_ku9)

function showTables_mecha_ku9(){
	document.getElementById('outputText_mecha_ku9').innerHTML = `Head: {Head}<br />Core: {Core}<br />Upper: {Upper}, {Upper}<br />Lower: {Lower}<br />Special: {Special}, {Special}<br /><br/><br/>head<br/>1. Tank Cannon ({Ammo})<br/>2. Head Miniguns ({Ammo})<br/>3. {Pointy Thing}<br/>4. Prehensile Trunk / Head Tentacle<br/>5. Advanced Sensors<br/>6. Advanced Sensors<br/>7. Advanced Communications Array<br/>8. Advanced Communications Array<br/><br/>pointy thing<br/>1. Fangs<br/>2. Tusks<br/>3. Horns<br/>4. Spikes<br/><br/>core<br/>1. Ejectable Fightercraft Cockpit<br/>2. Biological<br/>3. Quadrupedal or other Non-Humanoid<br/>4. Fusion-Powered (or other means of near-infinite energy)<br/>5. Armored<br/>6. Energy Barrier<br/><br/>upper<br/>1. {Ammo} {Gun}<br/>2. {Ammo} {Gun}<br/>3. {Material} {Melee}<br/>4. {Material} {Melee}<br/>5. Claw<br/>6. Tentacle<br/>7. Extra-Long Arm<br/>8. Multi-Tool<br/><br/>gun<br/>1. Rifle<br/>2. SMG<br/>3. Sniper Rifle<br/>4. Shotgun<br/>5. Pistol<br/>6. Cannon<br/><br/>ammo<br/>1. Laser<br/>2. Plasma<br/>3. Gauss<br/>4. Smart<br/>5. Bio<br/>6. Psionic/Magical<br/><br/>melee<br/>1. Sword<br/>2. Axe<br/>3. Hammer<br/>4. Mace<br/>5. Flail<br/>6. Whip<br/>7. Lance<br/>8. Shield<br/><br/>material<br/>1. High-Frequency<br/>2. Laser<br/>3. Metallic<br/>4. Bio<br/>5. Electric<br/>6. Psionic/Magical<br/><br/>lower<br/>1. Legs (Bipedal)<br/>2. Legs (Bipedal)<br/>3. Legs (Bipedal)<br/>4. Legs (Bipedal)<br/>5. Treads<br/>6. Hoverjet<br/>7. Wheels<br/>8. Legs (Skates/Skis/etc.)<br/>9. Legs (Unipedal)<br/>10. Legs (Tripedal or more)<br/><br/>special<br/>1. Sensor-Jamming<br/>2. Sensor-Jamming<br/>3. Camouflage<br/>4. Camouflage<br/>5. Prehensile Tail<br/>6. Prehensile Tail<br/>7. Autonomous Drones<br/>8. Autonomous Drones<br/>9. Advanced Autonomous AI<br/>10. Advanced Autonomous AI<br/>11. Alternate Form<br/>12. Alternate Form<br/>13. Combination of several Mecha<br/>14. Combination of several Mecha<br/>15. Shoulder-Mounted {Ammo} {Gun}<br/>16. Holographic<br/>17. Wormhole Jump Engine<br/>18. Extra-Dimensional<br/>19. Psionic/Magical<br/>20. Mecha-Buster Power Armor or Environment Suit (ignore or adapt the rest of the "Mecha" sheet accordingly)`

1 Like