Difference between revisions of "User:Alistaire/DefsStdExample"

From RimWorld Wiki
Jump to navigation Jump to search
(Updated parameters)
(Added multiple tables to show difference between hide and show notes and examples)
Line 1: Line 1:
==researchProjectDef==
+
__TOC__
 +
 
 +
Example DefsStd usage.<br/><br/>
 +
 
 +
==Only researchProjectDef==
 +
 
 +
{{User:Alistaire/Template:DefsStdTemplateHeader|tag=researchProjectDef|hideNotes=1|parents={{User:Alistaire/Template:DefsStdFormatter|Defs}},{{User:Alistaire/Template:DefsStdFormatter|ResearchProjectDefs}}}}
 +
{{User:Alistaire/Template:DefsStdTemplate|tag=defName|type=defName}}
 +
{{User:Alistaire/Template:DefsStdTemplate|tag=label|type=str|typeInfo=[[Typeinfo:lc|lc]]}}
 +
{{User:Alistaire/Template:DefsStdTemplate|tag=description|type=str|typeInfo=[[Typeinfo:ucfirst|ucfirst]]}}
 +
{{User:Alistaire/Template:DefsStdTemplate|tag=totalCost|type=int}}
 +
{{User:Alistaire/Template:DefsStdTemplate|tag=researchMods|type=li}}
 +
{{User:Alistaire/Template:DefsStdTemplate|tag=prerequisites|type=li}}
 +
|}<br/><br/>
 +
 
 +
==Notes on researchProjectDef==
 +
 
 +
{{User:Alistaire/Template:DefsStdTemplateHeader|tag=researchProjectDef|parents={{User:Alistaire/Template:DefsStdFormatter|Defs}},{{User:Alistaire/Template:DefsStdFormatter|ResearchProjectDefs}}}}
 +
{{User:Alistaire/Template:DefsStdTemplate|tag=defName|type=defName|notes=The in-script defName of this research project, referenced by other research projects.}}
 +
{{User:Alistaire/Template:DefsStdTemplate|tag=label|type=str|typeInfo=[[Typeinfo:lc|lc]]|notes=The in-game name of this research project. Its first character is uppercased in some in-game instances. Existing labels can be found on the [[Research]] page.}}
 +
{{User:Alistaire/Template:DefsStdTemplate|tag=description|type=str|typeInfo=[[Typeinfo:ucfirst|ucfirst]]|notes=The in-game description of this research project, shown in the research window. Existing descriptions can be found on the [[Research]] page.}}
 +
{{User:Alistaire/Template:DefsStdTemplate|tag=totalCost|type=int|notes=The reseach cost of this research project. Existing costs can be found on the [[Research]] page.}}
 +
{{User:Alistaire/Template:DefsStdTemplate|tag=researchMods|type=li|notes=A list with list items containing {{User:Alistaire/Template:DefsStdFormatter|specialAction}} tags.}}
 +
{{User:Alistaire/Template:DefsStdTemplate|tag=prerequisites|type=li|notes=What research projects are required to see this one. A list with list items containing {{User:Alistaire/Template:DefsStdContentSwitch|defName}} tags from other research projects. Existing prerequisites can be found on the [[Research]] page.}}
 +
|}<br/><br/>
 +
 
 +
==Examples and notes on researchProjectDef==
  
 
{{User:Alistaire/Template:DefsStdTemplateHeader|tag=researchProjectDef|showExamples=1|parents={{User:Alistaire/Template:DefsStdFormatter|Defs}},{{User:Alistaire/Template:DefsStdFormatter|ResearchProjectDefs}}}}
 
{{User:Alistaire/Template:DefsStdTemplateHeader|tag=researchProjectDef|showExamples=1|parents={{User:Alistaire/Template:DefsStdFormatter|Defs}},{{User:Alistaire/Template:DefsStdFormatter|ResearchProjectDefs}}}}

Revision as of 16:24, 12 April 2015

Example DefsStd usage.

Only researchProjectDef

Parents: <>Defs,<>ResearchProjectDefs

<>researchProjectDef
Element Contents
<>defName defName
<>label string (lc)
<>description string (ucfirst)
<>totalCost int
<>researchMods list item
<>prerequisites list item



Notes on researchProjectDef

Parents: <>Defs,<>ResearchProjectDefs

<>researchProjectDef
Element Contents Notes
<>defName defName The in-script defName of this research project, referenced by other research projects.
<>label string (lc) The in-game name of this research project. Its first character is uppercased in some in-game instances. Existing labels can be found on the Research page.
<>description string (ucfirst) The in-game description of this research project, shown in the research window. Existing descriptions can be found on the Research page.
<>totalCost int The reseach cost of this research project. Existing costs can be found on the Research page.
<>researchMods list item A list with list items containing <>specialAction tags.
<>prerequisites list item What research projects are required to see this one. A list with list items containing defName tags from other research projects. Existing prerequisites can be found on the Research page.



Examples and notes on researchProjectDef

Parents: <>Defs,<>ResearchProjectDefs

<>researchProjectDef
Element Contents Notes Examples
<>defName defName The in-script defName of this research project, referenced by other research projects. <defName>Brewing</defName>
<>label string (lc) The in-game name of this research project. Its first character is uppercased in some in-game instances. Existing labels can be found on the Research page. <label>stonecutting</label>
<>description string (ucfirst) The in-game description of this research project, shown in the research window. Existing descriptions can be found on the Research page. <description>Miner's picks are 20% more effective.</description>
<>totalCost int The reseach cost of this research project. Existing costs can be found on the Research page. <totalCost>1000</totalCost>
<>researchMods list item A list with list items containing <>specialAction tags. <researchMods>
   <li>
      <specialAction>ResearchModsSpecial.GunTurretCooling</specialAction>
   </li>
</researchMods>
<>prerequisites list item What research projects are required to see this one. A list with list items containing defName tags from other research projects. Existing prerequisites can be found on the Research page. <prerequisites>
   <li>ShipBasics</li>
   <li>Cryptosleep</li>
</prerequisites>