Stena Terminal

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


  • I have been working on the Stena Line Ferry and this huge vessel needs a harbour.


    The Ferry doesn't fit in the UG Harbor. That's why I now also have started to construct the Stena terminal.


    The first thing I wish to understand is how the paths are made in Blender. I have found the TNP (Transport Network Provider) object and added one into my Blender project, please see the screen shot below.
    In the TNP I have placed two curves just for testing and then I can export the project with the plugin from Merk.
    The result can be seen on row 92-98, the content is empty ?( .


    I have been searching for tutorial, but I'm not a lucky person. I have also tested to import the UG harbour but this is failing as the plugin is (for now) only made for Train Fever. I hope someone can give me some help on how to setup a simple Ship paths inside blender.



  • There a are some problems in the plugin (changes, new version of Blender), so the export may or may not work properly.


    In tf_mesh_mdl.py
    Find:
    "<class 'io_mesh_mdl.tf_transportNetwork.LuaExportFunctionProto'>":


    Replace with
    "<class 'tf_transportNetwork.LuaExportFunctionProto'>"



    If there is still errors, this could help:


    In tf_transportNetwork.py, search:
    transportNetworkProvider = self.export_transportNetwork(obj)


    Add:

    Code
    if 'metadata' not in model_data:
    						model_data['metadata'] = []

    Check the tabs, should be at the same code indentation as transportNetworkProvider = self.export_transportNetwork(obj)




    For modding questions please use the "Modding" part of the forum, the part "Mod Problems" is for users facing problems with mods.

  • I have now changed the code as you wrote. I have also discovered that the TNP code inside my mdl file is sometimes not appearing as it should. To get it back, I restarted Blender a couple of times until the export of TNP was working.
    At first I thought this was a new effect, but I found that same thing is also happening with the original code. As long as TNP code is visual in the exported mdl file, I don't have to restart Blender. :huh:


    With the updated plugin, I still get no laneList nor terminals.

    • Do I have to use a specific curve in Blender?
    • How to connect two separate curves? Is it just to place the end points close enough (same XYZ coordinates)?
    • Is it possible to get a small zipped sample file in Blender format (.blend)?


    Code
    transportNetworkProvider = {
    			laneLists = {
    			},
    			terminals = {
    			},
    		},
  • Yes, you need to use bezier curves.


    From memory, your need a "Transport Network Provider" in your model, in there you need "Transport Network Group" (this selects what kind of Nodes you have, PERSON, BUS ...)
    Then you need for each part a bezier curve. When the bezier curve is in a network group you can select the terminalid you want to have it.


    Technical a bezier curve can have more then two points, however the ui is only able to set the terminal id for the first and second (A and B) point of your bezier curve.
    A terminal id is the glue "virtual" connector to get the nodes together without counting.


    As the export isn't the best, all edges still uses the laneutil helper in the mdl to correct them.


    Best way is to import a train fever station platform model to see the relations.




    Sometimes Blender decides to change the order it loads the additional plug ins, so terminals won't be exported.
    The problem is as soon I decide to debug the problem and change the code, it starts working again because it will be loaded last.


    As soon @Merk releases a offical 0.5 Beta version I can try to debug this problem.
    The overall transport node plugin isn't tested and so there there will be some problems here and there, I am sorry. For my usage pattern it works, so I only touch the code if blender breaks it ;-)

  • The load order is a bit random because of Pythons keys() function. Currenly I use the sorted() function to avoid it, but I'm planing to introduce a custom order variable for each plugin, because otherwise we would be restricted to an alphabetical sort order.


    Since im already working on the transport network plugin (adding some new variables and implementing some necessary changes, because the way plugins are loaded has changed a bit), I'll also try to fix the export problems.

  • As the export isn't the best, all edges still uses the laneutil helper in the mdl to correct them

    • I've been working all the weekend to try different settings in Blender to get the start and end points of the Bezier curves exported, but I can't get it out from Blender. I find the only way is to manually enter the coordinates in the mdl file, but this has to be repeated every time I make any change in Blender with a following export, this seems not to be the right solution.


      * What are you doing when you need to create a new station with lanes?
      * Do you use Blender?
      * What is the laneutil helper?

    • I'm also struggling with the mesh. The terminal is always turned 180° (outside-in). All of you will probably answer turn it 180° with the rotation function in Blender by looking from above, and yes I have done that, but nothing happens in the game! The old .msh file is deleted before the export, else that export will not rewrite the file if the flag "overwrite" is off. Is there someone with an idea?

      I have found the error for the second issue and it was placed inside the con file,

      Code
      transf = transf.rotZYXTransl(transf.degToRad(0.0, 0.0, 0.0),  vec3.new(0.0, 30.0, .1))--  transf = transf.rotZYXTransl(transf.degToRad(180.0, 0.0, 0.0),  vec3.new(0.0, 30.0, .1))  (version with error)




    I'm so stuck in the first export problem that I will soon loose the motivation to continue. The Stena Ferry can't arrive to the UG harbour as it is to big and I'm drained of ideas.

    Einmal editiert, zuletzt von melectro ()

BlueBrixx