Difference between revisions of "User:Alistaire/DefsStdExample"

From RimWorld Wiki
Jump to navigation Jump to search
(Added pre's of the tables)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
__TOC__
 
__TOC__
 
+
<nowiki>
 
Example DefsStd usage.<br/><br/>
 
Example DefsStd usage.<br/><br/>
  
==Only researchProjectDef==
+
==hideNotes = 1==
  
 
{{User:Alistaire/Template:DefsStdTemplateHeader|tag=researchProjectDef|hideNotes=1|parents={{User:Alistaire/Template:DefsStdFormatter|Defs}},{{User:Alistaire/Template:DefsStdFormatter|ResearchProjectDefs}}}}
 
{{User:Alistaire/Template:DefsStdTemplateHeader|tag=researchProjectDef|hideNotes=1|parents={{User:Alistaire/Template:DefsStdFormatter|Defs}},{{User:Alistaire/Template:DefsStdFormatter|ResearchProjectDefs}}}}
Line 14: Line 14:
 
|}<br/>
 
|}<br/>
  
<pre>{{User:Alistaire/Template:DefsStdTemplateHeader|tag=researchProjectDef|hideNotes=1|parents={{User:Alistaire/Template:DefsStdFormatter|Defs}},{{User:Alistaire/Template:DefsStdFormatter|ResearchProjectDefs}}}}
+
<pre>{{DefSTD-TH
{{User:Alistaire/Template:DefsStdTemplate|tag=defName|type=defName}}
+
  |tag=researchProjectDef|hideNotes=1
{{User:Alistaire/Template:DefsStdTemplate|tag=label|type=str|typeInfo=[[Typeinfo:lc|lc]]}}
+
  |parents={{DefSTD-Format|Defs}},{{DefSTD-Format|ResearchProjectDefs}}}}
{{User:Alistaire/Template:DefsStdTemplate|tag=description|type=str|typeInfo=[[Typeinfo:ucfirst|ucfirst]]}}
+
  {{DefSTD-T
{{User:Alistaire/Template:DefsStdTemplate|tag=totalCost|type=int}}
+
    |tag=defName|type=defName}}
{{User:Alistaire/Template:DefsStdTemplate|tag=researchMods|type=li}}
+
  {{DefSTD-T
{{User:Alistaire/Template:DefsStdTemplate|tag=prerequisites|type=li}}
+
    |tag=label|type=str|typeInfo=[[Typeinfo:lc|lc]]}}
 +
  {{DefSTD-T
 +
    |tag=description|type=str|typeInfo=[[Typeinfo:ucfirst|ucfirst]]}}
 +
  {{DefSTD-T
 +
    |tag=totalCost|type=int}}
 +
  {{DefSTD-T
 +
    |tag=researchMods|type=li}}
 +
  {{DefSTD-T
 +
    |tag=prerequisites|type=li}}
 
|}</pre><br/><br/>
 
|}</pre><br/><br/>
  
==Notes on researchProjectDef==
+
==Standard researchProjectDef==
  
 
{{User:Alistaire/Template:DefsStdTemplateHeader|tag=researchProjectDef|parents={{User:Alistaire/Template:DefsStdFormatter|Defs}},{{User:Alistaire/Template:DefsStdFormatter|ResearchProjectDefs}}}}
 
{{User:Alistaire/Template:DefsStdTemplateHeader|tag=researchProjectDef|parents={{User:Alistaire/Template:DefsStdFormatter|Defs}},{{User:Alistaire/Template:DefsStdFormatter|ResearchProjectDefs}}}}
Line 34: Line 42:
 
|}<br/>
 
|}<br/>
  
<pre>{{User:Alistaire/Template:DefsStdTemplateHeader|tag=researchProjectDef|parents={{User:Alistaire/Template:DefsStdFormatter|Defs}},{{User:Alistaire/Template:DefsStdFormatter|ResearchProjectDefs}}}}
+
<pre>{{DefSTD-TH
{{User:Alistaire/Template:DefsStdTemplate|tag=defName|type=defName|notes=The in-script defName of this research project, referenced by other research projects.}}
+
  |tag=researchProjectDef
{{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.}}
+
  |parents={{DefSTD-Format|Defs}},{{DefSTD-Format|ResearchProjectDefs}}}}
{{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.}}
+
  {{DefSTD-T
{{User:Alistaire/Template:DefsStdTemplate|tag=totalCost|type=int|notes=The research cost of this research project. Existing costs can be found on the [[Research]] page.}}
+
    |tag=defName|type=defName
{{User:Alistaire/Template:DefsStdTemplate|tag=researchMods|type=li|notes=A list with list items containing {{User:Alistaire/Template:DefsStdFormatter|specialAction}} tags.}}
+
    |notes=The in-script defName of this research project, referenced by other research projects.}}
{{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.}}
+
  {{DefSTD-T
 +
    |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.}}
 +
  {{DefSTD-T
 +
    |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.}}
 +
  {{DefSTD-T
 +
    |tag=totalCost|type=int
 +
    |notes=The research cost of this research project. Existing costs can be found on the [[Research]] page.}}
 +
  {{DefSTD-T
 +
    |tag=researchMods|type=li
 +
    |notes=A list with list items containing {{DefSTD-Format|specialAction}} tags.}}
 +
  {{DefSTD-T
 +
    |tag=prerequisites|type=li
 +
    |notes=What research projects are required to see this one. A list with list items containing {{DefSTD-Datatype|defName}} tags from other research projects. Existing prerequisites can be found on the [[Research]] page.}}
 
|}</pre><br/><br/>
 
|}</pre><br/><br/>
  
==Examples and notes on researchProjectDef==
+
==showExamples = 1==
  
 
{{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}}}}
Line 58: Line 80:
 
|}<br/>
 
|}<br/>
  
<pre>{{User:Alistaire/Template:DefsStdTemplateHeader|tag=researchProjectDef|showExamples=1|parents={{User:Alistaire/Template:DefsStdFormatter|Defs}},{{User:Alistaire/Template:DefsStdFormatter|ResearchProjectDefs}}}}
+
<pre>{{DefSTD-TH
{{User:Alistaire/Template:DefsStdTemplate|tag=defName|type=defName|notes=The in-script defName of this research project, referenced by other research projects.|examples=Brewing}}
+
  |tag=researchProjectDef|showExamples=1
{{User:Alistaire/Template:DefsStdTemplate|tag=label|type=str|examples=stonecutting|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.}}
+
  |parents={{DefSTD-Format|Defs}},{{DefSTD-Format|ResearchProjectDefs}}}}
{{User:Alistaire/Template:DefsStdTemplate|tag=description|type=str|examples=Miner's picks are 20% more effective.|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.}}
+
  {{DefSTD-T
{{User:Alistaire/Template:DefsStdTemplate|tag=totalCost|type=int|examples=1000|notes=The research cost of this research project. Existing costs can be found on the [[Research]] page.}}
+
    |tag=defName|type=defName
{{User:Alistaire/Template:DefsStdTemplate
+
    |examples=Brewing
|tag=researchMods
+
    |notes=The in-script defName of this research project, referenced by other research projects.}}
|type=li
+
  {{DefSTD-T
|examples=<br/>&emsp;&emsp;&emsp;&lt;li&gt;<br/>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&lt;specialAction&gt;ResearchModsSpecial.GunTurretCooling&lt;/specialAction&gt;<br/>&emsp;&emsp;&emsp;&lt;/li&gt;<br/>
+
    |tag=label|type=str
|notes=A list with list items containing {{User:Alistaire/Template:DefsStdFormatter|specialAction}} tags.}}
+
    |examples=stonecutting|typeInfo=[[Typeinfo:lc|lc]]
{{User:Alistaire/Template:DefsStdTemplate|tag=prerequisites|type=li|examples=<br/>&emsp;&emsp;&emsp;&lt;li&gt;ShipBasics&lt;/li&gt;<br/>&emsp;&emsp;&emsp;&lt;li&gt;Cryptosleep&lt;/li&gt;<br/>|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.}}
+
    |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.}}
 +
  {{DefSTD-T
 +
    |tag=description|type=str
 +
    |examples=Miner's picks are 20% more effective.|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.}}
 +
  {{DefSTD-T
 +
    |tag=totalCost|type=int
 +
    |examples=1000
 +
    |notes=The research cost of this research project. Existing costs can be found on the [[Research]] page.}}
 +
  {{DefSTD-T
 +
    |tag=researchMods|type=li
 +
    |examples=<br/>&emsp;&emsp;&emsp;&lt;li&gt;<br/>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&lt;specialAction&gt;ResearchModsSpecial.GunTurretCooling&lt;/specialAction&gt;<br/>&emsp;&emsp;&emsp;&lt;/li&gt;<br/>
 +
    |notes=A list with list items containing {{DefSTD-Format|specialAction}} tags.}}
 +
  {{DefSTD-T
 +
    |tag=prerequisites|type=li
 +
    |examples=<br/>&emsp;&emsp;&emsp;&lt;li&gt;ShipBasics&lt;/li&gt;<br/>&emsp;&emsp;&emsp;&lt;li&gt;Cryptosleep&lt;/li&gt;<br/>
 +
    |notes=What research projects are required to see this one. A list with list items containing {{DefSTD-Datatype|defName}} tags from other research projects. Existing prerequisites can be found on the [[Research]] page.}}
 
|}</pre>
 
|}</pre>
 +
</nowiki>

Latest revision as of 13:57, 19 March 2023

Example DefsStd usage.<br/><br/> ==hideNotes = 1== {{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/> <pre>{{DefSTD-TH |tag=researchProjectDef|hideNotes=1 |parents={{DefSTD-Format|Defs}},{{DefSTD-Format|ResearchProjectDefs}}}} {{DefSTD-T |tag=defName|type=defName}} {{DefSTD-T |tag=label|type=str|typeInfo=[[Typeinfo:lc|lc]]}} {{DefSTD-T |tag=description|type=str|typeInfo=[[Typeinfo:ucfirst|ucfirst]]}} {{DefSTD-T |tag=totalCost|type=int}} {{DefSTD-T |tag=researchMods|type=li}} {{DefSTD-T |tag=prerequisites|type=li}} |}</pre><br/><br/> ==Standard 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 research 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/> <pre>{{DefSTD-TH |tag=researchProjectDef |parents={{DefSTD-Format|Defs}},{{DefSTD-Format|ResearchProjectDefs}}}} {{DefSTD-T |tag=defName|type=defName |notes=The in-script defName of this research project, referenced by other research projects.}} {{DefSTD-T |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.}} {{DefSTD-T |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.}} {{DefSTD-T |tag=totalCost|type=int |notes=The research cost of this research project. Existing costs can be found on the [[Research]] page.}} {{DefSTD-T |tag=researchMods|type=li |notes=A list with list items containing {{DefSTD-Format|specialAction}} tags.}} {{DefSTD-T |tag=prerequisites|type=li |notes=What research projects are required to see this one. A list with list items containing {{DefSTD-Datatype|defName}} tags from other research projects. Existing prerequisites can be found on the [[Research]] page.}} |}</pre><br/><br/> ==showExamples = 1== {{User:Alistaire/Template:DefsStdTemplateHeader|tag=researchProjectDef|showExamples=1|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.|examples=Brewing}} {{User:Alistaire/Template:DefsStdTemplate|tag=label|type=str|examples=stonecutting|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|examples=Miner's picks are 20% more effective.|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|examples=1000|notes=The research cost of this research project. Existing costs can be found on the [[Research]] page.}} {{User:Alistaire/Template:DefsStdTemplate |tag=researchMods |type=li |examples=<br/>   <li><br/>      <specialAction>ResearchModsSpecial.GunTurretCooling</specialAction><br/>   </li><br/> |notes=A list with list items containing {{User:Alistaire/Template:DefsStdFormatter|specialAction}} tags.}} {{User:Alistaire/Template:DefsStdTemplate|tag=prerequisites|type=li|examples=<br/>   <li>ShipBasics</li><br/>   <li>Cryptosleep</li><br/>|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/> <pre>{{DefSTD-TH |tag=researchProjectDef|showExamples=1 |parents={{DefSTD-Format|Defs}},{{DefSTD-Format|ResearchProjectDefs}}}} {{DefSTD-T |tag=defName|type=defName |examples=Brewing |notes=The in-script defName of this research project, referenced by other research projects.}} {{DefSTD-T |tag=label|type=str |examples=stonecutting|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.}} {{DefSTD-T |tag=description|type=str |examples=Miner's picks are 20% more effective.|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.}} {{DefSTD-T |tag=totalCost|type=int |examples=1000 |notes=The research cost of this research project. Existing costs can be found on the [[Research]] page.}} {{DefSTD-T |tag=researchMods|type=li |examples=<br/>   <li><br/>      <specialAction>ResearchModsSpecial.GunTurretCooling</specialAction><br/>   </li><br/> |notes=A list with list items containing {{DefSTD-Format|specialAction}} tags.}} {{DefSTD-T |tag=prerequisites|type=li |examples=<br/>   <li>ShipBasics</li><br/>   <li>Cryptosleep</li><br/> |notes=What research projects are required to see this one. A list with list items containing {{DefSTD-Datatype|defName}} tags from other research projects. Existing prerequisites can be found on the [[Research]] page.}} |}</pre>