Mods:Introduction: Difference between revisions
No edit summary |
add examples and explain the c# side of modding a bit |
||
Line 5: | Line 5: | ||
Of course the probability of a mod breaking depends on how deep you are interfacing with the game; if you are simply adding components it is likely that updating the mod will be very easy or not even necessary. | Of course the probability of a mod breaking depends on how deep you are interfacing with the game; if you are simply adding components it is likely that updating the mod will be very easy or not even necessary. | ||
There are currently two ways of adding components to the game: | There are currently two built-in ways of adding components to the game: | ||
== C# == | |||
This allows you to edit nearly all game code, and thus there is almost no limit to what can be achieved. Most mods are currently written this way, and thus you will find many preexisting that you could base your mod off of. If you are already familiar with programming, with C/C++/Java or with C# itself, it should be very easy to pick up the concepts. But even in case you are not, it should be fairly easy to just tweak an existing mod and pick up the language that way. | |||
= Logic Script = | The initial setup consists of creating a manifest.jecs<sub>(formerly manifest.succ)</sub> file, along with any required folders. This initial structure could look like, as follows, though empty folders can be omitted: | ||
YourMod/ <-- This folder ('''not''' its contents) is supposed to be placed into the GameData folder when installing the mod | |||
manifest.jecs | |||
components/ | |||
<.jecs component files> <-- these files define the actual component shapes, colors, peg counts and reference the C# code, if desired | |||
languages/ | |||
English/ | |||
English.jecs <-- Translation files simply map an internal name, e.g. author.modname.componentname to a human readable name, e.g. And Gate; See the MHG base mod for a complete list of supported languages. | |||
French/ | |||
French.jecs | |||
<other language folders> | |||
src/ <-- (indirectly) contains all C# source files, which will be compiled when starting the game | |||
client/ | |||
<.cs source files> | |||
server/ | |||
<.cs source files> | |||
{| class="wikitable sortable" | |||
|+Examples to base your mod off of | |||
!Mod Name | |||
!Description | |||
!Link | |||
!License | |||
|- | |||
|MHG | |||
|The Logic World base mod which contains '''all''' content. | |||
|Located in your 'Logic World/GameData' folder | |||
|Closed Source | |||
|- | |||
|Tcp Bridge | |||
|Adds a component supporting real-world tcp connections. Farily complex, but shows off using threads within components. | |||
|https://github.com/GHXX/LogicWorld-TcpBridge | |||
|MIT | |||
|- | |||
| | |||
| | |||
| | |||
| | |||
|} | |||
{{Todo|List more mods that perform various actions, e.g. adding a basic component; one that adds custom UI; maybe one for adding chat commands or something; etc.}} | |||
== Logic Script == | |||
This is an alternative way which requires less programming knowledge, but is much more limited. | This is an alternative way which requires less programming knowledge, but is much more limited. | ||
{{Todo|describe logic script}} | {{Todo|describe logic script}} |
Revision as of 21:58, 3 September 2025
Logic World currently features unofficial first-party modification (mod) support, this means, the Logic World client / server will load & compile mods, and while this will most likely be maintained, it might be lacking some quality of life features, and the API may undergo heavy changes. Though, this does not mean that every game update will break the game.
Of course the probability of a mod breaking depends on how deep you are interfacing with the game; if you are simply adding components it is likely that updating the mod will be very easy or not even necessary.
There are currently two built-in ways of adding components to the game:
C#
This allows you to edit nearly all game code, and thus there is almost no limit to what can be achieved. Most mods are currently written this way, and thus you will find many preexisting that you could base your mod off of. If you are already familiar with programming, with C/C++/Java or with C# itself, it should be very easy to pick up the concepts. But even in case you are not, it should be fairly easy to just tweak an existing mod and pick up the language that way.
The initial setup consists of creating a manifest.jecs(formerly manifest.succ) file, along with any required folders. This initial structure could look like, as follows, though empty folders can be omitted:
YourMod/ <-- This folder (not its contents) is supposed to be placed into the GameData folder when installing the mod manifest.jecs components/ <.jecs component files> <-- these files define the actual component shapes, colors, peg counts and reference the C# code, if desired languages/ English/ English.jecs <-- Translation files simply map an internal name, e.g. author.modname.componentname to a human readable name, e.g. And Gate; See the MHG base mod for a complete list of supported languages. French/ French.jecs <other language folders> src/ <-- (indirectly) contains all C# source files, which will be compiled when starting the game client/ <.cs source files> server/ <.cs source files>
Mod Name | Description | Link | License |
---|---|---|---|
MHG | The Logic World base mod which contains all content. | Located in your 'Logic World/GameData' folder | Closed Source |
Tcp Bridge | Adds a component supporting real-world tcp connections. Farily complex, but shows off using threads within components. | https://github.com/GHXX/LogicWorld-TcpBridge | MIT |
Logic Script
This is an alternative way which requires less programming knowledge, but is much more limited.