Mission "Top of Europe" erstellen: Mithilfe erwünscht

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


  • Hallo zusammen,


    in Transport Fever ist es möglich durch Modding gescriptete Missionen zu erstellen. Leider hat sich bisher außer @osprey noch niemand daran gewagt. Das sollten wir ändern! Ich habe bereits eine Höhenkarte erstellt. Die Karte ist noch nicht fertig. Es fehlen noch der See und eventuell Anpassungen für Spielbarkeit und Optik. Einen Screenshot aus dem Spiel mit geladener Karte und den Kartenausschnitt habe ich angehängt. Der Screenshot enthält den Graubünden-Mod von @Somnium für die Schneeberge.


    Der Bereich der Karte umfasst Interlaken, Lauterbrunnen, Grindelwald und Eiger, Mönch und Jungfrau. Es können in der Karte die Berner Oberland-Bahn, die Wengernalp-Bahn, die Jungfrau-Bahn, Schynige Platte-Bahn und die Bergbahn Lauterbrunnen-Mürren gebaut werden. Eins der letzten Missionsziele sollte sein, Passagiere mit einer Bahn aufs Jungfraujoch zu bringen, eventuell sogar bis zum Jungfrau-Gipfel. Ein Zwischenziel könnte sein, eine Bahnlinie bis zur kleinen Scheideggg zu bauen.


    Ich würde vorschlagen, zuerst einmal Ideen zu sammeln um dann gemeinsam ein Konzept für die Mission zu erarbeiten. Was habt ihr für Ideen für Teil-Missionsziele? Bitte nur solche Ideen posten, die auch modbar sind. Steilere Gleise und geringere Kurvenradien sind leider nicht modbar. Es können nur gescriptete Events verwendet werden, die in ähnlicher Form auch in der Kampagne vorkommen.


    Wer würde sich gerne an dem Projekt beteiligen wollen? Wenn ja, wie? Möglich sind Beiträge durch gemoddete Züge, Bahnhöfe, andere Mod-Objekte, Kartenerstellung, Skripting und Test-spielen der Mission. Ich kenne mich mit der Karten-Modding aus und habe auch schon Karten erstellt und kann mir auch vorstellen, mich in das Skript-Modding einzuarbeiten. Gemoddete 3d-Objekte kann ich allerdings keine erstellen. Ich würde mich über eure Mitarbeit an dem Projekt freuen!


    Viele Grüße,
    Simugamer

  • Ich finde die Idee seehr gut! Ich liebe Berge und Bergbahnen, die Jungfraubahn in TpF nachzubauen wäre toll!
    Allerdings wie du schon richtig geschrieben hast, grössere Steigungen sind leider nicht modbar. Deshalb meine Frage: ist deine Höhenkarte so ausgelegt, dass man mit der derzeit grösste Steigung die Bahnstrecke realitätsnah bauen kann?


    Ausserdem mit guten Plänen kann ich durchaus die entsprechende Züge bauen. Allerdings leider nicht innnerhalb von 1-2 Monaten, da ich derzeit im Urlaub bin, danach geht wieder die FH und Bachelorarbeit los...


    Auf jeden Fall tolles Projekt, würde mich sehr freuen wenn es umgesetzt werden könnte!

  • Bevor ich etwas weiter aushole zuerst zu deiner Frage: In der Karte lassen sich bis auf die Jungfrau-Bahn alle Bahnstrecken realitätsnah nachbauen.
    Bei der Jungfraubahn müsste man im Gegensatz zur Realität zusätzliche Serpentinen oder Kreiskehrtunnel einbauen.
    Eine Alternative wäre, die Jungfraubahn als Straßenbahn zu modellieren. Man müsste vermutlich die Strecke vom restlichen Straßennetz abkoppeln,
    um zu verhindern, dass auf der Strecke Autos fahren. Die Station Jungfraujoch kann als Industrie modelliert werden, die Personen annimmt.


    Der Kartenausschnitt ist in Realität 20km x 20km groß und die Höhendifferenz zwischen niedrigstem Punkt (Thuner See) und höhstem Punkt (Jungfraugipfel) ist 3600m.
    In Transport Fever ist der maximal mögliche Höhenunterschied 900m (1000m - 100m). Die maximal mögliche Steigung von Schienen in Transport Fever ist 7,5%.


    Im 1:1 Maßstab hätte die Karte die Größe riesig (siehe Heightmaps (Erlaubte Abmessungen)) und wäre viermal so flach (Überhöhungsfaktor 0,25).
    Folgende Tabelle zeigt, bei welcher Kartengröße welche Gleis-Steigungen gebaut werden können.
    Dabei ist angenommen, dass in Transport-Fever die maximale Höhendifferenz von 900m ausgenutzt wird und dass das Höhenprofil linear skaliert wird.
    Ein Überhöhungsfaktor < 1 bedeutet, dass die Karte im Spiel flacher ist, als in der Realität.

    Kantenlänge in kmKantenlänge in PixelÜberhöhungsfaktorSteigung 7,5% entspricht in Realität
    klein8 km20490,62512%
    mittel12 km30730,416718%
    groß16 km40970,312524%
    riesig20 km51210,2530%


    Eine zu starke Abflachung des Geländes führt allerdings dazu, dass die Karte nicht mehr stimmig aussieht.
    Die Karte aus meinem vorigen Screenshot hat die Größe klein. Die Höhe ist allerdings nicht linear skaliert.
    Dies bedeutet, dass die Abflachung in niedriger gelegenen Gebieten stärker ist als weiter oben.
    Ich habe mich dafür entschieden, um originalgetreue Bahnstrecken bis zur kleinen Scheidegg bauen zu können.
    Gleichzeitig sollte der optische Eindruck der hohen Gipfel und insbesondere der Eigernordwand erhalten bleiben.


    Für weitere Vorschläge, wie man einen möglichst guten Kompromiss aus Spielbarkeit und Optik erhalten kann, bin ich euch dankbar.

  • @Simugamer
    Guten Abend meine Damen und Herren,
    Leider meine Deutsch ist schlechter und langsame als meine English, deshalb schreibe ich in English...


    My maps folders from TF and TPF are littered with attempts at making a scenario like this, or slightly wider like @SwissCH 's BLS scenario. His work is incredibly if you don't already know about it:
    Swiss TPF Mods Projects
    and
    http://steamcommunity.com/shar…iledetails/?id=1079159755


    However, I have been thinking that a more focused mission on the Top of Europe would be fun!


    As far as I see it, there are 4 problems to overcome:
    1. The height map limits you mention above.
    2. The lack of possibility of a rack railway.
    3. Towns being generic (long and complicated, but I mean that e.g. Interlaken should be able to grow large industrial areas, while in the scenario, Wengen or Muren should probably be completely industry free).
    4. Mission scripting.... I'm still very concerned that I'm the only person (as far as I know) who has dabbled in it!


    So, my thoughts on those various issues:
    1. The game engine can handle bigger mountains - you can make them in-game using the landscaping tools, so it presumably is just a fixed limit they put on the code which imports heightmaps. I have emailed Urban games about this, but while they responded to some other things I asked, there was no news on lifting this unnecessary limit.
    As the game engine can handle it, there MIGHT be ways around this. Unfortunately, the mission scripting itself doesn't have any tool to change the height of terrain. However, as far as I understand, buildings can affect the terrain, at the very least by flattening it. If buildings can be used to do more than flattening terrain, it might be possible to "sneak" a heightmap into the game by coding it as the base of a building and "building" it. I wonder if anyone knows if this is possible? It is definitely possible for non-flat building footprints (see sloped stations) - how about more complex ones?


    2. I have experimented a bit with overcoming the steepness problem by modding stations at higher angles, but it doesn't work - the game engine simply won't let you build tracks at too steep an angle, whether through the track building tool, or as part of a construction. You could possibly mod this as a tram (see the recent attempts at building cable cars using the tram/road system!), but the proper solution would be better track modding options/tools. I also asked Urban games about this, but no response. I think that such a large amount of the value in such a mountainous scenario is bound up in being able to do things like this, that for me, this problem has limited my desire to spend time solving the other problems.


    3. The problem with towns is long and complex. In short, I think that it should be possible to have a number of extra moddable parameters for each town:
    Maximum town size
    Town growth rate
    Max % or number of land-use counts (e.g. max. 10% industrial)
    I have explored the various town variables which are accessible through mission modding, but none of them have the desired affect. The best I can do is forcibly delete town buildings each month, but this makes quite some havok in the game engine (it for some reason does not recognize buildings deleted using a mission script, so very weird things happen with the town population and growth).
    I have asked Urban games about this topic and they said it is not possible to do without them changing the game's code (i.e. its not just that no one has figured out how to do it yet through modding). However, there has been no news about it. I haven't tried again since the recent patch, but I doubt they changed this and then didn't tell anyone that they did do it, or how to use it.


    4. It took me a long time to even get very basic things working in mission scripting, and its full of weird quirks (e.g. it seems that, at least for steam workshop mods, you need to have the mission script in a different mod than the save game....). At the moment, I have very little time to devote to trying to figure it out more and write some. If I get the time, I will play around with the BLS scenario, but I'm not sure when that will happen, certainly not within the next few weeks...
    Hopefully some other people more naturally gifted in programming than me can have a go with this...

  • finding people who have the know how for the task of scripting is the most challenging part and so far no one able enoght has shown interest in doing a extensive mission.


    I for my part think it is very unelikly (if you are not a able modder yourself) to convince other people to work on your idea (sorry but i just think thats how it is).
    Why i am saying that?
    Well mostly because i have allready done a scenario which includes pretty much anything apart from the mission scripts and even thogh i had various people writing me and offer their help no one of said person has been able or shown ineterest to be able to finish a task yet.


    But i wish you the best of luck anyway.

  • Both your projects "History of Tirol" and "BLS" are great!


    I agree with the main problems that @osprey has identified.


    For modding a funicular I have an idea: The funicular stations could have a hidden underground street connection.
    The transport works by busses in an underground tunnel. The funicular itself is just an animation and has no function apart from the visual appearance.


    I tried to make the mission for connecting Thun with Domodossola in the BLS mission work. But the scripting is harder than I expected.
    I still haven't really figured out, how the TaskManager works, and when which function is called.
    This weekend I will try it again and I'm confident, that I will get it working.
    I will have a look at the "History of Tirol" mission script as well to better understand the scripting language.

  • I got a reply from Urban games.
    In short, we should be confident that they will address points 1 and 2, but don't hold our breaths about point 3. Thus, I will save my excitement for when a real funicular is possible.


    The History of Tirol script should give some pointers. It has a working example of checking for connections between two places. Should be easy to adapt it to work for railways rather than roads (there is simply a parameter you change). There's also some other useful stuff in there like the way town locations are detected automatically rather than having to manually define their locations for the script to work.

  • I wrote most of the scripts for the campaign, so feel free to ask any question related to that - I will be happy to help.


    Some general feedback:


    I´m very happy to see people creating new missions - in my opinion the system is very powerful - if you know what you can do with it (Have a look at: http://transportfever.com/wiki/script-doc/).


    In particular I would like to point out the possibilty to build and change constructions (buildConstruction, upgradeConstruction), replace (active) vehicles (replaceVehicle) and limit track building either by locking a region (setZone) or mission.setCallback (I think this is not yet documented in the Wiki, I will see to it!).


    I also had to overcome obstacles when designing the missions. I know it can be a bit frustrating, when good ideas dash against engine limitations or even realism, but in the end challenging and fun tasks are a good coverup when "bending reality". ;)

    Spieleentwickler, Geek, Content Creator

    2 Mal editiert, zuletzt von tomdotio ()

  • my 2 cents on this topic from a software developer active since 10 years:


    The documentation of is not sufficient. If you look at steamapps/common/Transport Fever/res/campaign/tutorial/01/script.lua you find


    Code
    local TaskManager = require "TaskManager"
    local missionutil = require "missionutil"


    As a developer I would like to see what APIs TaskManager and missionutil offer. But there is NO documentation about these guys.


    So now I could ask @tomdotio where is the documentation of



    Code
    tm:register(string, function, task)
    tm:register(string, function)

    ?? I cannot find it in the wiki.



    I am not surprised that nobody creates missions, because there is way to little documentation.


    Another example:


    Code
    local tm = TaskManager.new()

    Why do we need a TaskManager? In the linked example (http://www.transportfever.com/…operinfo:missionscripting) there should be comments all over the place. The comments should explain the motivation of using a TaskManager and what it does.


    As long as not all the infrastructure for mission creation is not properly documented only insiders or very dedicated people like @osprey will manage to create missions. The situation has to improve!

    sorry for my rant, but the lack of documentation really hurts the community here.

  • @momocat


    I definitely agree better documentation would be great. That being said, after writing my mission and studying the existing missions in the process, I felt I understood what almost all the existing code does, although still found it frustrating to figure out exactly what was required to get various things to work...



    The task manager (tm) which you see in the scripts is the box (and presumably all the underlying functionality) which appears on the left side of the game screen when doing missions/campaigns which shows you what your current task is, and details of previous tasks and sub-tasks. As far as I understand, it is not possible to have a mission task/goal without the task manager, although you can make a mission which doesn't have any tasks but has code which does other things (e.g. my industry location exporter tool).

  • I agree with you that better documentation for mission scripting would be helpful and I assume the developers of TransportFever think the same way.
    The developer team is relatively small, so I think they just did not have the time to write a better docu.
    Urban Games is very open towards the community and modding. I appreciate that.


    Some things I found out about lua and mission scripting that might be helpful for you:


    Lua is a very minimalistic language. A good and short introduction into lua: http://tylerneylon.com/a/learn-lua/
    Lua has some meta-features to compensate for the small language extent. I'm not sure how much you have to know about them for mission scripting.
    Functions in Lua are first class citizens. You can use them as method parameters and return values just as you would do with variables. The TransportFever mission scripting uses this feature quite a lot.
    In lua variables are global by default. Add local to every variable that should not be visible outside the current function.
    Otherwise you could accidentally override the value of a variable used in a mod or in lua code provided by Urban Games and mess up things a lot.


    The classes TaskManager and missionutil classes are important for connecting your mission script code with the game engine code.
    You have to tell TransportFever which missions are currently active and which lua mission code has to be executed to check for mission success.
    I've read in some other thread that the lua code that checks for the completion of an active mission is executed each frame.


    TrainFever often gives you good error messages that contain the line number of an error if you run a buggy mission script.
    The actual bug might be earlier in the code than indicated. You should know that Lua can run crazy stuff such as method calls where the number of parameters or return values does not match.
    It just fills up missing values with nil and discards extra values.


    Below I listed all methods of TaskManager and missionutil. I logged them out using a lua script.


    Einmal editiert, zuletzt von Simugamer () aus folgendem Grund: Added section about local

  • I want to develop a new campaign, too.
    I find the script pretty self-explaining at the moment.
    I'm also a bit into voice acting and could record the narrations in German without any noise and in high quality.
    I'm good in C#, Java, PHP and a few other languages, but new to LUA. I find it rather easy, tho.


    I just created a new Discord server. If anyone of you is interested in supporting this mod, please join so we can talk a bit:


    Admin-edit: Discord info deleated. Please use our TeamSpeak our Discord server instead.

  • @reditec
    Willkommen hier im Forum! Schön, dass du dich fürs Mission Scripting interessierst und mithelfen willst.
    Nimm es nicht persönlich, dass deine Discord Infos gelöscht wurden. Die Admins hier sind recht streng was die Foren-Regeln anbelangt. Das hat aber auch sein positives.


    Ich werde die nächsten Tage, wenn ich dazu komme, eine erste Version meiner Heightmap zu diesem Projekt hier hochladen.
    Du oder auch andere können sich dann gerne am Missionscripting versuchen.


    Außerdem habe ich noch ein angefangenes Missionscripting Projekt zu einer Gleisbau-Challenge auf einer modifizierten, bergigen Zufallskarte.

  • Hallo erstmals.


    Ich komme Ursprünglich aus dieser Region (Matten bei Interlaken) und spiele momentan oft Maps von Bern und Umgebung. Ich mag es wenn die Karten möglichst realistisch sind :)
    Daher bin ich auch auf diese Seite gekommen, jedoch kenne ich mich nicht mit Editieren, Maps oder so aus, bin jedoch ein Informatiker welcher Web-Frontends programmiert.
    Vielleicht kann ich so trotzdem was beisteuern oder mit der Map was helfen.


    Hast du schon konkretere Pläne oder so? Im November habe ich etwas mehr Zeit und könnte evtl. irgendwie was helfen...


    Grüsse aus Bern

  • Hallo Zusammen,


    ich bin der Songmaker, alias Micha und ganz neu hier im Forum. Und beim stöbern ist mir dieser Beitrag "Top of Europa" ins Auge gefallen. Nun, vom modden und programmieren hab ich absolut keine Ahnung aber dafür eine sehr ausgeprägte Fantasie (die auch ab und zu mal mit mir durchgeht) und erst vor kurzem ist mir eine Idee durch den Kopf gegangen, die das Zeug zu einer interessanten Mission oder Kampagne hätte. Also:
    wie wäre es wenn es eine Map gäbe mit 3 bis 4 europäischen Hauptstädten, die widerum von kleineren Städten umgeben sind. Soviel zur Map. Nun, Europa befindet sich im Wirtschaftsboom, die Industrien brummen die Städte wachsen und die Leute wollen reisen.( Soweit nix neues). Das fliegen wird immer beliebter, somit lautet die erste Aufgabe verbringe im Zeitraum X soviel Passagiere per Flugzeug in die Hauptstädte wie möglich, oder mindesten so und soviel etc. Aber jetzt kommt´s! In einer Ecke der Map erstreckt sich von Beginn an ein großer weißer Gebirgszug aus dem plötzlich viel viel Rauch aufsteigt, ein Vulkan ist ausgebrochen (na, Island noch in Erinnerung?!) aber es könnte ja auch der Ätna oder Vesuv sein. Plötzlich steht die liebe organisierte Flugwelt auf dem Kopf. Nix geht mehr Jetzt kommt die zweite Aufgabe. Versuche dass Passagieraufkommen zwischen den Hauptstädten mit alternativen Verkehrsmitteln aufrecht zu erhalten, bis sich der Vulkan wieder beruhigt hat. Nun meine Frage an Euch, wie findet Ihr die Idee??? Und ließe sich diese Idee umsetzen???


    Grüße aus NRW


    Euer songmaker

  • Hi!


    I recently started modding, and released my first mission shortly after. Though it's only playable with steam, i first published it in the Download section of the board.
    I spent around 3 evenings for mission scripting, and i think it is pretty straight forward. Usually, i develop software using C-like languages, so LUA itself made me mad.
    In case this thread is not dead, i would be glad to help with the mission script. I already used a wide range of mission assets, like zones, markers, pathfinding, delivery checks, upgrading buildings, subtasks.


    There's always an existing mission to copy from.


    I also played around with new industries and new good types, as i think it makes a mission even more special, e.g. by delivering actual cheese instead of food.

  • Hello snowball,
    Thank you for your answer. Good to know that my idea would be feasible and that you would like to work with it. I myself have no idea of programming and therefore can not help in this matter.But maybe there are still a few people who like this idea. Best regards songmaker


    Hallo snowball,


    danke für Deine Antwort. Gut zu wissen dass meine Idee machbar wäre und dass Du gerne mit daran arbeiten würdest. Ich selbst habe keine Ahnung vom programmieren und kann deshalb in dieser Materie nicht mithelfen.
    Aber vieleicht finden sich ja noch ein paar Leute, denen diese Idee auch gefällt.
    Viele Grüße
    Songmaker

    Einmal editiert, zuletzt von songmaker ()

BlueBrixx