このページは執筆中であり、今後内容が大幅に追加、変更される可能性があります。
RealTrainMod(RTM)のアドオン制作をする際のJSONの設定項目について解説します。
バージョンによって使用できる内容が異なりますが、このページでは最新版のRealTrainModに準拠しています。
JSONのインデントについて、このWikiでは空白4つで1つのインデントとする作法を採用します
useCustomColortagsdefaultDatascaleoffsetsmoothingdoCullingaccuracyserverScriptPathguiScriptPathguiTexturecustomIconTexturerenderAABBパーツ動作設定
座標変換設定
台車設定
modelFiletexturesrendererPathvertexShaderPathfragmentShaderPathbogieModel2
modelFiletexturesrendererPathbogieModel3
buttonTexture
rollsignTexture
rollsignNames
rollsigns
uvposdoAnimationdisableLightingdoor_left
objectspostransform
door_right
objectspostransform
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
typecolorposrtailLights
typecolorposrinteriorLights
possmoke
size
wheelRotationSpeed
namemodelvehicleTypefrictionaccelerationmaxSpeedmaxYawyawCoefficientpitchCoefficientrollCoefficienthoveringSpeedchangeYawOnStoppingvibrationcollisionPartsconnectionDistancecustomButtonscustomButtonTipsnamemodelvehicleTypevibrationgripPoscollisionPartsrailNamerailModelrailTexturemodelbuttonTexturepolygonTypeballastWidthallowCrossingdefaultBallast
blockNameblockMetadataheightcontainerNamecontainerModelcontainerTexturemodelbuttonTexturecontainerWidthcontainerHeightcontainerLengthfirearmNamefirearmModelfirearmTexturemodelbuttonTexturemodelPartsN
objectsposmodelPartsY
objectsposmodelPartsX
objectsposmodelPartsBarrel
objectsposmuzzlePosplayerPosyawpitchrotationSpeedYrotationSpeedXrecoilammoTyperateOfFiremagazineSizefpvModesignalNamesignalModelsignalTexturelightTexturebuttonTexturemodelPartsFixture
objectsposmodelPartsBody
objectsposlightsrotateBodynamemodeltexturelightTexturebuttonTexturerolehealthspeeddamageuseCustomColorduCullingsmoothingtexturebackTextureheightwidthdepthframeanimationCyclecolorlightValuenamemodel
modelFiletexturesrendererPathbuttonTexturemachineTypefollowRailAnglerotateByMetadatabrightnesssound_OnActivatesound_RunningdefaultValues
typekeyvaluesuggestionspatternminmaxdefaultDatanamemodelbuttonTextureornamentTypeminRandomScaleconveyorSpeednamemodelbuttonTexturetypetransmissionRatioONtransmissionRatioOFFmaxSpeedaccelerationradiusteethCounttextureheightwidthresolutionUresolutionVpoleLengthnamemodelconnectorTypewirePosnamemodeldeflectionCoefficientlengthCoefficientsectionLengthyOffsetuseCustomColorカスタムカラーを有効化するか
false| RTM2 | RTM | KaizPatchX |
|---|---|---|
| YES | NO | YES |
tagsモデル選択画面での検索キーワード
"tags": "ngt 223 JRW"
| RTM2 | RTM | KaizPatchX |
|---|---|---|
| YES | YES | YES |
defaultDataDataMapのデフォルト値
"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スムージングを有効化するか
falsedoCulling面の片面表示を有効化するか
false有効化すると、ポリゴンの表面のみが描画されます。MQOとOBJでは有効化した方が負荷が少ないです。
accuracy頂点座標の精度
"MEDIUM""LOW" - ±16.000の範囲を持ちます。この範囲に収まり、かつそれほど細かくないモデルであれば、こちらを選択したほうがメモリ使用量を削減できます。"MEDIUM" - 通常通り。serverScriptPathサーバースクリプトのファイルパス
"serverScriptPath": "scripts/server/serverscript.js"
guiScriptPathGUIスクリプトのファイルパス
"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"
}
]