ACM - Advanced Controls Mod [Besiege v0.45]

#21
This mod is sweet! One idea that could make it better would be if you could control an item (wheel or steering block) with multiple inputs acting on it. Like being able to add multiple input axis to a block than just one and/or having the original controls working as well with it. So if you wanted to change from controller back to keyboard you wouldn't have to change all the settings.

This would also open up the ability for machines to be simpler (cars/ tanks could have just 2 rows of wheels for total control, one each side e.g up arrow = all wheels forward, down arrow = all reverse and left arrow = one side all forwards + other side all reverse and right arrow vice versa. Previously 4 rows of wheels were needed to get the same control).
If there was a contradiction (e.g 2 inputs pressed acting on same device); if inputs were both the same (both telling it to go forward) then you could combine the speed of each for the one device and if inputs were different (one telling go forward, one going back), then cancel their speeds out.

I've been making quadcopters and hexacopters in besiege and if this was implemented then only 4 wheels total would be needed to get the same control as 12 (3 for each motor)

Keep up the good work man!
 

Lench

Active Member
#22
That's a great idea, but the problem is how to combine the values. That part tends to be very machine-specific. I'll see if I can figure out an elegant solution, meanwhile you can solve your problem in two ways:

Use input control and speed control simultaneously. For example, input control to up and down arrows in [-1, 0, 1] interval, and speed control to left and right in [-0.5, 1, 2.5] intervals, inverted for opposing sides. That way when you steer, one side wheel speeds will get inverted (-.5) and other will go faster (2.5) which will turn your tank. The center needs to stay at 1 so you can still drive straight.

The other way is programming your custom axis, if you know how to write some python code. You can do absolutely anything with it. There's an example above to get you started.
 

Lench

Active Member
#23
Small update v1.1.2
  • Fixed bug where control intervals were reset on opening the mapper.
  • Fixed bug where the same axes were saved multiple times.
 
#24
Could you maybe add an example on how to add a custom axis? I have no Idea How to write code.. And I'm not to sure how to use your example above. I'd really like to use both joysticks on my controller. (Joystick Axis 3 & 4)
Great Mod Though! The UI is really clean and Simple! Thanks!
 

Lench

Active Member
#25
Unfortunately there is no way to use other axis than the default vertical and horizontal ones you see in the controller axis window. I am working on it though and you can expect full controller support in a future update.

About using custom axis, I suggest you get familiar with Python basics first. There's a ton of good guides out there, but you can also message me if you need any help. I will be writing (recording?) a comprehensive guide on how the mod works and how to use all of it's features as soon as I have time. :)
 

Lench

Active Member
#26
Need help with testing input devices

Update to Besiege v0.3 with full controller support is mostly done.
Unfortunately, I cannot test a good variety of input devices as I only own one joystick.
That is why I need your help.

If you own a controller, joystick, steering wheel or any other game device and want to help,
send me a private message. This way I'll be able to support as many types of devices as possible
and you can make sure yours is one of them.
 
#27
Lench said:
Need help with testing input devices

Update to Besiege v0.3 with full controller support is mostly done.
Unfortunately, I cannot test a good variety of input devices as I only own one joystick.
That is why I need your help.

If you own a controller, joystick, steering wheel or any other game device and want to help,
send me a private message. This way I'll be able to support as many types of devices as possible
and you can make sure yours is one of them.
As soon as I can download the Spaars loader, I will test a Xbox 360 controller.
 

Lench

Active Member
#28
Update v1.2.0: Full controller support

New features include:
  • Full controller support
  • Chain axis
  • Camera control
  • Controller axis offset
  • Better GUI


Credits go to people who provided invaluable help with testing:
  • Y.Lachapelle
  • alphanerd132
  • JohnSawyer
  • Phantom329
 
#29
2 things, first, the axis picker doesn't show up for flying spirals. I could never make it work for the spirals in previous versions, but now it's not even there.

Second, what is the "joy buttons" in that screenshot and how to I get to it. Is there anyway to control non-axis stuff with a controller button? (or have the controller button press a keyboard key)
 

Lench

Active Member
#30
Flying spirals have been disabled on purpose. The way they work in the game doesn't allow me to control them in an effective way.

The 'joy buttons' example is a Standard Axis or Inertial Axis. These are simply two key axes.

You should be able to bind most joystick buttons with the game's button mapper already. The only exceptions are hats / d-pads and triggers, which actually work as axes.
 
#36
there is a bug where after a small amount of time the axis names change on the controller axis and the left trigger stops working correctly.
 

Lench

Active Member
#37
It seems that your controller mappings are incorrect. Go to Mods/Resources/AdvancedControls/GameControllerMappings.txt and find the line that defines your controller. You can be sure it's the one by comparing it's GUID to the one that gets printed to the console. Try deleting it or putting a # before it to see if it works.

Edit: Or you can just delete the whole file.
 
#39
D: what is this magic? This is amazing. How does the camera control work?

Also is this easily implementable in my scripts? (I guess I could make an unused hinge etc. that this mod controls and then read the axis value with hinge.GetAngle())

Also I'd personally prefer that when I set the maximum value to for example 90, the value would be at 90 when the axis is at its maximum, even with deadzone. I set my deadzone to 0.1 as the stick's rest position is not exactly at 0. So if I want my hinge to be at 90 degrees when the stick is fully moved, I now have to set the maximum angle to 90/0.9 = 100
 

Lench

Active Member
#40
GoofS said:
Also is this easily implementable in my scripts?
Apart from reading joystick input, this mod is nothing but a GUI for my scripting mod. All of these controls are easily implemented through scripts.
You can even use the custom axis in global scope to access your script's variables.

If you're talking about reading ACM axes in script, I'm writing an API for that right now.

GoofS said:
Also I'd personally prefer that when I set the maximum value to for example 90, the value would be at 90 when the axis is at its maximum, even with deadzone. I set my deadzone to 0.1 as the stick's rest position is not exactly at 0. So if I want my hinge to be at 90 degrees when the stick is fully moved, I now have to set the maximum angle to 90/0.9 = 100
Control maximum value will be set when axis value is 1, center when 0 and minimum when -1. It is up to you to configure your controller axis properly to reach these values. The mod cannot know in advance what range your controller can reach.

Also, deadzone is not the right tool to fix the rest position. Use the offset instead (drag the graph). Deadzone is intended for controllers with high jitter.

If you have trouble understanding how it works, I drew this a while ago. I hope you like my MS Paint skills.
 
Top