1. This forum is obsolete and read-only. Feel free to contact us at support.keenswh.com

Where to find latest source code?

Discussion in 'Programming (In-game)' started by JulianB, Jan 21, 2017.

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

    JulianB Trainee Engineer

    Messages:
    15
    EDIT: Solution: Download ILSpy (https://ilspy.net/) open SpaceEngineers\Bin64\Sandbox.Common.dll with ILSpy, go to Sandbox.ModAPI.Ingame and there you have the overview I was looking for. Thanks to Inflex.

    Currently I am using https://github.com/KeenSoftwareHouse/SpaceEngineers/tree/master/Sources/Sandbox.Common/ModAPI/Ingame to learn about all the possibilities in ingame programming. But it seems this page doesn't get any updates anymore...
    At this moment, for example, I'd like to know if there's any way to change the "Assigned Programmable Block" of an antenna. It's a new feature and thus isn't in the github repository. Of course I could simply try various possible strings for SetValue(), or use reflection to get the name of the actual property.
    But I'd really really like to just view the source. It'd make everything a lot simpler.

    So my question is: Is there any new, up-to-date source code reference for the newest dev builds in general? And if so, why not at least pin it to the forum or even put a link to it on top of the "Official Guide: Programmable Block" in the Steam workshop (to which is linked to by the help button of the in game editor interface).
    And if not: MAKE IT HAPPEN! NOW! :p

    If I missed an obviously placed post - then I'm sorry. But I really did try to find something on this matter for hours and failed :(

    Depressed Julian out.
     
    Last edited: Jan 22, 2017
  2. Inflex

    Inflex Developer Staff

    Messages:
    397
    Github source code is updated from time to time. It's random nature phenomenon and you can't do anything about it :p

    Fortunately it's not the only source of up-to-date API reference. You are free to peak SE DLLs and view most updated API interfaces, those you are currently running in your game. There is plenty of tools for IL DLL peaking, for example ILSPY, dotPeak, dnSpy, ... and others.

    What I would personally suggest you is even better than looking to source code. Make yourself a favor and get yourself some real IDE for script developing. I have for example guide on how to setup Visual Studio (free community version) but you can use basically any IDE that is capable of handling C# stuff (code editor + reference manager + optional compiler).
    https://forum.keenswh.com/threads/setup-visual-studio-for-se-programming.7385455/#post-1286989996
     
    • Like Like x 1
  3. Phoera

    Phoera Senior Engineer

    Messages:
    1,713
    you can list properties from PB.
    and, cuz this is combobox, i think it's not avaliable directly.
    hm, looks like CB fix mod need to be updated.
     
    • Like Like x 1
  4. JulianB

    JulianB Trainee Engineer

    Messages:
    15
    Wow thanks! That's exactly what I was looking for!
    Buuuuuuut: I just opened SpaceEngineers\Bin64\Sandbox.Common.dll in ILSpy. Then I looked into Sandbox.ModAPI.Ingame.IMyRadioAntenna and the TransmitMessage(...) method is missing. The one I am currently using in my script (and it works). Are there different files for the development version that I didn't see?
    Btw: you made a really good guide on how to make Visual Studio do what you want it to do! :D But I'd like to keep the ingame programming ingame... And not disrupting the immersion :p

    EDIT: Nonononononononononono I am so stupid... I reinstalled the game on another drive a while ago and accidentally opened up the dll from the old installation directory (don't know why it's still there...) now I checked the new dll and the method is in there... omg.
    So... again: thanks for the tip! Now I can view the real source code immediately after every update! thats awesome! :)
     
    Last edited: Jan 22, 2017
  5. Inflex

    Inflex Developer Staff

    Messages:
    397
    Don't you want to say that you are coding in in-game editor. That's nit immersion. That's hardcore self-punishment. You mush have done something horrible...

    No way. It has to be there. This is how it looks like for me (In Visual Studio ;))
    [​IMG]
     
    • Agree Agree x 1
  6. JulianB

    JulianB Trainee Engineer

    Messages:
    15
    Yeah I guess I need punishment :p
     
Thread Status:
This last post in this thread was made more than 31 days old.