Normaly it isnt possible. The Common API has an feature which allows you to create thighter curves,
Beiträge von RPGFabi
Willkommen in der Transport Fever Community
Wir begrüßen euch in der Fan-Community zu den Spielen Transport Fever und Train Fever, den Wirtschaftssimulatoren von Urban Games. Die Community steht euch kostenlos zur Verfügung damit ihr euch über das Spiel austauschen und informieren könnt. Wir pflegen hier einen freundlichen und sachlichen Umgang untereinander und unser Team steht euch in allen Fragen gerne beiseite.
Die Registrierung und Nutzung ist selbstverständlich kostenlos.
Wir wünschen euch viel Spaß und hoffen auf rege Beteiligung.
Das Team der Transport-Fever Community
-
-
Nur das genaue zielen und schief draufschauen hilft dir da.-
-
Hast du den Modkonverter aktiviert?
-
Mit Artikel. 13 wäre da was machbar. Denke der einzige Vorteil davon.
-
Der Bahnhof sollte sich diese Fläche selbst bauen...
Woran der Fehler genau liegt weis ich nicht.
-
Einfach einen eigenständigen Mod machen in dem du die mdls und Vorschaubildchen reinmachst. Das Spiel sucht dann automatisch die msh Datein in dem richtigen mod-
-
Aktuell habe ich den Mod soweit fertig (also selbstständig) werde ihn vmtl. erst hochladen, wenn der Häuermod auch soweit ist.
Sollte früher Bedarf da sein, einfach per PM melden. (Nur Modder, da er nur in Mods sinnvoll ist / funktioniert)
Hier noch die Funktionen welcher der Mod dann hat:
Script:
local Blocked_Areas = {}Description:
create an Table where blocked Areas are stored--------------------------------------------------------------------
Script:
Blocked_Areas[#Blocked_Areas +1] = RPGFabi_Block_Areas.createblock(X_Pos, Y_Pos, Width_X, Width_Y, safety_width )Description:
Block an Area from an Center PointX_Pos => position center x
Y_Pos => position center y
Width_X => width x
Width_Y => width y
safety_width => extra width per side--------------------------------------------------------------------
Script:
local Var = RPGFabi_Block_Areas.blockAreawithfourpoints(Point1_X, Point1_Y, Point2_X, Point2_Y, Point3_X, Point3_Y, Point4_X, Point4_Y, x_low, x_high)for i = 0,#Var do
Blocked_Areas[#Blocked_Areas +1] = Var[i]
endDescription:
Blocks an area with 4 given points.C D
/ /
/ /
/ /
/ /
A BPoint1_X => X value of A point
Point1_Y => Y value of A point
Point2_X => X value of C point
Point2_Y => Y value of C point
Point3_X => X value of B point
Point3_Y => Y value of B point
Point4_X => X value of D point
Point4_Y => Y value of D point
x_low => lowest x_Value
x_high => highest x_Value--------------------------------------------------------------------
Script:
local Var = RPGFabi_Block_Areas.checkifblocked(Blocked_Areas, Pos_x, Pos_y)Description:
Check if this specific coordinate is blocked. Returns false or trueBlocked_Areas => Table of Blocked Areas
Pos_x => x position of point
Pos_y => y position of point--------------------------------------------------------------------
Script:
local Var = RPGFabi_Block_Areas.checkAreaifblocked(Blocked_Areas, Position_X, Position_Y, Width_X, Width_Y)Description:
Check if this area is blocked. Returns false or trueBlocked_Areas => Table of Blocked Areas
Pos_x => x position of point
Pos_y => y position of point
Width_X => width in x direction
Width_Y => width in y direction--------------------------------------------------------------------
Script:
local Modelltable = RPGFabi_Block_Areas.buildonblocked(Y_Mid, Y_Width, X_Width, Blocked_Areas, X_Start, Testsize)for i = 0,#Modelltable do
result.models[#result.models+1] = Modelltable[i]
endDescription:
Builds red models on blocked areas. This should only be used in developing status.Y_Mid => y centre of area
Y_Width => y width of area
X_Width => x width of area
Blocked_Areas => Table of Blocked Areas
X_Start => lowest x coordinate of area
Testsize => size of the testobject. Good with 0.1 ; 0.5 ; 1 ; 2
--------------------------------------------------------------------
Script:
local Modelltable = RPGFabi_Block_Areas.buildonfree(Y_Mid, Y_Width, X_Width, Blocked_Areas, X_Start, Testsize)for i = 0,#Modelltable do
result.models[#result.models+1] = Modelltable[i]
endDescription:
Builds green models on free areas. This should only be used in developing status.Y_Mid => y centre of area
Y_Width => y width of area
X_Width => x width of area
Blocked_Areas => Table of Blocked Areas
X_Start => lowest x coordinate of area
Testsize => size of the testobject. Good with 0.1 ; 0.5 ; 1 ; 2 -
ich habe sie in den Häusern von Matze platziert
funktionieren die auserhalb? wenn ja, hast du da dein Problem

-
Nachdem ich in letzter Zeit wenig aktiv war und zudem ein größeres Problem für mein Häusermod hatte, jetzt das Ergebnis.
Es mag zwar klein scheinen aber es ist esentiel für den Mod.
Ich kann nun Bereiche für den Bau blockieren und überprüfen.
Creating and using an blocked Area for Constructions
Die Frage ist nun, ob ich das als eigenständigen Mod releasen soll.
-
I've got it

Now i Have a Script that can block an given Area (with 4 Points), block an Area from Center, check if an Position is free, show blocked and show not blocked Areas.
Of course the last 2 functions are only for development if everything works.
Right now I'm thinking about Creating an own Mod (Script, Model & Texture) with it so every Modder can just require this Mod to get this functions done.
What do you think about it?
This is how it looks like if you are in Testing mode.
Else it is invisible -
Ich dachte, das das dem Script von @snowballegal sei
-
@SM1 warum baust du immer erst Modelle, bevor du fragst ob das wer brauchen kann?
-
Das kannst ja wieder zu machen
-
Besteht also die Hoffnung, den morgentlichen Besuch im Forum (gegen 7 Uhr) danach wieder stattfinden zu lassen?
-
Da wir unsere Glaskugel mit Informationen füttern müssen wäre die stdout hilfreich.
Den Speicherort findest du im Lexikon.
Zudem... seit wan hat UG Untergrund Bahnhöfe?
-
Hast du uns den ein Bild des Bereiches in dem es hängt? Oder ist das überall so?
Und lief der gleiche Bereich mal flüssig?
-
Da wir unsere Glaskugel mit Informationen füttern müssen wäre die stdout hilfreich.
Den Speicherort findest du im Lexikon.
-
Hello Modding Collegues,
I've got a small Problem. For one of my new WIP-Mods i need a way to "block" an area. As all the positioning is totaly random i need to block the Area of an object, so the next object can't be build there. I tried to figure a way out to do this, but it seem to do not work. I've created some functions:
The Table for Blocked Areas looks like this.
Every single Area is added with this.
1. check if the blocked Area is free
Code
Alles anzeigenfunction RPGFabi_Gardencalculation.checkiffree(Blockierte_Flaeche, Pos_X, Pos_Y) local blocked = false for i = 0,#Blockierte_Flaeche do if ((Pos_Y > Blockierte_Flaeche[i][1]) and (Pos_Y < Blockierte_Flaeche[i][2])) or ((Pos_X > Blockierte_Flaeche[i][4]) and (Pos_X < Blockierte_Flaeche[i][3])) then blocked = true break else end end return blocked end
2. create an block from CenterCodefunction RPGFabi_Gardencalculation.createblock(X_Pos, Y_Pos, Width_X, Width_Y, safety_width) local Table = { Y_Pos - Width_Y/2 - safety_width, Y_Pos + Width_Y/2 + safety_width, X_Pos - Width_X/2 - safety_width, X_Pos + Width_X/2 + safety_width } endWidth is the Distance from the first end of the object to the last end of the object
safety width is the extra distance where nothing can be placed.3. show blocked Areas
Place an Object at the side of every BlockCode
Alles anzeigenfunction RPGFabi_Gardencalculation.showblocked(Blocked_Areas, Y_Housepos) local Table = {} local skalierung = { x = 0.1, y = 0.1, z = 0.1 } local rotation = { x = math.rad(0), y = math.rad(0), z = math.rad(0) } for i = 1,#Blocked_Areas do local X_Mid = Blocked_Areas[i][4] - Blocked_Areas[i][3] local Y_Mid = Blocked_Areas[i][2] - Blocked_Areas[i][1] local Modelpfad = "asset/track_multi_gleisfeldleuchte_db_doppelt" local translation_A = { x = X_Mid, y = Blocked_Areas[i][2], z = 0 } local translation_B = { x = X_Mid, y = Blocked_Areas[i][1], z = 0 } local translation_C = { x = Blocked_Areas[i][4], y = Y_Mid, z = 0 } local translation_D = { x = Blocked_Areas[i][3], y = Y_Mid, z = 0 } local translation_E = { x = X_Mid, y = Y_Mid, z = 0 } -- [[ Table[#Table +1] = { id = Modelpfad..".mdl", transf = transf.scaleRotZYXTransl(skalierung, rotation, translation_A) } Table[#Table +1] = { id = Modelpfad..".mdl", transf = transf.scaleRotZYXTransl(skalierung, rotation, translation_B) } Table[#Table +1] = { id = Modelpfad..".mdl", transf = transf.scaleRotZYXTransl(skalierung, rotation, translation_C) } Table[#Table +1] = { id = Modelpfad..".mdl", transf = transf.scaleRotZYXTransl(skalierung, rotation, translation_D) } -- ]] --[[ Table[#Table +1] = { id = Modelpfad..".mdl", transf = transf.scaleRotZYXTransl(skalierung, rotation, translation_E) } ]] end return Table end
4. Create the m and b variable of an straight line out of 4 coordinatesCodefunction RPGFabi_Gardencalculation.getLine(Einfahrt_Y, Einfahrt_X, Haus_Y, Haus_X) local m = (Einfahrt_Y - Haus_Y) / (Einfahrt_X - Haus_X) -- Steigung local b = Einfahrt_X - (m * Einfahrt_Y) -- Offset local Table_Line = { m, b } return Table_Line end
5. Use the Lines (2 create an groundface) to create an blocked Area. This should use small slices of the Area to create better blocked AreasCode
Alles anzeigenfunction RPGFabi_Gardencalculation.blockArea(Line_A, Line_B, EX, Haus_X, Y_Houseposition) local Distance = 0.5 -- Scheibengröße local Amount = (EX - Haus_X) / Distance -- Anzahl der Scheiben local Left_Y = 0 local Right_Y = 0 local Table_Block = { } -- erstelle Koordinaten für Scheibenweise Blockaden for i = 0,Amount do -- get low x local low_X = EX - (i * Distance) -- get high x local high_X = low_X - Distance -- get left Y local L_YA = (low_X - Line_A[2]) / Line_A[1] local L_YB = (high_X - Line_A[2]) / Line_A[1] if L_YA > L_YB then Left_Y = L_YB else Left_Y = L_YA end -- get right Y local R_YA = (low_X - Line_B[2]) / Line_B[1] local R_YB = (high_X - Line_B[2]) / Line_B[1] if R_YA > L_YB then Right_Y = R_YB else Right_Y = R_YA end -- Create Blocked Table Table_Block[#Table_Block +1] = { Left_Y, Right_Y, high_X, low_X } end return Table_Block endProblem:
It doesn't show me the blocks correct. As I don't know if they are created correct or not, which I need to check soon, I thought Hey maybe someone else got an easier way.
Can someone help with the creation and use of an blocked Area Table?
The Beginning would be the Table groundfaces use:
-
Solange du keine log-Datei (stdout) lieferst, kann man dir nicht helfen. Wo diese in deinem Fall gespeichert ist, findest du im Lexikon.
-
Das ist der Hoch-Bahnhof von Majuen.