Hallo lieber Mitmodder,
ich wollte meine Hochbahnsteige noch etwas umbauen und dafür habe ich die Lanes (die waren alle nur bedingt nötig) aus den MDLs entfernt und dafür wollte ich die Terminals über die CONs festlegen.
Das sollte wohl mittels der Edges in der CON und den terminalGroups funktionieren. Leider gibts von UG dafür noch keine Doku außer "Schaut sie euch in bestehenden Dateien an".
Hier mal Codebeispiele:
result.edgeLists[#result.edgeLists+1] = {
type = "STREET",
params = {
type = "new_medium.lua",
tramTrackType = "ELECTRIC",
},
edges = {
{ { .0, 40, .0 }, { .0, 10.0, .0 } },
{ { .0, 50, .0 }, { .0, 10.0, .0 } },
},
snapNodes = { 1 }
}
result.edgeLists[#result.edgeLists+1] = {
type = "STREET",
params = {
type = "new_medium.lua",
tramTrackType = "ELECTRIC",
},
edges = {
{ { .0, -50, .0 }, { .0, 10.0, .0 } },
{ { .0, -40, .0 }, { .0, 10.0, .0 } },
},
snapNodes = { 0 }
}
result.edgeLists[#result.edgeLists+1] = {
type = "STREET",
params = {
type = "new_medium.lua",
tramTrackType = "ELECTRIC",
},
edges = {
{ { .0, -40, .0 }, { .0, 20.0, .0 } },
{ { .0, -20, .0 }, { .0, 20.0, .0 } },
},
snapNodes = { }
}
result.edgeLists[#result.edgeLists+1] = {
type = "STREET",
params = {
type = "new_medium.lua",
tramTrackType = "ELECTRIC",
},
edges = {
{ { .0, -20, .0 }, { .0, 40.0, .0 } },
{ { .0, 20, .0 }, { .0, 40.0, .0 } },
},
snapNodes = { }
}
result.edgeLists[#result.edgeLists+1] = {
type = "STREET",
params = {
type = "new_medium.lua",
tramTrackType = "ELECTRIC",
},
edges = {
{ { .0, 20, .0 }, { .0, 20.0, .0 } },
{ { .0, 40, .0 }, { .0, 20.0, .0 } },
},
snapNodes = { }
}
result.terminalGroups = {
{
terminals = { {0, 0} },
vehicleNodeOverride = 6
}, {
terminals = { {1, 0} },
vehicleNodeOverride = 7
}
}
Alles anzeigen
metadata = {
transportNetworkProvider = {
laneLists = {
{
transportModes = { "PERSON" },
nodes = {
-- ped1
{ { -20.0, -2-1.1, .3 }, { 1, 0, .0 }, 1.25 },
{ { 0.0, -1.25, 1 }, { 1, 0, 0 }, 1.25 },
{ { 40.0, -1.25, 1 }, { 1, 0, .0 }, 2.0 },
{ { 0.0, -1.25, 1 }, { 1, 0, .0 }, 2.0 },
{ { 40.0, -1.25, 1 }, { 1, 0, 0 }, 1.25 },
{ { 60.0, -2-1.1, .3 }, { 1, 0, .0 }, 1.25 },
{ { 60.0, -2-1.1, .3 }, { 0, 2, 0 }, 1 },
{ { 60.0, -1.1, .3 }, { 0, 2, 0 }, 1 },
{ { 60.0, -1.1, .3 }, { 0, 0.2, 0 }, 1 },
{ { 60.0, -0.9, 0 }, { 0, 0.2, 0 }, 1 },
{ { 60.0, -0.9, 0 }, { 0, 4.8, 0 }, 1 },
{ { 60.0, 3.9, 0 }, { 0, 4.8, 0 }, 1 },
{ { -20.0, -2-1.1, .3 }, { 0, 2, 0 }, 1 },
{ { -20.0, -1.1, .3 }, { 0, 2, 0 }, 1 },
{ { -20.0, -1.1, .3 }, { 0, 0.2, 0 }, 1 },
{ { -20.0, -0.9, 0 }, { 0, 0.2, 0 }, 1 },
{ { -20.0, -0.9, 0 }, { 0, 4.8, 0 }, 1 },
{ { -20.0, 3.9, 0 }, { 0, 4.8, 0 }, 1 },
}
}
},
terminals = {
{ personNodes = { 2, 3 }, personEdges = { 1 }, 2.0 },
}
},
},
Alles anzeigen
So wirklich funktionieren will das damit aber nicht. Entweder habe ich dann eine nicht funktionierende Station oder einen Crash mit:
c:\build\transport_fever\steam\transport_fever_release\src\game\ui\actions\construction_builder_util.cpp:1719: class std::vector<class ecs::Entity,class std::allocator<class ecs::Entity> > __cdecl construction_builder_util::Apply(struct street_util::StreetToolkit,const class transport::CargoTypeRep *,const class CGameTime *,struct construction_builder_util::Proposal,struct construction_builder_util::ProposalData,const class ecs::Entity &): Assertion `p.first < (int)model2terminals.size()' failed.
Hat damit jemand Erfahrung? Ich bin gerade auch auf dem TS, falls das übers Forum zu kompliziert wird...