ExampleMod/README.md
To view this readme file correctly formatted, please visit the ExampleMod folder on tModLoader's GitHub.
This folder contains the source code for a mod called ExampleMod. It is intended to be used by modders to learn how to correctly make various types of content. Modders learning to make mods should frequently consult ExampleMod and look for examples similar to what they want to make. It is expected the new modders start exploring ExampleMod after completing the Basic tModLoader Modding Guide.
You can view the files of ExampleMod here on GitHub by navigating through the folders listed above. A good place to start is weapons. Click the links to navigate to the "Content" folder, then "Items" folder, then "Weapons". From there, click on "ExampleGun.cs". You can now read the source code for the ExampleGun ModItem directly in your web browser. Feel free to explore other folders to find other examples.
Click here to open a search page that will search specifically within ExampleMod. After opening that page, click on the search bar at the top and type a search term, for example "chair", and then press enter. The page will update with results from ExampleMod containing your search term. Use this to quickly find files relevant to what you want to learn about.
By default, the code you see here contains changes from the next version of tModLoader. Sometimes these changes contain code that does not exist on the current version of tModLoader. You can switch to the stable branch to view ExampleMod code intended for the currently released version of tModLoader. To do this, find the dropdown in the top left of this webpage that says "1.4.4" and use it to select the "stable" option.
It can be useful to download ExampleMod for easier reference. First, click here to download stable.zip. Open it and then open the "ExampleMod" folder within. You can extract the "ExampleMod" folder to your "ModSources" folder. (The "ModSources" folder can be found within the saves folder.)
Once ExampleMod is in your "ModSources" folder, you can even build it in-game just like any other mod. This is useful if you want to experiment with ExampleMod directly.