Jump to content

Bad Company Manager (ApiMod for Servers)


StompyNZ

Recommended Posts

Update Time - 2.5.2

 

Added new commands:

bc-undo - the new method for undoing import and block commands. The undo list is now a single list for both commands. block /undo and import /undo are removed.

 

bc-editmode - allows you to set the world into editmode, which enables features such as the vanilla prefab command for generating meshes, and importing without having to use the /editmode option. Be wary of using on populated servers as I have not tested the ramifications of doing so.

 

Improvements and fixes:

'bc-assets itemicons' now returns Mods folder icons as well as the vanilla icons, along with a count of baked icons and total

 

'block density' now has a /force option to bypass the built in density validation based on block type (only block command supports this, not blockrpc)

 

'bc-go <type> /filters' and 'bo-go <type> /index' are now available for listing the filters that can be used for the various game object types

 

bc-task - Added a status of Aborted (to go with InProgress and Complete) to indicate tasks that were canceled before completion (such as 'visit /stop'). Changed the output to be fully json encoded. Added the full command line text used to the output for each task listed.

 

visit - improved the displayed text, includes progress % on both the message returned if you run it while it is in progress and the bc-task output. visit now has the option to give 4 params to define a multi region visit

Link to comment
Share on other sites

  • 1 month later...
Source Code

 

Web Interface Project

 

For the precompiled binary:

Bad Company Manager - Version 2.5.2 for 7d2d A16.4 b8

 

Version 2.5.2 for 7d2d A16.4 b8

 

All commands are prefixed with bc- by default.

 

In the Mods/BCM/DefaultConfig folder is a Commands.xml file that allows you to change the command text, and in the sub folders are the help and description text files for each command that is displayed in game.

 

Any command that doesn't have a text file will display the class name of the command for the description, and an empty help file by default. I have plans for an auto help generator based on command aliases and allowable params, but that's down the list at this stage.

 

Current Commands

(See second post for an examples of the output)

 

bc-help - BCHelp, this command will return the full list of commands added by BCM, and some details on common /options

 

Output from the bc-help command:

***Bad Company Commands***
bc-help => (BCM) BCHelp - Provides a list of all active BCM commands, and info about /options
bc-settings,set => (BCM) Settings - Command to set and clear values from the settings persistent cache
bc-trash => (BCM) Mem Trash - Runs Garbage Collection to try and free up Memory on the server
bc-api => (BCM) BCBroadcastAPI
bc-co => (BCM) Chunk Observer - Command for controlling dynamic chunk observers and loading chunk areas
bc-task => (BCM) Task - Reports running subthread tasks
bc-test => (BCM) Test - Catchall command for testing new features
bc-lp => (BCM) Players - Provides extensive information about all players
bc-pdf,bc-pfinfo => (BCM) Player Files - Player data file information, such as steamid, last online, last write.
bc-loc,loc,pos => (BCM) Location - Gets your current position and stores it in cache for use in other commands
bc-admins => (BCM) Admins - Provides information on admins, bans, whitelist, and other admin details
bc-events => (BCM) Events - Edit event system configuration and report settings and data
bc-gs => (BCM) Players Gamestages - Alias for BCPlayers
bc-id,bc-lpids => (BCM) Players Ids - Alias for BCPlayers
bc-pos,bc-lppos => (BCM) Players Positions - Alias for BCPlayers
bc-le => (BCM) Entities - Provides information about all entities in the game
bc-chunks,bc-cc => (BCM) Active Chunks - Information about the chunks loaded by the server
bc-time => (BCM) Time - Provides server time, ticks, fps, clients, entities
bc-getspawn => (BCM) Get Spawn - Gets a valid spawn point at the given x,z. Also loads the chunk.
bc-assets => (BCM) Assets - Provides info on game resources and assets
bc-go => (BCM) Game Objects - Provides detailed information about the game objects such as blocks, items and recipes
bc-lhcd,bc-hcd => (BCM) Hub Cell Data - A list of all prefabs in a given Hub Cell
bc-version => (BCM) Versions - Information about the mods installed on the server
bc-geb,bc-gebuff => (BCM) Give Buffs to Entities - Buffs the entity or type of entity with the given buff
bc-gpb,bc-gpbuff => (BCM) Give Buffs to Players - Buffs the remote player with the given buff
bc-give => (BCM) Give Items to Players - Gives the targeted player items into inventory
bc-gpq,bc-gpquest => (BCM) Give Quests To Players - Grants the remote player the given quest
bc-setskill,setskill => (BCM) Set Skills On Players - Allows you to directly set skill levels on a player while they are online
bc-reb,bc-debuff,bc-rembuff => (BCM) Remove Buffs From Entities - Removes a buff from an entity or type of entity
bc-rpb,bc-rpbuff => (BCM) Remove Buffs From Players - Removes a buff from an online player
bc-rpq,bc-rpquest => (BCM) Remove Quests From Players - Removes an in progress quest from the player
bc-remove,remove => (BCM) Remove - Removes the selected entities from the game by unloading them
bc-spawn,spawn => (BCM) Spawn - Spawns entities with definable targets and groups/classes and horde counts
bc-showspawn,manager => (BCM) Horde Spawners - Gets information about the spawn manager system such as active spawns and spawncounts
bc-tele,move => (BCM) Teleport - Move target entity etc to a new location
bc-sleeper,sleeper => (BCM) Sleeper - Display and manipulate the sleeper volumes in prefabs
bc-wblocks,block => (BCM) World Blocks - Insert, report on, and swap blocks within the area
bc-wblocksrpc,blockrpc => (BCM) World Blocks - Similar to World Blocks but using RPC (remote procedure call) instead of chunk reloading to update the clients, single block only
bc-import,import => (BCM) Import - Loads a prefab from disk into the world, and activates sleeper spawns
bc-export,export => (BCM) Export - Creates a tts prefab file of the defined location
bc-visitregion,visit => (BCM) Visit Region - Visits the region(s) given and reveals the map
bc-te,tile => (BCM) Tile Entity - Perform actions on the tile entities (loot containers and doors) in the area
bc-reset => (BCM) BCReset
bc-prefab => (BCM) Prefab - Edit existing prefabs on the server
bc-editmode,editmode => (BCM) Edit Mode - Toggles the edit mode setting for the world
bc-undo => (BCM) Undo - Reverts the previous world editing command
***Options***
/log => Send the command output to the log file
/chat => Send the command output to chat
/console => Override command default settings for /log or /chat
/color=FFFFFF => Specify a color for text sent to chat
/details => For commands that support it, will give more details on items returned
/nodetails => Override command default settings for /details
/online => For ListPlayers commands it will display only online players (default shows all players)
/offline => For ListPlayers commands it will display only offline players
/all => Override command default settings for /online or /offline
***Output Format Options***
/1l => Returns json output on a single line (for server managers)
/pp => Returns json output with print pretty enabled (default: on)
/vectors => Returns all BCM Vectors as x y z objects rather than single string
/csvpos =>  Converts all Vector3 co-ords to csv seperated (default is space seperated)
/worldpos => Converts all Vector3 co-ords to Map Co-ords
/strpos => Override command default settings for /csvpos or /worldpos

 

Credits

Alloc, danilocoppi, dmustanger, and djkrose provided great inspiration, thanks to them for their efforts!

Has this been replaced or updated non of the links work ?

Link to comment
Share on other sites

Install Path is using 7days2dielauncher

 

D:\7D2DDS\war_of_the_walkers\War_of_the_Walkers_Bigger_Back_Pack_5.2\Mods

 

Do I need BAD COMPANY Manager in temp mod or just mods. Its in mods and does not work. Oh running it on a dedicated server with 7 days to die servermanager .

Link to comment
Share on other sites

  • 2 weeks later...

Where can I get the latest version? I have Bad Company Manager 2.2.3(15.4b8) and can not get it to work . I have Coppis Command additions 4.91 .SDX1 Server toola 10.7

 

SMX A16.3B12R2 Allocs 14,17,24 do any of these have problems with getting it to work ? I type bc-help any of the commands and nothing in chat but error in F1. If I can get it to start I can get a start on educating my self on how it works .

Link to comment
Share on other sites

The links are all working fine, nothing has changed.

 

If you can't access them then talk to your ISP and find out if they are blocking github (I've heard thats a thing these days).

 

it has no issues running with any other api mod.

 

if you have it installed in the right place then check the server logs for errors when it boots up.

Link to comment
Share on other sites

Hi! I am trying to figure out how to use the visit command to reveal the map. Can you please provide an example of how I can do this? Thanks in advance ;)

It should normally be intuitive to use the help command to figure out how something works. 90% of the time the commands will give you a response.

 

For this example, we will type help bc-visitregion and see what happens.

 

help bc-visitregion
*** Command: bc-visitregion ***
(BCM) Visit Region - Visits the region(s) given and reveals the map
   Aliases: bc-visitregion, visit
   Default Options: / 
   Usage:
     1. bc-visitregion <x1> <z1>
     2. bc-visitregion <x1> <z1> <r>
     3. bc-visitregion <x1> <z1> <x2> <z2>
   Notes:
     Visits the region given and reveals the map
     1. Visits the given region
     2. Visits the region(s) where <x1> <z1> is the center region and <r> is a radius
     3. Visits the region(s) between <x1> <z1> and <x2> <z2> inclusive

 

So by reading the output, you can infer exactly how it works, what it does, and how to use it.

Link to comment
Share on other sites

I found the problem ! I loaded them onto server files instead of client and they worked . 7D2D launcher just downloads client files and not server for you to run as a server. I wish it had option to download or use server files . When you check choose file and you choose a server file it will not accept it . But BC commands show when I do bc-help and bc-version . Now to see if I can get them to work on server live. I'm just going to use launcher from now on for the links it has.

Link to comment
Share on other sites

  • 4 weeks later...

OK, have this loaded on one of the servers I manage, and cannot figure out why this is happening.

I haven't made any changes to the files yet, so it could just be some configuration I need to add but haven't.

 

2018-07-02T12:15:44 1.097 INF [MODS] Trying to load from BCManager

Non platform assembly: /home/sdtd/engine/Mods/BCManager/BCManager.dll (this message is harmless)

2018-07-02T12:15:44 1.100 INF [MODS] Found ModAPI, creating instance

2018-07-02T12:15:44 1.159 INF (BCM) Unable to load Heartbeat BPM rate, setting not found in System.xml

2018-07-02T12:15:44 1.160 INF (BCM) Unknown Synapse entityspawnmutator

2018-07-02T12:15:44 1.164 ERR (BCM) Error configuring tasks

System.NullReferenceException: Object reference not set to an instance of an object

at UnityEngine.JsonUtility.FromJson[DiDConfig] (System.String json) [0x00000] in <filename unknown>:0

at BCM.Neurons.DeadIsDead..ctor (BCM.Synapse s) [0x00000] in <filename unknown>:0

at BCM.Synapse.WireNeurons () [0x00000] in <filename unknown>:0

at BCM.Config.ConfigureSystem () [0x00000] in <filename unknown>:0

2018-07-02T12:15:44 1.170 INF (BCM) It's Alive!!! (Pulse Started)

2018-07-02T12:15:44 1.170 INF [MODS] Loaded Mod: Bad Company Manager (2.5.2 (16.4b8))

 

So I figured I hadn't turned something on right?

 

Checking on System.xml in the Config folder shows this...

 

<?xml version="1.0" encoding="utf-8" ?>
<System>
<LogCache enabled="false"/>
<Heartbeat isalive="true"/>
<BPM rate="60"/>
<!--Spawn System-->
<Synapse name="spawnmanager" enabled="false" beats="1"/>
<!-- experimental synapse, use at own risk -->
<Synapse name="entityspawnmutator" enabled="false" beats="30" options="EntityEnemy,EntityNPC,EntityItem" config="SpawnMutator"/>
<!-- firing the neuron attempts to add the monitor, it will report instantly on spawns -->
<!--Character Management-->
<Synapse name="bagmonitor" enabled="false" beats="60"/>
<!-- todo: not implemented -->
<Synapse name="buffmonitor" enabled="false" beats="60"/>
<!-- todo: not implemented -->
<Synapse name="deadisdead" enabled="false" beats="15"/>
<!-- todo: not implemented -->
<Synapse name="deathwatch" enabled="false" beats="60"/>
<!-- todo: not implemented -->
<Synapse name="equipmentmonitor" enabled="false" beats="60"/>
<!-- todo: not implemented -->
<Synapse name="positiontracker" enabled="false" beats="60"/>
<!-- todo: not implemented -->
<Synapse name="questmonitor" enabled="false" beats="15"/>
<!-- todo: fix -->
<Synapse name="toolbeltmonitor" enabled="false" beats="60"/>
<!-- todo: not implemented -->
<Synapse name="pingkicker" enabled="false" beats="60"/>
<!-- todo: not implemented -->
<!--Admin Functions-->
<Synapse name="saveworld" enabled="false" beats="600"/>
<Synapse name="trashcollector" enabled="false" beats="1250"/>
<!-- not needed? -->
<Synapse name="mapexplorer" enabled="true" beats="5"/>
<!--Web App Integration-->
<Synapse name="broadcastapi" enabled="false" beats="5"/>
<!-- todo: not implemented -->
<!--Messaging Systems-->
<Synapse name="motd" enabled="false" beats="20"/>
<!-- todo: not implemented -->
<!--Logging-->
</System>

 

No not sure why it's giving those errors, since everything appears to be configured for it.

Link to comment
Share on other sites

Im not sure which version that is, but the latest one is quite different.

 

Maybe try downloading 2.5.2 gain and install that fresh, delete the BCManager folder and reinstall. You can leave the .bin files bt if you have issues still maybe wipe those too (save game folder).

 

https://github.com/7days2mod/BadCompanySM/blob/master/BCManager/Mods/BCManager/DefaultConfig/System.xml

 

<?xml version="1.0" encoding="utf-8" ?>
<System>
 <Heartbeat isalive="true" bpmrate="60"/>

 <!-- NOTES -->
 <!-- Synapse 'enable' and 'options' attribute allows for initial config to be passed to the synapse constructors. -->
 <!-- After first server boot you can reconfigure options via the bc-events command and persist to disk -->
 <!-- The 'config' attribute if preset points to the *.xml files in the Events folder -->
 <!-- The 'beats' attribute if preset indicates how many beats should pass for each execution of the Fire method -->

 <!-- Reactive Synapses -->
 <Synapse name="spawnmutator" enabled="false" options="EntityEnemy,EntityNPC,EntityItem" config="SpawnMutator"/>
 <Synapse name="deadisdead" enabled="false" options='{ "global": false }'/>
 <Synapse name="logcache" enabled="false"/>

 <!-- Heartbeat Synapses -->
 <Synapse name="fly_clip_tracker" enabled="false" beats="1"/> <!-- todo: partially implemented (reports to chat) -->
 <Synapse name="tracker" enabled="false" beats="15"/>
 <Synapse name="pingkicker" enabled="false" beats="5" options='{ "threshhold": 300, "count": 12 }'/>

 <!--
 <Synapse name="saveworld" enabled="false" beats="600"/>
 <Synapse name="motd" enabled="false" beats="20"/>
 -->

 <!-- todo: not implemented -->
 <Synapse name="spawnmanager" enabled="false" beats="1"/> <!-- experimental synapse, use at own risk -->
 <!--
 <Synapse name="deathwatch" enabled="false" beats="60"/>
 <Synapse name="savebackup" enabled="false" beats="21600"/>
 <Synapse name="entitymonitor" enabled="false" beats="4"/>
 <Synapse name="bagmonitor" enabled="false" beats="60"/>
 <Synapse name="equipmentmonitor" enabled="false" beats="60"/>
 <Synapse name="toolbeltmonitor" enabled="false" beats="60"/>
 <Synapse name="buffmonitor" enabled="false" beats="60"/>
 <Synapse name="questmonitor" enabled="false" beats="15"/>

 <Synapse name="mapexplorer" enabled="false" beats="5"/>
 -->
</System>

Link to comment
Share on other sites

  • 1 month later...

Visitregion Size Question

 

Hello,

 

I was wondering if it is possible to visit a region up to 15000-20000 :smile-new: coordinates in all directions without crashing with the right hardware. Around 20000 I know there is a related crash for going out too far. Is bc-visitregion limited to a particular size it can operate within? If I were to leave this running overnight or give it enough time in the day what would occur and what command radius would I use to achieve it?

 

Thank you for your time and this mod!

 

My server for reference is a personally modified server put to my specs that will not be released for others to play other than LAN. I'm looking to visit as many regions of the world as possible as bc-visitregion has made the exploration butter-smooth.

 

Additionally, my rig specifications for reference:

*CPU: i7 4790k

 

*CPU Cooler: Noctua DH-15 + Dual NF-A15 140mm Fans + Thermal Grizzly Conductonaut Thermal Grease

 

*RAM: 16GB Corsair Vengeance PRO DDR3

 

*MOBO: ASRock Z97 Extreme 6 Gaming

 

*GPU: ZOTAC GeForce GTX 1080 AMP! Extreme

 

*Monitor: Asus XB241H Predator 1080p @180Hz DP G-Sync + 4K UHD 65’ Vizio SmartCast Device

 

*Sound: Cyber Acoustic Speakers w/ Subwoofers

 

*PSU: EVGA SuperNOVA T2 Titanium Certified, High Overclock Stability & Power Efficiency

 

*Tower: Cooler Master HAF 920 + 6 120mm LEPA BOL QUITE Series PWM Fans with Cable Matters Y-Splitters

 

*Storage: Samsung 960 PRO 512GB + Seagate SSHD 4TB

 

*Ethernet Cable: Vandesail CAT7 High Speed 10Gbps

 

*OS: Windows 10 PRO

 

USB Devices:

*Logitech C920 HD 1080p + Tripod

 

*2 XBOX 360 Wireless Controllers (With Rechargeable AA)

 

*Mayflash Wireless Sensor DolphinBar + Zelda Edition Wii Remote Plus

 

*Poweradd Glowing Blue Earbuds w/ Mic

 

*Redragon M701 Lavawolf 3500 DPI Optical Gaming Mouse

 

*IMAGE? 3 Color LED Backlit Programmable Gaming Keyboard

 

*4TB Seagate External Hard Drive 120Mbs

 

*SanDisk Ultra CZ48 256GB USB 3.0 Flash Drive

Link to comment
Share on other sites

  • 2 months later...

b197 build up on first post.

 

There are many bits not updated so report any issues here and I'll look into them or let you know if I dont intend to update it

 

The config and help files are gone, its all embedded into the dll now. I will be adding the ability to edit the config via console commands in the next few days.

 

Source code hasnt been updated yet because its a mess :)

Link to comment
Share on other sites

Minor update for b198

 

fixed the alias for bc-pos / bc-lppos

 

Will have a bigger update later tonight with some new features and maybe fixes after more testing

 

Hiding chat commands and mute players perhaps? That would be grand *g*

Link to comment
Share on other sites

Minor update for b198

 

fixed the alias for bc-pos / bc-lppos

 

Will have a bigger update later tonight with some new features and maybe fixes after more testing

 

LOL, not that you would be surprised but its broke. As is coppis additiona. They show up under version command! That might just be that it reads the folder title. Is there a new link to get the undate ? Nor when you do bc-help or cp-help. I hope you will fix it , if not thank you for what you have done!

Link to comment
Share on other sites

LOL, not that you would be surprised but its broke. As is coppis additiona. They show up under version command! That might just be that it reads the folder title. Is there a new link to get the undate ? Nor when you do bc-help or cp-help. I hope you will fix it , if not thank you for what you have done!

 

The latest release is always in the first post.

 

https://github.com/7days2mod/BadCompanySM/releases

 

- - - Updated - - -

 

Hiding chat commands and mute players perhaps? That would be grand *g*

 

I've had a few requests for hiding chat commands and will be looking into it.

 

I'm feeling very tired (too many late nights) so not sure if I will get a lot done this week and I'm travelling for the weekend but will do what I can manage to squeeze in

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...