Space Engineers

Space Engineers

EasyMenu
56 Comments
DasKrusty 26 Mar, 2019 @ 5:06pm 
@ rockyjvec - is this script still running? would like to use it on my vessels, do i still have to use a timer?
Emiricol4Rl 11 Jan, 2019 @ 1:16pm 
I am so glad I found your Easy(X) series! I'm daydreaming of writing actual mods that actually work for my campaign I'm building, and can't wait to try it out! Lol.
Izidore 9 Nov, 2018 @ 4:05pm 
@Rocky. Thanks so much. Sorry for the late reply but I was out of town. I did not mean for my post asking if this was a 'dead' script to be negative. I just know that folks move on to other games and lose interest in SE. Thanks for sticking with it and I appreciate your work.
rockyjvec  [author] 7 Nov, 2018 @ 4:43pm 
@Izidore, the latest version of this script now works. I also fixed the demo world.
rockyjvec  [author] 7 Nov, 2018 @ 2:09pm 
I just fixed the script this is based on. I'll take a look at this one soon.
Izidore 7 Nov, 2018 @ 4:00am 
I'm guessing this is now dead(?) Anybody know of similar scripts?
Izidore 18 Oct, 2018 @ 9:10am 
This is exactly what I have been looking for but unfortunately it is broken. (as are all of the other Menu scripts I have found, it seems) Keeps throwing an error: "The type or member 'string MyObjectBuilder_Base.SubtypeName' is prohibited.'"
I would be eternally greatful if you could find the time, energy and desire to fix this.
rockyjvec  [author] 26 Jan, 2018 @ 1:18am 
Fixed.
Tiro 18 Jan, 2018 @ 2:11pm 
will this ever be fixed? or can someone recomend one that works?
SpaceCat 9 Jul, 2016 @ 5:46am 
Looks great, however doesnt work with latest dev build.
I used the github src and the error is something about 'icomparable'
MJ Koss 22 Apr, 2016 @ 9:26am 
Ohh yeah, thats what iw been looking for! Thank you for sharing it.
Vaagventje 28 Feb, 2016 @ 7:57am 
Oke ignore my last message. this was my fault. as i said in my message i was coping it from the workshop, ones it did it from github directly it worked. sorry my bad. ty for the patience and help, much appreciated . and ty for the awesome script
Vaagventje 28 Feb, 2016 @ 7:33am 
i cant get it to work. if loaded your test world again now for the 3th time to make sure it was updated but didnt work, i pulled your script about 5 new times from the workshop fresh. but now mater how i copy it in it keep returning me with the same error that it cant compare.
when you say copy example? you do mean eveyrthing up until "advanced users only" or up until getblocks? i dont fully understand anymore what i can be doing wrong. i even copied it piece by piece seeying if it would change. iam totaly clueless atm
rockyjvec  [author] 27 Feb, 2016 @ 9:21pm 
@Vaagventje, try loading the latest version of the easy menu script, then replacing the Example class with the one in the advanced example. I forgot to tell you that I had to make some changes to that script for the advanced script to work again. An old update must have broken it. If you load the latest version of the EasyMenu script, then copy over the example, it should work.
Vaagventje 27 Feb, 2016 @ 3:35pm 
ello again, it tells me "Caught exception during execution of script: failed to compare two elements in the array."

this is when i replace the menu with the ship explorer module. it does load up the lcd, it show me the Basic >Actions< but then the script stops with the exception.

i did load the test world again since i did some adding and removing block to make sure i was back at the basic. but still came up. did i miss something?
Vaagventje 27 Feb, 2016 @ 2:34pm 
Thank you rockyjvec, that is even better, ty very much :D
rockyjvec  [author] 27 Feb, 2016 @ 1:05pm 
@Vaagventje, nevermind, I fixed it so it works if you just copy and paste it over the Example class in the demo world. I wrote the old version before they added arguments. Just copy the new version from here: https://raw.githubusercontent.com/rockyjvec/EasyAPI/master/modules/EasyMenu/examples/ShipExplorer.cs
Vaagventje 27 Feb, 2016 @ 11:35am 
thank you thank you, aannnnnd.... that makes more sense and is easier then i was trying, i was trying to "jerry rig" the toggledoor to see all doors.(and seeying this makes me understand how silly my attempt was). uhhm with requires a timer. you mean it needs the "menutimer" setup to run script+trigger? or do i actually need to set up a timer to run the script a *sec interfal?
ty again for taking the time to explain :D
rockyjvec  [author] 27 Feb, 2016 @ 11:01am 
@Vaagventje,

The source for my ship explorer example is here: https://raw.githubusercontent.com/rockyjvec/EasyAPI/master/modules/EasyMenu/examples/ShipExplorer.cs

It's a little old so it still requires a timer block.

For closing all doors you could do something like this:

Add the following to your menu wherever you want it. I did it right above the Do Nothing menu item:

new EasyMenuItem("Toggle all doors", toggleDoors),

Finally, add the toggleDoors function. I added it right before the toggleDoor function:

public bool toggleDoors(EasyMenuItem item)
{
Blocks.ApplyAction("Open"); // equivalent to EasyCommand Blocks ApplyAction Open

return false;
}
Vaagventje 27 Feb, 2016 @ 10:20am 
uhhm 2nd question, sorry i really like this script but understanding is a 2nd..
uhhm do you have a link to your ship explorer script? i saw it in the vid en in the documentation.
but i cant seem to find it on your githud :(
it looks awesome.
Vaagventje 27 Feb, 2016 @ 9:54am 
it indeed work ty for the quick fix. awsome, and uhhm... question i just cant seem to understand what iam trying to do, maybe you can help :D
lets keep your test world as a mutual example.
iam trying to get to add a ""EasyCommand Blocks ApplyAction Open" but as a single menu item.
iam not that good with csharp, so its baveling me. i managed to add refineries. add more door. etc etc. but a simple close open all doors eludes me..
could you give me a example or quick guidelines on how to program it. me and my ship would be deeply apreciative :D

ofc if you want i could show you the finished product when its done.
rockyjvec  [author] 26 Feb, 2016 @ 9:35pm 
The last update broke the script. I just fixed the tutorial world. It should work now.
Vaagventje 26 Feb, 2016 @ 6:48pm 
Hello, your tutorial world returns me with this error:http://i.imgur.com/EWvEXLN.jpg
any idea on what i need to do to fix it? :|
Riverey 25 Jan, 2016 @ 11:42am 
... And it gives me error about complexity of the script.
Can it be because i hafe a lot of lcd's on the ship?
I have only commands related to the display of the menu itself.
Riverey 25 Jan, 2016 @ 10:31am 
Oh, figured it out)
The button panel in the world has "Noone" privatship so arguments just simly didn't work.
Riverey 25 Jan, 2016 @ 10:27am 
@rockyjvec hey again!
Have you updated the tutorial as well? Because I didn't found any information about how the Menu works without changing timer delay but with programming block arguments (as it is now in the test world)
Zacknetic 12 Dec, 2015 @ 10:44am 
Great job! Thanks a lot!
rockyjvec  [author] 12 Dec, 2015 @ 12:25am 
@Riverey and all. Thank you for your patience. I finally gave up waiting for a fix of the bug and decided to rewrite the affected parts of my scripts. The end result is that this script is now working again! I added a demo world in the description above which has a working menu. Let me know if you need any help. Thanks again for your patience.
rockyjvec  [author] 11 Dec, 2015 @ 11:09pm 
The update broke Easy API so the latest version won't fix it. I'm working on fixing easy api so it will work around the bug.
Zacknetic 11 Dec, 2015 @ 1:22pm 
I managed to get it working after the update that killed it by copying in your updated easy API and adding all the easy menu elements to it. Does that not work anymore? Perhaps I should find the script...
rockyjvec  [author] 4 Dec, 2015 @ 8:22pm 
I just tested again after todays update. Still not fixed :-(. I might have to just rewrite my script.
Riverey 3 Dec, 2015 @ 3:37pm 
Hey!
How is it going with this bug?
Riverey 30 Oct, 2015 @ 1:50am 
@rockyjvec oh, ok, no problem)
I know how it happens since it's not only scripts that stopped to work after last update...
rockyjvec  [author] 29 Oct, 2015 @ 4:20pm 
@Riverey,

Sorry, a bug was introduced in the Space Engineers API which broke almost all of my scripts. They have been working on fixing the bug but it is not fixed yet. We'll see if today's update fixes it. As soon as it's fixed I will make the changes to fix the menu script. Basically no generic classses work anymore since the bug was introduced. I've been testing it every update to see if it has is fixed.
Riverey 29 Oct, 2015 @ 3:57pm 
@rockyjvec hey!
How is it going?)
Riverey 4 Oct, 2015 @ 1:23pm 
Hi, @rockyjvec!
Thanks for answering=)
I sent you a friend request because I have a cool small-ship-gone-wild project that is friends-only for now and wanted to show it to you and ask for advice, if you don't mind.
rockyjvec  [author] 4 Oct, 2015 @ 1:12pm 
@Riverey, @{CC} Lethegrin, Hi guys, sorry, I've been away for a while. I believe the problem is simply an old version of EasyAPI is used in the example for this script. I'll try to fix it in the next couple days. Also, the latest SE update broke many scripts including EasyAPI so until that is fixed it won't work. Once that is fixed, if you follow the tutorial and use the version of EasyAPI from github it should work.
Riverey 5 Sep, 2015 @ 11:21am 
@{CC} Lethegrin does it work now?
Riverey 5 Sep, 2015 @ 11:20am 
Hi, @rockyjvec!
What is the status of the script now?
I really want to implement it to my next small-ship-gone-wild build.
Zacknetic 17 Aug, 2015 @ 12:18pm 
It seems your EasyAPI is updated, but your Easy Menu isn't....
Zacknetic 17 Aug, 2015 @ 11:16am 
Managed to fix "Blocks" by replacing " Blocks = new EasyBlocks(GridTerminalSystem.Blocks); " with "var Blocks = new List<IMyTerminalBlock>();
GridTerminalSystem.GetBlocks(Blocks);" Having trouble with block groups however.
Zacknetic 17 Aug, 2015 @ 4:28am 
Hey, getting an error while trying to compile the script.


"sandbox.modapi.ingame.imygridterminalsystem does notcontain a definition for 'blocks' and no extension method 'blocks' accepting a first argument of type sandbox.modapi.ingame. imygridterminalsystem could not be found, are you missing a using directive or an assembly reference?"

Any idea what to do?
rockyjvec  [author] 18 Jul, 2015 @ 1:21pm 
There was a bug in the EasyAPI code which caused the responsive problems I mentioned below. Someone fixed it so with the latest version of EasyAPI updating the menu with a timer works great!
rockyjvec  [author] 8 Jun, 2015 @ 10:31pm 
@Suicide_Jack, yes, you can trigger the doUpdates() function from a timer block to update the menu statuses. The problem I had when I tried that is the timer calls would overwrite the parameter of the button ones so the menu wasn't as responsive. That was a few days after they released the parameters feature so maybe they have fixed that issue by now. No, you shouldn't need ram/the values of the timer block. You could just have a "refresh" parameter in the timer block and have it run just the doUpdates function like the Up/Down... etc. ones do.
Suicide_Jack 8 Jun, 2015 @ 12:28am 
wouldn´t running the script via timer without parameters just update the status?

or do you need a ram like the values of the timer to work like that?
rockyjvec  [author] 7 Jun, 2015 @ 5:25pm 
@phuckthisstupidnamebullsh!t, no this script just creates the menu. However, it just returns a string containing the menu which you could use with another script to span lcds. I have planned to make something like that but I haven't gotten around to it yet.
Professor Nipples 7 Jun, 2015 @ 2:26pm 
Great looking script! Going to check it out tonight. Quick question...possible to make it link LCDs to make a larger display?
rockyjvec  [author] 7 Jun, 2015 @ 12:26pm 
@Suicide_Jack, yes, I actually already have example code for this. Take a look at this: https://github.com/rockyjvec/EasyAPI/blob/master/modules/EasyMenu/examples/Example2.cs It's basically the same example as in my tutorial but using the new parameters feature. The problem with using parameters instead of a timer is that the menu only updates when one of the actions (Up, Down, Choose, Back") are run. This means the door statuses don't update correctly. I haven't figured out a good fix for this yet. It may not affect you if you aren't using it for statuses like the example.

Oh yeah, and to use it, just put "Up", "Down", "Choose", and "Back" for the parameters in the PB. You will also need to copy the latest version of EasyAPI to the end of that script which you can get here: https://raw.githubusercontent.com/rockyjvec/EasyAPI/master/EasyAPI.cs (copy it starting at the "Advanced users only beyond this point" line)
Suicide_Jack 7 Jun, 2015 @ 12:18pm 
hi rockyjvec,

this script is a work of art. Thanks for this.

i have very little coding experience but i have have managed to run your script without a problem.

But i have a question/suggestion:

since we can now give parameters when running the PB, is it posible to let the script run with parameters like "up", "down", "enter" and "back" instead of changing values on the TB?

i believe that would make things a bit easier to setup and more user friendly.
kortikal 14 May, 2015 @ 1:09pm 
Wow awesome, the only negative thing: it is hard to do. But the result is awesome (Combined with automatic LCD,auto airlock: wow).