Difference between revisions of "Resource Key Type"

From SC4D Encyclopaedia
Jump to navigation Jump to search
sc4e>Tarkus
(Added a little more info.)
 
(16 intermediate revisions by 6 users not shown)
Line 1: Line 1:
'''Resource Key Type''' (RTK) is a common [[Exemplar]] property which is used to reference models.  There are several different RTK variants that are used in SC4, which are detailed below:
+
'''Resource Key Type''' (RKT) is a common [[Exemplar]] property which is used to reference models.  There are several different RKT variants that are used in SC4, which are detailed below:
  
==RTK0==
+
==RKT0==
'''RTK0''' is used to reference a single true-3D model that applies to all zoom levels (1 model total).  This is used on many [[NAM]] puzzle pieces, though the practice of using RTK0 has begun to fall out of favor with the NAM Team due to oversharpness of models in farther-away zooms.  Only one value is specified here.
+
'''RKT0''' is used to reference a single true-3D model that applies to all zoom levels (1 model total).  This is used on many [[NAM]] puzzle pieces, though the practice of using RKT0 has begun to fall out of favor with the NAM Team due to oversharpness of models in farther-away zooms.  Only one value is specified here.
  
==RTK1====
+
==RKT1==
'''RTK1''' is used to reference isometric models, one per face and one per zoom (20 models total).  This is used on most standard in-game buildings.  While the RTK1 property will reference 20 different models, only one value, that of the north-facing Zoom 1 model, needs to be specified in the property.  The game is able to infer the existence of the others through the RTK1 property.
+
'''RKT1''' is used to reference isometric models, one per face and one per zoom (20 models total).  This is used on most standard in-game buildings.  While the RKT1 property will reference 20 different models, only one value, that of the south-facing Zoom 1 model, needs to be specified in the property.  The game is able to infer the existence of the others through the RKT1 property.
  
==RTK2==
+
==RKT2==
  
==RTK3==
+
==RKT3==
'''RTK3''' is used to reference a series of true-3D models, one per zoom level (5 models total).  This is used on many [[NAM]] puzzle pieces and is becoming the standard for such pieces.  Each zoom level model needs to be specified with RTK3.
+
'''RKT3''' is used to reference a series of true-3D models, one per zoom level (5 models total).  This is used on many [[NAM]] puzzle pieces but is falling into disuse in light of new methods for wrapping textures around models such as Embedded Mipmapping.  Each zoom level model needs to be specified with RKT3.
  
==RTK4==
+
==RKT4==
 +
'''RKT4''' is like RKT3, with the additional capabilities of specifying overhanging models and/or timed props.  The full specification is as follows:
 +
 
 +
<span style="font-family: Courier;"><b>
 +
Rep 1: 0x0000000S<br>
 +
Rep 2: 0xXXXXXXXX<br>
 +
Rep 3: 0xZZZZZZZZ<br>
 +
Rep 4: 0xYYYYYYYY<br>
 +
Rep 5: 0xRRRRRRRR<br>
 +
Rep 6: 0xTTTTTTTT<br>
 +
Rep 7: 0xGGGGGGGG<br>
 +
Rep 8: 0xIIIIIIII<br>
 +
</span></b>
 +
These 8 reps can be repeated several times.
 +
 
 +
<span style="font-family: Courier;">0x0000000S</span><br>
 +
is 0 for the normal state, 1 for the special state.<br>
 +
If one of the states is missing, the prop will be invisible at that state.<br>
 +
The special state is given by one of the following properties:<br>
 +
<b>- Nighttime State Change<br>
 +
- Prop Time of Day<br>
 +
- Simulator Start Date, Simulator Date Duration, Simulator Date Interval,</b><br>
 +
 
 +
<span style="font-family: Courier;"><b>0xXXXXXXXX</b></span><br>
 +
is the offset in the model's X direction. Divide this number by 0x10000 to get meters.<br>
 +
 
 +
<span style="font-family: Courier;"><b>0xZZZZZZZZ</b></span><br>
 +
is the offset in the model's Z direction. Divide this number by 0x10000 to get meters.<br>
 +
 
 +
<span style="font-family: Courier;"><b>0xYYYYYYYY</b></span><br>
 +
is the offset in the model's Y direction (vertical). Divide this number by 0x10000 to get meters.<br>
 +
 
 +
<span style="font-family: Courier;"><b>0xRRRRRRRR</b></span><br>
 +
is the Resource Key Type of the prop, one of the following:<br>
 +
- 0x27812820 for RKT0 (one single model used for all rotations and zooms)<br>
 +
- 0x27812821 for RKT1 (separate models for each rotation and zoom)<br>
 +
(see what the original prop you're converting used).<br>
 +
 
 +
<span style="font-family: Courier;"><b>0xTTTTTTTT<br>
 +
0xGGGGGGGG<br>
 +
0xIIIIIIII</b></span><br>
 +
is the TGI address of the prop model.
  
 
==Other Properties==
 
==Other Properties==
The various "xm" RTK properties, such as RTK1xm, are used for referencing mirrored versions of props, particularly in conjunction with [[Type21]] Exemplars.
+
The various "xm" RKT properties, such as RKT1xm, are used for referencing mirrored versions of props, particularly in conjunction with [[Type21]] Exemplars. The mirrored RKT0 property is named RKTMisc.
 +
 
  
 
{{stub}}
 
{{stub}}
 +
[[Category:Modding]]
 +
[[Category:Modding Lots]]

Latest revision as of 13:56, 6 December 2021

Resource Key Type (RKT) is a common Exemplar property which is used to reference models. There are several different RKT variants that are used in SC4, which are detailed below:

RKT0

RKT0 is used to reference a single true-3D model that applies to all zoom levels (1 model total). This is used on many NAM puzzle pieces, though the practice of using RKT0 has begun to fall out of favor with the NAM Team due to oversharpness of models in farther-away zooms. Only one value is specified here.

RKT1

RKT1 is used to reference isometric models, one per face and one per zoom (20 models total). This is used on most standard in-game buildings. While the RKT1 property will reference 20 different models, only one value, that of the south-facing Zoom 1 model, needs to be specified in the property. The game is able to infer the existence of the others through the RKT1 property.

RKT2

RKT3

RKT3 is used to reference a series of true-3D models, one per zoom level (5 models total). This is used on many NAM puzzle pieces but is falling into disuse in light of new methods for wrapping textures around models such as Embedded Mipmapping. Each zoom level model needs to be specified with RKT3.

RKT4

RKT4 is like RKT3, with the additional capabilities of specifying overhanging models and/or timed props. The full specification is as follows:

Rep 1: 0x0000000S
Rep 2: 0xXXXXXXXX
Rep 3: 0xZZZZZZZZ
Rep 4: 0xYYYYYYYY
Rep 5: 0xRRRRRRRR
Rep 6: 0xTTTTTTTT
Rep 7: 0xGGGGGGGG
Rep 8: 0xIIIIIIII
These 8 reps can be repeated several times.

0x0000000S
is 0 for the normal state, 1 for the special state.
If one of the states is missing, the prop will be invisible at that state.
The special state is given by one of the following properties:
- Nighttime State Change
- Prop Time of Day
- Simulator Start Date, Simulator Date Duration, Simulator Date Interval,

0xXXXXXXXX
is the offset in the model's X direction. Divide this number by 0x10000 to get meters.

0xZZZZZZZZ
is the offset in the model's Z direction. Divide this number by 0x10000 to get meters.

0xYYYYYYYY
is the offset in the model's Y direction (vertical). Divide this number by 0x10000 to get meters.

0xRRRRRRRR
is the Resource Key Type of the prop, one of the following:
- 0x27812820 for RKT0 (one single model used for all rotations and zooms)
- 0x27812821 for RKT1 (separate models for each rotation and zoom)
(see what the original prop you're converting used).

0xTTTTTTTT
0xGGGGGGGG
0xIIIIIIII

is the TGI address of the prop model.

Other Properties

The various "xm" RKT properties, such as RKT1xm, are used for referencing mirrored versions of props, particularly in conjunction with Type21 Exemplars. The mirrored RKT0 property is named RKTMisc.