A simple request for the "/giveid" command + Some more ideas on server commands

    Benevolent27

    Join the Dark Side
    Joined
    Aug 21, 2015
    Messages
    585
    Reaction score
    327
    • Purchased!
    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. :)
     
    Last edited:

    Erth Paradine

    Server Admln & Bug Reporter
    Joined
    Feb 15, 2016
    Messages
    239
    Reaction score
    58
    Check console logs after running the command:
    Code:
    [ADMIN COMMAND] GIVEID from org.schema.schine.network.server.AdminLocalClient@7c223bea params: [ErthParadine, 80, -1]
    Further, running the command via StarNet returns a 0 errorstatus,. which is a standard way of saying that no errors occurred during execution.

    It would be nice of an error was generated when there was nothing to take though; if player's inventory didn't contain that item, return non-zero status, and report error to console output. Being able to list a player inventory would be handy though - even if just mainly for double-checking that the above commands ran without issue.

    As a workaround though, you might look into console output tagged with [INVENTORY]
     
    Joined
    Jan 28, 2015
    Messages
    492
    Reaction score
    149
    • Community Content - Bronze 1
    • Purchased!
    • Legacy Citizen 3
    The FeedUpYourBeast server ran with a goldbar setup. Shot Pirates used to drop bars. They had a spawn station where you could exchange the bars for stuff and ships.

    It's owner might be able to offer some insight. Maybe they used some pretty neat scripts there.

    FeedUpYourBeast
     

    NeonSturm

    StormMaker
    Joined
    Dec 31, 2013
    Messages
    5,110
    Reaction score
    617
    • Wired for Logic
    • Thinking Positive
    • Legacy Citizen 5
    Why not add a whole text-based trading interface?
    Why not add text-based interfaces for everything?

    !trade sessions
    !trade [ID] start USER
    !trade [ID] add/mention ITEM
    !trade [ID] demand/request ITEM
    !trade [ID] list ITEM
    !trade [ID] summary
    !trade [ID] accept/deny [ITEM/all [count]]
    !trade [ID] accept/deny summary confirm

    "add" adds an item to your side of the trade
    "mention" puts it into a reminder what can be asked/demanded by the other (rather than a blind guess).
    "request" allows the other to add by simply typing "!trade accept item". The string "all" is a constant.
    "demand" just puts it on the list of what is offered to you - the verb should be a warning to friendly traders!
    "list/ask/scan ITEM" Shows how much items are available on your or enemy ship (scan is invasive).
    "summary" shows a summary of everything since the last "!trade start" command.
    "!trade accept trade summary confirm" checks if something has changed since the summary is shown and must contain "confirm" if accepted.
     

    Benevolent27

    Join the Dark Side
    Joined
    Aug 21, 2015
    Messages
    585
    Reaction score
    327
    • Purchased!
    Why not add a whole text-based trading interface?
    Why not add text-based interfaces for everything?

    !trade sessions
    !trade [ID] start USER
    !trade [ID] add/mention ITEM
    !trade [ID] demand/request ITEM
    !trade [ID] list ITEM
    !trade [ID] summary
    !trade [ID] accept/deny [ITEM/all [count]]
    !trade [ID] accept/deny summary confirm

    "add" adds an item to your side of the trade
    "mention" puts it into a reminder what can be asked/demanded by the other (rather than a blind guess).
    "request" allows the other to add by simply typing "!trade accept item". The string "all" is a constant.
    "demand" just puts it on the list of what is offered to you - the verb should be a warning to friendly traders!
    "list/ask/scan ITEM" Shows how much items are available on your or enemy ship (scan is invasive).
    "summary" shows a summary of everything since the last "!trade start" command.
    "!trade accept trade summary confirm" checks if something has changed since the summary is shown and must contain "confirm" if accepted.
    That's a good way to do it. My focus right now actually isn't trading though. That was just an example of a script that would be possible if the "/giveid" command actually gave some kind of input about whether it was successful or not. Alternatively, there could be other commands to substitute for this, such as a command to list a player's inventory, or list all of a certain item type and give the amount in the player's inventory. Example: "/player_inv_id_search 80" which would then return "0" if none or whatever other number. Though I would prefer to have the /give_id action actually be capable of this check, since it would remove any sort of pause between the check and the actual removal of the item. That pause could possibly allow exploiting of the script.
     

    NeonSturm

    StormMaker
    Joined
    Dec 31, 2013
    Messages
    5,110
    Reaction score
    617
    • Wired for Logic
    • Thinking Positive
    • Legacy Citizen 5
    Though I would prefer to have the /give_id action actually be capable of this check, since it would remove any sort of pause between the check and the actual removal of the item. That pause could possibly allow exploiting of the script.
    Actually, you don't need a check here.
    You need a check of "do you have enough money" to get the trust of a trade partner before the trade but still have a "not enough money" failure exception afterwards additionally.

    What you need is either an atomic function "check(item, num) and take(item, num) or return failure"

    Or a "take_upTo(x, num_maxTaken)", "take_downTo(x, num_minRemaining)" and then check what you've got.
    You can afterwards give it back if it is too low or give some alternative back.
    This approach is like a "virtual backpack" which belongs to the transaction.
     

    Benevolent27

    Join the Dark Side
    Joined
    Aug 21, 2015
    Messages
    585
    Reaction score
    327
    • Purchased!
    Actually, you don't need a check here.
    You need a check of "do you have enough money" to get the trust of a trade partner before the trade but still have a "not enough money" failure exception afterwards additionally.

    What you need is either an atomic function "check(item, num) and take(item, num) or return failure"

    Or a "take_upTo(x, num_maxTaken)", "take_downTo(x, num_minRemaining)" and then check what you've got.
    You can afterwards give it back if it is too low or give some alternative back.
    This approach is like a "virtual backpack" which belongs to the transaction.
    Being able to create a virtual backpack in game might be cool, though I'd rather have the ability to store custom variables, which would utilize the built in HSQL for the server. Then the devs could probably provide the framework for a "virtual backpack" as an example of what it could be used for. Right now my scripts rely on my own database for outside variables, like banking.
    [doublepost=1471092931,1471091945][/doublepost]
    Why not add a whole text-based trading interface?
    Why not add text-based interfaces for everything?

    !trade sessions
    !trade [ID] start USER
    !trade [ID] add/mention ITEM
    !trade [ID] demand/request ITEM
    !trade [ID] list ITEM
    !trade [ID] summary
    !trade [ID] accept/deny [ITEM/all [count]]
    !trade [ID] accept/deny summary confirm

    "add" adds an item to your side of the trade
    "mention" puts it into a reminder what can be asked/demanded by the other (rather than a blind guess).
    "request" allows the other to add by simply typing "!trade accept item". The string "all" is a constant.
    "demand" just puts it on the list of what is offered to you - the verb should be a warning to friendly traders!
    "list/ask/scan ITEM" Shows how much items are available on your or enemy ship (scan is invasive).
    "summary" shows a summary of everything since the last "!trade start" command.
    "!trade accept trade summary confirm" checks if something has changed since the summary is shown and must contain "confirm" if accepted.
    Oh, but for a trade system, I'd probably make it so that players MUST BE in the same sector as each other. I'd also streamline it like this:

    !trade Player

    Player then gets a message and is told to type "!accept" or "!deny" with it auto-denying if no response is given within 10 seconds.

    Then instructions would be given to both players on how to add to the trade, which would probably just be "!trade item number."

    After each addition, the player is given feedback, like "20 lava added to offering!" This would just check to make sure the items are actually in the player's inventory, telling the player something like, "You don't have 20 lava!" if not. (This is to avoid complications that can occur if a player logs off and the script is unable to return the items). Each time an item is added successfully, it also lets the other player know what has been added to their trade partner's offering.

    If either player wants to see what is up for trade so far (such as if there is a lot of text in chat and some of the messages got buried), they can type "!offer" to see all of what their trade partner is offering so far.

    When done, both players type "!done." Then the bot would let both players know what each side has up for trading. The players are then told to type "!finalize" to complete the trade or or "!cancel." This would then run all the scripting in the background to verify again that all items are in the player's inventory and then assist with the transfer. If there are any errors, then it let's both players know and cancels the trade, letting both players know the outcome.
     
    • Like
    Reactions: Lukwan

    NeonSturm

    StormMaker
    Joined
    Dec 31, 2013
    Messages
    5,110
    Reaction score
    617
    • Wired for Logic
    • Thinking Positive
    • Legacy Citizen 5
    !trade Player
    Player then gets a message and is told to type "!accept" or "!deny" with it auto-denying if no response is given within 10 seconds.
    !accept and !deny also work for !leaveShip.

    You should prefix everything with either !trade or !id. or "!trade id". id can be 0, 1, 2, 3 …
    It would help if the console replaces (newline + tab) with the most recent prefixes.

    Also, when com systems get implemented, you might want to offer deals to a partner 2-3 solar systems away and then, only if the deal is accepted, you travel to him or hire a trade-guild fleet for that job.

    !trade finalize - this sounds like a step of locking the summary before players accept/deny the trade/deal.
    !trade done - this sounds like an event which is triggered by a successful trade execution.
    It doesn't matter which words you use - you could even allow all of them.
    !trade [ID] accept summary confirm
    !trade #playername accept summary confirm - that's very clear, uses same 3 symbols (trade, id, accept) for single items and the whole trade (thus easy to remember). (symbol: confirm) also makes it easier to avoid accepting a trade instead of accepting an item which is named "summary computer" or alike.

    Being able to create a virtual backpack in game might be cool, though I'd rather have the ability to store custom variables, which would utilize the built in HSQL for the server. Then the devs could probably provide the framework for a "virtual backpack" as an example of what it could be used for. Right now my scripts rely on my own database for outside variables, like banking.
    The virtual backpack is virtual because the player does not see or use it - the script does.

    This "virtual backpack" is a construct/class/container for items. which are locked from your inventory (so you cannot cheat by removing items shortly after accepting the trade and the check is true.

    They are put into this container (on both sides) and locked from user-access before the trade is done and they reserve space equal to the trade's biggest backpack.
    Only if both sides reserved this backpack for a trade, the trade is executed. Directly after, the success is confirmed for both sides before this backpack can be opened.

    When it is opened, you receive the items and the backpack disappears.
     
    Last edited:

    MeRobo

    Scrub
    Joined
    Apr 1, 2015
    Messages
    423
    Reaction score
    653
    • Purchased!
    • Competition Winner - Small Fleets
    • Legacy Citizen 4
    It'd be nice if this command gave a response when it was successful or not.
    Like this?

    This happens when you enter an invalid ID.
    And I agree with you, there should be an error message in the cases of failure you described.
     

    Benevolent27

    Join the Dark Side
    Joined
    Aug 21, 2015
    Messages
    585
    Reaction score
    327
    • Purchased!
    Like this?

    This happens when you enter an invalid ID.
    And I agree with you, there should be an error message in the cases of failure you described.
    It seems to give errors for technical things, like if a player is offline or an invalid item is specified. That's good, but ultimately what my scripts need to know if the script was successful in removing items. Once I can see that, then it will open up a lot of doors for me and our server.
     

    Benevolent27

    Join the Dark Side
    Joined
    Aug 21, 2015
    Messages
    585
    Reaction score
    327
    • Purchased!
    !accept and !deny also work for !leaveShip.

    You should prefix everything with either !trade or !id. or "!trade id". id can be 0, 1, 2, 3 …
    It would help if the console replaces (newline + tab) with the most recent prefixes.

    Also, when com systems get implemented, you might want to offer deals to a partner 2-3 solar systems away and then, only if the deal is accepted, you travel to him or hire a trade-guild fleet for that job.

    !trade finalize - this sounds like a step of locking the summary before players accept/deny the trade/deal.
    !trade done - this sounds like an event which is triggered by a successful trade execution.
    It doesn't matter which words you use - you could even allow all of them.
    !trade [ID] accept summary confirm
    !trade #playername accept summary confirm - that's very clear, uses same 3 symbols (trade, id, accept) for single items and the whole trade (thus easy to remember). (symbol: confirm) also makes it easier to avoid accepting a trade instead of accepting an item which is named "summary computer" or alike.


    The virtual backpack is virtual because the player does not see or use it - the script does.

    This "virtual backpack" is a construct/class/container for items. which are locked from your inventory (so you cannot cheat by removing items shortly after accepting the trade and the check is true.

    They are put into this container (on both sides) and locked from user-access before the trade is done and they reserve space equal to the trade's biggest backpack.
    Only if both sides reserved this backpack for a trade, the trade is executed. Directly after, the success is confirmed for both sides before this backpack can be opened.

    When it is opened, you receive the items and the backpack disappears.
    I like the idea of comms. I can think of some scripting right now that I could use to grab a player's location and then they might use the "!shout" command to send a message to individual players that are within a few sectors of them. Though I think I'd still prefer to only allow trades to be initiated within the same sector. About what to call the commands, whether "!done" and then "!finalize" or vice versa, I don't think it really matters all that much, so long as people understand it. "!done" would be short for "!done adding items to my offerings," and "!finalize" would complete the trade, which I feel is appropriate because of the definition of the word, "produce or agree on a finished and definitive version of." I would probably change the wording for it to be even clearer though. Perhaps "!trade done" and then "!trade complete." Maybe also "!trade add [item] [number]" and "!trade remove [item]." Honestly though, I really didn't have any plans to create a personal trading system when I wrote this thread. That's just a small example of what could be done if my simple request is implemented.
     

    NeonSturm

    StormMaker
    Joined
    Dec 31, 2013
    Messages
    5,110
    Reaction score
    617
    • Wired for Logic
    • Thinking Positive
    • Legacy Citizen 5
    I like everything as long as it comes with TELNET (a software few use today and which is totally insecure :) )

    But seriously, perhaps the communication interface could connect keywords with ship-logic (blocks), so that you can build your own information centre at your faction home which exports and sells the logic in script form for terminals and as blueprints for replicating the entity of your information centre.

    Such a station would be worth to keep and build as it sells stuff.
     

    Benevolent27

    Join the Dark Side
    Joined
    Aug 21, 2015
    Messages
    585
    Reaction score
    327
    • Purchased!
    I like everything as long as it comes with TELNET (a software few use today and which is totally insecure :) )

    But seriously, perhaps the communication interface could connect keywords with ship-logic (blocks), so that you can build your own information centre at your faction home which exports and sells the logic in script form for terminals and as blueprints for replicating the entity of your information centre.

    Such a station would be worth to keep and build as it sells stuff.
    I'm not entirely sure what you're referring to here. Is it so players can type something like "!info" while at spawn, and it might set off logic at the base? Or do you mean where a player could hit a button, and then a script starts sending server messages to the player, to provide info? Or perhaps an area trigger sets it off. Or something different?
    [doublepost=1471518248,1471517083][/doublepost]
    Check console logs after running the command:
    Code:
    [ADMIN COMMAND] GIVEID from org.schema.schine.network.server.AdminLocalClient@7c223bea params: [ErthParadine, 80, -1]
    Further, running the command via StarNet returns a 0 errorstatus,. which is a standard way of saying that no errors occurred during execution.

    It would be nice of an error was generated when there was nothing to take though; if player's inventory didn't contain that item, return non-zero status, and report error to console output. Being able to list a player inventory would be handy though - even if just mainly for double-checking that the above commands ran without issue.

    As a workaround though, you might look into console output tagged with [INVENTORY]
    I try to avoid parsing the console output directly, because of how much spam goes through it. The last wrapper I had installed for linux crashed the server when even a moderate amount of battles were going on. I am sticking to a very low impact wrapper right now that I scripted. If I can't do it through StarNet, I don't do it.
     

    NeonSturm

    StormMaker
    Joined
    Dec 31, 2013
    Messages
    5,110
    Reaction score
    617
    • Wired for Logic
    • Thinking Positive
    • Legacy Citizen 5
    I'm not entirely sure what you're referring to here. Is it so players can type something like "!info" while at spawn, and it might set off logic at the base? Or do you mean where a player could hit a button, and then a script starts sending server messages to the player, to provide info? Or perhaps an area trigger sets it off. Or something different?
    A display block which triggers if it's text-content would appear in a command directed at it.
    Or block-logic optimized into a script which does not have to set the activation-bit of blocks but work in a more condense only-logic-array.

    To make text-detection easier, I would make everything lowercase and alphanumeric.
    I would translate player-names to their IDs like @#1234567890.
    This I would put in a 5bit-tree:
    0-25 is alphanumeric
    26-30 special chars
    value 31 for a number in the next hierarchy levels interpreted as:
    0-15 for hexadecimal values (player-IDs for example, after e @# levels)
    5. bit (value 16) indicates a following numeric block.​
    You don't need 1 tree-level for 1 letter. Tree levels which contain just 1 possible entry can be eliminated by using 3 bits of the remaining byte as a number from 0..7 how many levels collapsed into one single.​

    Each level can contain a list of blocks which get activated by the sequence.
    I think I gonna implement this right now into my own logic-interpreter (console, not graphic blocks).​
     

    Erth Paradine

    Server Admln & Bug Reporter
    Joined
    Feb 15, 2016
    Messages
    239
    Reaction score
    58
    ...
    [doublepost=1471518248,1471517083][/doublepost]

    I try to avoid parsing the console output directly, because of how much spam goes through it. The last wrapper I had installed for linux crashed the server when even a moderate amount of battles were going on. I am sticking to a very low impact wrapper right now that I scripted. If I can't do it through StarNet, I don't do it.
    Consider capturing console output with a tool designed for log collection: rsyslog. From there, tools can readily monitor the logfile in a non-blocking way. For instance, by using standard features of logsurfer, a tool designed for very high speed & high volume log parsing, any scripts that you write no longer need to parse complete log output. Therefore you can focus on the in-game effects of your tools, instead of getting bogged-down by engineering high speed log parsing routines.

    We've found that doing it this way results in no perceivable lag between !command and an in-game response.

    We've been capturing and parsing console logs this way for the past ~2 months, and have not encountered a single issue. Along the way, we've also learned that saving, compressing, and rotating (daily) two months worth of console logs results in only ~1.3GB of consumed disk space.

    [doublepost=1471536454][/doublepost]
    A display block which triggers if it's text-content would appear in a command directed at it.
    Or block-logic optimized into a script which does not have to set the activation-bit of blocks but work in a more condense only-logic-array.
    ...​
    If you can figure out how to determine what a player is looking at and/or has selected on their HUD, I'd love to hear about it. As that's really the only thing preventing a suggestion like yours from working (+a few console/log parsing scripts of-course).
     
    Last edited:

    NeonSturm

    StormMaker
    Joined
    Dec 31, 2013
    Messages
    5,110
    Reaction score
    617
    • Wired for Logic
    • Thinking Positive
    • Legacy Citizen 5
    If you can figure out how to determine what a player is looking at and/or has selected on their HUD, I'd love to hear about it. As that's really the only thing preventing a suggestion like yours from working (+a few console/log parsing scripts of-course).
    Perhaps…
    If you shoot a shielded entity, it recharges, which drains power, which prevents a weapon from shooting or push modules from working.
    Alternatively, power-supply
    But this would require equipped weapons - or the player having a turret which shoots selected target.
     

    Erth Paradine

    Server Admln & Bug Reporter
    Joined
    Feb 15, 2016
    Messages
    239
    Reaction score
    58
    Perhaps…
    If you shoot a shielded entity, it recharges, which drains power, which prevents a weapon from shooting or push modules from working.
    Alternatively, power-supply
    But this would require equipped weapons - or the player having a turret which shoots selected target.
    Hmm...laser gun: shoot item for response. That might just work: have many docked entities, each one being a separate "switch" that players can shoot.
     

    Benevolent27

    Join the Dark Side
    Joined
    Aug 21, 2015
    Messages
    585
    Reaction score
    327
    • Purchased!
    Consider capturing console output with a tool designed for log collection: rsyslog. From there, tools can readily monitor the logfile in a non-blocking way. For instance, by using standard features of logsurfer, a tool designed for very high speed & high volume log parsing, any scripts that you write no longer need to parse complete log output. Therefore you can focus on the in-game effects of your tools, instead of getting bogged-down by engineering high speed log parsing routines.

    We've found that doing it this way results in no perceivable lag between !command and an in-game response.

    We've been capturing and parsing console logs this way for the past ~2 months, and have not encountered a single issue. Along the way, we've also learned that saving, compressing, and rotating (daily) two months worth of console logs results in only ~1.3GB of consumed disk space.
    I'll give it a shot. Thanks for the recommendation Erth. You've been a big help. :) I figured I'd wait until I had a good amount of back-end scripting set up anyhow before I even attempted this sort of thing. I know I can run a tail off the log file and then parse that, but I was worried this might create lag issues just due to the sheer volume of stuff that flies by, and all the parsing.. I figured I'd give it a go when I felt ready to build such a thing efficiently. We have some basic stuff like banking set up, so I'd like to be able to do more now. :)