Template:Object infobox 2: Difference between revisions

From Ukikipedia
Jump to navigation Jump to search
(Adding some constants, WIP)
m (forgot to remove part of an if)
 
(16 intermediate revisions by 6 users not shown)
Line 3: Line 3:
{{#if: {{{image|}}} |
{{#if: {{{image|}}} |
{{!}}-  
{{!}}-  
{{!}} colspan=2 style="text-align:center;" {{!}} [[File:{{{image}}}|300px|]]
{{!}} colspan=2 style="text-align:center;" {{!}} [[File:{{{image}}}]]
}}
}}
|-
|-
{{#if:{{{group|}}}|{{!}}align="center" colspan="2" bgcolor="#10274c" style="font-size:125%;" {{!}} '''<span style="color:white;">Technical Constants</span>'''
{{#if:{{{group|}}}{{{group2|}}}{{{modelID|}}}{{{tangibility|}}}{{{draw|}}}|{{!}}align="center" colspan="2" bgcolor="#10274c" style="font-size:125%;" {{!}} '''<span style="color:white;">Technical Constants</span>'''
|}}
|}}
|-
|-
{{#if: {{{group|}}} |
{{#if: {{{group|}}} |
{{!}} '''Object Group''' {{!!}} [[{{{group}}}]]
{{!}} '''[[Object Group]]''' {{!!}} {{{group}}}
{{!}}-}}
|-
{{#if: {{{group2|}}} |
{{!}} '''[[Actor groups|Actor Group]]''' {{!!}} {{{group2}}}
{{!}}-}}
|-
{{#if: {{{modelID|}}} |
{{!}} '''Model ID''' {{!!}} {{{modelID}}}
{{!}}-}}
|-
{{#if: {{{tangibility|}}} |
{{!}} '''Tangibility Radius''' {{!!}} {{{tangibility}}}
{{!}}-}}
|-
{{#if: {{{draw|}}} |
{{!}} '''Draw Distance''' {{!!}} {{{draw}}}
{{!}}-}}
{{!}}-}}
|-
|-
Line 17: Line 33:
|-
|-
{{#if: {{{gravity|}}} |
{{#if: {{{gravity|}}} |
{{!}} '''Gravity''' {{!!}} [[{{{gravity}}}]]
{{!}} '''[[Gravity]]''' {{!!}} {{{gravity}}}
{{!}}-}}
{{!}}-}}
|-
|-
{{#if: {{{friction|}}} |
{{#if: {{{friction|}}} |
{{!}} '''Friction''' {{!!}} [[{{{friction}}}]]
{{!}} '''Friction''' {{!!}} {{{friction}}}
{{!}}-}}
{{!}}-}}
|-
|-
{{#if: {{{buoyancy|}}} |
{{#if: {{{buoyancy|}}} |
{{!}} '''Buoyancy''' {{!!}} [[{{{buoyancy}}}]]
{{!}} '''Buoyancy''' {{!!}} {{{buoyancy}}}
{{!}}-}}
|-
{{#if:{{{interaction|}}}{{{damage|}}}{{{health|}}}{{{radius|}}}{{{height|}}}{{{offset|}}}|{{!}}align="center" colspan="2" bgcolor="#10274c" style="font-size:125%;" {{!}} '''[[Hitbox|<span style="color:white;">Hitbox</span>]]'''
|}}
|-
{{#if: {{{interaction|}}} |
{{!}} '''[[Interaction Type]]''' {{!!}} [[Interaction Type#{{{interaction}}}|{{{interaction}}}]]
{{!}}-}}
|-
{{#if: {{{damage|}}} |
{{!}} '''Damage''' {{!!}} {{{damage}}}
{{!}}-}}
|-
{{#if: {{{health|}}} |
{{!}} '''Health''' {{!!}} {{{health}}}
{{!}}-}}
{{!}}-}}
|-
|-
|}{{#ifeq:{{NAMESPACENUMBER}}|0|
{{#if: {{{radius|}}} |
[[Category:Objects]]}}</includeonly>
{{!}} '''Radius''' {{!!}} {{{radius}}}
<noinclude><div style="float:right"><pre>{{object_infobox
{{!}}-}}
|-
{{#if: {{{height|}}} |
{{!}} '''Height''' {{!!}} {{{height}}}
{{!}}-}}
|-
{{#if: {{{offset|}}} |
{{!}} '''Down Offset''' {{!!}} {{{offset}}}
{{!}}-}}
|-
{{#if:{{{behaviorScript|}}}{{{behaviorCode|}}}{{{animationFile|}}}|{{!}}align="center" colspan="2" bgcolor="#10274c" style="font-size:125%;" {{!}} '''[[Code Data|<span style="color:white;">Code</span>]]'''
|}}
|-
{{#if: {{{behaviorScript|}}} |
{{!}} '''Initialization Behavior Script'''  {{#tag:ref|{{{behaviorScript}}}|name=behavScript}}
{{!}}-}}
|-
{{#if: {{{behaviorCode|}}} |
{{!}} '''Behavior Code''' {{#tag:ref|{{{behaviorCode}}}|name=behavCode}}
{{!}}-}}
|-
{{#if: {{{animationFile|}}} |
{{!}} '''Animation File''' {{#tag:ref|{{{animationFile}}}|name=animFile}}
{{!}}-}}
|-
{{#if:{{{foundIn|}}}|{{!}}align="center" colspan="2" bgcolor="#10274c" style="font-size:125%;" {{!}} '''<span style="color:white;">Found in</span>'''
|}}
|-
{{#if: {{{foundIn|}}} |
{{!}} {{{foundIn}}}
{{!}}-}}
|-
{{#if:{{{related|}}}|{{!}}align="center" colspan="2" bgcolor="#10274c" style="font-size:125%;" {{!}} '''<span style="color:white;">Related Articles</span>'''
|}}
|-
{{#if: {{{related|}}} |
{{!}} {{{related}}}
{{!}}-}}
|-
|}{{#ifeq:{{NAMESPACENUMBER}}|0|[[Category:Objects]]}}</includeonly><noinclude>{{Object_infobox_2
|title=Boulder
|image=STROOP- Rolling Rock.png
|group=General Actor
|group2=Test
|modelID=0x39
|tangibility=20000
|draw=4000
|gravity=8
|friction=0.999
|buoyancy=2
|interaction=Hurtbox 1
|damage=3
|health=0
|radius=315
|height=525
|offset=0
|behaviorScript=[https://github.com/n64decomp/sm64/blob/master/src/game/behaviors/boulder.inc.c Boulder Behavior Code]
|behaviorCode=[https://github.com/n64decomp/sm64/blob/master/data/behavior_data.c#L4547 Boulder Initialization Code]
|animationFile=[https://github.com/n64decomp/sm64/tree/master/actors Animation Folder]
|foundIn= <!-- Courses this is found in, maybe also use a list (using the *) -->
|related= <!-- Related articles -->
}}
<div style="float:right"><pre>{{Object_infobox_2
|title=
|title=
|image=
|image=
|hitbox_type=
|group=
|hitbox_radius=
|group2=
|hitbox_height=
|modelID=
|hitbox_down=
|tangibility=
|draw=
|gravity=
|friction=
|buoyancy=
|interaction=
|damage=
|damage=
|speed=
|health=
|tangibility_radius=
|radius=
|interaction_type=
|height=
|surfaces=
|offset=
|behaviorScript=
|behaviorCode=
|animationFile=
|foundIn=
|related=
|related=
|found_in=
|expand=
}}</pre></div>
}}</pre></div>
*image &ndash; an image. Must use <code><nowiki>{{!}}</nowiki></code> for a <code>|</code> break symbol in image syntax.
 
*title &ndash; default pagename, just in case can be changed
[[Category:Infobox templates|{{PAGENAME}}]]
*hitbox_type &ndash; Set to N/A for no collision, surface for objects with surfaces, or cylinder for cylindrical hitboxes.
*hitbox_radius, hitbox_height, hitbox_down &ndash; stats like height, radius, and down offset.
*damage &ndash; how much damage the object deals on contact with Mario
*damage_hatless &ndash; how much damage the object deals if Mario doesn't have his hat
*tangibility_radius &ndash; tangibility radius of the object
*interaction_type &ndash; interaction type of the object
*surfaces &ndash; surfaces type of the object
*related &ndash; similar objects
*found_in &ndash; which course the object is found in.
*expand &ndash; for collapsing the "found in" and "related" lists when they are long. Activate this by writing "expandable" (it is "noexpandable" by default).
<br clear="all"> [[Category:Infobox templates|{{PAGENAME}}]]</noinclude>

Latest revision as of 17:24, 11 October 2023

Boulder
STROOP- Rolling Rock.png
Technical Constants
Object Group General Actor
Actor Group Test
Model ID 0x39
Tangibility Radius 20000
Draw Distance 4000
Physical Constants
Gravity 8
Friction 0.999
Buoyancy 2
Hitbox
Interaction Type Hurtbox 1
Damage 3
Health 0
Radius 315
Height 525
Down Offset 0
Code
Initialization Behavior Script [1]
Behavior Code [2]
Animation File [3]
{{Object_infobox_2
|title=
|image=
|group=
|group2=
|modelID=
|tangibility=
|draw=
|gravity=
|friction=
|buoyancy=
|interaction=
|damage=
|health=
|radius=
|height=
|offset=
|behaviorScript=
|behaviorCode=
|animationFile=
|foundIn=
|related=
}}