https://rimworldwiki.com/api.php?action=feedcontributions&user=MrPetovan&feedformat=atomRimWorld Wiki - User contributions [en]2024-03-29T13:30:25ZUser contributionsMediaWiki 1.35.8https://rimworldwiki.com/index.php?title=Template:Ask/Box&diff=59921Template:Ask/Box2018-09-09T04:36:56Z<p>MrPetovan: Update template for SemanticMediaWiki 2.5 (+ example)</p>
<hr />
<div><includeonly>{{ #vardefine: name | {{{Name | Packaged Survival Meal}}}<br />
}}{{#vardefine: value | {{Q| {{#var:name}} | Market Value Base }}<br />
}}{{#vardefine: other | {{Q| {{#var:name}} | Nutrition }}<br />
}}<div style='float: left; width: 10em; margin: 1em'<br />
><div class='infobox {{{userparam|c_01}}}' style='float: none; clear: none; border: none; height: auto; margin: 0 auto !important; width: 74px !important'<br />
><div style='position: absolute; z-index: 0; width: 5em; margin: 10px 0 0 66px'><div style='display: inline-block; border-radius: 0 2em 2em 0; background: #ddd; border: 1px solid #000; padding: 0.1em 0.3em 0.3em'>{{icon|silver|<b>{{#var:value}}</b>}}</div></div<br />
><div style='position: absolute; z-index: 0; width: 5em; margin: 38px 0 0 66px'><div style='display: {{#ifeq:{{#var:other}}||none|inline-block}}; border-radius: 0 2em 2em 0; background: #ddd; border: 1px solid #000; padding: 0.1em 0.3em 0.3em'>{{icon|bmeat|<b>{{#var:other}}</b>}}</div></div<br />
>{{Icon Big| {{#var:name}} }}</div<br />
><div class='infobox {{{userparam|c_01}}}' style='float: none; clear: none; border: none; height: auto; width: 100% !important; margin: -5px auto !important; width: 74px'><p class='heading' style='font-size: 110% !important; border-radius: 1em; height: auto; vertical-align: middle; padding: 0.5em !important'>{{#var:name}}</p></div<br />
></div></includeonly><br />
<noinclude><br />
{{List/Short|Stone|item=Ask/Box|limit=1}}<br />
</noinclude></div>MrPetovanhttps://rimworldwiki.com/index.php?title=Template:List/Short&diff=59920Template:List/Short2018-09-09T04:34:31Z<p>MrPetovan: Update template for SemanticMediaWiki 2.5</p>
<hr />
<div>{{#ask: [[Category: {{{1}}}]]{{{query|}}}<br />
| ?# = Name<br />
| ?Image<br />
| ?Description<br />
| ?Note<br />
| link = none<br />
| format = template<br />
| template = Ask/Box<br />
| named args = yes<br />
| userparam = {{{2|}}}<br />
}}<br />
{{clr|left}}</div>MrPetovanhttps://rimworldwiki.com/index.php?title=Template:Ask/Line&diff=59919Template:Ask/Line2018-09-09T04:27:31Z<p>MrPetovan: Update template for SemanticMediaWiki 2.5 (+ example)</p>
<hr />
<div><includeonly><br />
<div style='float: left; margin: 0.25em 0 0 0'>{{Icon Medium|{{{Name|Gold}}}}}</div><br />
<div style='padding-top: 0.1em; margin-left: 50px'><b>[[{{{Name|Gold}}}]]</b></div><br />
<p style='margin-top: 0; font-size: 80%; margin-left: 50px'>''{{{Description|Lorem ipsum dolor sit amet...}}}''</p><br />
<div style='clear: left; margin-bottom: 0.25em'></div><br />
</includeonly><br />
<noinclude><br />
{{Ask/Line}}<br />
</noinclude></div>MrPetovanhttps://rimworldwiki.com/index.php?title=Template:List/doc&diff=59918Template:List/doc2018-09-09T04:26:19Z<p>MrPetovan: Update template doc for SemanticMediaWiki 2.5</p>
<hr />
<div>{{TOCright}}<br />
This template lists the contents of the category given as its first argument, e.g. to list all pages in the category [[:Category: Fabric]], use:<br />
<br />
<nowiki>{{List|Fabric}}</nowiki><br />
<br />
== Result Order and Number ==<br />
Optionally, you can limit the number of pages listed, sort the list and order it. For example, to list the two most expensive fabrics, breaking ties by ease to work with them, you could use ('''NB: Whitespace and captitalization matter'''):<br />
<br />
<nowiki>{{List|Fabric|limit=2|sort=Market Value Base,Work To Make Factor|order=desc,asc}}</nowiki><br />
<br />
This gives:<br />
<br />
<div style='border: 1px solid #aaa; margin: 1em 0; padding: 1em'><br />
{{List|Fabric|limit=2|sort=Market Value Base,Work To Make Factor|order=desc,asc|item=Ask/Item Light}}<br />
</div><br />
<br />
== Customizing Result Appearance ==<br />
The list template calls the template [[Template:Ask/Item]] for every page. You can override this with its item parameter. It passes the following parameters to the item template:<br />
<br />
{| {{STDT|c_01}}<br />
|-<br />
! Parameter !! Description<br />
|-<br />
|<nowiki>{{{Name}}}</nowiki> || Name of the page<br />
|-<br />
|<nowiki>{{{Image}}}</nowiki> || Name of the icon for the page<br />
|-<br />
|<nowiki>{{{Description}}}</nowiki> || Description of the page (from XML)<br />
|-<br />
|<nowiki>{{{Note}}}</nowiki> || Description of the page (user-set, usually the first paragraph of the page content)<br />
|-<br />
|<nowiki>{{{Tags}}}</nowiki> || Name of the template that can produce the tags for the page<br />
|-<br />
|<nowiki>{{{userparam}}}</nowiki> || Value passed to ''param='' in the list template<br />
|}<br />
<br />
== How does the template work? ==<br />
The template uses the Semantic MediaWiki (SMW) extension to get its data. In particular, it uses the <nowiki>{{#ask: ... }}</nowiki> parser function. You can get the full details about how it works in [http://semantic-mediawiki.org/wiki/Help:Inline_queries its official documentation], but here are the basics:<br />
<br />
Let's return to above example:<br />
<br />
<nowiki>{{List|Fabric|limit=2|sort=Market Value Base,Work To Make Factor|order=desc,asc}}</nowiki><br />
<br />
When MediaWiki expands that template, it becomes:<br />
<br />
<nowiki>{{#ask: [[Category: Fabric]]<br />
| ?# = Name<br />
| ?Image<br />
| ?Description<br />
| ?Note<br />
| ?Tags<br />
| format = template<br />
| named args = yes<br />
| link = none<br />
| template = Ask/Item<br />
| limit = 2<br />
| sort = Market Value Base,Work To Make Factor<br />
| order = desc,asc<br />
}}</nowiki><br />
<br />
The first line tells SMW to look for all pages in the [[:Category: Fabric]] category. The new five lines start with ? and tell it which data to select from those pages (more about that below). The "?# = Name" means "take the page title and refer to it as Name". After that, the template tells SMW to called the [[Template:Ask/Item]] template for every result (format = template and template = Ask/Item), to pass along the data as named arguments, and to use only page names instead of links (e.g. "Devilstrand" instead of "<nowiki>[[Devilstrand]]</nowiki>").<br />
<br />
Thus, the above template call becomes:<br />
<br />
<nowiki>{{Ask/Item|Name=Hyperweave|Image=File:Hyperweave.png|Description=High-tech nano-fibers...|Note=Top-of-the-shelf, incredibly tough...|Tags=Template:Textile/Tags}}</nowiki><br />
<nowiki>{{Ask/Item|Name=Devilstrand|Image=File:Devilstrand.png|Description=Fabric spun...|Note=Devilstrand is obtained...|Tags=Template:Textile/Tags}}</nowiki><br />
<br />
These are then substituted normally again.<br />
<br />
(NB: Template:Textile/Tags does not exist yet, so the Tags parameter above is empty at the moment. This will change soon.)<br />
<br />
== Where does the data come from? ==<br />
SMW know about, say, the description of Devilstrand, because on the [[Devilstrand]] page there is a [[Template:Define]] template, which executes the following:<br />
<br />
<nowiki>{{#set: Description = {{{description|}}} }}</nowiki><br />
<br />
The <nowiki>{{#set: ... }}</nowiki> parser function is the opposite of <nowiki>{{#ask: ... }}</nowiki>, it tells SMW that the page in question has one or more properties or relations. For the full description, see again [http://semantic-mediawiki.org/wiki/Help:Properties_and_types the official documentation].<br />
<br />
You can browse the data available about a page by using the "Browse Properties" link under "Tools" in the menu on the left side of the screen. You can browse all page/value pairs for a property by visiting its page in the Property: namespace, e.g. [[Property:Market_Value_Base]].</div>MrPetovanhttps://rimworldwiki.com/index.php?title=Template:Ask/Item_Light&diff=59917Template:Ask/Item Light2018-09-09T04:18:02Z<p>MrPetovan: Update missing Note parameter syntax (+ example)</p>
<hr />
<div><includeonly><br />
<div style='float: left; margin: 0.67em 1em 0 0'>{{Icon Big|{{{Name}}}}}</div><br />
<div style='font-size: 132%; margin-bottom: 0.3em; padding-bottom: 0.17em; padding-top: 0.5em'><b>[[{{{Name}}}]]</b></div><br />
<p>''{{{Description}}}''</p><br />
<p style='clear: left; margin-top: 1em'>{{{Note}}}</p><br />
<div style='clear: left; margin-left: -0.85em; margin-top: -0.85em'><br />
{{#if:{{{Tags|}}}|{{{{{Tags}}}|{{{Name}}}}}}}<br />
</div><br />
<div style='clear: left; margin-bottom: 1em'></div><br />
</includeonly><br />
<noinclude><br />
{{List|Stone|limit=1|item=Ask/Item Light}}<br />
</noinclude></div>MrPetovanhttps://rimworldwiki.com/index.php?title=Template:Ask/Item&diff=59916Template:Ask/Item2018-09-09T04:14:07Z<p>MrPetovan: Update template for SemanticMediaWiki 2.5 (+ example)</p>
<hr />
<div><includeonly><div style='float: left; margin: 0.67em 1em 0 0'>{{Icon Big|{{{Name}}}}}</div><br />
=== [[{{{Name}}}]] __NOEDITSECTION__ ===<br />
<p>''{{{Description}}}''</p><br />
<p style='clear: left; margin-top: 1em'>{{{Note}}}</p><br />
<div style='clear: left; margin-left: -0.85em; margin-top: -0.85em'><br />
{{#if:{{{Tags|}}}|{{{{{Tags}}}|{{{Name}}}}}}}<br />
</div><br />
<div style='clear: left; margin-bottom: 1em'></div><br />
</includeonly><br />
<noinclude><br />
{{List|Stone|limit=1}}<br />
</noinclude></div>MrPetovanhttps://rimworldwiki.com/index.php?title=Template:Ask/Item_Light&diff=59915Template:Ask/Item Light2018-09-09T04:11:46Z<p>MrPetovan: Update template for SemanticMediaWiki 2.5</p>
<hr />
<div><div style='float: left; margin: 0.67em 1em 0 0'>{{Icon Big|{{{Name}}}}}</div><br />
<div style='font-size: 132%; margin-bottom: 0.3em; padding-bottom: 0.17em; padding-top: 0.5em'><b>[[{{{Name}}}]]</b></div><br />
<p>''{{{Description}}}''</p><br />
<p style='clear: left; margin-top: 1em'>{{{?Note}}}</p><br />
<div style='clear: left; margin-left: -0.85em; margin-top: -0.85em'><br />
{{#if:{{{Tags|}}}|{{{{{Tags}}}|{{{Name}}}}}}}<br />
</div><br />
<div style='clear: left; margin-bottom: 1em'></div></div>MrPetovanhttps://rimworldwiki.com/index.php?title=Template:List&diff=59914Template:List2018-09-09T03:10:01Z<p>MrPetovan: Reverted edits by MrPetovan (talk) to last revision by Beagle</p>
<hr />
<div><includeonly><br />
<div style='-webkit-column-count: {{{columns|1}}}; -moz-column-count: {{{columns|1}}}; column-count: {{{columns|1}}}'><br />
{{#ask:<br />
[[Category: {{{1}}}]]<br />
{{{query|}}}<br />
| ?# = Name<br />
| ?Image<br />
| ?Description<br />
| ?Note<br />
| ?Tags<br />
| format = template<br />
| named args = yes<br />
| link = none<br />
| template = {{{item |Ask/Item}}}<br />
| limit = {{{limit|50}}}<br />
| sort = {{{sort |}}}<br />
| order = {{{order|}}}<br />
| userparam = {{{param|}}}<br />
}}<br />
</div><br />
</includeonly><br />
<noinclude><br />
{{List/doc}}<br />
</noinclude></div>MrPetovanhttps://rimworldwiki.com/index.php?title=Template:List&diff=59913Template:List2018-09-09T03:09:11Z<p>MrPetovan: </p>
<hr />
<div><includeonly><br />
<div style='-webkit-column-count: {{{columns|1}}}; -moz-column-count: {{{columns|1}}}; column-count: {{{columns|1}}}'><br />
{{#ask:<br />
[[Category: {{{1}}}]]<br />
{{{query|}}}<br />
| ?# = Name<br />
| ?Image<br />
| ?Description<br />
| ?Note<br />
| ?Tags<br />
| format = template<br />
| named args = yes<br />
| link = none<br />
| template = Ask/Item |import-annotation=true<br />
| limit = {{{limit|50}}}<br />
| sort = {{{sort |}}}<br />
| order = {{{order|}}}<br />
| userparam = {{{param|}}}<br />
}}<br />
</div><br />
</includeonly><br />
<noinclude><br />
{{List/doc}}<br />
</noinclude></div>MrPetovanhttps://rimworldwiki.com/index.php?title=Template:List&diff=59912Template:List2018-09-09T03:08:33Z<p>MrPetovan: </p>
<hr />
<div><includeonly><br />
<div style='-webkit-column-count: {{{columns|1}}}; -moz-column-count: {{{columns|1}}}; column-count: {{{columns|1}}}'><br />
{{#ask:<br />
[[Category: {{{1}}}]]<br />
{{{query|}}}<br />
| ?# = Name<br />
| ?Image<br />
| ?Description<br />
| ?Note<br />
| ?Tags<br />
| format = template<br />
| named args = yes<br />
| link = none<br />
| template = {{{item |Ask/Item }}} |import-annotation=true<br />
| limit = {{{limit|50}}}<br />
| sort = {{{sort |}}}<br />
| order = {{{order|}}}<br />
| userparam = {{{param|}}}<br />
}}<br />
</div><br />
</includeonly><br />
<noinclude><br />
{{List/doc}}<br />
</noinclude></div>MrPetovanhttps://rimworldwiki.com/index.php?title=Template:List&diff=59911Template:List2018-09-09T03:07:31Z<p>MrPetovan: </p>
<hr />
<div><includeonly><br />
<div style='-webkit-column-count: {{{columns|1}}}; -moz-column-count: {{{columns|1}}}; column-count: {{{columns|1}}}'><br />
{{#ask:<br />
[[Category: {{{1}}}]]<br />
{{{query|}}}<br />
| ?# = Name<br />
| ?Image<br />
| ?Description<br />
| ?Note<br />
| ?Tags<br />
| format = template<br />
| named args = yes<br />
| link = none<br />
| template = {{{item |Ask/Item |import-annotation=true}}}<br />
| limit = {{{limit|50}}}<br />
| sort = {{{sort |}}}<br />
| order = {{{order|}}}<br />
| userparam = {{{param|}}}<br />
}}<br />
</div><br />
</includeonly><br />
<noinclude><br />
{{List/doc}}<br />
</noinclude></div>MrPetovanhttps://rimworldwiki.com/index.php?title=Nutrient_paste_meal&diff=56551Nutrient paste meal2018-05-24T13:30:37Z<p>MrPetovan: </p>
<hr />
<div>{{Define|Meal<br />
| always haulable = true<br />
| def name = MealNutrientPaste<br />
| description = A synthetic mixture of protein, carbohydrates, and vitamins, amino acids and minerals. Everything the body needs, and absolutely disgusting.<br />
| draw gui overlay = true<br />
| graphic class = Graphic_Single<br />
| graphic path = Things/Item/Meal/NutrientPaste<br />
| label = nutrient paste meal<br />
| parent name = MealRottable<br />
| path cost = 15<br />
| resource readout priority = Last<br />
| selectable = true<br />
| social properness matters = true<br />
| stack limit = 10<br />
| thing class = Meal<br />
| ticker type = Rare<br />
| eat effect = EatVegetarian<br />
| ingested direct thought = AteNutrientPasteMeal<br />
| max num to ingest at once = 1<br />
| nutrition = 0.90<br />
| sound eat = Meal_Eat<br />
| taste = Awful<br />
| joy offset = -0.04<br />
| preferability = Awful<br />
| use hit points = true<br />
| deterioration rate base = 10<br />
| flammability base = 1.0<br />
| market value base = 15<br />
| max hit points base = 50<br />
| mass = 0.44<br />
}}<br />
<br />
A nutrient paste meal is produced from a [[nutrient paste dispenser]] by using 0.3 of any edible ingredients and each unit provides 0.9 nutrition. When consumed, it causes a -4 mood penalty thought [[thoughts list|''"Ate nutrient paste"'']]. No cooking skill is required to create this meal.<br />
<br />
A nutrient paste meal has advantages over cooked meals:<br />
<br />
* Extremely efficient on food reserves as it requires less ingredients and provide more nutrition.<br />
* It never causes [[Ailments#Food_Poisoning|food poisoning]], while cooked meals always have a chance of causing [[Food_Poison_Chance| food poisoning]].<br />
<br />
<br />
Colonists will prefer eating berries or simple meal instead only for a matter of taste.</div>MrPetovan