Rotation Limits [1.1] [spaar`s Mod Loader]

spaar

Active Member
#1
Hey there!

This mod allows you to set limits on the rotation of steering hinges, hinges and steering blocks. By default, it will limit them to 90 degrees in either direction.
You can change that with the console commands available:
Use the console command "enableRotationLimits" to enable the limits, "disableRotationLimits" to disable all limits and "setRotationLimits" to set them to a specifc value.
"setRotationLimits" usage: "setRotationLimits <steering|hinge|steeringHinge> <limit1> <limit2>". Use the first parameter to specify what limits you want to set. <limit1> and <limit2> are the limits in either direction respectively.

Since version 1.1 limits are also saved across restarts, although not with the machine but as global values.

Additionally, be carefule when changing limits while in the simulation. If you set the limit to lower than where a hinge currently is, it will suddenly snap back to the limit, potentially breaking your machine.

The mod requires spaar's Mod Loader in at least version 1.0.0-beta1 (Make sure you don't use current non-beta versions, like 0.3.2) Installation is as simple as with any mods for that loader, just drop RotationLimits.dll into your Mods folder.

I hope that you find this useful, if you have any questions, let me know on the forums!

Changelog:
1.1
-Add Steering blocks and Hinges
-Save limits across restarts

1.0
-Initial release

Attached Files
RotationLimits.dll
 
#3
any chance of this having the ability to be implemented for unpowered hinges as well? Some of my machines that use pistons primarily would benefit from that a lot.
 

spaar

Active Member
#4
Prevenge said:
any chance of this having the ability to be implemented for unpowered hinges as well? Some of my machines that use pistons primarily would benefit from that a lot.
Possibly. I'll take a look at that later this week.
 

spaar

Active Member
#6
Phantom329 said:
Can you add this for steering blocks as well? Maybe you could even have two different values since they are different blocks.
I'll see what I can do.
Also, sorry to everybody who was interested for never coming back on the unpowered hinges, some other stuff kept me from working on this. I'll look into that again as well.
 

spaar

Active Member
#7
I finally released an update! Again, sorry it took so long, but here it is at last.
It requires the 1.0.0(-beta) version of the mod loader, but it supports saving the limits now, as well as setting limits for Hinges and Steering blocks in addition to Steering Hinges!
 
#8
Setrotationlimits now requires a block number, which numbers do i use? Edit: According to the new Multimod, it should be 28 for the steering hinge, 7 for the Hinge and 1 for the steering block, but that doesn't work. I enter "SetRotationlimits 28 45 45" and he says it was successful, but nothing changes, it stays at 90

Also I think this would be much nicer if I was able to set the limits for individual blocks in the block settings like in the old Multimod, cause I need my front wheel steering to have a 45° limit, but the steering block of my turret should rotate 360°
 

spaar

Active Member
#9
Steamzombie said:
Setrotationlimits now requires a block number, which numbers do i use? Edit: According to the new Multimod, it should be 28 for the steering hinge, 7 for the Hinge and 1 for the steering block, but that doesn't work. I enter "SetRotationlimits 28 45 45" and he says it was successful, but nothing changes, it stays at 90
Sorry, I though I mentioned this in the post but apparently I forgot. You don't need to specify a number, but one of "hinge" "steeringHinge" or "steering". If one of those names is wrong I aplogize in advance, I'm writing them from memory. They should work though.

EDIT: I just found out I did actually include them in the forum post. However I put them in angle brackets and that made the forum remove them. I thought the text looked weirdly incomplete.

Steamzombie said:
Also I think this would be much nicer if I was able to set the limits for individual blocks in the block settings like in the old Multimod, cause I need my front wheel steering to have a 45° limit, but the steering block of my turret should rotate 360°
This would be nicer indeed. I'll see if I can do it, I have an idea that might work.
 

spaar

Active Member
#13
kreepdaboom said:
wait, is this for besiege v0.11 or what?
Yes, it should work fine with Besiege v0.11.

kreepdaboom said:
how do u type stuff in the console
You can open the console by pressing Ctrl+K and then you can type in the input field at the bottom of the window that pops up, after clicking into it, just like with any other text box on your computer.
 
#14
If I posted a machine utilizing this to the workshop, would the mod be required by the users in order for the setting to take effect? I'm assuming the answer is yes.
 

spaar

Active Member
#15
Eldael said:
If I posted a machine utilizing this to the workshop, would the mod be required by the users in order for the setting to take effect? I'm assuming the answer is yes.
It would indeed require the mod. However the mod isn't actually capable of saving the limits in a machine file, so the limits wouldn't actually be the same for people who download the machine, they'd have to set them manually.
 
#16
I can't get this to work. Enabling rotation limits makes steering blocks and hinges sop at 90º, but when I change the limits like setrotationlimits steeringhinge 45 45, the block becomes stuck at 45 degrees and it doesn't move. Using the block number (28 for steering hinge IIRC) doesn't work either. I'm using the latest modloader

Man this feature was so simple and convenient back in the 0.05 Multimod
 

spaar

Active Member
#17
chester100 said:
I can't get this to work. Enabling rotation limits makes steering blocks and hinges sop at 90º, but when I change the limits like setrotationlimits steeringhinge 45 45, the block becomes stuck at 45 degrees and it doesn't move. Using the block number (28 for steering hinge IIRC) doesn't work either. I'm using the latest modloader

Man this feature was so simple and convenient back in the 0.05 Multimod
If you set both angles to 45, it will always lock in one place. You would need to use -45 and 45 to set the first limit to 45 degrees in the opposite direction.
 
#19
Maybe it's just my computer being crappy, but when using this mod, the game becomes really laggy in the build screen when rotation limits are enabled and there are steering blocks or hinges present in the machine. Framerate is good during the simulation, but the lag in build mode can make the game unplayable unless I remove all the steering-related stuff.

Using it in 0.11
 

spaar

Active Member
#20
chester100 said:
Maybe it's just my computer being crappy, but when using this mod, the game becomes really laggy in the build screen when rotation limits are enabled and there are steering blocks or hinges present in the machine. Framerate is good during the simulation, but the lag in build mode can make the game unplayable unless I remove all the steering-related stuff.

Using it in 0.11
Hm, I'll look into this.
 
Top