Requested Features for the modding API

    Joined
    Jul 21, 2013
    Messages
    2,932
    Reaction score
    460
    • Hardware Store
    This is a thread in which modders can post and discuss what features they would like to see in the modding API.
    By no means is this thread official, nor can anyone make guarantees that requested features will be implemented.

    Also, when requesting a feature, specifc exactly what you want. A new listener, a new variable/method in a class, the deobfuscation of a class?

    Requests in this thread may be part of a suggestion of a game-feature and vice-versa, since an API-feature and a game-feature may end up being 2 sides of the same coin.
     
    Joined
    Jan 22, 2014
    Messages
    1,047
    Reaction score
    299
    Build Helpers
    Defining your own build helpers is currently not really possible. Their constructor has to accept a parameter that is of an obfuscated type which changes in every build, there is no registering mechanism, which means that they have to be injected into the appropriate package in the StarMade.jar, and they have to implement some drawLocal method where I don't get why it is needed.
    So, in conclusion, we need
    • … a way to safely instantiate and register build helpers to the game
    • … a simpler way to define them. I imagine it should be suffiicent to just return the set of vectors, without the need to implement some custom drawing mechanism everytime.
    Commands
    I believe a very important thing is the definition of custom server commands that do whatever we want. I'm not really familiar with this, but it seems to me that the only thing missing is a way to register them. Support for overriding built-ins would be awesome. I'm thinking about some kind of permission mod like Bukkit provided.​
    Display Modules
    Display modules could support custom variables. Have an interface that lets you define the variable name and the return values. Having them take parameters could also be a thing, i.e. using common function syntax. I'm thinking that this could be solved in a similar manner how build helpers define their parameters.​

    In the long run we also need to be able to define custom blocks (like custom weapons and effects) and have kind of a UI framework available. This is obviously kinda difficult because a user should not have to mod their client in order to be able to play on any server, but I guess it could be solved by using Lua for this sort of thing.
     
    Joined
    Jul 21, 2013
    Messages
    2,932
    Reaction score
    460
    • Hardware Store
    Build Helpers
    Defining your own build helpers is currently not really possible. Their constructor has to accept a parameter that is of an obfuscated type which changes in every build, there is no registering mechanism, which means that they have to be injected into the appropriate package in the StarMade.jar, and they have to implement some drawLocal method where I don't get why it is needed.
    So, in conclusion, we need
    • … a way to safely instantiate and register build helpers to the game
    • … a simpler way to define them. I imagine it should be suffiicent to just return the set of vectors, without the need to implement some custom drawing mechanism everytime.
    Commands
    I believe a very important thing is the definition of custom server commands that do whatever we want. I'm not really familiar with this, but it seems to me that the only thing missing is a way to register them. Support for overriding built-ins would be awesome. I'm thinking about some kind of permission mod like Bukkit provided.​
    Display Modules
    Display modules could support custom variables. Have an interface that lets you define the variable name and the return values. Having them take parameters could also be a thing, i.e. using common function syntax. I'm thinking that this could be solved in a similar manner how build helpers define their parameters.​

    In the long run we also need to be able to define custom blocks (like custom weapons and effects) and have kind of a UI framework available. This is obviously kinda difficult because a user should not have to mod their client in order to be able to play on any server, but I guess it could be solved by using Lua for this sort of thing.
    • Regarding buildhelpers
      • The buildhelper registering could be achieved by a List<Class<? extends BuildHelper>>
        • I actually poked schema about this some time ago.
      • I agree, the drawing method shouldn't be abstract, but instead just use the Set of locations. However, one should still be able to override it if wanted
    • The commands could simply be done by a Map<String,ChatCommand> with ChatCommand being an interface with the methods
      Java:
      void runCommand(PlayerState player, String[] params); //if executed from the server's console, player is null
      void runCommand(PlayerState player, String param); //speeds things up if someone wants to make a command using concatted varargs [the pm command e.g.]
      boolean singleParam(); // if true, the runCommand(PlayerState,String) is used to run the command instead of runCommand(PlayerState,String[])
    • The display modules basically just need Formatters applied to them.
     
    Joined
    Jul 6, 2013
    Messages
    48
    Reaction score
    7
    • Purchased!
    I'm still doing experiments, but maybe a way to modify existing classes without having to replace the class file.
     
    Joined
    Jul 21, 2013
    Messages
    2,932
    Reaction score
    460
    • Hardware Store
    I'm still doing experiments, but maybe a way to modify existing classes without having to replace the class file.
    That is impossible without direct knowledge and usage of knowledge about the .class format. I could try to make an editor, but I'm afraid nobody'll be able use it, unless he/she could manipulate the class files directly with a hex-editor already.
     
    Joined
    Jun 19, 2014
    Messages
    1,756
    Reaction score
    162
    • Purchased!
    • Top Forum Contributor
    • Legacy Citizen
    I'd like to have:
    • The ability to have custom factories.
    • Some extension to the block editor from the launcher.
    • Custom resources.
    • The ability to define in which blocks resources will spawn.
    • Custom asteroid/planet generation.
    1. The above must all be relatively easy to use.
    That's pretty much it for now. I might want something later on, but those are the most important things for me.

    Also, great job at organising all this!
     
    Joined
    Jul 21, 2013
    Messages
    2,932
    Reaction score
    460
    • Hardware Store
    I'd like to have:
    • The ability to have custom factories.
    • Some extension to the block editor from the launcher.
    • Custom resources.
    • The ability to define in which blocks resources will spawn.
    • Custom asteroid/planet generation.
    1. The above must all be relatively easy to use.
    That's pretty much it for now. I might want something later on, but those are the most important things for me.

    Also, great job at organising all this!
    1. Already possible, requires inserting code though.[and is easy, provided you know java]
    2. specify more please
    3. I think we're already at a limit here
    4. I want
    5. I want even more.(possible already possible, but hard to do)
    BTW, there is no organization behind this, it's just that I'm uninspired and want to know what it needed.
     
    Joined
    Jun 19, 2014
    Messages
    1,756
    Reaction score
    162
    • Purchased!
    • Top Forum Contributor
    • Legacy Citizen
    I basically wanted a better version of the block editor in which you can easily create custom configs, and also custom factories.

    And how do you actually create custom factories now, Megacrafter127 ?
     
    Joined
    Jul 21, 2013
    Messages
    2,932
    Reaction score
    460
    • Hardware Store
    I basically wanted a better version of the block editor in which you can easily create custom configs, and also custom factories.

    And how do you actually create custom factories now, Megacrafter127 ?
    In the class ElementKeyMap, there are variables of the type FixedRecipe(1 for each type of factory). The arrays storing the conversions of items of public and not final, allowing you to (ex-)change them.
     
    Joined
    Jun 19, 2014
    Messages
    1,756
    Reaction score
    162
    • Purchased!
    • Top Forum Contributor
    • Legacy Citizen
    In the class ElementKeyMap, there are variables of the type FixedRecipe(1 for each type of factory). The arrays storing the conversions of items of public and not final, allowing you to (ex-)change them.
    Ehh, my java coding skills are, well, non-existent. Maybe I should start learning it.

    It would be nice if the API added a way for people who don't know java to create them.
     
    Joined
    Jan 22, 2014
    Messages
    1,047
    Reaction score
    299
    The ability to define in which blocks resources will spawn.
    Something like this? :P
    HTML:
    <ResourceInjection>1</ResourceInjection>
    I basically wanted a better version of the block editor in which you can easily create custom configs, and also custom factories.
    This is about the API (Application Programming Interface), meaning we are trying to collect ways to specifically make this better. A block editor is independent of this and, unlike the API, could easily be created by a third party.
     
    Joined
    Jun 19, 2014
    Messages
    1,756
    Reaction score
    162
    • Purchased!
    • Top Forum Contributor
    • Legacy Citizen
    Something like this? :p
    HTML:
    <ResourceInjection>1</ResourceInjection>

    This is about the API (Application Programming Interface), meaning we are trying to collect ways to specifically make this better. A block editor is independent of this and, unlike the API, could easily be created by a third party.
    Last time I tried using that it wouldn't show me the buttons a normal factory would show.
     
    Last edited:
    Joined
    Jun 19, 2014
    Messages
    1,756
    Reaction score
    162
    • Purchased!
    • Top Forum Contributor
    • Legacy Citizen
    Can I ask again for a custom factory function? The code thing probably won't be easy to get to other clients (when making mods), so could you make it that it is easy to transfer to to other clients?

    Edit: just copying the whole config section for a factory doesn't get the overlay, which is why I'm asking for this.
     
    Joined
    Jul 21, 2013
    Messages
    2,932
    Reaction score
    460
    • Hardware Store
    Can I ask again for a custom factory function? The code thing probably won't be easy to get to other clients (when making mods), so could you make it that it is easy to transfer to to other clients?
    That indeed is a problem, but doesn't belong to the API, but more in the category of configs.
     
    Joined
    Oct 19, 2013
    Messages
    47
    Reaction score
    1
    Functionality for cancelling chat events
    ie onChatEvent(Event event) { event.Cancel() };

    Functionality to iterate players objects
    ie Universe universe = server.GetUniverse();
    foreach (Player in universe.getPlayers())
    {
    }

    Functionality to get a players positions
    ie player.getLocation()

    Functionality to send a message to the player
    ie player.SendMessage()

    It would be nice if this was similar to the bukkit implementation

    http://jd.bukkit.org/rb/apidocs/org/bukkit/event/player/AsyncPlayerChatEvent.html

    Uses

    This will allow me to set Radio broadcast distances for chat messages in game, i can cancel the event, check the position of players nearby and then resend the message with a [Radio] tag

    We could do other cool things with this like scramble messages based on the distance from the receiver, add racial language scrambling etc
     
    Joined
    Jan 31, 2014
    Messages
    14
    Reaction score
    3
    • Legacy Citizen
    Functionality for cancelling chat events
    ie onChatEvent(Event event) { event.Cancel() };

    Functionality to iterate players objects
    ie Universe universe = server.GetUniverse();
    foreach (Player in universe.getPlayers())
    {
    }

    Functionality to get a players positions
    ie player.getLocation()

    Functionality to send a message to the player
    ie player.SendMessage()

    It would be nice if this was similar to the bukkit implementation

    http://jd.bukkit.org/rb/apidocs/org/bukkit/event/player/AsyncPlayerChatEvent.html

    Uses

    This will allow me to set Radio broadcast distances for chat messages in game, i can cancel the event, check the position of players nearby and then resend the message with a [Radio] tag

    We could do other cool things with this like scramble messages based on the distance from the receiver, add racial language scrambling etc
    I am a member of the Ragnarok Galaxy server and I think I speak for most of us when I say ... "WE NEED THIS!!!" i have spent weeks chopping up copies of a starmade directories (both parts) looking for any hidden ways to get more to mess with, and i cant find anyyyyy!!!!!!! =_____= it drives me nuts, I am a MC plugineer, and having so little drives me plain nuts ... i LOVE MAKING PLUGINS, and adjusting then and that kind of thing, but MC has gotten boring to me, i want space!!! no more crunchy, unmoving land masses!!!! the Dark needs his daily dose of space exploration guys! and also, i have been playing Space engineers, dont like it as is much, but has some nice stuff I would like to add in for servers and other people to use, like full online/offline ship making, not like SMedit, i mean make a ship from nothing, build it how ever, with no worries of anything! and custom asteroids, planets, stations, i want FULL control, Its a sandbox game, i feel it is my right to be god! to control ALL the things :P and i would LOVE to use something like Minecraft's Voxelsniper, or world edit to make planets, stations, or asteroids, I know i would make some cool stuff, lying through full on dense asteroid fields, flying your ship into a hole in a planet and that messes up their Radar, but also yours so you have to fly "blind" and that would really define good pilots from the moderate ones, test your limits as a pilot XD
     

    nightrune

    Wizard/Developer/Project Manager
    Joined
    May 11, 2015
    Messages
    1,324
    Reaction score
    577
    • Schine
    • Top Forum Contributor
    • Thinking Positive
    In game scripting would be a huge boon. I want to be able to provide events for people to play on a server and save thier progress as well.

    Some sort of event system would be great.
     

    Tunk

    Who's idea was this?
    Joined
    Sep 8, 2013
    Messages
    363
    Reaction score
    153
    • Purchased!
    • Community Content - Bronze 1
    • Legacy Citizen 4
    So I've been on a binge lately and been picking at starmade.

    What I would REALLY like is if the HSQLDB database were exposed in a more friendly manner, possibly starting it in server mode so we can connect to it via command line or other tools from localhost without having to do some fiddly fun ;)

    Also some doco on the tables (specifically systems, sectors, sectors_items) would be much appreciated, as well and when/how a system/sector is generated and under what conditions it wont be.

    More info on how systems are generated and if/when they get generated etc would really go a long way to things like custom galaxy gen, custom planet gen, custom roid/station gen etc and having that nicely automated.

    The rest looks to be standard easy to understand stuff, and highly useful for admins with a bit of sql savvy, or tool/wrapper builders.
    Will also be useful later as jar modding and modloaders takes off more.
     
    Joined
    Jun 23, 2013
    Messages
    24
    Reaction score
    7
    • Community Content - Bronze 1
    • Legacy Citizen 2
    • Legacy Citizen
    The one really cool feature I would like to see is that mods are handled as packages, with real package management, with a source to download them from (with API). And then have servers advertise what mods they have, clients can then load up appropriate mods and/or download & install them.

    I'm just starting to pick at the starmade code, trying to get a handle on things. Here's just some things that appear to be missing.
    • No way to instantiate custom metaitems (eg, new guns). This requires custom commands, additions to the Lua/NPC API, and additions to the NPC scripts.
    • New blocks (elements?) require new recipes to get them, which are in the block config. I think we need some way for mods to provide their own block configs that get merged into the default block config (possibly to be overridden by the admin's custom config).
     
    • Like
    Reactions: Valck
    Joined
    Jun 23, 2013
    Messages
    24
    Reaction score
    7
    • Community Content - Bronze 1
    • Legacy Citizen 2
    • Legacy Citizen
    There seems to be a lack of events or hooks for:
    • Element activations ('R' key)
    • Element hover text
    • Metaitem activations (left and right click)
    • Logic
    • Master/slave connections
    StarMade seems to have the style of not instantiating java objects for each element, so it would make sense for the top-level mod object to receive the events. It would be nice to have a standard, centralized mechanism to filter these events.
    [DOUBLEPOST=1452206929,1452203802][/DOUBLEPOST]Hm. 2047 elements is not enough to encompass all items added by all mods by everyone. What I would have is some kind of ID arbitration system: mods register symbolic names, the mod framework loads up the block configs and informs the mods of the IDs assigned to them.

    Of course, then the clients and the servers need matching block configs (and maybe extra textures?), and saved blueprints need a copy of the Symbol -> ID table.