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. masterfail #yolo Trainee Engineer

    And it would actually promote the use of antennas, because right now you dont have much incentive to have any active other than for RDAV fleet command.
  2. Lynnux Junior Engineer

    Controls (IMyShipController):
    - seperate joystick and keyboard input. I managed to filter the joystick input and keyboard input from MoveIndicator but it's unreliable / not feasible for all joystick sensitivity settings. See Digi's ControlModule as a good example.
    - provide the joystick sensitivity (maxX, maxY values) to the PB
    - ControlThrusters is a global switch for the whole grid. Make it a switch only affecting the one ShipController where it's changed but not the other ones and the PBs. To disable (manual) control individually...
    - ControlWheels: see above
    - add "ControlGyros" ?

    Thrusters (IMyThrust):
    - as already mentioned, add a toggle (bool) to switch the thruster override on/off. Currently thrusters have to be switched off to prevent manual control when the thrust override is set to 0.0. An alternative is the "local" ControlThrusters switch mentioned above to prevent manual control in this setting

    Wheels (IMyMotorSuspension):
    - add "PropulsionOverride" as for thrusters (optional, only if easy to implement).
    - add "SteerAngleOverride" (optional, only if easy to implement)

    There is IMyShipcontroller.CanControlShip to disable user input but this doesn't fulfill the requirement:
    The user shall be able to steer the ship while the thrusters/wheels are only controlled by the PB (most common application: cruise control).
    Last edited: Oct 23, 2017
    • Agree Agree x 1
  3. Hellothere! Apprentice Engineer

    Could you add an option to access the grid aligned bounding box of an IMyDetectedEntityInfo instead of just the world aligned bounding box?
    • Agree Agree x 3
  4. hellokeith Apprentice Engineer

    In intergrid comms, include the IDs of sending and receiving antennae in the message to the activated PB.
    • Disagree Disagree x 2
  5. gothosan Junior Engineer

    Its not that hard to get the ID of the sending antenna as well as the receiving antenna.
    --- Automerge ---
    Saw your disagree vote :p Its your right to disagree of course.
    However, you can get every block ID via in-game programming, and its better to do it that way.
    Then your communication protocol could include how two grids first "speak" to each other as well as knowing from where a message arrived.
    Couple that with the PB ID and you can control which grids your ships can or cannot get a message to, as well as send to, as well as maintain a list of friendly and non friendly grids and decide if and when to communicate with them.
    It would impose great limits if the API prevent scripters from deciding how to phrase the antenna (or any other block for that matter) ID.
    • Agree Agree x 2
    • Disagree Disagree x 1
  6. Arcturus Senior Engineer

    Yeah, other than the Main Cockpit selection we only have Control Wheels and Control Thrusters on the control stations/flight seats/cockpits. Control Gyros would be nice.

    Any means of driving wheel suspensions from a PB or autopilot would be nice - currently they are only for player or remote-control player use.
  7. Myrkur Trainee Engineer

    Not sure if this is still active but can we get the ability to recompile a program block with a toolbar bind :)
  8. Yeto Trainee Engineer

    I would like to use the following functions for the PB
    • ore detector: access [gps | ore name] similar to what the player can see
    • set buttons to execute a PB with RUN value !!!!!!
    • a function that will execute a PB in the next Tic, NOT within the runtime of the calling PB, this would enable ping pong, and end the discussion of how mutch characters / limits etc a PB has and it is nice for ballancing (experts) in any way good for performance, not everything has to happen at once
    • restructure commands block.xyz in a way that SetValue is explorable intuitive, or replaced by speaking commands such as block.SetValuePB (eg for antenna) after 3 hours, I still do not know if something like that exists or not
    Yours Yeto
  9. Pharap Apprentice Engineer

    I am so glad someone else asked for this too.

    I made an issue for this on the feedback site a while ago and it didn't get much interest.

    I also had a thread about this somewhere but I can't find it at the moment.
    • Agree Agree x 1
  10. Elfi Wolfe Apprentice Engineer

    Access to MyResourceSinkComponent and I guess the MyResourceSourceComponent that a block uses?
  11. Wicorel Senior Engineer

    @PhoBot whitelist check MyResourceSinkComponent
    For request MyResourceSinkComponent found one class Sandbox.Game.EntityComponents.MyResourceSinkComponent with partial access. Allowed members:
    RequiredInput, SuppliedRatio, CurrentInput, IsPowered, AcceptedResources

    @PhoBot whitelist check MyResourceSourceComponent
    For request MyResourceSourceComponent found one class Sandbox.Game.EntityComponents.MyResourceSourceComponent with partial access. Allowed members:
    CurrentOutput, MaxOutput, DefinedOutput, ProductionEnabled, RemainingCapacity, HasCapacityRemaining

    What more do you want access to?
  12. Phoera Senior Engineer

    that was surprisely O_O
  13. Elfi Wolfe Apprentice Engineer

    The list that Keen uses? Right now I use accepted resources then ToString to see if Oxygen. But people tell me it does not work with other languages.
  14. Baconfist Apprentice Engineer

    Would love to have access to all the properties of BlockDefinition.

    like the ThrusType [ion,hydrogen,atmopheric]
  15. Digi Senior Engineer

    That is only used by the sound, probably not that helpful.
    If you only care about getting the vanilla types then using their subtypeIds is enough, otherwise for modded ones (and more data on the vanilla ones) you'd need the MinPlanetaryInfluence/MaxPlanetaryInfluence (which is air density, not gravity) and EffectivenessAtMinInfluence/EffectivenessAtMaxInfluence. There's also NeedsAtmosphereForInfluence but it seems useless.

    It would be nice if we had access to all block definitions, but they need to make a wrapper around them or give us a copy, because as they are they're quite editable.

    AcceptedResources is a list of MyDefinitionId which is allowed in PB, you can access .SubtypeName on each element to get the gas name... that is assuming the type is a gas. But regardless they can't be localized so you don't need to worry about language.
    Last edited: Oct 29, 2017
  16. Wicorel Senior Engineer

    I did a short bit of testing today and the sub type names did not changed with a language change. If they ARE, please make a bug report.
  17. Wanderer308 Trainee Engineer

    Some stuff already suggested by other people out there, but i will repeat it because this stuff would really nice to have.
    • Some grid property that returns number of blocks in this grid. Total and terminal (functional) blocks. So it will be possible to determine whether grid was modified or not without calculating its mass (plus mass is always 0 for stationary grids).
    • Toggleable thruster override, like one for gyros, so we can set zero overridden thrust, not 1.0001.
    • Property for ore detector that hold info about last detected ore type and GPS, like one player can see on HUD. Alternatively output this info to ore detector DetailedInfo, so PB can take it and parse.
    • Not sure if i should adress it as feature request or API issue, but suspension wheels (IMyMotorSuspension) lacks of any setters for Damping, Strength, Friction, Power, Height, SteerAngle, MaxSteerAngle, SteerSpeed, SteerReturnSpeed, SuspensionTravel etc. Definetly need those. Also need propulsion and steer override.
    • Property for medical station that indicate if player currently use medical station.
    • Property for cockpits/seats/cryo chambers (and as i understand any other IMyShipController's) that gives current player suit O2 and H2 fill ratio.
    • Some property or function for turrets that returns its current target GPS, or aim direction vector with range.
    • Property/function for antenna that return list of detected signals. List should contain signal text, GPS (or direction plus distance), faction relation to player (antenna).
  18. Malware Master Engineer

    These are data identifiers, so if they didn't work for other languages the game itself would break down. Something else is happening. The type id's are not localized.
    --- Automerge ---
    @Wanderer308 detailinfo should never be used for data extraction. It's highly inefficient, causes much allocation as you parse, and is localized so it will be different for each language.
  19. See0507 Trainee Engineer

    The possibility to use the programmable block/scripts to configure actions done by timer blocks or buttons.
    e.g. to change the argument which is passed from a timer block to a programmable block.
  20. rlb Trainee Engineer

    Add another vote for Ore Detector API and Radar.

    Also, can we get a Jump command in Jump Drive API? It would add a lot of flexibility toward drones & autonomous ships, and the whole "people can mess this up so let's not give it to them" mentality of restricting features has never resonated with me.
    • Agree Agree x 4
  21. Malware Master Engineer

    Unfortunately it doesn't matter whether it resonates with us or not.

    More automation = more difficult to optimize because they can no longer make assumptions related to player locations... so it's not just "people can mess this up".
  22. susu Trainee Engineer

    It was already mentioned, but: access to Ore detector and Antenna's detected entities. Not need the exact coordinates, but direction + distance (I know, coordinates can be calculated then, but that is what player can see as well).
    • Agree Agree x 1
  23. lBlackthorne Trainee Engineer

    Create, modify and delete terminal block groups.

    get a list of visible signals from a given radio antenna, including their range and bearing
  24. Ruadhan2300 Trainee Engineer

    I would like to be able to get the relative bearing and elevation (alternately simply the direction-vector) of a pilot in a cockpit.

    Useful for stuff like mouse-aimed turrets built using rotors and suchlike.
    Also useful for in-cockpit interface controls or "touch screens" for things like Whip's fleet command system.

    That's just off the top of my head, I'm sure the possibilities for this simple addition are endless.
    • Funny Funny x 1
  25. Whiplash141 Junior Engineer

    cough Rdav's Fleet Command cough

    This would be mighty spiffy! I'd love if passenger seats could do this too
    • Funny Funny x 3
  26. Ruadhan2300 Trainee Engineer

    My bad! It's been a long week.
    • Friendly Friendly x 1
  27. Digi Senior Engineer

    A built in method/property to know if a block reference is still valid so you can know if you need to re-acquire it... basically returning value of Closed.
    Current solution is:
    bool valid = (block.CubeGrid.GetCubeBlock(block.Position)?.FatBlock == block);
    which is slower than checking Closed.
    • Agree Agree x 2
  28. Ruadhan2300 Trainee Engineer

    A blacklist Filter for the Camera Raycast so I can ignore blocks, ignore blocks that belong to me, or ignore terrain (read: ground penetrating radar!)
  29. Malware Master Engineer

    None of that makes any sense for a visual scanner... The camera is a simple laser detector, it's not a radar.

    Ignoring stuff enables cheats. We must not forget that this is a vanilla feature, and as such must be balanced. I am sorry, but I need to vote no for those :(
    • Agree Agree x 1
  30. Ruadhan2300 Trainee Engineer

    Point taken.
Thread Status:
This last post in this thread was made more than 31 days old.