Barotrauma

Barotrauma

Not enough ratings
DSSI Faction Craft
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
936.878 KB
27 Aug, 2023 @ 10:25pm
30 Jun @ 11:36pm
52 Change Notes ( view )

Subscribe to download
DSSI Faction Craft

In 1 collection by whosyourdaddy
Map Dev Tools
7 items
Description
A very powerful set of custom map development tools, you can easily make almost any game mode in it, multiplayer only support sandbox.

Only server side lua is required in multiplayer

Independent Edition: DFC (Independence)

Default chat commands:
!help: list all server commands [Server Side]
!clhelp: list all client commands [Client Side]

List of mods that used this mod:

If your game mode doesn't care about the outside of the main submarine, Pure Empty Level is recommended that it can improve the performance and reduce the laggy.

gitee source code: https://gitee.com/zhurengong/barotrauma-mod-dssifactioncraft
github source code: https://github.com/zhu-rengong/barotrauma-mod-dssifactioncraft

Severe Warning for v1.8.6.2+ Users
If your map is using this mod's LuaComponent sync method to send synchronization data to the client, players without Lua installed will be forcibly disconnected from the server. Their consoles will pop up the following error:
Error in xxx. The number of properties on the item "xxx" does not match between the server and the client. Server: xxx, client: xxx.
The error is caused by an official code change:
https://github.com/FakeFishGames/Barotrauma/blob/6203171b6d0cdac86ac3f804b3d325aa49dcf07b/Barotrauma/BarotraumaShared/SharedSource/Items/Item.cs#L3768
This means multiplayer now require stricter consistency between the client and server.
A temporary workaround is to disable sync. If you still wish to use that, you can use the better Lua component: RuyiLuaComponent, which offers more comprehensive Lua support and more detailed documations.
17 Comments
whosyourdaddy  [author] 23 Apr @ 12:43am 
Severe Warning for v1.8.6.2+ Users
If your map is using this mod's LuaComponent sync method to send synchronization data to the client, players without Lua installed will be forcibly disconnected from the server. Their consoles will pop up the following error:
[code]Error in xxx. The number of properties on the item "xxx" does not match between the server and the client. Server: xxx, client: xxx.[/code]
The error is caused by an official code change:
https://github.com/FakeFishGames/Barotrauma/blob/6203171b6d0cdac86ac3f804b3d325aa49dcf07b/Barotrauma/BarotraumaShared/SharedSource/Items/Item.cs#L3768
This means multiplayer now require stricter consistency between the client and server.
A temporary workaround is to disable sync . If you still wish to use that, you can use the better Lua component: RuyiLuaComponent , which offers more comprehensive Lua support and more detailed documations.
Ricky 5 Oct, 2023 @ 12:52pm 
ah yes always forget about the lua component thank you
whosyourdaddy  [author] 5 Oct, 2023 @ 4:33am 
Forgot one thing, disable Isolation for LuaComponent is needed.
whosyourdaddy  [author] 5 Oct, 2023 @ 4:29am 
@Ricky, sorry for not providing any more details on the usage of the mod. In fact, you can do anything right now to implement other complex functions, because there's a Lua component that allows you to access the sender.
Just need to write the following code in the LuaComponent:

[code]
if inp[1] and sender[1] then
out[1] = sender[1].JobIdentifier.ToString()
end
[/code]

And connect one of the output pins ('guid', 'name', 'speciesname', 'group', 'tags' or 'entered') from "EnterLeaveRegion" to signal_in1 of the LuaComponent.
When someone triggers “EnterLeaveRegion”, it will send a signal sent by the triggered character that entered or left the region.
When the LuaComponent receives a signal, it will send the job name of the triggered character from signal_out1.
Ricky 4 Oct, 2023 @ 9:48pm 
would be nice if the "EnterLeaveRegion" had a output pin for the players job
whosyourdaddy  [author] 17 Sep, 2023 @ 5:50pm 
Except that, you can also used other components and combine them to get more way to spawn.
whosyourdaddy  [author] 17 Sep, 2023 @ 5:48pm 
@Galaxies Just four steps to spawn items in a way:
1. Place in an Item Spawner
2. Set property 'Item Builds' for spawning items, example for:[code]
return {
"This is just a debug name",
{
-- Spawn a auto injector headset
identifier = "autoinjectorheadset",
-- equip it
equip = true,
-- inherit the wifi channel from the headset worn by character
inheritchannel = true,
-- spawn a c4-block in the headset
-- tags must be changed to "chem,medical"
inventory = {
{ identifier = "c4block", tags = "chem,medical" },
}
},
}
[/code]
3. Wire a button and connect it to the Item Spawner
4. Trigger button, you will get a self-explosion headset
Galaxies 17 Sep, 2023 @ 2:44pm 
Yay! Thank you!

One more thing, the READ_ME is quite confusing, it doesn't tell me how to utilize the components in-game. I want to use the item spawner component (I forgot the real name!), but I have no clue how to give people said items. The Testing Grounds map really didn't tell me anything either.
whosyourdaddy  [author] 16 Sep, 2023 @ 7:51pm 
@Galaxies Only server side lua is required in multiplayer
Galaxies 16 Sep, 2023 @ 2:31pm 
Do players need client-side Lua, or is only server-side Lua needed? (I really want to use this, but I can't if it requires client-side Lua)