Besiege

Besiege

53 arvostelua
Lua Scripting Mod
3
   
Palkinto
Lisää suosikkeihin
Lisätty suosikkeihin
Poista suosikeista
Tiedostokoko
Julkaistu
Päivitetty
1.099 MB
4.2.2021 klo 0.09
27.7.2021 klo 4.59
41 muutosilmoitusta ( näytä )

Tilaa ladataksesi
Lua Scripting Mod

Kuvaus

What is this mod?
This mod allows you to create really cool machines using in-game Lua scripting with multiplayer and other mod support.

Join Besiege official discord server, there are so few members who plays with Lua mod. I`ll be waiting for you.

Main features at this stage of development
  • Almost full multiplayer support.
  • Key emulation.
  • Changing slider values in simulation.
  • Setting steering angle.
  • Module system for using same scripts for different machine parts.
  • Handling and writing chat messages.
  • Getting information about level entities (soldiers etc.).
  • Getting info of specified block of specified player such as position, velocity, rotation and so on.
  • Getting info of machine of specified player.
  • Creating GUIs based on Unity3D GUIs.
  • Raycasting, sphere overlapping and more.
  • Handling input from mouse, keyboard, joysticks.
  • Other usefuls things like screen info, FPS cursor mode and so on.
  • Documentation[github.com] provided.
  • Scripting examples provided.
  • In-game scripting, no need to compile, rejoin or restart.

How to start?

  1. Press Ctrl+L in building mode.
  2. See documentation.
  3. Download some examples.
  4. Press "Open LuaRoot folder".
  5. Open "main.lua" with some nice code editor.
  6. Examine it.
  7. Create!

Examples
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2558577515
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2396766820
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2393945683
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2383786648
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2383799572
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2383802295
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2383834423

Warning
Mod still in development and can contains a lot of bugs, but i will try to fix them as soon as they appear.
121 kommenttia
ilyshk4  [tekijä] 26.7. klo 10.53 
I feel like its not related to the mod itself, but how the Unity game engine handles gamepad/joystick input. You can try and google for the correct axes names.
Neanod 26.7. klo 5.00 
I encountered a problem when connecting a gamepad: the script via input.get_key() sees pressing some digital buttons (for example, Joystick8Button9), but input.get_axis_raw() does not read the main axes of the sticks and triggers. I tried all possible options (JoystickAxis1-28, Joystick1Axis1, etc.), but they are not registered.

Please tell me if there is a known limitation of the mod, or am I doing something wrong?
ilyshk4  [tekijä] 2.6. klo 7.47 
It depends on how game develoeprs implemented the block, sometimes they precalculate values and save them so changing the source variables like rocket power doesnt affect the rocket
Neanod 31.5. klo 18.41 
Very good mod for programmers and war crimes lovers. For some reason, after ignition you cant edit rocket power, but everything else is ok.
Antarctic_Singularity 9.11.2024 klo 11.27 
truposjigatel Certain values you can't change while the simulation is running, not sure if the ones you mentioned are unchangable but that might be why it's not working.
truposjigatel 9.11.2024 klo 7.49 
У клиента не работает set_slider('speed',..) для колес и вращающихся блоков. При этом у сервера все ок - тот же скрипт, та же техника - колеса крутятся без проблем. Было раньше такое или это после обновы бесиджа? Что можно поделать? Ошибок никаких не выдает.
孩子们我回来了 4.6.2024 klo 4.18 
support message simulate please. and new DLC blocks
ilyshk4  [tekijä] 21.1.2024 klo 0.53 
Some blocks do not support changing its speed during simulation.
To detect presses on xbox controller you have to use input.get_key_down("JoystickButton0"). Joystick buttons are kind-of randomly mapped, so you have to google "unity xbox one controller mapping"
Antarctic_Singularity 2.12.2023 klo 19.38 
Or how to detect button presses on xbox controller?
Antarctic_Singularity 2.12.2023 klo 15.20 
Hi do flying blocks work with set speed slider? I tried yaw.set_slider("speed", 3) and using local yaw = machine.get_refs_control("yaw") but it is not working. Are they broken or am I doing it wrong : P