API Feedback and Suggestions

Discussion in 'Empyrion API' started by Jascha, Mar 8, 2017.

  1. cmwhee

    cmwhee Commander

    Joined:
    Oct 31, 2016
    Messages:
    118
    Likes Received:
    72
    apologies for being out of the loop, but how do you directly access the DB?
     
    #441
  2. Taelyn

    Taelyn Guest

    By opening the Global.db File in the SaveGame Folder

    How you do that in your code is up to you

    NOTE: You can only read the file while the Server is running. You CANT write to it
     
    #442
  3. cmwhee

    cmwhee Commander

    Joined:
    Oct 31, 2016
    Messages:
    118
    Likes Received:
    72

    ...Holy god, any way we can get a hard reference to that in the API? (and docs)
     
    #443
  4. Taelyn

    Taelyn Guest

    As i said in the SaveGame Folder. Its not in the docs since we dont provide any way to access it.
    Its compleet up to you how you do that

    Naamloos.png
     
    #444
    Ephoie likes this.
  5. ASTIC

    ASTIC Captain

    Joined:
    Dec 11, 2016
    Messages:
    993
    Likes Received:
    707
    I find this development strange. We give up a clean API interface and recommend seriously that the MOD works directly on the database - OMG
    :-(
     
    #445
    Ephoie likes this.
  6. cmwhee

    cmwhee Commander

    Joined:
    Oct 31, 2016
    Messages:
    118
    Likes Received:
    72
    Operationally, if I write a value to a table, how can I prompt the game to look for the new value?
     
    #446
  7. Taelyn

    Taelyn Guest

    As said you cant. You cant write to it WHEN the game or Server is useing the DB. Neither its ment for writeing. Its ment to READ. You have the API to change things
     
    #447
  8. cmwhee

    cmwhee Commander

    Joined:
    Oct 31, 2016
    Messages:
    118
    Likes Received:
    72
    Oof, My brain skipped that part
     
    #448
  9. tachyon

    tachyon Commander

    Joined:
    Aug 12, 2015
    Messages:
    92
    Likes Received:
    134
    Hello,

    would it be possible to add events that notifies:
    • when a structure take damage
      • Here the damaged IBlock instances would be usefull
    • when a structure is changed
      • information on added/deleted/modified blocks would be helpfull
    ?

    Also IDevice could provide at least some information like the name (the one set by the players) and if it is off/on. Also it would be nice to get the signals that are attached to a Device directly.

    Update: I see that there is already a genric event for this. I now have to figure out which additional information is provided for each event type.
     
    #449
    Last edited: Jul 31, 2020
    Kassonnade likes this.
  10. FRAGaLOT

    FRAGaLOT Captain

    Joined:
    Dec 28, 2015
    Messages:
    14
    Likes Received:
    21
    Wouldn't that be incredibly spammy? When you attack a POI you'll be flooded with messages about how much damage a block is taking, and everyone on the server will log out over the spam.
     
    #450
  11. tachyon

    tachyon Commander

    Joined:
    Aug 12, 2015
    Messages:
    92
    Likes Received:
    134
    I would filter this for a structure that has a script applied to it. That would allow for monitoring a structure’s damage
     
    #451
  12. tachyon

    tachyon Commander

    Joined:
    Aug 12, 2015
    Messages:
    92
    Likes Received:
    134
    Hello,

    It would be nice if IDevice would provide some information if the Device occupies multiple blocks (like cockpits or the large fuel tanks):
    • Is multi-block? true/false (device has multiple blocks or not)
    • Min-/max coordinates (aka bounding box of the multi-block device)
    • Correct hitpoints/ damage for the whole multi-block device (so that every sub-block returns the max. hitpoints and current damage)
    • If it is switchable (can be turned on/off)
    • An instance ID that is the same for every sub-block of the multi-block device to be able to determinate, what belongs together
    This would really help with many things. IDevice would be a good place to put this in, as this only applies to devices.

    Also, more IDerived interfaces (like IWeapon <- ITurret with for example current ammo/max ammo) would be nice.
     
    #452
    ASTIC likes this.
  13. me777

    me777 Commander

    Joined:
    Aug 18, 2020
    Messages:
    384
    Likes Received:
    131
    right now im missing:
    -a way to set waypoints with setting 'remove on approach' and 'waypoint' in the new (client/standalone) api
    -get terain-placeables other than reading the database (i can read the database, but it should be in api, not that from behind way)
    -way to tell what a constructor is doing
    -solar capacitor level and power in/output

    can i get those? (pretty please) ;)
     
    #453
  14. x_blaster

    x_blaster Ensign

    Joined:
    Nov 23, 2022
    Messages:
    2
    Likes Received:
    0
    Request: Standardized folder structure for mods containing modded/added blocks and localization entries.
    Also: Localization.csv should no longer be one of the "Extras". Maybe move it to it's own folder?
    Simple outline:
    • Content
      • Configuration
        • <Main configuration files for entire game>
      • Localizations
        • localization.csv (main localization file for entire game)
      • Mods
        • <Mod1>
          • Configuration
            • BlocksConfig.ecf
            • Templates.ecf
            • (Other modded .ecf files maybe)
          • Localizations
            • localization.csv
          • Mod1_Info.yaml
          • Mod1.dll
          • <other mod files>
    This will allow custom blocks to be part of a mod package, and not tied to a scenario (i.e.: mod with added blocks will work with all scenarios (theoretically))

    Edit:
    The Configuration and Localizations folders would be optional, since obviously not all mods would need them.
    Also, the localization entries could be used to minimize overhead, as the mod would only need to send the entry key, instead of the full string.
     
    #454
    Last edited: Nov 23, 2022
  15. x_blaster

    x_blaster Ensign

    Joined:
    Nov 23, 2022
    Messages:
    2
    Likes Received:
    0
    A "CustomDevice" class (ecf file reference) and corresponding DeviceTypeName enum type that would be used by modders for mod scripts that can be "activated" whether the device is Active, or even exists.

    We can then use the GetDevices(DeviceTypeName) and GetDevice<T>(position) functions to find them and control the mod via whether the CustomDevice is active or not.(Also tell if it is our device from the block id/name)

    For (at least) the determining the device is Active we can get the info from IBlock, but having at least an Active bool property( could be a bool IsActive() function) in IDevice/ICustomDevice interface would be very helpful.

    In considering this, I'm sure tanks are devices, do they even have an active property? Though I know it'd be a useless property for them.

    Edit: spelling
     
    #455

Share This Page