このページは執筆中であり、今後内容が大幅に追加、変更される可能性があります。
RealTrainMod(RTM)のアドオン制作をする際のJSONの設定項目について解説します。
バージョンによって使用できる内容が異なりますが、このページでは最新版のRealTrainModに準拠しています。
JSONのインデントについて、このWikiでは空白4つで1つのインデントとする作法を採用します
useCustomColor
tags
defaultData
scale
offset
smoothing
doCulling
accuracy
serverScriptPath
guiScriptPath
guiTexture
customIconTexture
renderAABB
パーツ動作設定
座標変換設定
台車設定
modelFile
textures
rendererPath
vertexShaderPath
fragmentShaderPath
bogieModel2
modelFile
textures
rendererPath
bogieModel3
buttonTexture
rollsignTexture
rollsignNames
rollsigns
uv
pos
doAnimation
disableLighting
door_left
objects
pos
transform
door_right
objects
pos
transform
pantograph_front
pantograph_back
sound_Stop
sound_S_A
sound_S_M
sound_Medium
sound_M_H
sound_High
sound_H_M
sound_M_S
sound_Acceleration
sound_Deceleration
sound_D_S
sound_Horn
sound_BrakeRelease
sound_BrakeRelease2
sound_Announcement
sound_DoorOpen
sound_DoorClose
soundScriptPath
muteJointSound
seatPos
slotPos
seatPosF
playerPos
bogiePos
pantoPos
jointDelay
maxSpeed
renderLight
rolling
rollSpeedCoefficient
rollVariationCoefficient
rollWidthCoefficient
accelerateion
trainDistance
doCulling
isSingleTrain
notDisplayCab
headLights
type
color
pos
r
tailLights
type
color
pos
r
interiorLights
pos
smoke
size
wheelRotationSpeed
name
model
vehicleType
friction
acceleration
maxSpeed
maxYaw
yawCoefficient
pitchCoefficient
rollCoefficient
hoveringSpeed
changeYawOnStopping
vibration
collisionParts
connectionDistance
customButtons
customButtonTips
name
model
vehicleType
vibration
gripPos
collisionParts
railName
railModel
railTexture
model
buttonTexture
polygonType
ballastWidth
allowCrossing
defaultBallast
blockName
blockMetadata
height
containerName
containerModel
containerTexture
model
buttonTexture
containerWidth
containerHeight
containerLength
firearmName
firearmModel
firearmTexture
model
buttonTexture
modelPartsN
objects
pos
modelPartsY
objects
pos
modelPartsX
objects
pos
modelPartsBarrel
objects
pos
muzzlePos
playerPos
yaw
pitch
rotationSpeedY
rotationSpeedX
recoil
ammoType
rateOfFire
magazineSize
fpvMode
signalName
signalModel
signalTexture
lightTexture
buttonTexture
modelPartsFixture
objects
pos
modelPartsBody
objects
pos
lights
rotateBody
name
model
texture
lightTexture
buttonTexture
role
health
speed
damage
useCustomColor
duCulling
smoothing
texture
backTexture
height
width
depth
frame
animationCycle
color
lightValue
name
model
modelFile
textures
rendererPath
buttonTexture
machineType
followRailAngle
rotateByMetadata
brightness
sound_OnActivate
sound_Running
defaultValues
type
key
value
suggestions
pattern
minmax
defaultData
name
model
buttonTexture
ornamentType
minRandomScale
conveyorSpeed
name
model
buttonTexture
type
transmissionRatioON
transmissionRatioOFF
maxSpeed
acceleration
radius
teethCount
texture
height
width
resolutionU
resolutionV
poleLength
name
model
connectorType
wirePos
name
model
deflectionCoefficient
lengthCoefficient
sectionLength
yOffset
useCustomColor
カスタムカラーを有効化するか
false
RTM2 | RTM | KaizPatchX |
---|---|---|
YES | NO | YES |
tags
モデル選択画面での検索キーワード
"tags": "ngt 223 JRW"
RTM2 | RTM | KaizPatchX |
---|---|---|
YES | YES | YES |
defaultData
DataMapのデフォルト値
"defaultData": "scale=(Double)1.0,type=(String)Normal"
RTM2 | RTM | KaizPatchX |
---|---|---|
YES | YES | YES |
scale
縮尺(NGTOモデル使用時のみ)
RTM2 | RTM | KaizPatchX |
---|---|---|
YES | Maybe YES | YES |
offset
モデルの描画位置
モデルの描画位置を設定します。Entityの中心からの相対座標で記述してください。
"offset": [0.0, 0.0, 0.0]
RTM2 | RTM | KaizPatchX |
---|---|---|
YES | YES | YES |
smoothing
スムージングを有効化するか
false
doCulling
面の片面表示を有効化するか
false
有効化すると、ポリゴンの表面のみが描画されます。MQOとOBJでは有効化した方が負荷が少ないです。
accuracy
頂点座標の精度
"MEDIUM"
"LOW"
- ±16.000の範囲を持ちます。この範囲に収まり、かつそれほど細かくないモデルであれば、こちらを選択したほうがメモリ使用量を削減できます。"MEDIUM"
- 通常通り。serverScriptPath
サーバースクリプトのファイルパス
"serverScriptPath": "scripts/server/serverscript.js"
guiScriptPath
GUIスクリプトのファイルパス
"guiScriptPath": "scripts/gui/guiscript.js"
guiTexture
乗り物GUIのカスタムテクスチャのファイルパス
"guiTexture": "textures/gui/gui.png",
customIconTexture
カスタムアイコンのテクスチャのファイルパス
"customIconTexture": "textures/icon/icon.png"
renderAABB
描画有無判定用BOXのサイズ
"renderAABB": [-0.5, 0.0, -0.5, 0.5, 1.0, 0.5]
trainName
車両のID
ユニークなものでなければならない。車両キットを使用した場合や、既にアドオンがある形式など、競合することがないように工夫して命名することが望ましい。
"trainName": "train_name"
trainType
サブタイプ
"EC"
- 電車"DC"
- 気動車"CC"
- 貨車"TC"
- タンク車"trainType": "EC"
trainModel
削除
"trainModel": "train.class",
bogieModel
削除
"bogieModel": "bogie.class",
trainTexture
削除
"trainTexture": "textures/train/train.png",
bogieTexture
削除
"bogieTexture": "textures/train/bogie.png",
trainModel2
モデルファイルとテクスチャファイルの設定
modelFile
<string> モデルファイルへの相対パスtextures
<array> 材質設定の配列
rendererPath
<string> 描画スクリプトのファイルパスvertexShaderPath
<string> 詳細不明fragmentShaderPath
<string> 詳細不明文字列にAlphaBlend
が含まれていれば透過、Light
が含まれていれば発光が有効化されます
"trainModel2": {
"modelFile": "train.mqo",
"textures": [
["mat1", "textures/train/train1.png", "AlphaBlend"],
["mat2", "textures/train/train2.png", "Light"],
["mat3", "textures/train/train3.png"]
],
"rendererPath": "scripts/script.js"
},
"bogieModel2"
/ "bogieModel3"
ゲーム内の車両には、台車(ボギー)を設定することができます。
台車の指定方法には、前後で同じ台車を使用する場合と、異なる台車を使用する場合の2種類があります。
"bogieModel2"
)"bogieModel2"
を使用すると、前後で同じ台車を設定できます。
"bogieModel2": { "modelFile": "...", "textures": [...], "rendererPath": "..." }
キー名 | 型 | 説明 |
---|---|---|
"modelFile" |
string |
モデルファイルのパス(models ディレクトリからの相対パス) |
"textures" |
array of arrays |
[材質名, テクスチャのパス] のペアを格納した配列(minecraft ディレクトリからの相対パス) |
"rendererPath" |
string (省略可) |
描画スクリプトのパス(指定するとスクリプトで描画を制御可能) |
"bogieModel2": {
"modelFile": "bogie.mqo",
"textures": [
["mat1", "textures/bogie.png"]
],
"rendererPath": "scripts/bogie.js"
}
"bogieModel3"
)"bogieModel3"
を使用すると、前後で異なる台車を設定できます。
"bogieModel3": [ frontBogie, rearBogie ]
キー名 | 型 | 説明 |
---|---|---|
frontBogie |
object |
前方の台車の設定("bogieModel2" の値と同様) |
rearBogie |
object |
後方の台車の設定("bogieModel2" の値と同様) |
"bogieModel3": [
{
"modelFile": "bogieF.mqo",
"textures": [
["mat1", "textures/bogieF.png"]
],
"rendererPath": "scripts/bogieF.js"
},
{
"modelFile": "bogieR.mqo",
"textures": [
["mat1", "textures/bogieR.png"]
],
"rendererPath": "scripts/bogieR.js"
}
]