Engine, wheel and tank are mutual exclusive, because they all have a size associated, which is stored in the same variable, and therefor the tank would have the same size as the wheel or the engine. And they use different scales so it gets really weird.
But how about this:
[
{
"type" : "vehicle_part",
"id" : "skateboard_frame",
"name": "skateboard frame",
"symbol": "H",
"color": "red",
"broken_symbol": "#",
"broken_color": "light_gray",
"damage_modifier": 10,
"durability": 200,
"item": "frame",
"difficulty": 3,
"location": "structure",
"fuel_type" : "muscle",
"power": 30,
"flags": [
"MOUNTABLE", "CONTROLS", "FOLDABLE", "BOARDABLE", "PEDALS", "ENGINE"
]
}, {
"type" : "vehicle",
"id" : "skateboard",
"name" : "skateboard",
"parts" : [
{"x": 0, "y": 0, "part": "skateboard_frame"},
{"x": 0, "y": 0, "part": "wheel_caster"}
]
}, {
"id": "skateboard",
"type": "TOOL",
"symbol": "0",
"color": "light_gray",
"name": "skateboard",
"description": "This is a skateboard..",
"price": 350000,
"material": "aluminum",
"weight": 907,
"volume": 8,
"bashing": 10,
"cutting": 0,
"to_hit": -5,
"max_charges": 0,
"initial_charges": 0,
"charges_per_use": 0,
"turns_per_charge": 0,
"ammo": "NULL",
"revert_to": "null",
"use_action": {
"type": "unfold_vehicle",
"vehicle_name": "skateboard",
"unfold_msg": "You place skateboard on the ground.",
"moves": 50
}
}, {
"type" : "vehicle_part",
"id" : "skateboard_frame_2",
"name": "skateboard frame",
"symbol" : "o",
"color" : "dark_gray",
"broken_symbol" : "x",
"broken_color" : "light_gray",
"damage_modifier" : 50,
"durability" : 70,
"wheel_width" : 6,
"item" : "wheel_caster",
"difficulty" : 1,
"location" : "structure",
"flags" : ["WHEEL", "MOUNTABLE", "VARIABLE_SIZE", "FOLDABLE"]
}, {
"type" : "vehicle",
"id" : "big_skateboard",
"name" : "big skateboard",
"parts" : [
{"x": 0, "y": 0, "part": "skateboard_frame"},
{"x": -1, "y": 0, "part": "skateboard_frame_2"},
{"x": 1, "y": 0, "part": "skateboard_frame_2"}
]
}, {
"id": "skateboard",
"type": "TOOL",
"symbol": "0",
"color": "light_gray",
"name": "skateboard",
"description": "This is a skateboard..",
"price": 350000,
"material": "aluminum",
"weight": 907,
"volume": 8,
"bashing": 10,
"cutting": 0,
"to_hit": -5,
"max_charges": 0,
"initial_charges": 0,
"charges_per_use": 0,
"turns_per_charge": 0,
"ammo": "NULL",
"revert_to": "null",
"use_action": {
"type": "unfold_vehicle",
"vehicle_name": "skateboard",
"unfold_msg": "You place skateboard on the ground.",
"moves": 50
}
}
]
You need the debug menu to spawn it. The item is copied from the folding bicycle and the values (weight/valolume/…) are probably all wrong. As are the values for the skateboard_frame. But it works nicely, safe/top speed: 8/23 mph.
Vehicles with more than one square require a valid wheel configuration, skateboard_frame_2 acts as wheels for this. See “big skateboard”, currently no item for it.
“Folding” a vehicle cost 500 move points (5 turns), regardless of the vehicle type.
This is just a simple sketch, someone else might add the recipes/items/values/… and make a PR. It is not very good as it is now. The big skateboard is more like a bicycle (and will probably always look like it). Also the cruise control can be set to multiples of 9 mph only, so the skateboard is either not moving at all or moving at 9 mph, or you have to manually speed up/down. 9 mph seems to be about twice as fast as a zombie.
Note that this puts many functions into one vehicle item: “CONTROLS” & “BOARDABLE” & “PEDALS” & “ENGINE” but this is purely for the internal mechanics.
Also: you don’t need a seat, the code only checks for a part with the “CONTROLS” flag.
“falling off your skateboard” would be a nice addition.
Pushing/kicking a shopping cart to make it move sounds awesome.