Jump to content

Bad Company Manager (ApiMod for Servers)


StompyNZ

Recommended Posts

Stompy Is there a way of adding Prefix for admins that can be configured for their level. eg Moderator: Staff: Admin: etc? Maybe assign like name colouring method or something??

 

 

thanks

 

yeah there's ways that can be done.

 

I'll add it to my list :)

Link to comment
Share on other sites

Stomp, I think you're going to find that most people don't understand 99% of the cool stuff you can do with your mod. You may want to do an entire video showcasing the features, so that they're "in english" for those of us who are NOT as mod-minded as you, so to speak (translation: for the rest of us dummies :)).

 

Just a thought.

 

Totally agree with Guppy here. I tried the mod for the first time today and love it! But yeah, a video showing the various commands in practice would be most awesome for "beginners" - most especially the commands used to create and import prefabs, build a prefab underground etc.

Link to comment
Share on other sites

I'll try and get a vid done this weekend to demo the install and basic command intro :)

 

Currently working on making serializable data objects for the list commands so I can make better use of LitJson library. While I'm doing this i'll look at a way to do the /filter=1,2,5,6 to only get certain fields, and a /columns option to provide a list of column names to index.

 

It will mean a change in the output data structure but once this is done it will be easier to maintain and keep consistent.

Link to comment
Share on other sites

I'll try and get a vid done this weekend to demo the install and basic command intro :)

 

Currently working on making serializable data objects for the list commands so I can make better use of LitJson library. While I'm doing this i'll look at a way to do the /filter=1,2,5,6 to only get certain fields, and a /columns option to provide a list of column names to index.

 

It will mean a change in the output data structure but once this is done it will be easier to maintain and keep consistent.

 

Awesome! Thank you :)

Link to comment
Share on other sites

Yay. Fred my laziness...

 

...@libby, you say that, but good luck with his thick accent. =)

 

ah he's not so bad, and sometimes he does a silent vid with just the text - that's cool too - as long as we can see the commands and what happens after he uses them. :)

Link to comment
Share on other sites

Feature requests:

 

Add some sort of push request type thing where rather than needing to poll the server regularly, we can ask the server to notify us via telnet when x is detected.

 

Here's some x's;

 

A player is detected flying (like Coppi's mod).

A player is detected clipping (I have no idea if hackers will be able to, but I don't see why not - they're hackers).

A player's position changes by more than x distance since the last known position (without dying or a server command like a teleport).

 

Another thing that is no longer reported, the x y z of zombie spawns. There's no way to despawn a zed at spawn. I can only do that later.

Could you add a spawn suppressor from a list of x y z's and a distance from them? The current system of using le is quite spammy.

 

Also just adding here though we discussed it on Steam;

 

Add back the Player joined message when the player actually joins. Having to wait until they spawn in the world to know that they need to be kicked is too slow.

Link to comment
Share on other sites

I'll look into those. The push method is something I've been working on for a while now. For telnet all that requires is a log message right? That being the case it's simple to push a message to log etc.

 

The other idea was to have a broadcast system that your endpoint subscribes to the game server then it will send out the data at intervals (dependant on settings and server fps) to that endpoint... could possibly set something up for irc but that may take a bit as I'd have to work out how to connect etc :) (only dealt with api's so far)

 

 

I'm about halfway through redoing the list commands (prob another day to finish) then ill go over the requests and start adding things in :)

 

API has hooks for:

 

GameAwake

GameStartDone

GameUpdate - every time anything changes in the world (i.e. a lot)

GameShutdown

PlayerLogin - should give you instant notice when a player connects and takes a slot

PlayerSpawning - not quite sure when this triggers, somewhere between login and SpawnedIntoWorld

PlayerSpawnedInWorld - they are fully loaded into the game at this point and can be kicked without crashing them etc

PlayerDisconnected

SavePlayerData - every 30 secs, or when looting triggers an update

ChatMessage - this is where chat hooks are done, can intercept or pass messages through

CalcChunkColorsDone - chunk colors are done, so you can tie map stuff to this one

 

There's also a bunch of delegates you can subscribe to for various things. Chromecide has done a great job of making a wrapper class for those, but you can also directly subscribe

 

Such as:

World.OnEntityLoadedDelegate - could do what you wanted with the pos on spawn maybe, if not then polling the entity list for new entries

GameStats.OnChangedDelegate - I think guppy had interest in this one

EntityStats.AddBuffChangedDelegate

etc

Link to comment
Share on other sites

Is there a way we can modify the slot on an entity or container, to give/remove items to boxes, players, etc.?

 

Boxes yes (i use it for my remote tradingsystem through "tradingchests"). Players inv is not possible as it is handled clientside.

 

Cheers

Link to comment
Share on other sites

Got an update almost ready to go. I've updated the repo with it, but will wait on the release until I have a few more bits sorted.

 

The entire List Players command has been rebuilt, and now has all of the options in a single command.

I've used LitJson to do the encoding so it will get a few bits of escaping my quick hack system wouldn't have. It also allows for the print pretty option, which is now on by default, and all commands return json output

Another benefit of this system is I have added a filter option as well.

 

bc-lp /filters - gets a list of properties, and the 'text' key to use to specify it

bc-lp /index - as above, but with an int 0 based index instead

 

then you can do:

 

bc-lp /filter=0,1,2,3,9,10

or

bc-lp /filter=steamid,name,entityid,ip,underground,position

 

and it would only get those specific fields

 

if you don't want the output over several lines and using print pretty then you can use /1l (1 L for one line) and you will get the full json back in a single line of output

 

example of full output here:

https://gist.github.com/StompyNZ/2ba0e4c592cb5d4fc655da91d1adaf0d

 

 

I've also got the spawn manager working again with the new settings system, however there is currently no built in stop (other than the target dying), but that is close to ready as well.

 

Also added will be a spawn monitor that reports the location of all spawns (called EntitySpawnMutator, because it will also get the ability to apply settings dynamically to spawns). Settings will allow you to specify which entity types to notify for.

 

All the old list player commands have been removed for now, except gamestages, which acts as a shortcut to call bc-lp /filter=gamestage. Other shortcut commands will be easy to set up, and I'll look at a way to make it configurable in the config

 

I still need to translate the gameobject commands to the new system but that should hopefully not take too long. I'll do a release before working on that though.

 

I've also coded up a high ping kicker, but haven't had a chance to test it yet. It works by scanning clients and checking their ping, if over a limit it will count down the second limit, which is how many beats (heartbeat system ticks) of high ping before you get kicked. A whitelist is also available for this.

 

Also added an entity remove command, but have yet to test it.

Link to comment
Share on other sites

Update Time

 

Added a SetSkillOnPlayer command (bc-setskill | setskill)

- Sets a skill level of a player. The skill name params are as found in the xml name field, the level is any valid level for that skill and player requirements.

- /self can be used in place of a playername to specify the player giving the command.

 

i.e.

 

bc-setskill StompyNZ craftSkillGuns 10

 

A couple notes:

Target player needs to be in game (for now, will add offline player code later)

 

If you are viewing the skill screen at the time, exit that screen and return.

 

If you are crafting and you set the skill lower then it wont change to the new skill until you start a new queue (if you increase the skill the output is improved)

 

Setting the skill to a value past the max possible will say it has done it, but won't actually do it :) (still to add proper constraints checking and reporting the issues)

 

Still to test what happens if you try to set a skill that you havent met reqs for but I assume it will be the same as trying to set it past max level.

 

Will be adding at the least a /max /maxall /reset /resetall options, which should be obvious what they do :p

 

Also the ability to define a class 'profile' and apply it in a single command, which could include modded unique unpurchasable skills that can only be awarded via the command, or somesuch :)

 

Now this is something of interest as a player on my server errorneously purchased a skill set that he did not want..

 

This might be a dumb question, but, I will ask it anyway. The skill in question here is a mod for No Timers skill. Would this command allow me to set it back to 0 as the player wants? I am assuming the answer is yes..

 

Hopefully soon we can do this while player is offline due to time differences of players and admin personnel.

 

 

Excellent work

Link to comment
Share on other sites

yes you can set it to any value within its valid range. Can use bc-skills to get the list of names to use.

 

I don't have a way to edit the skill points yet, so you'd have to keep track of what you refund and give them a skill for those points manually.

Link to comment
Share on other sites

@StompyNZ im running your mod on 2 server 1 i mess around on and its running grate but on my main 50slot server im geting this

 

 

 

 

 

2017-07-27T16:05:08 3547.017 INF Executing command 'loc' from client ************

 

(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)

 

2017-07-27T16:05:17 3556.070 INF Executing command 'gettime' by Telnet from **********

 

(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)

 

2017-07-27T16:05:24 3562.708 INF Executing command 'block 0' from client ************

 

(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)

 

2017-07-27T16:05:24 3562.725 WRN Entity block on pos -33, 124, -17 not found!

 

(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)

 

2017-07-27T16:05:24 3562.732 WRN Entity block on pos -8, 122, 3 not found!

 

(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)

 

2017-07-27T16:05:24 3562.735 WRN Entity block on pos 3, 122, -2 not found!

 

(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)

 

2017-07-27T16:05:24 3562.741 WRN Entity block on pos -11, 123, 1 not found!

 

(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)

 

2017-07-27T16:05:24 3562.746 WRN Entity block on pos 1, 123, -4 not found!

 

(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)

 

2017-07-27T16:05:24 3562.749 WRN Entity block on pos -29, 124, -19 not found!

 

(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)

 

2017-07-27T16:05:24 3562.760 WRN Entity block on pos -7, 129, -20 not found!

 

(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)

 

2017-07-27T16:05:24 3562.762 WRN Entity block on pos -7, 129, -16 not found!

 

(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)

 

2017-07-27T16:05:24 3562.955 INF (BCM) Error in BCWorldBlocks.Execute: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.

at System.Collections.Generic.Dictionary`2[ClientInfo,System.Collections.Generic.List`1[system.Int64]].get_Item (.ClientInfo key) [0x00000] in <filename unknown>:0

at BCM.BCChunks.ReloadForClients (System.Collections.Generic.Dictionary`2 chunks) [0x00000] in <filename unknown>:0

at BCM.Commands.BCWorldBlocks.FillBlocks (Vector3i size, Vector3i p3, Vector3i p4, BlockValue _bv, System.Collections.Generic.Dictionary`2 modifiedChunks) [0x00000] in <filename unknown>:0

at BCM.Commands.BCWorldBlocks.Process () [0x00000] in <filename unknown>:0

at BCM.Commands.BCCommandAbstract.Execute (System.Collections.Generic.List`1 _params, CommandSenderInfo _senderInfo) [0x00000] in <filename unknown>:0

 

(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)

 

2017-07-27T16:05:29 3567.919 INF [NET] PlayerConnected EntityID=-1, PlayerID='', OwnerID='', PlayerName=''

 

(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)

Link to comment
Share on other sites

hmm, do you know what was in the area that was replaced with air?

 

 

The last error is to do with the chunk reloading. There's probably a sync issue causing that as I try to refresh the chunks each client in the area has, and if they unload before the server gets notified I think is what causes that error.

 

I've made some good progress with getting a chunk loader working so will see if I can get to the root of that issue, but it's a hard one to test as it requires at least two people before I ever see that error.

Link to comment
Share on other sites

hmm, do you know what was in the area that was replaced with air?

 

 

The last error is to do with the chunk reloading. There's probably a sync issue causing that as I try to refresh the chunks each client in the area has, and if they unload before the server gets notified I think is what causes that error.

 

I've made some good progress with getting a chunk loader working so will see if I can get to the root of that issue, but it's a hard one to test as it requires at least two people before I ever see that error.

 

its happing with all block even if i try to place stone up in the air if u ever need some one to help test my steam is http://steamcommunity.com/profiles/76561198088961057/home

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...