Template:Object infobox 2: Difference between revisions

From Ukikipedia
Jump to navigation Jump to search
(To prevent completely breaking everything, creating a temporary sandbox template that I will be redoing. This template is going to be based almost entirely off of what the code dictates.)
 
m (forgot to remove part of an if)
 
(17 intermediate revisions by 6 users not shown)
Line 6: Line 6:
}}
}}
|-
|-
{{#if:{{{hitbox_type|}}}{{{interaction_type|}}}|{{!}}align="center" colspan="2" bgcolor="#10274c" style="font-size:125%;" {{!}} '''<span style="color:white;">Hitbox Info</span>'''
{{#if:{{{group|}}}{{{group2|}}}{{{modelID|}}}{{{tangibility|}}}{{{draw|}}}|{{!}}align="center" colspan="2" bgcolor="#10274c" style="font-size:125%;" {{!}} '''<span style="color:white;">Technical Constants</span>'''
|}}
|}}
|-
|-
{{!}} '''[[Hitbox]]'''
{{#if: {{{group|}}} |
{{!}}
{{!}} '''[[Object Group]]''' {{!!}} {{{group}}}
{{#switch: {{{hitbox_type}}}  
{{!}}-}}
| N/A = No collision with Mario
|-
| surface = Collision involves triangles instead of a cylindrical hitbox
{{#if: {{{group2|}}} |
| cylinder = cylinder with radius of {{{hitbox_radius}}} and height of {{{hitbox_height}}}{{#if: {{{hitbox_down|}}}|, offset down {{{hitbox_down}}} units|, not offset down
{{!}} '''[[Actor groups|Actor Group]]''' {{!!}} {{{group2}}}
| cylinder with radius of {{{hitbox_radius}}} and height of {{{hitbox_height}}}{{#if: {{{hitbox_down|}}}|, offset down {{{hitbox_down}}} units|, not offset down}}
{{!}}-}}
}}
|-
{{#if: {{{modelID|}}} |
{{!}} '''Model ID''' {{!!}} {{{modelID}}}
{{!}}-}}
|-
{{#if: {{{tangibility|}}} |
{{!}} '''Tangibility Radius''' {{!!}} {{{tangibility}}}
{{!}}-}}
|-
{{#if: {{{draw|}}} |
{{!}} '''Draw Distance''' {{!!}} {{{draw}}}
{{!}}-}}
|-
{{#if:{{{gravity|}}}{{{friction|}}}{{{buoyancy|}}}|{{!}}align="center" colspan="2" bgcolor="#10274c" style="font-size:125%;" {{!}} '''<span style="color:white;">Physical Constants</span>'''
|}}
|-
{{#if: {{{gravity|}}} |
{{!}} '''[[Gravity]]''' {{!!}} {{{gravity}}}
{{!}}-}}
|-
{{#if: {{{friction|}}} |
{{!}} '''Friction''' {{!!}} {{{friction}}}
{{!}}-}}
|-
{{#if: {{{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|}}} |
{{#if: {{{damage|}}} |
{{!}} '''[[HP|Damage]]''' {{!!}} {{{damage}}}
{{!}} '''Damage''' {{!!}} {{{damage}}}
{{!}}-}}
{{!}}-}}
|-
|-
{{#if:{{{damage_hatless|}}}|
{{#if: {{{health|}}} |
{{!}} '''[[Hat|Damage without hat]]''' {{!!}} {{{damage_hatless}}}
{{!}} '''Health''' {{!!}} {{{health}}}
{{!}}-}}
{{!}}-}}
|-  
|-
{{#if:{{{speed|}}}|
{{#if: {{{radius|}}} |
{{!}} '''Speed'''{{!!}} {{{speed}}}
{{!}} '''Radius''' {{!!}} {{{radius}}}
{{!}}-}}
{{!}}-}}
|-  
|-
{{#if:{{{tangibility_radius|}}}|
{{#if: {{{height|}}} |
{{!}} '''[[Tangibility Radius|Tangibility radius]]''' {{!!}} {{{tangibility_radius}}}
{{!}} '''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:{{{interaction_type|}}}|
{{#if: {{{behaviorCode|}}} |
{{!}} '''[[Interaction Type|Interaction type]]'''  
{{!}} '''Behavior Code''' {{#tag:ref|{{{behaviorCode}}}|name=behavCode}}
{{!!}} [[Interaction Type#{{{interaction_type}}}|{{{interaction_type}}}]]
{{!}}-}}
{{!}}-}}
|-  
|-
{{#if:{{{surfaces|}}}|
{{#if: {{{animationFile|}}} |
{{!}} '''[[Surface]]s''' {{!!}} {{{surfaces}}}
{{!}} '''Animation File''' {{#tag:ref|{{{animationFile}}}|name=animFile}}
{{!}}-}}
{{!}}-}}
|-
|-
{{#if:{{{related|}}}|
{{#if:{{{foundIn|}}}|{{!}}align="center" colspan="2" bgcolor="#10274c" style="font-size:125%;" {{!}} '''<span style="color:white;">Found in</span>'''
{{!}} colspan="2" style="padding:0" {{!}}
{{{!}} class="{{#ifeq:{{{expand}}}|expandable|mw-collapsible mw-collapsed|noexpandable}}" width="100%" style="background:ghostwhite; text-align:left;" border="0" cellpadding="0" cellspacing="0"
! style="background:{{{secbg|#c5ced6}}}; padding:2px;" {{!}} Related
{{!}}-
{{!}} style="padding:0 2px;" {{!}} {{{related|}}}
{{!}}}
|}}
|}}
|- style="vertical-align: top"
|-
{{#if:{{{found_in|}}}|
{{#if: {{{foundIn|}}} |
{{!}} colspan="2" style="padding:0" {{!}}
{{!}} {{{foundIn}}}
{{{!}} class="{{#ifeq:{{{expand}}}|expandable|mw-collapsible mw-collapsed|noexpandable}}" width="100%" style="background: ghostwhite; text-align:left;" border="0" cellpadding="0" cellspacing="0"
{{!}}-}}
! style="background:{{{secbg|#c5ced6}}}; padding:2px;" {{!}} Found In
|-
{{!}}-
{{#if:{{{related|}}}|{{!}}align="center" colspan="2" bgcolor="#10274c" style="font-size:125%;" {{!}} '''<span style="color:white;">Related Articles</span>'''
{{!}} style="padding:0 2px;" {{!}} {{{found_in}}}
{{!}}}
|}}
|}}
|}{{#ifeq:{{NAMESPACENUMBER}}|0|
|-
[[Category:Objects]]}}</includeonly>
{{#if: {{{related|}}} |
<noinclude>{{object_infobox
{{!}} {{{related}}}
|title= Yellow Coin
{{!}}-}}
|image= Yellow_Coin.gif
|-
|hitbox_type= cylinder
|}{{#ifeq:{{NAMESPACENUMBER}}|0|[[Category:Objects]]}}</includeonly><noinclude>{{Object_infobox_2
|hitbox_radius= 100
|title=Boulder
|hitbox_height= 64
|image=STROOP- Rolling Rock.png
|hitbox_down= 0
|group=General Actor
|speed= Dependent on [[RNG]]. Varies based on how it was spawned.
|group2=Test
|tangibility_radius= 1000
|modelID=0x39
|interaction_type= Coin
|tangibility=20000
|surfaces=
|draw=4000
|related= [[Red Coin|Red Coins]] <br> [[Blue Coin|Blue Coins]]
|gravity=8
|found_in= [[All courses]], [[The Castle]]
|friction=0.999
|expand=
|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
<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=
}}