Modding: Difference between revisions

m Formatting fix
added explanation to edditing the recipe.txt file
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Mods are packages of files that change The Last Starship in some way. These packages match the <code>[[main.dat]]<code> file structure to overload specific files. Mods can change game textures, default ships, and adjust system interactions.
Mods are packages of files that change The Last Starship in some way. These packages match the <code>[[main.dat]]</code> file structure to overload specific files. Mods can change game textures, default ships, and adjust system interactions.


== Using mods ==
== Using mods ==
Line 11: Line 11:
:'' The texture files for the game are still changing regularly. Any texture pack mods may need to be updated with each game release.''
:'' The texture files for the game are still changing regularly. Any texture pack mods may need to be updated with each game release.''


To create new textures for the game, it is recommended to create new sprite sheets and only override <code>spitebank.txt</code>. This should allow multiple texture packs to co-exist once stronger mod tooling has been developed.
To create new textures for the game, it is recommended to create new sprite sheets and only override <code>spritebank.txt</code>. This should allow multiple texture packs to co-exist once stronger mod tooling has been developed.


Sprites define their textures as below:
Sprites define their textures as below:
Line 50: Line 50:


To add a new language, create a new directory in <code>data\language</code> with the name of the language (e.g.: <code>latin</code>). The name of the folder will be used for the selection menu in the game. Inside this folder, create the file <code>language.txt</code> to contain all of the strings for the language.
To add a new language, create a new directory in <code>data\language</code> with the name of the language (e.g.: <code>latin</code>). The name of the folder will be used for the selection menu in the game. Inside this folder, create the file <code>language.txt</code> to contain all of the strings for the language.
=== New recipes ===
: '' The recipe files for the game are still changing regularly. Any mods may need to be updated with each game release.''
To create new ''recipe'' for the game, it is recommended to create new data folder and only override <code>recipes.txt</code>. This should allow multiple mods to co-exist once stronger mod tooling has been developed.
Recipes define their input and outputs as below:
BEGIN Recipe
    Type                ShieldedZeleonCanister
    Equipment          ChemicalLab
    Duration            2.0
    NeedsUnlocking      true
    BEGIN Item      Type PortInput  Index 1  Resource StableZeleon  Quantity 15.0  Capacity 60.0  END
    BEGIN Item      Type SlotInput  Resource ShieldedCanisterComponent  Quantity 2.0  Capacity 12.0  END
    BEGIN Item      Type SlotOutput Index 1  Resource ShieldedZeleonCanister  Quantity 2.0 Capacity 8.0  END
END
The Type field must match an existing item in the game. and will be used to put that name and sprite as header in the list of recipes.
The Equipment field specifies the type of equipment used to preform the recipe. so far the Refinery, ChemicalLab, MunitionsFactory, Fabricator, Assembler, LaserInfuser have been tested as valid entries.
The Duration field specifies the processing time of the recipe in seconds.
The NeedsUnlocking field is optional. If set to true then the recipe has to be added to a technology in <code>techtree.txt</code> before it can be researched and then useed.
Each ingredient or product has to be specified by the following format:  BEGIN Item      Type [Port/Slot][Input/Output]  Index [Index number of the spot the item is loaded or pipe is connected]  Resource [Resource name]  Quantity [The amount required]  Capacity [How much can be loaded at once]  END . The amount and type of ingredients/products allowed depend on the Equipment used.