adv_vehicles/README.md

411 lines
10 KiB
Markdown
Raw Permalink Normal View History

2019-08-20 11:26:11 -07:00
# Advanced Vehicles. Current version is 1.0.1-Release.
2019-07-16 07:47:33 -07:00
## Description
------------------------------
2019-06-25 13:31:29 -07:00
Adds smart different cars (passenger cars, trucks, buses, service). This mod introduces little API to register cars with analogical parameters that use the mod (see *API Documentation)
## API Documentation
2019-07-16 07:47:33 -07:00
------------------------------
2019-06-25 13:31:29 -07:00
###adv_vehicles.register_vehicle(vehicle_name, vehicle_properties, vehicle_item)
2019-07-03 13:40:56 -07:00
--Registers a vehicle in the game as an entity and an item spawner for it.
2019-06-25 13:31:29 -07:00
*vehicle_name* is entity string.
*vehicle_properties* is a table with following fields:
hp_max,
mass, is a property that sets a value of vehicle mass in tons. Necessary for calculating of the gravity.
max_vel, measured in metres in sec.
cbox, is collision box.
model,
textures,
seats, is a table that contains a data about each seat (busy_by, pos fields). Key should be string containing a sort of seat (driver or passenger).
player_eye_offset, is pos table
*vehicle_item* is a table with item spawner data. Fields: description, inv_image, craft_recipe.
2019-06-26 08:37:38 -07:00
###adv_vehicles.rotate_point_around_other_point(circle_center_pos, rotating_point_pos, fixed_point_yaw, current_point_yaw)
--This method implements affine transformation of a point *rotating_point_pos* rotation along a circle with *circle_center_pos* center.
2019-06-25 13:31:29 -07:00
2019-06-26 08:37:38 -07:00
*circle_center_pos* is position table.
*rotating_point_pos* is position table.
*fixed_point_yaw* is the last fixed yaw of a vehicle (saving in self.fixed_veh_rotate_angle).
*current_point_yaw* is current yaw of a vehicle.
2019-06-25 13:31:29 -07:00
2019-06-26 08:37:38 -07:00
###adv_vehicles.attach_player_to_veh(player, vehicle, seated, model, animation)
--Attaches a player to the vehicle.
*player* is PlayerObjectRef.
*vehicle* is ObjectRef.
*seated* is "driver" or "passenger" keys depending on which field in *seats_list* used.
*model* is vehicle model (.b3d format).
2019-07-03 13:40:56 -07:00
*animation* is a table with x, y fields
###adv_vehicles.detach_player_from_veh(player, vehicle, seated, model, animation)
--Opposite to *adv_vehicles.attach_player_to_car*. Detaches a player from the car and the same arguments.
2019-08-14 01:26:08 -07:00
###adv_vehicles.pave_vector(vehicle, old_acc_vect_pos, old_yaw)
--Paves the vector from '0' point relatively to the car origin towards to *old_acc_vect_pos*.
2019-07-03 13:40:56 -07:00
*old_yaw* is a integer value that saving in self.fixed_veh_rotate_angle.
This method should be caused continuously per 0.1 second to recalculate the car direction.
###adv_vehicles.rotate_collisionbox(vehicle, yaw)
This method is WIP and doesnt work properly currently.
2019-07-16 07:57:30 -07:00
2019-08-14 01:26:08 -07:00
###adv_vehicles.collide(vehicle)
Calculates elastic force of surface on that *vehicle* has fallen. It depends currently only on the vehicle velocity. It will also damage the vehicle and objects sitting inside. Damage rate also depends from the velocity.
###adv_vehicles.vehicle_braking(vehicle, vector_l)
*vector_l* is a just coefficient for braking calculating. The above value, the braking is faster. This method is permanently called in the globalstep.
###adv_vehicles.vehicle_handle(vehicle, controls, yaw)
*controls* is a table resulted from get_player_control().
Executes the vehicle driving (turns, forward/backward going)
2019-07-16 07:47:33 -07:00
## Crafting Recipes Guide
2019-07-16 07:47:33 -07:00
-----------------------------
L/B = Luxury Decor or Basic Materials
### Basic Items
Items that needed to craft any of vehicle sort.
***Car Frame***
Basic element of crafting of all vehicles. Available only **before** 1.0.0-RC2.
2019-07-16 07:54:04 -07:00
2019-07-16 07:47:33 -07:00
-------------------
L/B plastic_sheet L/B plastic_sheet L/B plastic_sheet
2019-07-16 07:54:53 -07:00
2019-07-16 07:47:33 -07:00
L/B plastic_sheet L/B plastic_sheet L/B plastic_sheet
2019-07-16 07:54:53 -07:00
2019-07-16 07:47:33 -07:00
L/B plastic_sheet
-------------------
***Car Frame Material***
Basic element of crafting of all vehicles. Available only **since** 1.0.0-RC2.
-------------------
default:steel_ingot === L/B plastic_sheet === adv_vehicles:aluminium_dust
default:steel_ingot === L/B plastic_sheet === adv_vehicles:aluminium_dust
L/B plastic_sheet === xpanes:pane_flat
L/B plastic_sheet
-------------------
2019-08-20 11:26:11 -07:00
***Wheels Bunch***
2019-08-02 11:58:20 -07:00
2019-08-20 11:26:11 -07:00
A group of *wheels* items. An element is needed for crafting of all vehicles. Just made to save a room in the crafting grid for other items.
-------------------
2019-08-20 11:26:11 -07:00
adv_vehicles:wheel === adv_vehicles:wheel === adv_vehicles:wheel
2019-08-20 11:26:11 -07:00
adv_vehicles:wheel
-------------------
***Two Red Headlights***
2019-08-02 11:59:13 -07:00
A group of *red headlights*. Just made to save a room in the crafting grid for other items.
-------------------
adv_vehicles:headlight_red === adv_vehicles:headlight_red
-------------------
***Two White Headlights***
2019-08-02 11:59:13 -07:00
A group of *white headlights*. Just made to save a room in the crafting grid for other items.
-------------------
adv_vehicles:headlight_white === adv_vehicles:headlight_white
-------------------
***Diesel ICE (Internal Combustion Engine)***
2019-08-02 11:59:13 -07:00
An important part of any vehicle without that no one can move in real. Crafted from *aluminium dust*, four *cylinders* and two *steel ingots*.
-------------------
adv_vehicles:cylinder === default:steel_ingot === default:steel_ingot
adv_vehicles:cylinder === adv_vehicles:cylinder
adv_vehicles:cylinder === adv_vehicles:aluminium_dust
-------------------
***Steering Wheel***
2019-08-02 11:59:13 -07:00
Needed for crafting of any vehicle.
-------------------
L/B plastic_sheet === L/B plastic_sheet === adv_vehicles:aluminium_dust
dye:black
-------------------
### Ores Generation and their stuff
Heres about the ores generation and all recipes what concerned to using these ores.
***Aluminium***
2019-08-02 12:00:17 -07:00
*Generates below -40 y coord.*
*Introduces itself a long sheet of ores.*
*Gives 1-6 *aluminium lumps*.
*Generates rarer than *silicon*.
***Silicon***
2019-08-02 12:00:17 -07:00
*Generates below -60 y coord.*
*Shapes small clusts of ores.*
*Gives 1-4 *silicon lumps*.
*Most frequently generated*.
***Phosphorus***
2019-08-02 12:00:17 -07:00
*Generates below -100 y coord.*
*Introduces blobs of ores.*
*Gives 1-3 *phosphorus lumps*.
*Very rare*
***Aluminium Lump***
2019-08-02 12:00:17 -07:00
Mined *aluminium ore*.
***Aluminium Dust***
2019-08-02 12:00:17 -07:00
Crafted from one *aluminium lump*.
***Silicon Lump***
2019-08-02 12:00:17 -07:00
Mined from *silicon ore*.
***Silicon Dust***
2019-08-02 12:00:17 -07:00
Crafted from *silicon lump*.
***Phosphorus Lump***
2019-08-02 12:00:17 -07:00
Mined from *aluminium ore*.
***Phosphorus Dust***
2019-08-02 12:00:17 -07:00
Mined from *phosphorus lump*.
***Aluminium and Silicon Dusts***
2019-08-02 12:00:17 -07:00
A group of *aluminium dust* and *silicon dust*. Needed for alloying of *silumin*.
***Silumin Ingot***
2019-08-02 12:00:17 -07:00
An alloy is consisted of *aluminium* and *silicon* dusts. Needed for crafting of *piston*, *crankshaft* and *cylinder*.
***Red LED***
2019-08-02 12:00:17 -07:00
A light-emitting diode of red color.
-------------------
adv_vehicles:aluminium_dust === L/B plastic_sheet === default:copper_ingot
-------------------
***Green LED***
2019-08-02 12:00:17 -07:00
A light-emitting diode of green color.
-------------------
adv_vehicles:phosphorus_dust === L/B plastic_sheet === default:copper_ingot
-------------------
***Blue LED***
2019-08-02 12:00:17 -07:00
A light-emitting diode of blue color.
-------------------
adv_vehicles:silicon_dust === L/B plastic_sheet === default:copper_ingot
-------------------
***White LED***
2019-08-02 12:00:17 -07:00
A light-emitting diode of white color.
-------------------
adv_vehicles:red_led === adv_vehicles:blue_led === adv_vehicles:green_led
-------------------
### ICE (Internal Combustion Engine) Components.
Here are listed crafting recipes of ICE components.
***Piston***
2019-08-02 12:01:28 -07:00
A piston that implements fuel compression.
-------------------
default:steel_ingot === default:steel_ingot === default:steel_ingot
adv_vehicles:silumin_ingot === adv_vehicles:silumin_ingot
2019-07-16 07:56:45 -07:00
adv_vehicles:silumin_ingot
-------------------
***Crankshaft***
2019-08-02 11:56:34 -07:00
2019-07-16 07:47:33 -07:00
-------------------
default:steel_ingot === default:steel_ingot
2019-07-16 07:55:53 -07:00
adv_vehicles:silumin_ingot
adv_vehicles:silumin_ingot
2019-07-16 07:47:33 -07:00
-------------------
***Cylinder***
2019-08-02 12:01:28 -07:00
A working chamber of the ICE.
-------------------
adv_vehicles:piston
adv_vehicles:crankshaft
adv_vehicles:silumin_ingot
-------------------
### Vehicles.
A list of crafting recipes of vehicles.
2019-07-16 07:47:33 -07:00
***BMW 118 Car***
2019-08-02 12:01:28 -07:00
Before 1.0.0-RC2.
2019-07-16 07:56:45 -07:00
2019-07-16 07:47:33 -07:00
-------------------
adv_vehicles:car_frame dye:blue
2019-07-16 07:55:53 -07:00
2019-07-16 07:47:33 -07:00
adv_vehicles:wheel adv_vehicles:wheel adv_vehicles:wheel
2019-07-16 07:55:53 -07:00
2019-07-16 07:47:33 -07:00
adv_vehicles:wheel L/B plastic_sheet
-------------------
***Volvo Bus***
2019-08-02 12:01:28 -07:00
Before 1.0.0-RC2.
2019-07-16 07:56:45 -07:00
2019-07-16 07:47:33 -07:00
-------------------
adv_vehicles:car_frame dye:yellow dye:yellow
2019-07-16 07:55:53 -07:00
2019-07-16 07:47:33 -07:00
adv_vehicles:wheel adv_vehicles:wheel adv_vehicles:wheel
2019-07-16 07:55:53 -07:00
2019-07-16 07:47:33 -07:00
adv_vehicles:wheel L/B plastic_sheet default:steel_ingot
-------------------
***Kamaz Truck***
2019-08-02 12:01:28 -07:00
Before 1.0.0-RC2.
2019-07-16 07:56:45 -07:00
2019-07-16 07:47:33 -07:00
-------------------
adv_vehicles:car_frame dye:grey dye:white
2019-07-16 07:55:53 -07:00
2019-07-16 07:47:33 -07:00
adv_vehicles:wheel adv_vehicles:wheel adv_vehicles:wheel
2019-07-16 07:55:53 -07:00
2019-07-16 07:47:33 -07:00
adv_vehicles:wheel L/B plastic_sheet default:steel_ingot
-------------------
***BMW 118 Car***
2019-08-02 12:01:28 -07:00
Since 1.0.0-RC2.
-------------------
adv_vehicles:car_frame_material === adv_vehicles:tires_bunch === adv_vehicles:two_red_headlights
adv_vehicles:car_frame_material === adv_vehicles:diesel_ice === adv_vehicles:two_white_headlights
adv_vehicles:car_frame_material === adv_vehicles:steering_wheel === dye:blue
-------------------
***Volvo Bus***
2019-08-02 12:01:28 -07:00
Since 1.0.0-RC2.
-------------------
adv_vehicles:car_frame_material === adv_vehicles:tires_bunch === adv_vehicles:two_red_headlights
adv_vehicles:car_frame_material === adv_vehicles:diesel_ice === adv_vehicles:two_white_headlights
adv_vehicles:car_frame_material === adv_vehicles:steering_wheel === dye:yellow
2019-07-16 07:47:33 -07:00
-------------------
***Kamaz Truck***
2019-08-02 12:01:28 -07:00
Since 1.0.0-RC2.
-------------------
adv_vehicles:car_frame_material === adv_vehicles:tires_bunch === adv_vehicles:two_red_headlights
adv_vehicles:car_frame_material === adv_vehicles:diesel_ice === adv_vehicles:two_white_headlights
adv_vehicles:car_frame_material === adv_vehicles:steering_wheel === dye:white
-------------------
### Miscellaneous Stuff
***Tire***
2019-08-02 12:01:28 -07:00
An element that intended for crafting of *tires bunch*
-------------------
L/B plastic_sheet === L/B plastic_sheet === dye:dark_green
2019-08-20 11:26:11 -07:00
L/B plastic_sheet
-------------------
***Wheel***
2019-08-02 12:01:28 -07:00
2019-08-20 11:26:11 -07:00
An element for crafting of *wheels_bunch*.
-------------------
2019-08-20 11:26:11 -07:00
adv_vehicles:car_frame_material === default:steel_ingot
2019-08-20 11:26:11 -07:00
adv_vehicles:aluminium_dust === adv_vehicles:tire
-------------------
***Red Headlight***
2019-08-02 12:01:28 -07:00
Back car headlight. Crafted from seven *red_leds*, one *plastic_sheet* and one *steel ingot*.
-------------------
adv_vehicles:red_led === adv_vehicles:red_led === adv_vehicles:red_led
adv_vehicles:red_led === L/B plastic_sheet === adv_vehicles:red_led
adv_vehicles:red_led === default:steel_ingot === adv_vehicles:red_led
-------------------
***White Headlight***
2019-08-02 12:01:28 -07:00
Front car headlight. Crafted from four *white leds*, one *plastic_sheet* and one *steel ingot*.
-------------------
adv_vehicles:white_led === adv_vehicles:white_led === adv_vehicles:white_led
adv_vehicles:white_led === L/B plastic_sheet === adv_vehicles:white_led
adv_vehicles:white_led === default:steel_ingot === adv_vehicles:white_led
-------------------