Custom Rotation Amount [Besiege 2.0+]

ITR

l̺̤͈̘̰̺͉̳͉̖̝̱̻̠̦͈ͅ֍̫̜̥̭͖̱̟̟͉͙̜̰ͅl̺̤͈̘̰̺͉̳͉̖̝̱̻̠̦͈ͅ
Staff member
#1
Well, as the title says, this is what it is.
Edit the text field to change the rotation amount.

The textfield can be hid with "q", but you can change this in "RotateSettings.txt", in the same folder as the Besiege Executeable (http://docs.unity3d.com/ScriptRefere...-dataPath.html)

Install by putting in Spaar's "Mods" folder

Not comp with bmgui atm
This mod is compatible with the BetterGUI mod, but it's not needed: http://forum.spiderlinggames.co.uk/f...e-get-rekt-mod

Attached Files
Rotate.dll
 
#2
I have yet to try it out but i am gonna go ahead and thank you for helping fill the void an outdated multimod has left in my heart.
 

ITR

l̺̤͈̘̰̺͉̳͉̖̝̱̻̠̦͈ͅ֍̫̜̥̭͖̱̟̟͉͙̜̰ͅl̺̤͈̘̰̺͉̳͉̖̝̱̻̠̦͈ͅ
Staff member
#3
Prevenge said:
I have yet to try it out but i am gonna go ahead and thank you for helping fill the void an outdated multimod has left in my heart.
Well, I feel kinda bad for not updating the Precision Building mod, and since multimod might not get updated in a while I thought I should make this, so that people won't have to wait long after each update
 
#6
It would be absolutely glorious if the prominent modders in besiege could collaborate on something like Multimod or Precision...I know Cysto said he wasnt gonna be able to work on it for a while and the whine-level was fairly high after the last Besiege patch came out with no Multimod update in sight. I contemplated trying to find a "Unity modding for dummies" book or something myself lol. But , again, I am happy there are others willing to do things at their own expense.
 

ITR

l̺̤͈̘̰̺͉̳͉̖̝̱̻̠̦͈ͅ֍̫̜̥̭͖̱̟̟͉͙̜̰ͅl̺̤͈̘̰̺͉̳͉̖̝̱̻̠̦͈ͅ
Staff member
#7
unstoppablecarl said:
Your link to the BetterGUI mod is broken.
Thanks, fixed now
 

ITR

l̺̤͈̘̰̺͉̳͉̖̝̱̻̠̦͈ͅ֍̫̜̥̭͖̱̟̟͉͙̜̰ͅl̺̤͈̘̰̺͉̳͉̖̝̱̻̠̦͈ͅ
Staff member
#8
unstoppablecarl said:
Seems to only want to rotate 45 deg unless I add a letter to it like "22,r5". I am on osx I don't know if this matters.
Have you tried using '.' instead of ','? I'm not completely sure how it parses strings to float yet.

Also, it should do 22.5 if there are letters in it (or if it's empty), are you completely sure that it's 45?
 

NickLD

New Member
#9
Hey ITR, I think I know whats causing the error. Float.Parse handles things differently on different OS's unless you make it culture independent. just make your Float.Parse line like this:

float.Parse(string2befloat, CultureInfo.InvariantCulture.NumberFormat);

that should solve the issue I think.

Here is some MSDN information that helped me solve a similar problem to this one using CultureInfo.InvariantCulture.NumberFormat: https://msdn.microsoft.com/en-us/li...n.cultureinfo.invariantculture(v=vs.110).aspx
 

ITR

l̺̤͈̘̰̺͉̳͉̖̝̱̻̠̦͈ͅ֍̫̜̥̭͖̱̟̟͉͙̜̰ͅl̺̤͈̘̰̺͉̳͉̖̝̱̻̠̦͈ͅ
Staff member
#10
Yeah, I think I read about that once, but I want unstoppable's feedback so I know if that's actually the problem or if it might be caused by something else
 

ITR

l̺̤͈̘̰̺͉̳͉̖̝̱̻̠̦͈ͅ֍̫̜̥̭͖̱̟̟͉͙̜̰ͅl̺̤͈̘̰̺͉̳͉̖̝̱̻̠̦͈ͅ
Staff member
#11
Okay, format errors and BetterModGUI glitch should be fixed :/
 

ITR

l̺̤͈̘̰̺͉̳͉̖̝̱̻̠̦͈ͅ֍̫̜̥̭͖̱̟̟͉͙̜̰ͅl̺̤͈̘̰̺͉̳͉̖̝̱̻̠̦͈ͅ
Staff member
#13
unstoppablecarl said:
Everything is working as expected now thanks for the update.
Okay, great, was getting really worried with obvious errors that should have appeared when I tested earlier suddenly appeared.
 

ITR

l̺̤͈̘̰̺͉̳͉̖̝̱̻̠̦͈ͅ֍̫̜̥̭͖̱̟̟͉͙̜̰ͅl̺̤͈̘̰̺͉̳͉̖̝̱̻̠̦͈ͅ
Staff member
#15
vovavalter said:
I tried the mod out but when I type somehting in the text field the blocks still wont rotate can you please help me
What happens when you press r? Can you click ctrl+K and see if an error message pops up?
 
#16
Is this compatible with spaar's loader v0.2?
I get the following error:
Code:
[Log] Could not load Rotate.dll:
[Exception] ReflectionTypeLoadException: The classes in the module cannot be loaded.
System.Reflection.Assembly.GetTypes ()
spaar.ModLoader.Start ()
UnityEngine.Debug:LogException(Exception)
spaar.ModLoader:Start()
 

spaar

Active Member
#18
Looks like the optional integration with the BetterGUI mod is the problem. For the new way of loading the mod loader gets a list of all types in the assembly (the GetTypes() call above) which fails when it tried to load a type that uses the BetterModGUI class. I'm not sure how this should best be handled... I could probably add a work-around in the mod loader but not if ITR plans to use the new way of loading with this.... and the old one will be removed at some point, so that's not really optional.

For now, the workaround is to also install the BetterGUI mod, it should work then.
 

ITR

l̺̤͈̘̰̺͉̳͉̖̝̱̻̠̦͈ͅ֍̫̜̥̭͖̱̟̟͉͙̜̰ͅl̺̤͈̘̰̺͉̳͉̖̝̱̻̠̦͈ͅ
Staff member
#19
spaar said:
Looks like the optional integration with the BetterGUI mod is the problem. For the new way of loading the mod loader gets a list of all types in the assembly (the GetTypes() call above) which fails when it tried to load a type that uses the BetterModGUI class. I'm not sure how this should best be handled... I could probably add a work-around in the mod loader but not if ITR plans to use the new way of loading with this.... and the old one will be removed at some point, so that's not really optional.

For now, the workaround is to also install the BetterGUI mod, it should work then.
stellHex suggested using something like this:
Code:
public class SomeModGUIWithoutMod : MonoBehaviour{ public SomeMod someMod; void Start() { someMod = gameObject.AddComponent<SomeMod>(); } bool checkNoGUIMod() {return false;} void onModCheck() { } void Update(){ if (checkNoGUIMod()) {onModCheck();} else {doSomeStuff();} } } public class SomeModGUIWithMod : SomeModGUI{ public BetterModGUI betterModGUI; bool checkNoGUIMod() {return !betterModGUI;} void onModCheck() {betterModGUI = gameObject.GetComponent<BetterModGUI>();} }
Will that also not work for the new version?
 

spaar

Active Member
#20
I'm not sure if I'm reading this correctly (no line-breaks ;) ) but I don't think it would unfortunately.
The new way of loading requires all types to be loaded from the dll which normally isn't a problem, but as soon as the assembly contains some type that references the BetterModGUI class and that isn't present, the above exception is thrown.
 
Top