Jump to content

Mods:Introduction: Difference between revisions

From Logic World Wiki
m update formatting
m unify url format
 
(2 intermediate revisions by one other user not shown)
Line 8: Line 8:


== C# ==
== 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.
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 pre-existing 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<ref>Formerly, <code>.jecs</code> files used the <code>.succ</code> file-extension.</ref> file, along with any required folders. This initial structure could look like, as follows, though empty folders can be omitted:
The initial setup consists of creating a manifest.jecs<ref>Formerly, <code>.jecs</code> files used the <code>.succ</code> file-extension.</ref> file, along with any required folders. This initial structure could look like, as follows, though empty folders can be omitted:
Line 38: Line 38:
|Located in your <code>Logic World/GameData</code> folder
|Located in your <code>Logic World/GameData</code> folder
|All Rights Reserved
|All Rights Reserved
|-
|Basic Logic World Mod
|Adds a basic NAND Gate component to Logic World.
|[https://github.com/FoxFireFive0135/Basic-Logic-World-Mod/tree/main https://github.com/FoxFireFive0135/Basic-Logic-World-Mod]
|MIT
|-
|-
|Tcp Bridge
|Tcp Bridge
Line 43: Line 48:
|https://github.com/GHXX/LogicWorld-TcpBridge
|https://github.com/GHXX/LogicWorld-TcpBridge
|MIT
|MIT
|-
|
|
|
|
|}
|}
{{Todo|List more mods that perform various actions, e.g. adding a basic component; one that uses dynamic pegs, like the vanilla AND gate; one that adds custom UI; maybe one for adding chat commands or something; etc.}}
{{Todo|List more mods that perform various actions, e.g. adding a basic component that uses dynamic pegs, like the vanilla AND gate; one that adds custom UI; maybe one for adding chat commands or something; etc.}}





Latest revision as of 22:19, 8 September 2025

This article is a stub. Please help expand it by adding content.

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 pre-existing 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[1] 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 basemod 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>

Examples to base your mod off of
Mod Name Description Link License
MHG (basemod) The Logic World base mod which contains most game content. Located in your Logic World/GameData folder All Rights Reserved
Basic Logic World Mod Adds a basic NAND Gate component to Logic World. https://github.com/FoxFireFive0135/Basic-Logic-World-Mod MIT
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 that uses dynamic pegs, like the vanilla AND gate; 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.

TODO: describe logic script

References

  1. Formerly, .jecs files used the .succ file-extension.