Welcome to Keen Software House Forums! Log in or Sign up to interact with the KSH community.
  1. You are currently browsing our forum as a guest. Create your own forum account to access all forum functionality.

Space Engineers Ingame API Feature Requests

Discussion in 'Programming (In-game)' started by rexxar, Oct 10, 2017.

Thread Status:
This last post in this thread was made more than 31 days old.
  1. VDOgamez Trainee Engineer

    Messages:
    4
    I would like, for projectors, to be able to get information about the blueprint being projected. At the very least it would be good to have a bounding box of the blueprint, but ideally I'd like to be able to get a list of the locations of blocks in the blueprint, and the locations of blocks that can currently be built (have support) in the blueprint. Having that would make some automated construction techniques a lot more feasible.
    I also second the ability to get the list of entities an antenna can see. Right now a lot of the time when you make scripts to track hostile or player entities at long range, you have to manually point a camera at something that you can already see through the antenna GUI and hope it doesn't accelerate too hard!
     
    • Agree Agree x 1
  2. taleden Trainee Engineer

    Messages:
    48
    • Increased script size limit has been mentioned already I think but I'll second that. Developing scripts for SE is fun when it's solving interesting in-game problems; it's a lot less fun when the problem to be solved is how to remove whitespace, comments, descriptive method and variable names, etc to cram the code into the size limit.
    • I'd still love some way to look up the blueprint definition to produce an item, given an instance of the item definition. Right now I have to hardcode blueprint definition names to use with MyDefinitionId.Parse() but that can't work for new items added by mods (or future game versions). If it were possible to fetch the blueprint in-game, then TIM could support Assembler management of modded items just like base items.
     
    • Agree Agree x 1
  3. Malware Master Engineer

    Messages:
    9,601
    Agreed. However the sad fact is that this limit is not arbitrary. It's already very slow to compile fully minified and packed scripts with the current limit. Imagine how it would be with a higher limit, because people are going to minify and fully pack that too. At the very least asynchronous compiling must be added first, and that's not a simple proposition. Because async. I have a ready PR but it must be thoroughly reviewed. This takes time, and it may well be rejected. Because async :p
     
  4. gothosan Junior Engineer

    Messages:
    723
    T_T I want to finish my OS script but 100k is simply not enough.
    At least if white space was not counted toward it, it could help a bit..
     
  5. Malware Master Engineer

    Messages:
    9,601
    Minifier, buddy. Minifier.
     
  6. Wicorel Senior Engineer

    Messages:
    1,242
    MDK has a built-in minifier. I'm using it now.
     
  7. Spitbag Trainee Engineer

    Messages:
    2
    - Access to Ore Detector markers
    - (remote) Camera-to-LCD
     
    • Agree Agree x 1
  8. Malware Master Engineer

    Messages:
    9,601
    What does this have to do with the programmable block?

    Also, when pigs fly... ;)
     
  9. qsek Trainee Engineer

    Messages:
    29
    I would like to have a bool for when a Welder is actively welding.
    Currently there is no way to determine if a non terminal block is actually completed.
    • Power consumption does not change
    • Materials go into the block independent from building state
    • projector.RemainingArmorBlocks does not report builing progress
    • cant access building state (or anything other) on non armor blocks
    Suggestions for making building progression properties available for non terminal blocks have been rejected, so im hoping this will get through. Practical Arguments are that armour blocks are not wired to any electrical system.
    But the welder already has some kind of way of determining when there needs to be a welding spark.

    It would enable proper sensing of what happens infront of the welding tip when using my robotic arm.
    A premium addition would be to put information of currently welded blocks (in reach of the welder) in the detailed info.
    For example:
    Code:
    Armor Slope Large: 80% completed
    Conveyor Tube: 20% completed
    Welding active/Welding halted
    But i would be more than glad with just a
    Code:
    IMyShipWelder.isWelding 
     
    Last edited: Nov 15, 2017
    • Agree Agree x 3
    • Like Like x 1
  10. Digi Senior Engineer

    Messages:
    2,384
    While the detail info can be useful for the player, it's quite bad to use that for PB.
    A better thing would be List<MyBlockInfo> or Dictionary<MyDefinitionId, MyBlockInfo>; where MyBlockInfo would contain build progress % and maybe missing+installed components list for welders and grinders (and definition Id if it's a List).
     
  11. Lynnux Junior Engineer

    Messages:
    881
    Currently I'm using <Block with safety lock>.GetMaximum<float>("Weld speed") to determine the world speed. Looks like this will be removed. So can we get this interface renamed and added to e.g. MyShipController instead ?
     
  12. rexxar Senior Engineer

    Messages:
    1,530
    No.
     
    • Funny Funny x 1
  13. 1wsx10 Trainee Engineer

    Messages:
    24
    some way to know if the person clicked the recompile button.

    its useful to distinguish between the world loading, and the person installing the script... you could say its in-world information because:
    1. the button is in the programmable block interface
    2. if this was real life, the world doesn't just shut down, so you wouldn't have this issue
    3. its for performance so pls rexxar
     
  14. Malware Master Engineer

    Messages:
    9,601
    From the script's point of view, technically, there is no way to distinguish between the world loading or recompiling. The script needs to do the exact same job no matter what. If you need to delay autoupdate until a user starts the program, that can be done already.
     
  15. Wicorel Senior Engineer

    Messages:
    1,242
    What use do you want to use it for? What difference does it make to you? What are you going to do differently?
    All ways of asking "Why"..


    It's not the way the system currently works; they are both the same. Maybe there's some other way to do what you want?
     
  16. Digi Senior Engineer

    Messages:
    2,384
    The resource system could be exposed better:
    • Add interfaces for MyResourceSinkComponent and MyResourceSourceComponent, preferably named something better than "sink" and "source".
    • Add the *ByType() methods from sink/source components there (to allow us to get details from other resources).
    • Expose those interfaces in IMyCubeBlock with properties (.ResourcesRequired/.ResourcesCreated or something like that), avoiding needing to use .Components.Get<T>() which is rather weird.
     
    • Agree Agree x 1
  17. FowlPlayChiken Trainee Engineer

    Messages:
    15
    Please let us access info from the ore detector!! ;)
     
    • Agree Agree x 2
  18. Izion Trainee Engineer

    Messages:
    9
    Would it be possible to add a function to detect if a sound block is currently playing a sound (IsPlaying)?

    May have missed something but can't see any way to do this

    thanks
     
  19. MisterMagoo Trainee Engineer

    Messages:
    29
    I would even settle for the camera ray-cast returning the voxel material type it hits.
     
    • Like Like x 1
  20. Digi Senior Engineer

    Messages:
    2,384
    • Enable clientside GPS string parser for CustomData (just like LCD adds GPS entries to your GPS menu).
    • Methods to create GPS strings from name and vector and also getting name and vector from a GPS string.
    • A property to indicate how well a solar panel is aligned, separate from power output which can be lower than max simply because nothing is using power.
    • ^ or a property to get the definition max output since IMySolarPanel.MaxOutput gets changed with alignment.
     
    Last edited: Dec 14, 2017
    • Agree Agree x 1
  21. Jon Turpin Apprentice Engineer

    Messages:
    162
    As per the conversation on Discord, I would like to see lambda support added for the GridTerminalSystem.GetBlocks() method. Currently, .GetBlocksOfType() supports lambdas, but .Getblocks() does not.

    Also, it would be nice if .CalculateShipMass() filtered out anything connected by a connector. Currently, it displays the mass sum of all connected grids.

    Keep up the good work! :)
     
    Last edited: Dec 20, 2017
  22. Sixela963 Trainee Engineer

    Messages:
    16
    I think it would be nice and simple to have a function to copy settings from one block to another. Absolutely not thinking about projectors for Von Neuman machines. Would this be possible?
     
  23. Malware Master Engineer

    Messages:
    9,601
    You can already do that manually, it'll take some work but you can. If you can't then there's missing API members - which you then must report ;)

    I'm afraid you can't expect them to put a lot of work into something that will only be used by a very few, when it is already accomplishable :)
     
  24. Ronin1973 Master Engineer

    Messages:
    4,800
    I would like sensor blocks to be able to read information about players it detects. There doesn't have to be a change to the terminal interface. The sensor would continue working exactly the way it does.

    However, when a player is in range, the following data would be able to be read:

    Player detected (already does this).
    Player alignment (enemy, friendly, neutral) - already does this.
    Player position in game world (I believe this is already possible).
    Visor open or close (can return a bool).
    Player inventory and amounts.
    Player oxygen, energy, hydrogen, and health.


    I think this information would be useful in scenario settings. If part of the objective is to arrive in an area with a specific component or object in inventory, that could be detected.
    It would also be useful in-game to detect if a player has his visor open (airlocks, checking if a player is armed (for parlaying) or is a threat.
    Detecting the status of the player and organizing actions for or against them based on their personal criteria.

    I think this would definitely be helpful for custom scenarios, especially for querying information regarding the player and progress.
     
  25. Pennywise Apprentice Engineer

    Messages:
    338
    Hi, rexxar. A question about your mod GFDExposer. Can you give a sample script with extension class, enabling GFD, you've mentioned in mod description?
     
  26. [HEX] 0x00 Trainee Engineer

    Messages:
    8
    Hi, how about syntax highlighting and including files? C:
     
  27. rexxar Senior Engineer

    Messages:
    1,530
    No
     
  28. [HEX] 0x00 Trainee Engineer

    Messages:
    8
    Your answer is... informative..
    About syntax highlighting, I understand why NO (but I'ld try), about file "including" I not understand why "No", it good feature because it increase code decoupling. Maybe you have any plans to make editor modable? (I mean UI and Editor mods\plugins)
     
  29. Wicorel Senior Engineer

    Messages:
    1,242
    There is no place to include from.

    Where would you expect the included source to come from?
     
  30. [HEX] 0x00 Trainee Engineer

    Messages:
    8
    I understad that there is no place From where it might be included, but I think it could be implimented.

    It would be like solution explorer in VisualStudio the main part of the programm must have Main Program and Save methods, for other files these methods must be blocked.
    1. Solution explorer with files and folders.
    2. The one file with name like Main.cs where we impliment functional for Program Main and Save methods and include other files.
    3. The Other files with methods Program\Save\Main is trigger an error like "Only Main.cs should have Program\Main\Save method."
    4. The build process based on a Tree of including files.

    Or they could impliment API for UI modding so anyone who want change the editor could use it.
     
Thread Status:
This last post in this thread was made more than 31 days old.