Your commands must implement the interface. Just follow the same procedure you did to add the Starsector API. Just comment out the row by adding a # at the beginning to prevent the game from loading your command until it's finished)įirst off, make sure your IDE has “mods/Console Commands/jars/lw_Console.jar” added as a library. (Sometimes you may want to start with the CSV row to get a better idea of how your command will look. If you are the sort who learns best by example, you might find copying from that mod easier than following this tutorial. Placing them elsewhere allows you to bundle commands with a regular mod that will only be loaded if the console is tagged in the launcher.Īn example mod that adds several simple commands can be found in the mod folder. Starsector will automatically compile any scripts in this directory or its subdirectories, and this will cause errors when the console mod is not active. It is _highly_ recommended that you do not place your commands in data/scripts. Commands can also be in jars (which shouldn't create a dependency as these classes won't be loaded if the console isn't active). The console mod loads command classes itself, so you can place the java files anywhere in your mod folder you want – data/console/commands is a good choice as data/console already exists to contain commands.csv. You do not need to add Console.jar to your mod_info.json.Īll commands are contained in their own separate Java class. To add custom commands to the console you'll need a mod that contains two things: your commands' scripts, and the file data/console/commands.csv to register them in. This tutorial is intended to explain the new process in detail. A major design goal of version 2.0 was to make implementing these commands as painless as possible. Using this mod as a cheating tool will suck all of the fun out of Starsector for you. The command “list” will help with this alternatively these IDs can be found in the data files, usually in the CSVs or variant files. Most importantly, you will need to know the internal IDs of various objects in order to use any commands dealing with them. This means it does require some knowledge of Starsector's inner workings. While I've tried to keep everything as user-friendly as possible, this is primarily intended as a tool to aid mod development.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |