[mod] EmpyrionBaseAlign

Discussion in 'Empyrion API' started by ASTIC, Jun 30, 2018.

  1. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,074
    Likes Received:
    729
    The goal is to set up and position a (new) base that seamlessly merges with an old building base.



    https://github.com/GitHub-TC/EmpyrionBaseAlign

    Installation
    1. Download der aktuellen ZIP datei von https://github.com/GitHub-TC/EmpyrionBaseAlign/releases
    2. Upload der Datei im EWA (EmpyrionWebAccess) MOD oder händische installation mit dem ModLoader aus https://github.com/GitHub-TC/EmpyrionModHost

    What is this?
    Es soll dazu dienen eine neue Basis (AlignBase) so auszurichten und zu positionieren das sie im Rastermaß einer bestehenden Basis (MainBase) liegt und beim Bauen nahtlos an diese anschließt

    What are all the commands?
    Hinweis: Zur Zeit ist implementiert das ein Spieler nur eine Basis ausrichten kann die nicht mehr als 10 Blöcke hat, also direkt nach dem Setzen des Basisstarter.
    Damit werden viele Exploids vermieden die sich sonst ergeben würden. Spieler mit einer höheren Berechtigung dürfen alles Ausrichten.

    Help
    • /al : Zeigt die Kommandos der Mod an
    Align
    • /al {BaseToAlignId} {MainBaseId}
    • /al {BaseToAlignId} 0

    • /als {ShiftX} {ShiftY} {ShiftZ} => Letzte /al Basis um XYZ verschieben
    • /alr {RotateX} {RotateY} {RotateZ} => Letzte /al Basis um XYZ drehen
    Richtet die Basis (BaseToAlignId) so aus und positioniert sie das sie im Rastermaß einer bestehenden Basis (MainBaseId) liegt und beim Bauen nahtlos an diese anschließt.

    UNDO: Wenn die {MainBaseId} = 0 ist wird die Basis {BaseToAlignId} wieder an die ursprüngliche Position und Ausrichtung zurückgesetzt werden.

    Restore?
    Im Logfile werden die 'setposition' und 'setrotation' Kommandos hinterlegt die zur Restaurierung der 'alten' Position und Ausrichtung genutzt werden können

    Is that it?
    Zunächst erstmal und damit viel Spaß beim natlosen Bauen wünscht euch
    ASTIC/TC

    Version: 1.1:
    • Nun auch mit "UNDO" Funktion.

    Version: 1.2:
    • Verbesserte Bedienung
    • Zusätzliche Rotation möglich
    Version: 2.0:
    • .NET 4.6 EWA and ModLoader compatible
     
    #1
    Last edited: May 5, 2019
  2. Exacute

    Exacute Rear Admiral

    Joined:
    Feb 17, 2017
    Messages:
    456
    Likes Received:
    307
    Good work ;)
    One small request:
    An /al undo
    Would undo the last action, and move the base back to where it was (I'd recommend just saving the last location, before moving it: One for each player)
     
    #2
  3. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,074
    Likes Received:
    729
    Ok, cool idea - where I would implement a "/al undo {BaseToAlignId}" which restores the original state - that is, before executing all possible /al commands on the base.

    Restriction: This would only be remembered in main memory, so it will not be available after a server restart.
     
    #3
  4. Exacute

    Exacute Rear Admiral

    Joined:
    Feb 17, 2017
    Messages:
    456
    Likes Received:
    307
    Honestly, I'd just have one global for each player, as you really only would want to do it with the latest one you've moved?
    Up to you ofcourse ;)
    And the limitation seems fair. Once restarting the server, it would be really few cases, where you would want to undo it (only cause a server crash I suppose)
    You could optionally output each move to the log, with 'original coords' => 'new coords'. That should solve any 'oops' or whatever.
     
    #4
    Ephoie and geostar1024 like this.
  5. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,074
    Likes Received:
    729
    Version 1.1:
    Now "/al {AlignBaseId} 0" makes an "undo" and restores the original position and rotating

    PS: All changes are written to the logfiles ;-)
     
    #5
    Ephoie and Exacute like this.
  6. abelzw

    abelzw Lieutenant

    Joined:
    Sep 9, 2017
    Messages:
    22
    Likes Received:
    13
    Where am I supposed to put this and how do I know if it's active? If I just put it in the correct folder, will it automatically activate itself?
     
    #6
  7. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,074
    Likes Received:
    729
    The directory (below ...\Content\Mods) should not matter, I have it for example. lay here
    ...\Content\Mods\EmpyrionBaseAlign\EmpyrionBaseAlign.dll

    It ist activate when you type /al in the fractionschat and get an message box with the commands
     
    #7
  8. abelzw

    abelzw Lieutenant

    Joined:
    Sep 9, 2017
    Messages:
    22
    Likes Received:
    13
    That's weird because I don't see a mod folder under Content. Should I just create a new folder named "Mods" then place the file in there? Will it work then?
     
    #8
  9. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,074
    Likes Received:
    729
    Yes you can create a mods folder under the content folder.
    A detailed description is here https://empyrion.gamepedia.com/Game_API_InstallMods
     
    #9
    abelzw likes this.
  10. abelzw

    abelzw Lieutenant

    Joined:
    Sep 9, 2017
    Messages:
    22
    Likes Received:
    13
    [QUOTE = "ASTIC, post: 256829, member: 16593"] The directory (below ... \ Content \ Mods) should not matter, I have it for example. lay here
    ... \ Content \ mods \ EmpyrionBaseAlign \ EmpyrionBaseAlign.dll

    It is activate when you type / al in the fractionschat and get an message box with the commands [/ QUOTE]
    Also, you specifically mean to type in the "faction chat" or the console?
     
    #10
  11. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,074
    Likes Received:
    729
    The "faction chat" -> /al

    And get the new version 1.2 with the new features ;-)
     
    #11
    Last edited: Jul 11, 2018
  12. abelzw

    abelzw Lieutenant

    Joined:
    Sep 9, 2017
    Messages:
    22
    Likes Received:
    13
    Man, I just don't get it. I've done everything I can think of but I still can't get it to work. I honestly don't know what I'm doing wrong.. I'd really like to use this thing.
     
    #12
  13. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,074
    Likes Received:
    729
    Ok, problem is solved:

    it may only be the file
    ...\Content\Mods\EmpyrionBaseAlign\EmpyrionBaseAlign.dll

    e.g. from the ZIP file from the beginning in the mods directory ;-)
     
    #13
    abelzw likes this.

Share This Page