[mod] Reforged Eden Enhancements

Discussion in 'Empyrion API' started by heyitsmk, Mar 9, 2021.

  1. heyitsmk

    heyitsmk Ensign

    Joined:
    Feb 20, 2021
    Messages:
    12
    Likes Received:
    8
    Mod Title: Reforged Eden MKI
    Description: Reforged Eden Scenario Enhancements
    Git: https://github.com/heyitsmk/ReforgedEdenMKI

    Description: Adds additional enhancements to the popular Reforged Eden scenario that are unavailable without modding.

    Features:

    Warpgates - Progenitor warp gates can now teleport players and vessels as long as the warp gate has been powered up. Players will be given a dialog option to initiate the warp, after a short delay all players and vessels in proximity to the gate will be teleported.

    More to come as I find things that need modding!

    Changelist
    • 3/10/2021 - v0.1.1 - Fixed an abuse scenario with warpgate identification
     
    #1
    Last edited: Mar 10, 2021
  2. ravien_ff

    ravien_ff Rear Admiral

    Joined:
    Oct 22, 2017
    Messages:
    6,422
    Likes Received:
    12,028
    This is so cool.
    Thank you for doing this!

    May I link this in the scenario guide?
     
    #2
  3. heyitsmk

    heyitsmk Ensign

    Joined:
    Feb 20, 2021
    Messages:
    12
    Likes Received:
    8
    Sure!
     
    #3
    Last edited: Mar 10, 2021
    ravien_ff likes this.
  4. ravien_ff

    ravien_ff Rear Admiral

    Joined:
    Oct 22, 2017
    Messages:
    6,422
    Likes Received:
    12,028
    This wouldn't be possible with the API that works in single player would it?
     
    #4
  5. heyitsmk

    heyitsmk Ensign

    Joined:
    Feb 20, 2021
    Messages:
    12
    Likes Received:
    8
    Its my understanding that API2 is missing a significant number of functions available in the legacy dedicated server API. If anyone that is more familiar with API2 wants to correct me I'm happy to update it.

    Right now the functions I am using from API1 are:

    Request_Player_ChangePlayerfield
    Request_Entity_ChangePlayfield
    Request_Load_Playfield
    Request_GlobalStructure_Update
    Request_Player_Info

    And the events from API1 I am using are:

    Event_GlobalStructure_List
    Event_Playfield_Loaded
    Event_Playfield_Unloaded
    Event_Player_Info

    As far as I know there are no analogs for these methods/events in API2 that provide all of the information I need.

    The API2 structure list would not return the 'powered' state of structures regardless of when it was called (before or after entity load).
    The API2 playfield loaded/unloaded events do not fire.
    I was not able to find any commands in API2 to teleport players or entities.
    I was not able to find a command to request a playfield load in API2.
    There was something about player info (maybe name or position?) in API2 that was missing or not working.
     
    #5
    ravien_ff likes this.
  6. heyitsmk

    heyitsmk Ensign

    Joined:
    Feb 20, 2021
    Messages:
    12
    Likes Received:
    8
    You can still play "Single Player" you just have to do it via a local co-op server.
     
    #6
    ravien_ff likes this.
  7. Myrmidon

    Myrmidon Rear Admiral

    Joined:
    Mar 26, 2016
    Messages:
    1,729
    Likes Received:
    2,058
    I had no clue that there are gates that permit vessels to warp. Cant the ability be used for other type of gates?
     
    #7
  8. ASTIC

    ASTIC Captain

    Joined:
    Dec 11, 2016
    Messages:
    993
    Likes Received:
    707
    A "problem" with the API2 is that some functions only work under certain conditions and you have to specify in the mod where it is loaded (None, Dedi, PfServer, Client), ie you can only find out whether a structure is powered in the PfServer. ..
    Teleporting and many other things of the API1 are not implemented at all
     
    #8
  9. ASTIC

    ASTIC Captain

    Joined:
    Dec 11, 2016
    Messages:
    993
    Likes Received:
    707
    Do I understand you correctly that the API1 mods in the "SP" work when you start a co-op game and play there alone?

    ok, i try it and it works ..... BUT ... the API2 Mods are loaded twice (on the computer how hosts the coop) if they are capable for SP & Dedi :-((
    because the criterion for loading mods in the SP is switching off the EAC
     
    #9
    Last edited: Mar 10, 2021
  10. heyitsmk

    heyitsmk Ensign

    Joined:
    Feb 20, 2021
    Messages:
    12
    Likes Received:
    8
    I did all of my testing on a faux Single Player server (local co-op with just me) and I didn't see the mod loaded twice - could you explain that a little more? The info.yaml file specifies that the mod is only loaded on the Dedicated process - not on the client.
     
    #10
  11. heyitsmk

    heyitsmk Ensign

    Joined:
    Feb 20, 2021
    Messages:
    12
    Likes Received:
    8
    With modifications you could certainly use this project to create other types of gates.

    The gate doesn't prevent vessels from warping - rather it allows vessels to warp longer than normal distances to fixed locations.
     
    #11
  12. ASTIC

    ASTIC Captain

    Joined:
    Dec 11, 2016
    Messages:
    993
    Likes Received:
    707
    for example my scripting loaded by the dedicated coop AND the client that runs on this computer - so two instance of this mods ar doing the same at nearly the same time - and strange things will be happend ;-)
     
    #12
  13. heyitsmk

    heyitsmk Ensign

    Joined:
    Feb 20, 2021
    Messages:
    12
    Likes Received:
    8
    I'm not sure I understand - the info.yaml file has it only loaded by the dedicated server, not by the client so that shouldn't be happening.
     
    #13
  14. ASTIC

    ASTIC Captain

    Joined:
    Dec 11, 2016
    Messages:
    993
    Likes Received:
    707
    For example, my scripting mod has the setting
    Code:
    ModTargets: PfServer,Client
    because it hast to be work on single player settings and server multiplayer settings. "Client" ist only active when EAC is off - because then your Empyrion game loads local mods. In the coop setting is EAC off and the dedicated server loads the mod AND the client too.

    This is also the reason why servers should ALWAYS switch on the EAC, otherwise the cheater's door and gate are opened via ClientMods
     
    #14
  15. heyitsmk

    heyitsmk Ensign

    Joined:
    Feb 20, 2021
    Messages:
    12
    Likes Received:
    8
    I think there is some miscommunication going on here - but I've tested in every way I can think of and I do not see my mod loaded multiple times when playing on a local co-op server. The most clear evidence is that procmon does not show a file read request for the mod dll coming from the client process, only the dedicated server process. Not to mention the client logs do not show the mod loading.

    If you can provide steps to reproduce the issue please do otherwise I'm not going to look into this anymore.
     
    #15
  16. ASTIC

    ASTIC Captain

    Joined:
    Dec 11, 2016
    Messages:
    993
    Likes Received:
    707
    It's not about your mod but the statement that you can simply run the game in coop to get the mods to work. this is only true for API1 mods but not for API2 mods that support dedicated AND single player.
    I just wanted to pass this knowledge on
     
    #16
    Myrmidon likes this.
  17. Xango2000

    Xango2000 Captain

    Joined:
    Jun 15, 2016
    Messages:
    385
    Likes Received:
    202
    Jump Gates was on my to-do list
    https://trello.com/b/k8nYrojB/xangos-mods

    Thank you, my list is way too long as it is. Feel free to draw inspiration from anything else you see on there, too. That goes for everybody, if you see any mod ideas on my trello that you would like to make, you go right ahead.
     
    #17

Share This Page