Preface: There are a lot of nice commands for scripters like me to use, but some small changes and moderate additions would really open a lot of doors for server-owners to have creative, dynamic gameplay. The framework is there, it just needs to be filled out a little bit more.
Here is my simple request for the "/giveid" command. It'd be really nice if this command gave a response when it was successful or not when removing items from a player's inventory. This may seem trivial, but it's a cornerstone ability that is 100% necessary to unlock a lot of really cool ideas. I'll give a few examples of how it works currently and what this change would allow.
Right now I can have a script that can send the command, "/giveid Benevolent27 80 1" to the server (via StarNet) and this will give the player 1 lava. If sending the command, "/giveid Benevolent27 80 -1," however, then it removes 1 lava. Awesome! So this gives me all sorts of ideas for commands that cost items! Quests! Trading! Admin events! Rare item hunting! Etc.! But then there is the brick wall that stops me from coding any of these things. The command doesn't return anything when this command runs (except to let you know the player is offline or an invalid ID was used). So I cannot know if it was successful or no when removing items. Bummer!
So, what might this be useful for? Well, one good one might be a "!trade" command. It could possibly have the usage, "!trade [player] [item number] [amount]". A player named "Otis" might type "!trade Benevolent27 80 5" and this will start a trade process with Benevolent27. When the process is completed and accepted by both parties, the script would then send the following commands to the console, "/giveid Otis 80 -5" and then IF that command is successful, "/giveid Benevolent27 80 5." IF the giveid command to Benevolent27 fails, then it refunds the items back to Otis. However, right now when I use the "/giveid Otis 80 -5" command, the server gives no hint whether or not it was successful either way. If Otis did in fact have 5 lava in his inventory, it will remove the item. So that's good. But what if Otis has 0? Or 3? No error is returned, which means I can't get very creative with my wrapper.
Some other possible uses:
- Turning in quest items
- Using alternate currency items, like bronze, silver, and gold bars to purchase items, redeem for credits, or perhaps store in a virtual bank vault.
Some More Ideas on Console Commands that would really open a lot of doors for scripting:
1. Add to the "/give_metaitem" command to allow giving of blueprints.
Right now the usage is "/give_metaitem schema logbook/weapon/helmet." I suggest adding "blueprint" as an option and have the player type the full blueprint name in quotes and then specify whether it should be filled or not. Example: '/give_metaitem Benevolent27 blueprint "Fighter Ship 29" filled' This would then give the player "Benevolent27" a blueprint from the catalog called "Fighter Ship 29" and it would be filled. If there is an error, then the command will return it. Example "Blueprint name not found." Also, allow this command to give an item to a player that is not online.
2. Add some options for "/player_info" so that only the needed info is returned.
For example, "/player_info Benevolent27 credits" would only return the amount of credits the player has. This would help simplify scripting with StarNet, and also reduce the amount of reads necessary to the player's info. In addition this would be a nice addition for admins to have more human readable and targeted inquiries. Doing it in this way would also allow backwards compatibility to existing scripts.
3. In a more general sense, allow the commands which give items or credits, like the "/give_credits", "/give", "/giveid", and "give_all_items" commands to give/remove credits/items from a target player's account even if that person is offline.
Why shouldn't an admin be able to modify a player's credits or items whenever they'd like? This would also help make banking with wrappers a bit less prone to breakdown should a player go offline at the wrong time while using a wrapper's banking function.
4. For the "/change_sector", "/change_sector_for", "/change_sector_copy", and "/change_sector_for_UID" commands, allow additional spacial coordinates to be given. [/B]
Right now the usage is "/change_sector_for Benevolent27 X Y Z." But, wouldn't it be nice to be able to provide optional spacial coordinates too? Something like "/change_sector_for Benevolent27 2 2 2 50 46 30"? This would allow exact placement of astronauts. If an astronaut is already in that exact location, then it would just place the player as close as possible to those coordinates, much like how spawning players works. The reason I'd like to see this implemented is because it would allow me to script in some quests/admin events that place people exactly within a base somewhere. It could also be used to place a player exactly back where they came from after a quest or admin event is over.
This is already possible with the "/teleport_to" command. I didn't realize it was completely different from the "/tp_to" command. I thought the "tp_to" command was simply a shorter version of it, but I was wrong.
5. Create a command called, "/list_items", which would list the items within a player's inventory and hotbar (not their cargo though).
Example Usage: "/list_items Benevolent27" This would work whether a player is online or offline, but would return an error if that player does not exist on the server. There could also be a "verbose" option which would give the exact placement of each item as well. Example: "/list_items Benevolent27 verbose" would return a list of the items and also show the order in which they appear. Such as if a player has power reactors in the 3rd slot over, it would show this. This would also show the item number of each item, enclosed in brackets. This would allow admins to see exactly what a player has in their inventory, and would also give good options to scripters like myself for things like quest items and smarter commands. The reason I think exact placement of the blocks would be useful is because of the next suggestion..
6. Create a command called "/replace_item_in_slot" command.
What this would do is replace a slot in a specified player's inventory. For example, perhaps I have a script that looks at a player's inventory (using the verbose method in number 5 above). It then wants to change a specific quest item into a reward, in place. How would it do this? Well, right now it cannot. But if it had that exact item's location in the player's inventory and a way to replace that item.. The script could easily do this. So the usage of this command would be, "/replace_item_slot_for_player [player name] [inventory/hotbar] [item placement number] [item id] [number of item]". So an example of use would be, "/replace_item_slot_for Benevolent27 inventory 1 80 5". This would replace the first slot of the player's inventory with 5 lava. Of course, I'd also make the script smart enough to know if the player had a stack of quest items and would use the "/giveid" command to give the player the amount they had minus 1 (or however many quest items it took to turn in the quest). Another good usage of this would be a way to mirror a player's inventory onto another GUI and that GUI would then make specific changes, to be used as an admin tool. When I ran sandbox server before, I had exactly this kind of tool and it was very useful.
7. Add the ability to specify an exact shop entity for the "/create_trade_party" to go to.
Right now an admin has to actually select it in their "n" screen. But if the command could allow a UID.. Then this could be used to refill specific shops through scripting.
New! As of 08-18-16
8. Add a command to force an astronaut out of the entity they are in.
Perhaps, "/force_exit [playername]". This would be useful for scripts that are teleporting players to other locations and the script does not want to bring the person's ship with them.
9. Conversely, add a command to force an astronaut to ENTER an entity by UID.
This could perhaps have the usage, "/force_enter [playername] [entity_UID]". This would be useful for scripts that want to return a player where they left off. Or perhaps sets up a quest.. or an admin event.. Ect. The command would first force_exit the player if they are already in an entity and then place them into the target entity. It might even be used to provide some similar access to a SHIFT + F8 type command that players can use, but only for certain entities and only at certain locations, like their home base.
I'm sure I could come up with more, but I'll leave it at this for now. I'm tired and could use some sleep. Thanks for taking the time to read this. As always, additional thoughts and ideas are welcome.
Here is my simple request for the "/giveid" command. It'd be really nice if this command gave a response when it was successful or not when removing items from a player's inventory. This may seem trivial, but it's a cornerstone ability that is 100% necessary to unlock a lot of really cool ideas. I'll give a few examples of how it works currently and what this change would allow.
Right now I can have a script that can send the command, "/giveid Benevolent27 80 1" to the server (via StarNet) and this will give the player 1 lava. If sending the command, "/giveid Benevolent27 80 -1," however, then it removes 1 lava. Awesome! So this gives me all sorts of ideas for commands that cost items! Quests! Trading! Admin events! Rare item hunting! Etc.! But then there is the brick wall that stops me from coding any of these things. The command doesn't return anything when this command runs (except to let you know the player is offline or an invalid ID was used). So I cannot know if it was successful or no when removing items. Bummer!
So, what might this be useful for? Well, one good one might be a "!trade" command. It could possibly have the usage, "!trade [player] [item number] [amount]". A player named "Otis" might type "!trade Benevolent27 80 5" and this will start a trade process with Benevolent27. When the process is completed and accepted by both parties, the script would then send the following commands to the console, "/giveid Otis 80 -5" and then IF that command is successful, "/giveid Benevolent27 80 5." IF the giveid command to Benevolent27 fails, then it refunds the items back to Otis. However, right now when I use the "/giveid Otis 80 -5" command, the server gives no hint whether or not it was successful either way. If Otis did in fact have 5 lava in his inventory, it will remove the item. So that's good. But what if Otis has 0? Or 3? No error is returned, which means I can't get very creative with my wrapper.
Some other possible uses:
- Turning in quest items
- Using alternate currency items, like bronze, silver, and gold bars to purchase items, redeem for credits, or perhaps store in a virtual bank vault.
Some More Ideas on Console Commands that would really open a lot of doors for scripting:
1. Add to the "/give_metaitem" command to allow giving of blueprints.
Right now the usage is "/give_metaitem schema logbook/weapon/helmet." I suggest adding "blueprint" as an option and have the player type the full blueprint name in quotes and then specify whether it should be filled or not. Example: '/give_metaitem Benevolent27 blueprint "Fighter Ship 29" filled' This would then give the player "Benevolent27" a blueprint from the catalog called "Fighter Ship 29" and it would be filled. If there is an error, then the command will return it. Example "Blueprint name not found." Also, allow this command to give an item to a player that is not online.
2. Add some options for "/player_info" so that only the needed info is returned.
For example, "/player_info Benevolent27 credits" would only return the amount of credits the player has. This would help simplify scripting with StarNet, and also reduce the amount of reads necessary to the player's info. In addition this would be a nice addition for admins to have more human readable and targeted inquiries. Doing it in this way would also allow backwards compatibility to existing scripts.
3. In a more general sense, allow the commands which give items or credits, like the "/give_credits", "/give", "/giveid", and "give_all_items" commands to give/remove credits/items from a target player's account even if that person is offline.
Why shouldn't an admin be able to modify a player's credits or items whenever they'd like? This would also help make banking with wrappers a bit less prone to breakdown should a player go offline at the wrong time while using a wrapper's banking function.
This is already possible with the "/teleport_to" command. I didn't realize it was completely different from the "/tp_to" command. I thought the "tp_to" command was simply a shorter version of it, but I was wrong.
5. Create a command called, "/list_items", which would list the items within a player's inventory and hotbar (not their cargo though).
Example Usage: "/list_items Benevolent27" This would work whether a player is online or offline, but would return an error if that player does not exist on the server. There could also be a "verbose" option which would give the exact placement of each item as well. Example: "/list_items Benevolent27 verbose" would return a list of the items and also show the order in which they appear. Such as if a player has power reactors in the 3rd slot over, it would show this. This would also show the item number of each item, enclosed in brackets. This would allow admins to see exactly what a player has in their inventory, and would also give good options to scripters like myself for things like quest items and smarter commands. The reason I think exact placement of the blocks would be useful is because of the next suggestion..
6. Create a command called "/replace_item_in_slot" command.
What this would do is replace a slot in a specified player's inventory. For example, perhaps I have a script that looks at a player's inventory (using the verbose method in number 5 above). It then wants to change a specific quest item into a reward, in place. How would it do this? Well, right now it cannot. But if it had that exact item's location in the player's inventory and a way to replace that item.. The script could easily do this. So the usage of this command would be, "/replace_item_slot_for_player [player name] [inventory/hotbar] [item placement number] [item id] [number of item]". So an example of use would be, "/replace_item_slot_for Benevolent27 inventory 1 80 5". This would replace the first slot of the player's inventory with 5 lava. Of course, I'd also make the script smart enough to know if the player had a stack of quest items and would use the "/giveid" command to give the player the amount they had minus 1 (or however many quest items it took to turn in the quest). Another good usage of this would be a way to mirror a player's inventory onto another GUI and that GUI would then make specific changes, to be used as an admin tool. When I ran sandbox server before, I had exactly this kind of tool and it was very useful.
7. Add the ability to specify an exact shop entity for the "/create_trade_party" to go to.
Right now an admin has to actually select it in their "n" screen. But if the command could allow a UID.. Then this could be used to refill specific shops through scripting.
New! As of 08-18-16
8. Add a command to force an astronaut out of the entity they are in.
Perhaps, "/force_exit [playername]". This would be useful for scripts that are teleporting players to other locations and the script does not want to bring the person's ship with them.
9. Conversely, add a command to force an astronaut to ENTER an entity by UID.
This could perhaps have the usage, "/force_enter [playername] [entity_UID]". This would be useful for scripts that want to return a player where they left off. Or perhaps sets up a quest.. or an admin event.. Ect. The command would first force_exit the player if they are already in an entity and then place them into the target entity. It might even be used to provide some similar access to a SHIFT + F8 type command that players can use, but only for certain entities and only at certain locations, like their home base.
I'm sure I could come up with more, but I'll leave it at this for now. I'm tired and could use some sleep. Thanks for taking the time to read this. As always, additional thoughts and ideas are welcome.
Last edited: