GT Starmade Wrapper 1.0.5944.872

    Another StarMade wrapper - Run your server like a boss!

    1. maldiablo
      So I've got a wrapper in development that I've been running on my own server and I've decided to release it to the community. You can always see it in action on my own server (see my sig) if you're interested.

      It's a windows only .NET executable. You need the .net framework 4.5.1 in order to run this. Grab that here if you don't already have it:
      Features? Here's a list of implemented features:
      • Configuration and data are stored in a sqlite database. Yes, it IS possible to make a database driven application WITHOUT requiring people to install and configure a separate database engine!
      • Commands have warmups/cooldowns.
      • When a new player joins, there is a server wide announcement.
      • Admins get join/quit notifications even when server notifications are disabled.
      • Factions get join/quit notifications of fellow faction members when server notifications are disabled.
      • Admins get whisper/faction chat spy (they see all conversations) in a channel of their choice.
      • Admins can optionally be set to automatically invisible/god upon login.
      • Scheduled announcements.
      • Optional system to punish bad language after a number of warnings.
      • An on-screen log so easy to read, you can follow the game without being logged in.
      • Personal banking for players. Players can send money from one bank account to another.
      • starmade-servers.com integration (voting buys points to use in game for rewards).
      • Players can buy the sniper rifle, rocket launcher, or even a 30 second god-mode powerup (among other things)
      • Space folding with a rising cost in voting points for distance traveled (warmup/cooldowns apply)
      • Tracks docked ships so players can't abuse warping to move stations/planet faces.
      • Admins can create named warps (public/private/faction locked).
      • A !stuck command that only moves you one sector over in a random direction (with warmup/cooldown to prevent abuse).
      • A !help command that lists available commands. All available commands also have their own help text.
      • A !seen command for player to see when a friend/enemy was last on.
      • Set a blueprint size limit in blocks. Wrapper will automatically move rejected blueprints to a 'rejected' folder upon upload, preventing their use.
      • Local sector broadcast. If a player PM's him or herself, it sends that to everybody in just that one sector they are in. (only works on server versions prior to the chat update.)
      • There's a bug I've noticed where sometimes a player shows up in two factions, this attempts to resolve it internally by reading the player's true faction affiliation from their entity file. It makes no changes to the game though.

      Planned features in the future:
      - Shops and tradestations visited will be tracked. The wrapper will restock them even when the Starmade server unloads the sector they're in.
      - Bounty system
      - Automatic restarts
      - Galaxy borders (by either specifying min/max x,y,z coords (cubic), or centerpoint and max distance (speherical). People that pass a threshold will be warned then auto-teleported back to the nearest sector within the borders after a timeout.

      Screenshots:
      [​IMG]

      [​IMG]

      [​IMG]

      How to install:
      1. Ensure you have the proper .net framework.
      2. Extract the archive into your starmade subfolder (not the one with the starmade-starter.exe, but the next one).
      3. Run it. The first time it runs it'll create the sqlite database and populate the bad word table for the language filter. (comes with badword.txt file based on US English profanity).
      4. That's it! Your server should be running.

      Configuration:
      You'll need a sqlite database manager. If you don't already have a favorite, I'd recommend sqliteman which can be found at:
      sqliteman: sqlite3 admin and devel tool - Browse Files at SourceForge.net

      Using your favorite sqlite database editor, open wrapperdb.s3db

      The config table is where the party's at. I'll now walk you through all of the variables:

      • DBVersion: Leave this alone. Changing it will do nothing but break things for you.
      • LastPID: This will be the PID of the java process. No need to mess with this.
      • JavaArgs: The arguments passed to the java command line.
      • JavaExe: The java exe. On some configs you may need to add the path here as well
      • RestartCount: The amount of times the wrapper has detected the server restart while running.
      • PlayerWarningsToKick: If a player uses bad words beyond this threshold, they will be killed off by the wrapper.
      • PlayerWarningThreshold: After this threshold, they'll start getting killed AND kicked for using bad language.
      • WarningCooldown: Time in seconds to reduce a player's warning count for using bad language.
      • SMSApiCode: If you use starmade-servers.com, your api code goes here so voters can claim.
      • AnnounceInterval: Time in seconds between announcements.
      • WelcomeMessage: What's announced to a player every time they connect to your server.
      • PaidOnly: Currently unused, but will eventually be setup so the wrapper kicks players who haven't purchased Starmade (will use the whitelist to allow bypass)
      • FactionCleanupAge: If no members have logged on in this many days, delete the faction. Setting this to 0 (default) disables this feature. If you're running an established server, DO NOT TURN THIS ON! See notes about this further below.
      • LastFactionCleanup: The wrapper runs a cleanup cycle every 4 hours, this just helps it keep track of when it was last run. Nothing here for a server owner to mess with.
      • MaxBPBlockSize: Maximum amount of blocks an uploaded blueprint before it's moved to a reject folder.
      • ReloadBadWords: The server only populates the badwords table on it's first run if there's a badwords.txt file. If you set this to 1, it will dump and reload the table the next time you start the wrapper.

      New variables as of 3-4-2015:
      • VotingEarns: How many voting points earned when a player submits a claim for voting on starmade-servers.com
      • BPBlocksPerVP: Whenever a player buys a blueprint size cap increase with voting points, this is the size of the increase.
      • FoldingUnitMultiplier: If the base cost of folding is 1vp, then this is the most systems you can travel for that 1vp.
      • GodModeDuration: Time in seconds that godmode lasts when a player activates it
      • BankWithdrawPercentFee: What percent of a bank withdrawal gets eaten by the bank.
      • BankDepositPercentFee: What percent of a bank deposit gets eaten by the bank.
      • PlayerMinimumToBank: A player can only deposit credits they have in excess of this number. For example if it's set to 5 and they have 100 credits and try to deposit them all, only 95 will go in. The bank will never let a player's on-hand balance drop below this.
      • BankSendPercentFee: The percent charged by the bank when sending money from one player's bank to another player's bank.
      New variables as of 3-19-2015:
      • ChatSpyChannel: By default this is blank. When this is set, all private/faction/channel chat will be relayed into whatever channel is specified here. It's up to the admin to make sure it's a protected channel.

      Important things to know:
      • You should disable server join/part messages in your config or admins/faction members will get messages doubled.
      • All config variables take effect right away and change the running server (except for the ReloadBadWords variable).
      • The bad word filter can be turned off by removing the badwords.txt, changing the ReloadBadWords config value to 1, then restarting the wrapper. Or you can manually truncate the table. When the table is empty, the filter shuts down.
      • FactionCleanupAge uses the wrappers own internal time keeping to determine when players were last online. If you turn this on right away and you're running a server, the wrapper will see that nobody's been on recently and delete ALL the factions. So for example, if you want factions older then two weeks to be deleted, then you need to WAIT TWO WEEKS before turning this on.
      • The commandqueue and cooldowns tables shouldn't be messed with. They allow for warmups/cooldowns to persist even over server restarts.
      • Announcements are manually added to the database as well.
      • The characterfeatures table is maintained by the wrapper. When a player is online, any changes to that line in the table are ignored and overwritten. If you want to modify any of that directly, do it when they're offline.
      • Extra tables: badwordexceptions doesn't do anything yet.
      • If you close the wrapper with the X, the console will open and you can watch it attempt to gracefully shut down the server's java process. Hit the X again and it'll force it closed.
      • If you use the /shutdown command it'll trigger the wrapper's restart mechanism and increase the restart count.

      Warps:
      Adding/changing warps are done through a series of commands.

      First thing would be for creating a warp:
      • !warpcmd add WarpName x y z
        • This creates a basic private warp to x y z owned by you with no faction association. The point of origin is the sector you're in.
      • !warpcmd del WarpName
        • This deletes a named warp
      • !warpcmd access WarpName public/private/faction
        • By default a warp is 'private' when first made. This changes it to public of faction based or back to private if desired
      • !warpcmd faction WarpName FactionName
        • Assigns a faction to a warp. Ignored if access isn't set to 'faction'. There's no check on the validity of the faction name so be careful here.
      • !warpcmd hidden WarpName true/false
        • Hides a warp. Appears deleted to players but can still be seen by admins.
      • !warpcmd owner WarpName Owner
        • Changes the owner of a warp. Private warps only work for whoever this is defined as. Wrapper doesn't check if this is a valid player or not.
      • !warpcmd oneway WarpName true/false
        • Toggles whether a warp is one-way or not. The sector the warp was created in is considered the origin.

      Managing announcements:
      The announcement table is fairly straightforward. The ID field is auto-populated so ignore that and the LastTimeAnnounced field is managed by the wrapper. When adding an announcement, just set that field to 0. The wrapper uses it to prevent the same announcement from being repeated twice in a row.

      In-game commands. Excuse the formatting - this is taken from the source code nearly word-for-word (was easier for me that way):
      CommandText = "!bpcap"
      HelpText = "Shows the maximum size of a blueprint you can upload. Can be increased by spending voting points"
      NeedAdmin = False
      PrivateCommand = False

      CommandText = "!warpcmd oneway"
      HelpText = "Changes a warp from bidirectional to one-way and vice-versa. Syntax /pm %CHARNAME% !warpcmd oneway warpname true/false"
      NeedAdmin = True
      PrivateCommand = True

      CommandText = "!warpcmd hidden"
      HelpText = "Hides/unhides a warp from public view. Syntax /pm %CHARNAME% !warpcmd hidden warpname true/false"
      NeedAdmin = True
      PrivateCommand = True

      CommandText = "!warpcmd access"
      HelpText = "Sets a warpgate access level to public, private, or faction only. Syntax: /pm %CHARNAME% !warpcmd access warpname public/private/faction"
      NeedAdmin = True
      PrivateCommand = True

      CommandText = "!warpcmd owner"
      HelpText = "Changes the player that owns a warp. Syntax: /pm %CHARNAME% !warpcmd owner warpname playername"
      NeedAdmin = True
      PrivateCommand = True

      CommandText = "!warpcmd faction"
      HelpText = "Changes the faction that owns a warp. Syntax: /pm %CHARNAME% !warpcmd warpname faction faction_name"
      NeedAdmin = True
      PrivateCommand = True

      CommandText = "!warpcmd del"
      HelpText = "Deletes a warp. Syntax: /pm %CHARNAME% !warpcmd del warpname"
      NeedAdmin = True
      PrivateCommand = True

      CommandText = "!warpcmd add"
      HelpText = "Adds a warp with default owner set as invoker. Syntax: /pm %CHARNAME% !warpcmd add warpname X Y Z oneway"
      NeedAdmin = True
      PrivateCommand = True

      CommandText = "!warpcmd"
      HelpText = "Admin level warp gate management system."
      NeedAdmin = True
      PrivateCommand = True

      CommandText = "!bank i"
      HelpText = "Shows info about the bank like deposit/withdraw/sending fees"
      NeedAdmin = False
      PrivateCommand = False

      CommandText = "!bank s"
      HelpText = "Sends money from your bank account to another players bank account. !bank s playername amount"
      NeedAdmin = False
      PrivateCommand = False

      CommandText = "!bank b"
      HelpText = "Checks the balance of your bank account."
      NeedAdmin = False
      PrivateCommand = False

      CommandText = "!bank w"
      HelpText = "Withdraws money from your bank account with a 1% withdrawal fee."
      NeedAdmin = False
      PrivateCommand = False

      CommandText = "!bank d"
      HelpText = "Deposits money in your bank account."
      NeedAdmin = False
      PrivateCommand = False

      CommandText = "!bank"
      HelpText = "This is the master command for all other banking commands. Try !bank to get a list of it's subcommands."
      NeedAdmin = False
      PrivateCommand = False

      CommandText = "!distance"
      HelpText = "Tells you the distance between you and the coordinates you specify: usage: !distance x y z"
      NeedAdmin = False
      PrivateCommand = False

      CommandText = "!changevp"
      HelpText = "Lets you add or subtract VP from a player"
      NeedAdmin = True
      PrivateCommand = False

      CommandText = "!p fold"
      HelpText = "Lets you teleport anywhere in the known universe using VP at a cost of %COST% VP per %FOLDINGUNITMULTIPLIER% systems travelled (%WARMUP% warmup and %COOLDOWN% cooldown). Format is: !p fold x y z"
      NeedAdmin = False
      PrivateCommand = False

      CommandText = "!p lasergun"
      HelpText = "Spends %COST% of your voting points on getting the laser gun. Make sure you have the inventory space or you won't get the gun but you'll lose the VP!"
      NeedAdmin = False
      PrivateCommand = False

      CommandText = "!p healgun"
      HelpText = "Spends %COST% of your voting points on getting a healing beam. Make sure you have the inventory space or you won't get the gun but you'll lose the VP!"
      NeedAdmin = False
      PrivateCommand = False

      CommandText = "!p powergun"
      HelpText = "Spends %COST% of your voting points on getting a power supply beam. Make sure you have the inventory space or you won't get the gun but you'll lose the VP!"
      NeedAdmin = False
      PrivateCommand = False

      CommandText = "!p markergun"
      HelpText = "Spends %COST% of your voting points on getting a marker gun. Make sure you have the inventory space or you won't get the gun but you'll lose the VP!"
      NeedAdmin = False
      PrivateCommand = False

      CommandText = "!p snipergun"
      HelpText = "Spends %COST% of your voting points on getting a Sniper rifle. Make sure you have the inventory space or you won't get the gun but you'll lose the VP!"
      NeedAdmin = False
      PrivateCommand = False

      CommandText = "!p rocketgun"
      HelpText = "Spends %COST% of your voting points on getting a Rocket Launcher. Make sure you have the inventory space or you won't get the gun but you'll lose the VP!"
      NeedAdmin = False
      PrivateCommand = False

      CommandText = "!p god"
      HelpText = "Spends %COST% of your voting points on an instant-use god-mode powerup that lasts for %GODMODEDURATION%. (%COOLDOWN% cooldown)"
      NeedAdmin = False
      PrivateCommand = False

      CommandText = "!p bpincrease"
      HelpText = "Spends %COST% of your voting points to increase your personal blueprint upload limit by %BPBLOCKSPERVP% blocks."
      NeedAdmin = False
      PrivateCommand = False

      CommandText = "!p"
      HelpText = "Short for Purchase or Powerup. This will instantly cash in some of your VP for a powerup or item."
      NeedAdmin = False
      PrivateCommand = False

      CommandText = "!myvp"
      HelpText = "Checks your voting point balance."
      NeedAdmin = False
      PrivateCommand = False

      CommandText = "!claim"
      HelpText = "Claims a reward of %VOTINGEARNS% VP for voting on starmadeservers.com."
      NeedAdmin = False
      PrivateCommand = False

      CommandText = "!testclaim"
      HelpText = "Claims a reward of %VOTINGEARNS% VP for voting on starmadeservers.com (admin only - bypasses vote check)."
      NeedAdmin = True
      PrivateCommand = True

      CommandText = "!seen"
      HelpText = "Looks up when a player was last seen on this server."
      NeedAdmin = False
      PrivateCommand = False

      CommandText = "!godmode"
      HelpText = "Use with parameter TRUE/FALSE to enable/disable godmode for yourself. Use this instead of normal admin commmand to bypass the server broadcast."
      NeedAdmin = True
      PrivateCommand = True

      CommandText = "!invismode"
      HelpText = "Use with parameter TRUE/FALSE to enable/disable invisibility for yourself. Use this instead of normal admin commmand to bypass the server broadcast."
      NeedAdmin = True
      PrivateCommand = True

      CommandText = "!resetcooldowns"
      HelpText = "Debugging function - resets all command cooldowns across the server or for a single player."
      NeedAdmin = True
      PrivateCommand = True

      CommandText = "!stuck"
      HelpText = "Teleports one sector over in a random direction. Warmup is %WARMUP% and cooldown is %COOLDOWN%."
      NeedAdmin = False
      PrivateCommand = False

      CommandText = "!warp"
      HelpText = "Warps you somewhere if the game tells you there is a warp available. Warmup is %WARMUP% and cooldown is %COOLDOWN%. SYNTAX: !warp warpname."
      NeedAdmin = False
      PrivateCommand = False

      CommandText = "!help"
      HelpText = "Gets help on other commands. SYNTAX: !help !command"
      NeedAdmin = False
      PrivateCommand = False

      Well, that's about it. tl;dr can kiss my ass.

      EDIT:
      Looks like my forum sig doesn't show up here. So here it is:
      [​IMG]

    Recent Reviews

    1. RabidBat
      RabidBat
      5/5,
      Version: 1.0.5944.872
      Pretty good. Would like to see more options if possible.
      Still discovering what it has I'll admit.
    2. Jeztic
      Jeztic
      3/5,
      Version: 1.0.5944.872
      only reason I am giving this 3 stars is that when i load the DB it is asking me for a password and I am not seeing this in the forum anywhere
      1. maldiablo
        Author's Response
        It's not documented anywhere because because nothing in my wrapper would require a password. The database it creates/uses is open to access. Plus you haven't submitted a single request for assistance - not by forum post here, private message, or my own site. If you asked for help I may have offered to assist you in resolving and educated you on whatever self inflicted problem you're having that led to this troll review.
    3. JumpSuit
      JumpSuit
      3/5,
      Version: 1.0.5944.872
      Well gettings two errors: "ElementParser Exception: Grey Hull Info SensorImput not found. location: Block
      and another error: NumburFormatExcveption: mutiple points
      1. maldiablo
        Author's Response
        That error may not be my wrapper but the actual game. PM me the precise log text (get some log text before and after the error) and at the very least I'll confirm whether or not it's my wrapper and if it's something I can fix.
    4. FirePhoenox
      FirePhoenox
      5/5,
      Version: 1.0.5680.36528
      Very nice wrapper, there are still a few bugs, like the text typing backwards, and for some reason I am getting errors and told to report it to you, the only command that is working is the !claim but it says failed. all other commands do nothing and give me this error in the log file.

      [7/25/2015 5:46:11 PM] Starmade Version: 0.1932
      [7/25/2015 5:46:11 PM] Wrapper Version: 1.0.5680.36528
      [7/25/2015 5:46:11 PM] Data processed: [CHANNELROUTER] RECEIVED MESSAGE ON Server(0): [CHAT][sender=Admin][receiverType=CHANNEL][receiver=all][message=!myvp]
      [7/25/2015 5:46:11 PM] ex.Message: Cannot enqueue empty command!
      [7/25/2015 5:46:11 PM] ex.StackTrace: at ‍‭‬‎‬‏‬‮‬‭‫‫‪‏‏‬‎‍‮.‬‪‮‍‌‏‫‭‍‍‮‭‪‭‍‮‭‮‬‫‬‮(‏‪‫‬‭‭‫‎‮‏‭‬‏‍‭‎‪‫‪‏‌‫‮ ) in D:\Users\eviled\Documents\Visual Studio 2013\Projects\StarMadeWrapperNET\StarMadeWrapperNET\CommandHandler.vb:line 1820
      [7/25/2015 5:46:11 PM] at ‌‎‮‎‪‫‌‫‪‫‬‏‌‮‌‍‪‮‎‏‫‍‭‏‭‮.‍‫‌‎‫‫‫‍‫‬‭‪‌‌‮‮‌‮‍‏‪‮(Object , DataReceivedEventArgs , String ) in D:\Users\eviled\Documents\Visual Studio 2013\Projects\StarMadeWrapperNET\StarMadeWrapperNET\Form1.vb:line 544</WRAPPERERROR>
      1. maldiablo
        Author's Response
        You may have a corrupt wrapper database. This generally happens if you close the wrapper too quickly after it's first run and interrupt the database creation.

        Close the wrapper, make a backup of the wrapperdb.s3db file then remove it from your wrapper folder. Lastly, restart the wrapper and let it finish it's database creation stuff.

        If that still doesn't fix it, contact me in the PM system and I'll let you know what information I'm going to need next to lend a hand.
    5. dgrindle
      dgrindle
      5/5,
      Version: 1.0.5541.42557
      solid windows wrapper! Thanks maldiablo!
    6. ghettodexter
      ghettodexter
      5/5,
      Version: 1.0.5541.42557
      Awesome job... Ghettodexters Gameroom Fully supports your work... as far as bounty we are a HEAVY rp server... Your first review comes directly from testing on my server and my admin suggested the adjustable size BP per my request... I have another. Bounty is very much in HIGH demand here, we also have a jail and would like a way to easily set a jail spawn location or set spawn location of people with bounties to our jail so if they die they spawn in jail... right now it must be manually done each time and they don't spawn exactly inside the cell instead randomly in the station some place. This would be awesome if you can not give up on that. Give up on nothing because your work is great!
      1. maldiablo
        Author's Response
        I still intend to do bounties - I was just figuring on making them player initiated. Since it'd be easier to write player managed system I can make it more robust then any other server as there's a good chance I can have the person who places the bounty specify whether the target needs to be in a ship or not, and possibly the minimum mass of the ship that have to die in must be (that way the initiator can at least expect the target to take some financial damage in the process).

        Previously I was thinking of a system similar to games like Elite Dangerous where killing another player automatically generates a bounty on your head, but the big issue would be making it so players couldn't game the system by killing each other constantly. It'd take a lot of work to write the code to keep a history of who kills who just to prevent abuse. Behind the scenes, my primary goal isn't the feature itself, but the implementation of a version of it that can't be abused by players.

        As for jails - my observation is that every sector has sub-coordinates within it and I don't know of any server commands that can move a player directly to those sub coordinates. If you're in sub coordinates 10,50,20 within sector 2 2 2 then move to sector 3 3 3 with a server command, it'll retain those sub-coordinates on move. The problem is the undeathinator - players can place them at any subcoordinate so when they respawn, even if you auto-teleport them they're not going to be where you expect them to be. I think it's possible to kick the player to modify the entity file so they're in the right spot before coming back in, but that runs a corruption risk - especially if the format changes in the future. In a few cases my wrapper reads entity files to pull certain bits of information, but even then I try to avoid it unless absolutely necessary.
    7. Rand_Al_Thorn
      Rand_Al_Thorn
      4/5,
      Version: 1.0.5525.35530
      Love this wrapper but I do have some questions about it. Is in game adding warps coming? How can we change the rewards system for voting..ie give them a certain blueprint for x amount of vp.
      1. maldiablo
        Author's Response
        For in-game warp additions, I've been putting it off mainly because it'd be a complex command due to the amount of options a warp can have. To reduce complexity, I'm leaning towards three different !addwarp commands like !addfactionwarp, !addpublicwarp, and !addprivatewarp then other commands like !changewarpowner to make management easier.

        Increasing the allowable blueprint size per player for voting points is an awesome idea. I like it so much I'm going to work on adding that next as well.

        A longer term plan of mine is to add tables to allow admins to manually tweak the point costs and claim rewards, but for now everything is statically defined. I suppose it wouldn't be too much effort to get started on that sooner rather then later.

        You're my first real feedback. Thanks for that and I'll see what I can do in the near future with it!