Skip to content

Adds scripting support and other useful functionality to 7 Days To Die dedicated server

Notifications You must be signed in to change notification settings

xorex/7DTD-ScriptingMod

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

djkrose's Scripting Mod

Adds scripting support and other useful functionality to 7 Days To Die dedicated server.

Download

Scripting Examples

Lua JavaScript
1. Create file example.lua
-- @commands    mylua
-- @description My first Lua command
-- @help        This example shows how easy it is
--              to add a new command in Lua script
print "Hello Lua World!"

2. Drop file into \Mods\ScriptingMod\scripts folder
3. Execute commands: help mylua and mylua
Example mylua
4. Profit!

1. Create file example.js
// @commands    myjavascript myjs
// @description My first JavaScript command
// @help        This example shows how easy it is
//              to add a new command in JavaScript
console.log("Hello JavaScript World!");

2. Drop file into \Mods\ScriptingMod\scripts folder
3. Execute commands: help myjsand myjs
Example mylua
4. Profit!

Why Scripting?

  • Quickly and easily modify commands to your own preference; changes are live instantly without server restart
  • Pick and choose commands from various online sources; write and share single command snippets with others
  • Implement new commands from simple to complex individual features; no need for third-party bots
  • Full OS access, full file access, full network access: use web requests (REST/JSON), any database, send emails, ...
  • Two of the most flexible and easy to learn programming languages with lots of resources online
  • Full access to .Net Framework, all Unity objects, and all 7DTD game data
  • Full support of 7DTD command permission system: assign access levels to your commands just like any other

Built-in Commands

dj-exportExports a prefab including all container content, sign texts, ownership, etc.
dj-importImports a prefab, optionally including all container content, sign texts, ownership, etc.
dj-posShows the current player's position in various units and formats.
dj-regenRegenerates a chunk or custom area based on the world seed.
dj-repairRepairs server problems of various kinds. *NEW!*
dj-reset-jsClears the JavaScript engine from all variables and loaded modules.
dj-reset-luaClears the Lua engine from all variables and loaded modules.
dj-versionShows djkrose's Scripting Mod version information.

Compatibility

  • Dedicated Server of 7 Days to Die. The mod is not meant to be used with the desktop client.
  • For specific version compatibility, see release notes.
  • Developed and tested on Windows. Linux may or may not work; reports are welcome!
  • No dependencies: No other mods or other software is required.
  • Successfully tested together with these great mods:

Documentation

[coming later]

Source Code

During this early phase of development the source code is not yet publicly available. The GitHub repository is just used for issue tracking and documentation. When the mod has reached stable status (version 1.0) the source code will be published and others are invited to contribute to it or use parts in their own mods.

Road Map

The mod is still in early development and I want to add a lot more to it. Here are some ideas:

  • Expose more game variables and functions to scripts through an easy ScriptingMod API with clear documentation
  • Many more example scripts in Lua and JavaScript to get you started quicker
  • Event system to execute scripts based on game events like player logged in, player killed, bloodmoon starting, etc.
  • Option to execute commands through chat messages rather than console commands, for instance /home or !home

This is just a rough outline; everything is subject to change depending on your feedback, on feasibility, on my real life commitments, and simply on my pleasure to continue in any direction or at all.

Contact

Feedback is welcome! If you have any suggestions, questions, or concerns please send me a message:

Just remember: This software is provided free of charge, as is, without any guarantee or support. You are not entitled to support, nor is anyone but you liable for data loss. If it doesn't work, that is just bad luck. If data is lost, you should've made a backup.

License

Creative Commons License djkrose's Scripting Mod is licensed under a CC BY-NC 4.0. That means, you are free to use the mod and the source code (once published) for non-commercial purposes; just leave the credit notes intact.

This mod is a private project and not affiliated with the official 7DTD game or with The Fun Pimps in any way.

About

Adds scripting support and other useful functionality to 7 Days To Die dedicated server

Resources

Stars

Watchers

Forks

Packages

No packages published