Setting Up Seats (almost finished) - korbynullevig/craftmoto GitHub Wiki
Here you can determinate the number of seats, their actions, utility, placement, and some cool things. It is a really big part for a fully custom vehicle, so be attentive, patient, and don't hesitate to try some things.
IT IS ONLY WORKS ON HELMETS.
-
<int>
Is a number, as 1, 10, 6487 . Don't put negative value if it isn't writed. X.0 isn't a int. -
<double>
Is a decimal number, as 0.7 or 0.0 . Don't put negative value if it isn't writed. Int can be used too. -
<char>
Is only one character, but it can be a number, letter or UTF-8 character. -
<string>
some characters. On this config size, you may NOT use UTF-8 character.
This is an example in the Template.yml.
seats:
amount: 3 ## How many (in addition to the driver's seat).
dummy_fallback: true ## Whether or not sitting in dummy seats will attempt to seat the player in a normal seat.
offset: ## The offset in blocks from the centre of the drivers seat.
seat1:
x: 0
y: -1.55
z: -1.15
seat2:
x: -1.15
y: -1.55
z: 0
seat3:
x: -1.15
y: -1.55
z: -1.15
steers: ## Which seats will be able to steer this vehicle.
seat0: true
seat1: true
seat2: false
seat3: false
dummy: ## Dummy seats cannot be driven.
seat3: true
pickup_mobs: ## What seats will pickup nearby mobs.
seat0: true
pickup_players: ## What seats will pickup nearby players.
seat0: true
seat1: true
## What happens when the spacebar is pressed. Cooldown is in ticks.
## If cooldown is negative, player must release spacebar before action can happen again.
## If action is data, you must define a list of integers, 'cycle' for data to cycle through.
## If action is dock, undock or toggle_dock, you must specify a list of docking ports, 'ports', to affect.
spacebar: ## Action can be any of fly, horn, shoot, data, inventory, vtol, sink, boost, dock, undock, toggle_dock.
seat0:
action: inventory
cooldown: 5
seat1:
action: data
cooldown: -1
cycle:
- 0
- 1
- 5
- 3
seat2:
action: shoot
cooldown: 5
seat3:
action: boost
boost: 1.3 ## The boost multiplier.
boost_duration: 6 ## The duration of the boost in ticks.
control: ## What happens when control is pressed (when sprint is enabled). Similar to spacebar. Note that this will happen as long as the player continues to sprint.
seat1:
action: dock
cooldown: 20
ports:
- port0
- port2
left: ## What happens when A is pressed. Similar to spacebar. Note that this will happen as long as A is held.
seat1:
action: data
cooldown: 20
right: ## What happens when D is pressed. Similar to spacebar. Note that this will happen as long as D is held.
seat1:
action: data
cooldown: 20
gun: ## Hooks into CrackShot.
seat1:
gun: Deagle ## The name of the CrackShot weapon.
click: left ## How to shoot this gun. Can be left or right.
sneak: true ## Whether or not to shoot this gun as if the player is sneaking.
infinite_ammo: true ## Whether or not this gun has infinite ammo. If false, uses ammo from the player/vehicle inventory.
clamp: ## Limit the ability of a passenger to turn in their seat. Only works if the passenger cannot steer the vehicle from this seat. Must be > 0 if you wish to use this.
seat1:
yaw:
left: 0
right: 0
pitch:
up: 0
down: 0
inventory: ## Per-seat inventories. Size must be a multiple of 9. Delete to remove the inventory. Only accessible if the spacebar action for the given seat is inventory.
seat0:
size: 9
title: Craftmoto Inventory
underwater:
allowed:
seat0: false ## Whether or not this seat can be ridden while submerged.
breathing:
seat0: false ## Whether or not players will be able to breathe while underwater in this seat.
night_vision:
seat0: false ## Whether or not players will get night vision as long as they're underwater in this seat.
BASIC CONFIGS
amount: <int>
dummy_fallback: <true/false>
offset:
seat<int>:
x: <double>
y: <double>
z: <double>
seat<int+1>:
etc...
-
amount: <int>
The number of seats (not including the seat0). -
dummy_fallback: <true/false>
Permise to players who try to sit in a dummy seat will be automatically sit on the first seat avaiable. Repeat all of this for each seat, each time you see seat. If the module is optional, you can ignore it. -
seat<int>:
Must be replaced by the number of the seat. Reference is the center, alias seat0 (you can't modify seat0 coords, so don't put it here) -
x: <double>
Coordinate of the X axis (in front of if positive, behind if negative) in blocks. -
y: <double>
Coordinate of the Y axis (in higher if positive, under if negative). -
z: <double>
Coordinate of the Z axis (at right if positive, left if negative).
SET UP STEERING SEATS
steers:
seat<int>: <true/false>
seat<int+1>: <true/false>
etc...
-
seat<int>: <true/false>
whether or not if this seat can drive or not. seats which not steerable can be ignored here.
SET UP DUMMY SEATS (Optional)
dummy:
seat<int>: <true/false>
seat<int+1>: <true/false>
etc...
-
seat<int>: <true/false>
whether or not if player can sit here. seats which not dummy can be ignored here. Dummy Seats withdummy_fallback: true
can be useful to permise a player to enter a vehicle easier.
SET UP PICKUP-MOBS (Optional)
pickup_mobs:
seat<int>: <true/false>
seat<int+1>: <true/false>
-
seat<int>: <true/false>
whether or not if mobs will be sit on the seat if they are near of one seat. seats which not pickup_mobs can be ignored here. Can transport any mob.
SET UP PICKUP-PLAYERS (Optional)
pickup_players:
seat<int>: <true/false>
seat<int+1>: <true/false>
-
seat<int>: <true/false>
whether or not if a player will be sit on the seat if they are near of one seat. seats which not pickup_players can be ignored here.
You have finished the basic seat config. BUT ! You can continue this page for special things for seats.
SET UP ACTIONS
- You can use
- If you want to put spacebar and control on the vehicle, just do what you want with spacebar, and do the same with control (with other actions and seats, obviously).
<string>:
seat<int>:
action: <string>
cooldown: <int>
seat<int+1>:
etc...
-
<string>:
Put the keyboard you want withspacebar
,control
,left
orright
. If your vehicle needs one of these keyboard to be drive (as WASD), you may not put the used keyboard as Action on the drivers seats. No problem for passengers. If a player have custom controls, no worries. -
seat<int>:
As usual, put only seats you want to be used for this keyb and action. Dummy seats and not writen seats are ignored. -
action: <string>
Put the action the seat may do with the control. You can puthorn
, ìnventory,
fly,
shoot,
data,
vtol,
sink,
boost,
dock,
undockand
toggle_dock`. -
cooldown: <int>
Put the delay in ticks (20 ticks x second). The action keep using while you press the key with delay. Put 0 for no delay, put -1 to make the action only once, forcing player to press the key again.
ACTIONS CONFIG
- Each action have different properties, so you may do some different things for each. it isn't in a different file or section.
- Horn
seat<int>:
action: horn
cooldown: <int>
For Horn the config doesn't change here, but you have to config the horn in the sound module (A link will be placed here when this module will be writen)
- Inventory
seat<int>:
action: inventory
cooldown: <int>
For Horn the config doesn't change here, but you have to config the inventory in the inventoy module in this page.)
-
Fly
-
Shoot
-
Data
-
vtol
-
Sink
-
Boost
seat<int>:
action: boost
cooldown: <int>
boost: <double>
boost_duration: <int>
-
boost: <double>
is the multiplicator ofmax_acceleration
in the Move module (LINK). 1 will multiply the max_acceleration per 1, so nothing change. Put lower and the vehicle will go slowly, higher and the speed increase. If you are using the WASD int the same module, it will be affected (may be a bug because WASD use max_acceleration too) -
boost_duration: <int>
is how many time in ticks the boost during. (20 ticks per second) If the boost_duraction is higher than the delay of use, the boost can repeat while the key is pushed, exept on -1, you may type the key again.
-
Dock
-
Undock
-
Toggle Dock
SET UP GUNS (Hooked with Crackshot plugin)
gun: ## Hooks into CrackShot.
seat<int>:
gun: <string>
click: <left / right>
sneak: <true / false>
infinite_ammo: <true / false>
seat<int+1>:
etc...
-
gun: <string>
Must be the name of the gun in the config, like when you are using /shot get . -
click: <left/right>
Select which click will shoot with the weapon. -
sneak: <true/false>
Does the player need to sneak for shooting or not. -
infinite_ammo: <true/false>
Does the weapon have infinite ammo or not.
SET UP CLAMP
clamp:
seat<int>:
yaw:
left: <int>
right: <int>
pitch:
up: <int>
down: <int>
etc...
-
seat<int>:
Put the seat(s) you want to restrict how many degrees the passenger can turn. Doens't affect drivers seats and dummy seats, unwrited seats will be ignored. - `left/right/up/down : For each, put the degree value into 0 to 180. An higher value allow player to turn longer in this direction. 0 forbid turning in the direction.
SET UP INVENTORIES
inventory:
seat<int>:
size: <int>
title: <string>
etc...
- `seat: You can config here every seats used with "inventory" action. You may config EACH SIT with this action.
-
size: <int>
Put the size of the inventory. It is majored to the superior multiplicator of 9. Don't put a valu higher than 54. -
title: <string>
Is just the name of the inventory, like when you see "chest" when you open one. You can use UTF-8 here. - WARNING : Vehicles inventories are bugged when you let them go into the garage: They drop all the content but this content is keeped into the vehicle, so if you don't want duplication risk with this item, you may diable one of these two modules.
SET UP UNDERWATER
breathing:
seat<int>: <true/false>
etc...
night_vision:
seat<int>: <true/false>
etc...
-
seat<int>: <true/false>
whether or not if player can breath underwater or get night_vision effect.
YOU HAVE FINISHED WITH THIS CONFIG !