Space Engineers

Space Engineers

Does NOT WORK! Suit Energy Manager [Prox]
42 件のコメント
Jace ∅ Ethaniel 2019年1月7日 0時17分 
I wonder why modders haven't made Backup Batteries for suits yet. Perhaps the API doesn't give access to the needed bits of code?...
Proximo  [作成者] 2016年1月26日 12時55分 
Sorry to hear that, in this case i add this new information to the name of this mod. You are free to use/use parts/change this mod if you find it more useful that way. But i have currently no time to fix this mod.
Visentinel 2016年1月24日 18時16分 
this script no longer can compile after recent changes to the scripting system
Wolfebane 2015年8月27日 14時32分 
Now some one just needs to make a freaking umbilical mod or at the very least use the coding for the O2 bottles and make something for suit energy.
Proximo  [作成者] 2015年5月14日 11時34分 
I will add audio warnings as soon as i install this game again.
J0K3R6397 2015年5月9日 21時44分 
I cant seem to add spaces to my warning messages. any help on this? Also, can you implement a sound play feature when warnings are displayed?

Thanks
Proximo  [作成者] 2015年4月26日 17時25分 
Thank you ;)
Ah Whole Lotta Lumps 2015年4月19日 10時41分 
PROXIMO YOU ARE A GUARDIAN ANGEL :)
merath 2015年4月19日 7時52分 
it work wonderfuly i love it altho iagee somesort of soudnwouldhel cus i dontalwes see the reten warning cin mi mostly vlind i ushly notes by aout 10 % so ithas saved me
thanks forthe nice script
McyD 2015年1月29日 16時58分 
Seems to be working fine, Though it would be nice to get sounds with the added warning messages, even if it was just a vanilla one, or even a few beeps.
Proximo  [作成者] 2015年1月9日 13時03分 
It's a very old script and i have not changed it in a very long time. If it's not working any longer, please tell me. I will than install space engineers again and fix it.
Palindine 2015年1月9日 0時54分 
is this script still working?
Vip3rGER 2014年10月21日 19時23分 
Nice, it*s work.
Proximo  [作成者] 2014年10月20日 14時26分 
It's working again

@Geneticus
It's a good idea, but it's not the problem at all.

To get the User-Object i have to call "GetObjectBuilder" on the entity, and the entity is just an interface-object. The only way to check if that works is simply to try it. And if its impossible, the application it will rise an exception.
So my quickfix is to just try/catch the error that happens. And yes, thats uggly, but it works...
Geneticus 2014年10月20日 2時36分 
How about a wait state while controlled entity != Player ?
Proximo  [作成者] 2014年10月19日 14時44分 
I understand now. The ControlledEntity is the ship, after you enter a cockpit. That means that i try to get the property "Energy" of the ship, but there is no property with that name available, because it is a ship. But the main problem is that i can not longer access the "player"-character, only the "thing" he currently controlles. I am sure there is another way but for the moment my script is broken, i am sorry about that, i will try to find another way soon.
Nathan 2014年10月19日 10時44分 
aianstant crash, yep.
Dark 2014年10月19日 3時27分 
Instant crash as soon as I enter small ship cockpit.
Conditions: hosting multiplayer game, bunch of other mods.

Exception occured: System.NullReferenceException: Object reference not set to an instance of an object.
at 5BCAC68007431E61367F5B2CF24E2D6F.F6DF01EE4159339113BB9650DEEE1913.GetObjectBuilder(Boolean A5DC70F106B952A1255F4B70E35F9DCD)
at ProxSpaceEngineers.ProxEnergyWarner.UpdateAfterSimulation100()
at ProxSpaceEngineers.ProxEnergyWarner.UpdateAfterSimulation()
at AAC05F537A6F0F6775339593FBDFC564.D580AE7552E79DAB03A3D64B1F7B67F9.F672BBF9E192151CE8FD7E91E62B997D()
at AAC05F537A6F0F6775339593FBDFC564.D580AE7552E79DAB03A3D64B1F7B67F9.EC90B1C44E3C361983D093F355FF0CC8(MyTimeSpan 9916A9BA14FB0BB1A36908E2E8C15A74)
Proximo  [作成者] 2014年10月18日 4時17分 
I can not reproduce this error, but it could be because of the change i made (Controller could be nothing, that means ControlledEntity and Entity to...)
I tested it in a offline-sandbox. What are the testing conditions you have?
Geneticus 2014年10月17日 19時27分 
Application crash now :(
Exception occured: System.NullReferenceException: Object reference not set to an instance of an object.
at 5BCAC68007431E61367F5B2CF24E2D6F.F6DF01EE4159339113BB9650DEEE1913.GetObjectBuilder(Boolean A5DC70F106B952A1255F4B70E35F9DCD)
at ProxSpaceEngineers.ProxEnergyWarner.UpdateAfterSimulation100()
at ProxSpaceEngineers.ProxEnergyWarner.UpdateAfterSimulation()
at AAC05F537A6F0F6775339593FBDFC564.D580AE7552E79DAB03A3D64B1F7B67F9.F672BBF9E192151CE8FD7E91E62B997D()
Geneticus 2014年10月17日 19時20分 
Having said that, I do wish they would deprecate changes instead of breaking things constantly.
Geneticus 2014年10月17日 19時10分 
I can't make heads or tails of the API so far (mostly a time issue). I am an ASP/C#/SQL enterprise application programmer atm. I deal with Grids, form fields, and web services all day.
Proximo  [作成者] 2014年10月17日 12時20分 
There was a change in the API because of this patch. The property "PlayerCharacter" is not longer available.
I reprogramed the part using this: "MyAPIGateway.Session.Player.Controller.ControlledEntity.Entity"
If you know how to program you see how stupid this is. If not, it's working again ;)
Proximo  [作成者] 2014年10月17日 8時57分 
Thanks you for reporting, i will fix it as soon as possible (probably today or tomorrow)
Geneticus 2014年10月16日 17時28分 
New Patch Bugs. Yay.

MOD_ERROR: 316092014.sbm_energyWarnerScript, in file: 316092014.sbm_energyWarnerScript
c:\Users\Username\AppData\Local\Temp\EnergyWarner.cs(193,70) : error CS1061: 'Sandbox.ModAPI.IMyPlayer' does not contain a definition for 'PlayerCharacter' and no extension method 'PlayerCharacter' accepting a first argument of type 'Sandbox.ModAPI.IMyPlayer' could be found (are you missing a using directive or an assembly reference?)
MOD_ERROR: 316092014.sbm_energyWarnerScript, in file: 316092014.sbm_energyWarnerScript
Compilation of 316092014.sbm_energyWarnerScript failed:
Proximo  [作成者] 2014年10月11日 20時17分 
The bug Generticus was talking about should be fixed in the current version of space engineers. If you have any other problem with the script, just write a comment ;)
Proximo  [作成者] 2014年9月30日 6時31分 
Thats one of the errors i was talking about Geneticus. That error means:
"I tryed to write to the file where the finish version of the 'energy warner script' (Suit Energy Manager) is, but i couln't BECAUSE there is someone using this file"
Now here comes the Joke: The one using the file IS Space Engineers, so it is basicly trying to access a file that is currently in used by IT SELF!

What i can do about it is:
- Nothing
- Wait for a patch

What you can do about it:
- Restart Space Engineers every time before you join a new game
- Wait for a patch

I hope this helps ;)
Geneticus 2014年9月30日 0時16分 
MOD_ERROR: 316092014.sbm_energyWarnerScript, in file: 316092014.sbm_energyWarnerScript
Compilation of 316092014.sbm_energyWarnerScript failed:
MOD_ERROR: 316092014.sbm_energyWarnerScript, in file: 316092014.sbm_energyWarnerScript
error CS0016: Could not write to output file 'e:\Steam\steamapps\common\SpaceEngineers\Bin64\316092014.sbm_energyWarnerScript' -- 'The process cannot access the file because it is being used by another process. '
Proximo  [作成者] 2014年9月28日 7時43分 
Thats odd, yes, but there are very serious problems with the script-api currently. So i have to wait for the next patch to work on this mod, sorry ;)
Proximo  [作成者] 2014年9月25日 3時50分 
Well, it's done now, enjoy
Proximo  [作成者] 2014年9月25日 0時16分 
I see, i am currently working on a ingame and file-config. Its hard because xml is not available, so i had to program something from scratch. It will be available in about 5 hours.
Darkaiser 2014年9月24日 20時14分 
My reasoning is that studies have shown that any sort of contact, even the artificial kind, can help fend off lonliness in survival situations. Kind of like Wilson from the Tom Hanks film Castaway.
Darkaiser 2014年9月24日 20時13分 
Wonderful and thank you! I was thinking of somewhere between Jarvis from the Iron Man movies (almost TOO pilot if a bit ironic) to the annoying operator on the other end of the radio.
Proximo  [作成者] 2014年9月24日 2時08分 
I was thinking the most people don't appreciate my jokes, so i tryed to be direct and simple. But yes, its very, very simple to add warnings with every text you can imagine. I try to make a config next so that you can add some youself.
Darkaiser 2014年9月23日 17時54分 
How difficult would it be for you to mod a version of this that is a bit more...flavorful? By that I mean annoying. For instance at 20% you get the ususal 'Suit power at 20%' warning. At 15% you get 'Ok now...you're down to 15%. Time to head back' and so on. The 5% should be something serious like 'Ok dumba$$...get back and rechanrge NOW!'

Or am I asking too much?
Proximo  [作成者] 2014年9月20日 9時35分 
It does in my case, but there is probably something special for multiplayer. I will see into that, thank you.
Nikki 2014年9月20日 8時54分 
the warning didnt show up and the power cut off
Proximo  [作成者] 2014年9月20日 6時49分 
I am sorry, i do not understand what you are trying to say. this script only displayes messages in the current state and has nothing to do with ship power or your friends.
Nikki 2014年9月20日 6時04分 
Thank ou for making this svript energy destroyed my friends ship when power went out he flew towords a cargo ship and gotshredded to bits
Proximo  [作成者] 2014年9月20日 3時50分 
I am glad this script helps. If you have any more ideas what i could make better, just ask.
Todo: sounds
Goldobsidian 2014年9月19日 21時44分 
Thank you, I hate how they knocked the warning down, it use to be at like 15% or something and they dropped it to 5%
Joseph Sneed 2014年9月19日 17時28分 
small thing but useful