Editing Modding Tutorials/Xml Adding Weapons Traits Research

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 3: Line 3:
 
This page is a tutorial on how to create a rimworld mod it will step you through the process of creating a mod from scratch. from basic files structure to writing code for your mod. This tutorial is aimed at people who have never created a mod before and are looking to get started. and is meant to be a updated guide to the old tutorials on the wiki.
 
This page is a tutorial on how to create a rimworld mod it will step you through the process of creating a mod from scratch. from basic files structure to writing code for your mod. This tutorial is aimed at people who have never created a mod before and are looking to get started. and is meant to be a updated guide to the old tutorials on the wiki.
  
This is a follow up to my [[Modding_Tutorials/Getting_started_with_mods|previous tutorial]] on how to make a mod. if you have not:
+
This is a follow up to my [[Modding_Tutorials/Geting_started_with_mods|previous tutorial]] on how to make a mod. if you have not:
 
# Set up a mod folder structure
 
# Set up a mod folder structure
 
# Created an About.xml file
 
# Created an About.xml file
Line 9: Line 9:
 
# Tested the mod in game using the Debug menu
 
# Tested the mod in game using the Debug menu
  
Then you should go back a read the [[Modding_Tutorials/Getting_started_with_mods|previous tutorial]].
+
Then you should go back a read the [[Modding_Tutorials/Geting_started_with_mods|previous tutorial]].
  
 
= Goal of this tutorial =
 
= Goal of this tutorial =
Line 28: Line 28:
 
File -> Preferences -> Configure User Snippets -> XML
 
File -> Preferences -> Configure User Snippets -> XML
 
</pre>
 
</pre>
this will open a file called xml.json. copy [https://raw.githubusercontent.com/Zeta-of-the-rim/RimWorld-Mod-Tutorials/master/CodeSnippets.jsonc this code] and paste it into the xml.json file. save the file and you are ready to go.
+
this will open a file called xml.json. copy [https://raw.githubusercontent.com/Burgess12/RimWorld-Mod-Tutorials/master/CodeSnippets.jsonc this code] and paste it into the xml.json file. save the file and you are ready to go.
  
 
This will allow you to type "rwweapon" to generate the skeleton for a new weapon. you can then fill in the details for your weapon.
 
This will allow you to type "rwweapon" to generate the skeleton for a new weapon. you can then fill in the details for your weapon.
Line 163: Line 163:
 
         <description>A simple gun for learning purposes.</description>
 
         <description>A simple gun for learning purposes.</description>
 
</pre>
 
</pre>
We start by defining the weapon as a makeable gun. Then we give it a gameId (defName), a user friendly name (label) and a description. </br>
+
We start by defining the weaponas a makeable gun. Then we give it a gameId (defName), a user friendly name (label) and a description. </br>
 
==== Textures and Sounds ====
 
==== Textures and Sounds ====
 
<pre>             
 
<pre>             
Line 250: Line 250:
  
 
== Final Notes ==
 
== Final Notes ==
And with that we have a working weapon with a custom bullet and recipe. to improve the weapon you could add a custom sound and texture or change the stats to your liking. The best way to learn is to experiment or look at other mods (I recommend looking at Vanilla Weapons Expanded as their mods keep the code clean and tidy). </br>
+
And with that we have a working weapon with a custom bullet and recipe. to inprove the weapon you could add a custom sound and texture or change the stats to your liking. The best way to learn is to experiment or look at other mods (I recommend looking at Vanilla Weapons Expanded as there mods keep there code clean and tidy). </br>
  
 
= Adding a Research Project =
 
= Adding a Research Project =
Currently the weapon is unlocked by default. Lets add a research project to unlock it. </br>
+
Currently there weapon is unlocked by default. Lets add a research project to unlock it. </br>
  
 
== Making the File ==
 
== Making the File ==
While we could add the research project to the same file as the weapon it is good practice to keep things tidy. So let's make a new file in the "Defs" folder called "ResearchProjectDef.xml" </br>
+
While we could add the research project to the same file as the weapon it is good practice to keep things tidy. So we lets make a new file in the "Defs" folder called "ResearchProjectDef.xml" </br>
 
Remember to add the Xml header and "Defs" tag. (Remember this can be done with "rwxxml")
 
Remember to add the Xml header and "Defs" tag. (Remember this can be done with "rwxxml")
  
Line 385: Line 385:
  
 
= Github =
 
= Github =
As with the other tutorials I have made I have the example mods on [https://github.com/Zeta-of-the-rim/RimWorld-Mod-Tutorials github] for you to download and look at. </br>
+
As with the other tutorials I have made I have the example mods on [https://github.com/Burgess12/RimWorld-Mod-Tutorials github] for you to download and look at. </br>
  
 
= Next Steps =
 
= Next Steps =

Please note that all contributions to RimWorld Wiki are considered to be released under the CC BY-SA 3.0 (see RimWorld Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)

Template used on this page: