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.

Ingame Programming missing API and functions and known issues

Discussion in 'Programming (In-game)' started by mexmer, Apr 23, 2015.

Thread Status:
Not open for further replies.
This last post in this thread was made more than 31 days old.
  1. Jewboii Apprentice Engineer

    Messages:
    242
    The ability to have matching function signatures in two different class... Yeah, I'm still pushing for that before I try anything else in this game.

    Code:
    class MyA {
      void Foo() {}
    }
    
    class MyB {
      void Foo() {}
    }
    
    Main() {
      (new MyA()).Foo()
      (new MyB()).Foo()
    }
    It's not an API though, so it doesn't belong here. Consider it spam, BUT I CONSIDER IT A WAY OF LIFE!!1!1!11!
     
  2. mexmer Senior Engineer

    Messages:
    1,977
    FYI got confirmation from phand, that someone will look into this (or rather say, there is ticket in their tracking system).
    No promises, but anyway i will try to keep this updated, and hopefully we might see some improvement in future.
     
  3. mexmer Senior Engineer

    Messages:
    1,977
    since SE code is opensourced, we can try to address some if issues stated in first post ourselves. when they will be added to release, that's another thing.
    just want to let you know, it might speed up things
     
  4. Ishakaru 2 Trainee Engineer

    Messages:
    14
    Issue:
    IMyProjector.LoadBlueprint() Doesn't work.

    Edit: After a bit of waiting, I was starting to wonder if I was being dumb. ./sigh looks like I am.

    For anyone that is wondering how to get this to work you need to specify the path as
    C:\\Users\\Bob\\AppData\\Roaming\\SpaceEngineers\\Blueprints\\local\\Ship Name\\bp.sbc
     
    Last edited: May 25, 2015
    • Like Like x 1
  5. Malware Master Engineer

    Messages:
    9,866
    When or if they'll be added to release, one should say I think.

    Oh an @mexmer the programmable block issues have been solved, with the Me- and ElapsedTime properties.
     
  6. indigodarkwolf Apprentice Engineer

    Messages:
    115
    Is there a GitHub repository for making changes/fixes/extensions for the in-game programming? Or a group otherwise working on it? I'd be interested in contributing.
     
  7. Digi Senior Engineer

    Messages:
    2,393
    https://github.com/KeenSoftwareHouse/SpaceEngineers
    It's for everything related to the game's code.
     
  8. indigodarkwolf Apprentice Engineer

    Messages:
    115
    I'd meant more like a specific branch that people were coordinating on, so we could review each others' work and coordinate changes before sending pull requests to the master branch... so I guess the answer there is "no".
     
  9. mexmer Senior Engineer

    Messages:
    1,977
    afaik there is none, but you can always review other people pulls.
    there are also some discussions (in issues), that doesn't contain sourcecode but discussion regarding implementation
     
  10. Malware Master Engineer

    Messages:
    9,866
    @mexmer shouldn't you update the first post with what has been addressed?
     
  11. mexmer Senior Engineer

    Messages:
    1,977
  12. joemorin73 Junior Engineer

    Messages:
    949
    If I remember correctly, there is no API to get the name of the current grid or set the name of the current grid. If that is true, could we add it to the list?
     
  13. mexmer Senior Engineer

    Messages:
    1,977
    i would gladly add this, but where this option should be? guess, we need to search trough sourcecode, where it's stored, how it's initialized and stuff - definetly it's not on antena, that much i know ;o)
     
  14. joemorin73 Junior Engineer

    Messages:
    949
    From what I recall, it's part of the IMyEntity? (I'm at work, don't quote me.)
     
  15. plaYer2k Master Engineer

    Messages:
    3,160
    Renaming the ship should be accessible to the IMyGridTerminalSystem as that is the closest representation for the whole ship (the whole terminal system as the name says).
     
  16. joemorin73 Junior Engineer

    Messages:
    949
    Agreed. Only issue is ensuring you get the right name when connected via connector.
     
  17. plaYer2k Master Engineer

    Messages:
    3,160
    Dont ships rename aswell when connecting through connectors? I am not sure tbh.
     
  18. joemorin73 Junior Engineer

    Messages:
    949
    They do from the info screen. I think the API has it on the IMyEntity so it changes the grid the block belongs to. (It's weird, but also makes sense.)
     
  19. Raffson Trainee Engineer

    Messages:
    22
    Personally, I don't really mind that the sorter blocks are ignored by scripts.. Sometimes it even proves to be usefull...
     
    • Like Like x 1
  20. mexmer Senior Engineer

    Messages:
    1,977
    due potential "security" issues and abuse (with current block identification) OtherAntenna thing will not happen anytime soon.
    i will not go into detail, but fact is, that with current block identification, you can store and access block later, even when you are not connected by antena, which is not desired behavior ... when this issue is rectified, it will be possible to have interface to retrieve block on other end of antena connection.
     
  21. plaYer2k Master Engineer

    Messages:
    3,160
    Thats a flawed excuse because connecting structures through connector, rotor, piston, merge block allows for the same.
    On the other hand now allowing access through antennas forces us to do the sneaky abuse in order to even have any chance to communicate off-grid.

    So to conclude, it is a design issue in general and antennas should have that feature nonetheless.
     
  22. JoeTheDestroyer Junior Engineer

    Messages:
    573
    mexmer is reporting what the dev's told him on his pull request that would have provided similar functionality to the laser antenna. They specifically referred to the "merge block exploit", so until that is addressed they seem unwilling to expand the range of situations to which the exploit would apply.
     
  23. mexmer Senior Engineer

    Messages:
    1,977
    like you said, they allow the same ... and there exists so called "merge block exploit", until that is fixed, no more interfaces allowing block retrieval from disconnected grids

    thanks @JoeTheDestroyer for explanation
     
  24. Wicorel Senior Engineer

    Messages:
    1,262
    All of the new additions to remote control (autopilot) and we don't have pb access to those items.

    These are non trivial items (lists of waypoints with actions).

    I really want pb access to creating/controlling those items.

    Can you Add this to the master list?

    Also, we should have access to the gps waypoint list we with at least read privileges. And probably add. Maybe not delete...
     
  25. mexmer Senior Engineer

    Messages:
    1,977
    i'm not sure, if we can get more than r/o access to gps point list, but as for remote control block, should be possible. added both to "wishlist"
     
  26. g4borg Apprentice Engineer

    Messages:
    271
    I might add, that adding some sort of action to retrieve a list of "detected broadcasting antennas" by an antenna, with friend/neutral/foe/faction info, the broadcasted name, distance and/or maybe position (is that OP?) could also be very nice (without access to the actual grids beyond that, as their own kind of struct, or maybe just once the grid2grid security has been ironed out), since it makes sense to have information, which is also displayed for a player, to be accessible by script.
     
  27. gchristopher Apprentice Engineer

    Messages:
    132
    There's still no way to directly inspect the current thrust of a thruster. That could be easily fixed by adding a property or detailed info string.

    I also still haven't seen any example code of someone successfully setting turret azimuth/elevation. (At all, but in particular demonstrating successful use of the synch methods in a DS.) But that might be my failure to use search adequately.
     
  28. mexmer Senior Engineer

    Messages:
    1,977
    i will add this to list, but i don't expect this to happen unless security issue is fixed.
    it will be easier to add interface for HUD displayed objects, that for antenas ... althought maybe pairs of "name" + vector3 (what you see in hud), might be possible ... not sure about that.

    @gchristopher unfotrunately that can't be easilly fixed, current thrust value is in fact approximate, because thrust is computed for grid as whole, therefore thrust of each separate thruster doesn't matter, unless thruster is turned off.
    For this to give proper values, we will actually need access to thruster grid, which i don't believe we will get (similar situation is with gyro, or power circuits - which i'm currently trying at least partially expose, but it requires overwriting lot of code in multiple blocks, so i suspended work on it, unless easier to use interface is provided by ksw)
     
    • Like Like x 1
  29. gchristopher Apprentice Engineer

    Messages:
    132
    Thanks! That's really interesting and I hadn't read that anywhere else on the forums.

    I suppose (since thruster position is irrelevant), knowing the thrust being applied to the cube grid would be more immediately useful than knowing the thrust of any single thruster. I see you've already noted that IMycubeGrid is a good place to expose velocity. Maybe a thrust vector property would be an appropriate, too? (I'll RTFS before conjecturing further.)

    Thanks again!
     
    Last edited: Jun 7, 2015
  30. mexmer Senior Engineer

    Messages:
    1,977
    @gchristopher that is just only my opinion, also problem is, that imycubegrid works only for single grid entities, for multigrid entities it's quite more complicated ... so atm. i'm not sure which is best place for this values.
     
Thread Status:
Not open for further replies.
This last post in this thread was made more than 31 days old.