ist das Pathverzeichnis eigentlich richtig, oder muss ich da ein anderen ordner raussuchen? (weil bei meinem test savegame keine textur neben den schienen erstellt wurde auch bei einem höheren wert von 15.0 bei dem local ballast texture with)
mods/unixroot_natural_environment_pro_tpf2_2/res/textures/terrain/ballast_albedo.dds
Hier noch die ganze Modlua
function data()
return {
info = {
minorVersion = 0,
severityAdd = "NONE",
severityRemove = "NONE",
name = _("Fabtendo's Trackside Ballast"),
description = _("Adds a ballast texture next to the tracks."),
authors = {
{
name = "Fabtendo",
text = 'idea, script, test',
role = "CREATOR",
steamProfile = "76561198841625646",
tfnetId = "43362",
},
{
name = "ChatGPT",
text = 'script',
role = "CREATOR",
},
},
tags = {"Track", "Ballast", "Texture", "NEP", "Scenery"},
dependencies = {
{
name = "Natural Environment Professional 1",
modID = "unixroot_natural_environment_pro_tpf2_1",
},
},
},
runFn = function(settings, modParams)
local ballast_texture_path = "res/textures/terrain/ballast_albedo.dds"
local ballast_texture_width = 15.0
addModifier("loadModel", function(fileName, data)
if fileName:find("track_") then
if data.materials then
for _, material in ipairs(data.materials) do
if material.diffuseTex then
material.diffuseTex = ballast_texture_path
material.tileX = ballast_texture_width
material.tileY = ballast_texture_width
end
end
end
end
return data
end)
end,
}
end
Alles anzeigen
(Und ja, der fairness halber habe ich Chat GPT mit eingebunden, weil der für mich das ganze Scripting übernommen hat)