API Feedback and Suggestions

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

  1. Florian Hirson

    Florian Hirson Ensign

    Joined:
    Dec 8, 2017
    Messages:
    10
    Likes Received:
    6
    Yeah I know but I'd like to avoid keeping all those values in memory, or checking a file everytime the user sort his inventory
     
    #281
  2. Xango2000

    Xango2000 Captain

    Joined:
    Jun 15, 2016
    Messages:
    385
    Likes Received:
    202
    un
    until 7.5 comes out, then every server can be different
     
    #282
  3. Florian Hirson

    Florian Hirson Ensign

    Joined:
    Dec 8, 2017
    Messages:
    10
    Likes Received:
    6
    Ok i'll look to get the values from the config file
     
    #283
  4. cmwhee

    cmwhee Commander

    Joined:
    Oct 31, 2016
    Messages:
    118
    Likes Received:
    72
    What is the "time" column for?
     
    #284
  5. Jascha

    Jascha Administrator

    • Moderator
    Joined:
    Jan 22, 2016
    Messages:
    1,141
    Likes Received:
    713
    Its a value to define the decay time.

    For Weapons it shows how often the item was used. It will break when it reaches the value in the item info.
    For Plants/Food it shows the internal server-time (game) how long the item is already existing. If its larger then the time you see in the info of that item (x1000) it will spoil.
     
    #285
  6. Florian Hirson

    Florian Hirson Ensign

    Joined:
    Dec 8, 2017
    Messages:
    10
    Likes Received:
    6
    Someone asked about my inventory sorting mod if it could sort other inventories like advanced constructor or containers, but it doesn't seem possible with the current api, it would be nice tho :)
     
    #286
    Jascha likes this.
  7. Florian Hirson

    Florian Hirson Ensign

    Joined:
    Dec 8, 2017
    Messages:
    10
    Likes Received:
    6
    I have another question, public int ammo in ItemStack is just refering about weapons right ? not tools
     
    #287
  8. Jascha

    Jascha Administrator

    • Moderator
    Joined:
    Jan 22, 2016
    Messages:
    1,141
    Likes Received:
    713
    Tools that have ammo are also using that value.
     
    #288
    Florian Hirson likes this.
  9. Florian Hirson

    Florian Hirson Ensign

    Joined:
    Dec 8, 2017
    Messages:
    10
    Likes Received:
    6
    Great, It will avoid my mod to regroup tools and weapons
     
    #289
  10. Mortlath

    Mortlath Commander

    Joined:
    Jul 26, 2017
    Messages:
    49
    Likes Received:
    26
    Any API changes for 7.5?
     
    #290
  11. Jascha

    Jascha Administrator

    • Moderator
    Joined:
    Jan 22, 2016
    Messages:
    1,141
    Likes Received:
    713
    Sorry, there were no changes.
    But I think for 8.0 there is enough time to do some changes.
     
    #291
  12. Mulano_iZz_LuEp

    Mulano_iZz_LuEp Ensign

    Joined:
    Dec 20, 2017
    Messages:
    9
    Likes Received:
    0
    Can i change the Stacksize of Water Jug in ITEM.XML or configfile?
     
    #292
  13. Jascha

    Jascha Administrator

    • Moderator
    Joined:
    Jan 22, 2016
    Messages:
    1,141
    Likes Received:
    713
    You could do that, but only tool internal. If oyu want to change it ingame you have to edit the config file of the game.
     
    #293
  14. Keith Hovey

    Keith Hovey Captain

    Joined:
    May 11, 2016
    Messages:
    221
    Likes Received:
    74
    What all on the new config file CAN be changed for multiplayer?
     
    #294
  15. Jascha

    Jascha Administrator

    • Moderator
    Joined:
    Jan 22, 2016
    Messages:
    1,141
    Likes Received:
    713
    Sorry I'm the wrong guy for that and it might be the wrong thread.
    But as far as I know you can change a LOT.

    Maybe someone can direct you to the right post/help/docu for infos. Or take a look at the config file. Many things should be self explanatory.
     
    #295
  16. Keith Hovey

    Keith Hovey Captain

    Joined:
    May 11, 2016
    Messages:
    221
    Likes Received:
    74
    You have a point lol. We have been toying with it, but its a lot of experimentation. Will look around. TY anyways lol.
     
    #296
  17. Exacute

    Exacute Rear Admiral

    Joined:
    Feb 17, 2017
    Messages:
    456
    Likes Received:
    307
    Ability to add commands to the game (So you can use https://empyrion.gamepedia.com/Game_API_CmdId#Event_ConsoleCommand , with custom entries => Currently 'invalid' commands doesn't get sent to the API)

    Request_ConsoleAddCommand (..) Command-format (command name, attribute:type, attribute:type (0...n))

    (should prob. be a flexible object.. Something like
    CommandName: (main prefix (for instance 'spawn'))
    Attributes: [{},{}] Wrapper for this, but layered. Several should be able to coexist (array => object)
    BaseAccess: What access-level is needed.
    HelpText: Text shown as help ('Use me to spawn, with <tier1 attributes-listed>')

    By itself it doesn't do anything. It needs handling on the event_consolecommand level. This is to register it into the game, to show it as help, and have it pass on to the API in the first place.
     
    #297
    Last edited: Apr 10, 2018
  18. Jascha

    Jascha Administrator

    • Moderator
    Joined:
    Jan 22, 2016
    Messages:
    1,141
    Likes Received:
    713
    Hey, what exactly do you want to do or do you need? I can't see a clear meaning of that function. Request console command gives you all the old telnet functions. Its not meant to include objects or anything else.

    If you need a specific Request I can ask for it. Just need to know what for.
     
    #298
  19. Exacute

    Exacute Rear Admiral

    Joined:
    Feb 17, 2017
    Messages:
    456
    Likes Received:
    307
    Alright. So.

    Currently, when you type a command ingame
    [​IMG]
    The valid (standard) command gets executed, AND sent to the Event_ConsoleCommand in the API
    But the invalid (non-standard) returns an error AND DOES NOT get sent to the Event_ConsoleCommand in the API

    So. This means that you cannot use custom commands. You can kinda get around this, by using a standard command as a preface, and THEN appending your own commands (for instance 'pda NotAStandardCommand' would get sent to the API')
    But that is not convenient, intuitive for the user (as it just said the command was not recognized), or pretty.

    So. What I am suggesting, is having a Request in the api (Request_AddConsoleCommand (or similar name))
    That would 'inject' the custom command specified, into the console.

    There's two ways this could go: The one where the API is the 'master', and the data sent in the request is minimal
    -Here you would only specify the commands name, (for instance 'NotAStandardCommand' as data)
    -The game would be like 'List this command in the 'help' command
    -If the command is entered, send it to the API, but don't output any text in the console.

    This solution would however require, that the API can output text to the CONSOLE (So we would need a Request_AddConsoleText('string') aswell), so that you can output your own 'help-documentation' (Like if what the user have typed is invalid, or otherwise give feedback)

    The second way of going about it, is my above ones, where you would create an entire object, that you would pass in the initial Request_AddConsoleCommand, that have all the data needed, to provide all the 'ingame-feedback'. This would be way more extensive, but would not require having the second 'interact with console (text output) request'

    ----
    The goal is, based on the above picture, to be able to type 'NotAStandardCommand' (for instance), and have it return data like the 'pda' command, aswell as being sent to the API's Event_ConsoleCommand (listener for when commands is typed)
    ----

    Does this make sense?
     
    #299
  20. Exacute

    Exacute Rear Admiral

    Joined:
    Feb 17, 2017
    Messages:
    456
    Likes Received:
    307
    Another thing I'd like to request:

    Technically I suppose it's not an API feature, as much as tweaking how the game works slightly.. But the alternative, would be requesting several API features, to 'halting player login', 'communicating with player on loginscreen' etc.

    I would suggest tweaking the 'ban <user> <time> <message>'
    to (still) disconnecting the user, and giving the user the banned message, but also displaying a timer (when reasonable.. for instance if bantime <1hr)
    After the timer have expired, the *client* would simply retry the connection with the server.

    (Also, a small bug relating to the ban functionality: When an user tries to reconnect to a server, the reason for the ban is not specified in the popup, just that the user is banned, and the duration)

    The purpose of this would be to implement a low-maintenance que system
    (Ban user for <reasonable time, for instance 30s>, then the client would attempt to reconnect, giving the server the chance to update the banreason (Place in que: #5, could be a banreason in this case for instance))
    While whatever mod is holding its own quelist, for users position.

    Fairly small edit, resulting in a nice feature ;)
     
    #300

Share This Page