Space Engineers

Space Engineers

EasyMenu
56 Comments
DasKrusty Mar 26, 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 Jan 11, 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 Nov 9, 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] Nov 7, 2018 @ 4:43pm 
@Izidore, the latest version of this script now works. I also fixed the demo world.
rockyjvec  [author] Nov 7, 2018 @ 2:09pm 
I just fixed the script this is based on. I'll take a look at this one soon.
Izidore Nov 7, 2018 @ 4:00am 
I'm guessing this is now dead(?) Anybody know of similar scripts?
Izidore Oct 18, 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] Jan 26, 2018 @ 1:18am 
Fixed.
Tiro Jan 18, 2018 @ 2:11pm 
will this ever be fixed? or can someone recomend one that works?
SpaceCat Jul 9, 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 Apr 22, 2016 @ 9:26am 
Ohh yeah, thats what iw been looking for! Thank you for sharing it.
Vaagventje Feb 28, 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 Feb 28, 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] Feb 27, 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 Feb 27, 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 Feb 27, 2016 @ 2:34pm 
Thank you rockyjvec, that is even better, ty very much :D
rockyjvec  [author] Feb 27, 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 Feb 27, 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] Feb 27, 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 Feb 27, 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 Feb 27, 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] Feb 26, 2016 @ 9:35pm 
The last update broke the script. I just fixed the tutorial world. It should work now.
Vaagventje Feb 26, 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 Jan 25, 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 Jan 25, 2016 @ 10:31am 
Oh, figured it out)
The button panel in the world has "Noone" privatship so arguments just simly didn't work.
Riverey Jan 25, 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 Dec 12, 2015 @ 10:44am 
Great job! Thanks a lot!
rockyjvec  [author] Dec 12, 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] Dec 11, 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 Dec 11, 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] Dec 4, 2015 @ 8:22pm 
I just tested again after todays update. Still not fixed :-(. I might have to just rewrite my script.
Riverey Dec 3, 2015 @ 3:37pm 
Hey!
How is it going with this bug?
Riverey Oct 30, 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] Oct 29, 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 Oct 29, 2015 @ 3:57pm 
@rockyjvec hey!
How is it going?)
Riverey Oct 4, 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] Oct 4, 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 Sep 5, 2015 @ 11:21am 
@{CC} Lethegrin does it work now?
Riverey Sep 5, 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 Aug 17, 2015 @ 12:18pm 
It seems your EasyAPI is updated, but your Easy Menu isn't....
Zacknetic Aug 17, 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 Aug 17, 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] Jul 18, 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] Jun 8, 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 Jun 8, 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] Jun 7, 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 Jun 7, 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] Jun 7, 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 Jun 7, 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 May 14, 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).