Beiträge von uzurpator

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


    WIP: Paintable industrial stations WIP: Paintable industrial stations, example use WIP: Paintable industrial stations, example use


    Current work on this project. The platforms work the way I want them to, at least within the constraints of the game. The track though. I failed to find a way so I would have a working track module without forced terrain manipulation below it. The terrain alignment in the *.module does work, but then is overriden by placement of the track. I would like the rails and sleepers to be semi sunken in the dirt, but the best I could to was to narrow the shape in the track definition, but that causes all kinds of other trouble - like catenary tool not working.

    I am currently working on a mod like this:

    WIP dirt station


    Essentially - a platform module which is nothing more than a patch of dirt, which you can paint over. Other than that, it behaves like a normal station. Just looks cool.

    Anyhow - I've spent some time on it, staring at the modding wiki, but am at loss. I've got some queries :)


    1. Can I control the height at which cargo appears on the station? Is 'transportNetworkProvider' somehow linked to it? I would like the dirt to be lower than it is now ( which is 0.8 ).


    2. How do I detect that my module is next to a station building? The game generates a 'platform' buffering station buildings from the platform modules, but GetModuleAt gives me nothing.


    3. regarding the 'transportNetworkProvider' - is it possible to make a platform a shared storage space for the entire station? There is a mod that does this kinda/sorta on the steam workshop, but not quite.


    4. BTW - can I make track module that does the same landscaping as a platform module? In the perfect world I would like the station to be a continuous flat area with half sunken tracks in the middle and storage place all around. I tried to do it analoguously to how platforms do it, but didn't get the result I want.


    My ultimate goal is to detach the platforms from the tracks, so each track module on a station creates a terminal and is linked to a common storage space for the entire station. This way I could get a more realistically looking cargo stations - with several tracks in parallel and storage space somewhat to the side.

    I would like to automatically change a vehicle ( train, wagon ) colour when the user purchases it. I've scoured some sort of a 'hook' to call in the api, but it seems impossible and/or I don't get how to do it. In essence - I want to apply my own ColorConfig to train wagons and engines automatically, to randomize their looks.

    Possible? Somehow?

    Answering my own question for the sake of archiving the answer for others.


    'modParams' obtained from the engine in the 'runFn' contain all globally present parameters of all mods. To get those from the base_mod, just access the [ "" ] key ( empty key ). From there it is just necessary to translate values from "advancedOptions.xxx", which are mere indexes, to proper values the game uses.

    Howdy.


    I want to get to the infrastructure and vehicle build scales that the game introduced in the spring update. For some of those advancedOptions they are written into the game.config. But those I need are not. Any workarounds, apart from providing my own version of base_mod.lua?

    Doesn't even need a good scripter.

    Because afaik the only way to have variation in one mdl file is via the custom cargo models.


    Models and materials are loaded once, so it is impossible to change anything there when loaded unless you do some very deep digging like eis_os.

    The game already supports custom color for each vehicle instance - natively through ColorConfigs for some vehicles or by hand when buying one. If I could access this functionality with a script then I would get what I want without adding additional complexity.

    Do You want the variants to just show up randomly in the game or to be selectable via the depot purchase menus?


    In the first case, it would probably not beyond a good scripter to add a bit of random colour to any purchased vehicle via the Cblend option the second the vehicle is bought.

    Through some sort of UI callback during the creation of a vehicle? That would be optimal. I want to provide a color version for each 'suffix' a vehicle can get. There are ~10 such suffixes so if I were to add 10 versions for each albedo texture, that would amount to gigabytes of data - there are like 100 train vehicles per climate, so 1000 textures to provide. Doing this programatically - by providing a parameter during instantiation of a vehicle would be preferable. I could even add some random variety to each vehicle to break the uniform look. Can you point me to an example of such trickery?


    I'll take a look into it over the weekend.

    Hey.

    I've got a problem. I want to make variant vehicles in Extended Gameplay Two to be more distinct - in order to get it done I want to provide 10 or so color variants for each. However - if I do so by providing a new texture for each variant - that is going to murder GPU memory and this game is already quite hungry for it.


    So - does anyone know a way to do so with materials? Color-configs don't seem to work for wagons and locomotives. Neither do color-blend property from material script...

    This is a topic for me to mumble how great the Extended Gameplay Two mod is. If you don't know. EG2 is for Transport Fever 2 what Extended Gameplay and Immersion was for Transport Fever was. That thing you can see here: Extended Gameplay and Immersion ( EGI )


    In a nutshell - EG2 is a script mod that is mostly about providing more 'game' to the game. Which means there are more decisions to make, and those decisions come with consequences, so for most occasions, when it comes to it, it becomes a game of tradeoffs. Especially on higher difficulty settings.


    Which is the first thing this mod introduces - four distinct difficulty settings, from 'easy' which allows to pretty much play the game as a model railroad, to 'fever' which will test just about any player.


    The focal point of this mod are railroads, so in order to make constructing them more involved 18 track types are introduced, all with varying maximum speeds and maintenance costs. Especially the latter part makes the game more strategic, as it encourages re-use of infrastructure to avoid runaway infrastructure cost.


    Also - when it comes to track, the track laying tools limit the maximum curvature of track to the track's maximum speed. So 120km/h track will force 120km/h limit. This, coupled to 4-click gradient control when building allows for precise control of how track is laid - you can even easily transitional curves by using nothing more the game's in-built tools.


    When it comes to rolling stock - the other fun feature of EG2 is randomization. Each wagon and locomotive is first analyzed towards realistic performance bracket ( based on year of introduction, capacity volume, power etc ) which then gets modified with a few random suffixes/affixes, thus creating an unique vehicle. Also - randomized unique vehicle. When generating a new game you select a 'seed'. Each seed corresponds to a different set of vehicles to choose from. Considering that each model gets about 15 versions, there are _literally_ thousands vehicles to choose from - albeit no more then five from a given model at a time. Also - the last five never expire, so you can easily use steamers in 2050, provided the gameplay justifies it.


    There are also several aesthetic changes - such as fixed valve gear animations, fixed lods or other changes. For a detailed description please visit the mod's readme. Attached below.


    Extended Gameplay 2

    Dateien

    • eg2_readme.pdf

      (64,54 kB, 167 Mal heruntergeladen, zuletzt: )

    doug: THANK YOU! This solves my problem. Also, for the brave soul out there who might have this or similar issue in the future ( and google catches this ). In order to get the members of an api.type use code like this:


    Code
    local MuVariantRecord = api.type.MultipleUnit.new() -- create an api type, here - a multiple unit
    
    -- show its fields
    debugPrint( MuVariantRecord )
    -- show its metadata - which includes methods   
    debugPrint( getmetatable( MuVariantRecord ) )
                

    It appears I am spamming the forum :)


    I have a problem. I've been sitting at it for the last few days and am stumped. The API reference does not help much, but the wiki mentions that adding mutliple units at runtime should be possible - at the 'postRunFn' stage. Brilliant for my use case. So I wrote this code:


    What I am trying to do is to take an existing MU and add several variants of it using different models. The problem I am facing is that I don't know how to add stuff ot the vehicles array. So far I tried to use the 'table.insert', use an index starting from 1 or from 0 and even regular c++ code.


    I gather that I should use some sort of an api call for the engine to allocate the memory for the MU component for me. But I dumped the api and api.type arrays and did not find any relevant function. Scouring the game provided scripts gave me nothing. What am I missing?


    EDIT: the creation of the vehicle array does not seem to change anything.

    Enzojz - I was tinkering with stuff for the last few days and in fact - the bounding box is available at the postRunFn stage. Which means that I can at least dump it to file and reapply on the next run of my mod. Does not seem to help with meshes. But is available with models.

    For the vanilla game - it has a very little use. But, since it is pretty much low-speed ( 1-10km/h ) power limiter, so if you play around it and introduce realistic train weights ( as my mod does ) then it becomes really, really important. Low tractive effort and high power locomotives are most affected.

    MaikC - obviously - the entire lod would need to be processed to get a reliable bounding box of a vehicle. For my purposes that would suffice.


    VacuumTube - I can't modify a vehicle in postRunFn, now can I. So even if that worked, then It would, at least, introduce two-stage model loading. Which is very not customer friendly.


    Enzojz - For my purposes I need to read and process the files during mod-loading in runFn. I can write c++ ( actually, I am pro programmer who actually does c++ ), but that would not fit my use-case. Unless I would be willing to off-line process all the mods ever produced for this game.

    I've found some models, like this one: https://steamcommunity.com/sha…iledetails/?id=2227192019 which do not have the bounding box. Thus I persume the engine just goes through all the meshes and uses them to calculate it.


    The issue is that from a mod I can't access this data. The other issue is that in order to determine the weight on drivers of a given locomotive I need to know its axle arrangemet. From that, and axle-loading I can get adhesive weight and thus get a realistic tractive effort without relying on other sources. Currently I am lookigh through the 'lods' of a model and cross-referencing them with 'axles' in metadata. I get a proper axle count this way. But to know which are the drivers I need to know the size of a given mesh. Those don't have bounding boxes in the game's resources.

    Howdy.


    I have a need to read the blob file - because I need to know the bounding boxes of stuff. Mostly to determine realistic data for vehicles from workshop. Because some people seem to think that BR01 could do 270kN of tractive effort with three drivers and 114 of total locomotive weight :) But also because not all mods include bounding box for the models. Has anyone tried it? Maybe there is a tool for it? Or at least a comperhensive guide to the format?

    Well. Sucks about the particle effects. I thought UG could make that work at this point.

    Anyhow - regarding the depot UI - I am working around this by using the small icons for the grouped vehicles and a large one for the group root. It looks well with 5-7 vehicles, gets to "fair" with 20+. If there are more then two vehicles in a group at all times, then group root icon is the one that is going to be seen. examples below.


    EDIT: What bothers me now is how to get new-lines into the vehicle description

    So I played around with it. Turns out that generating vehicles during game load is, in fact, impossible. So I'll need a separate tool for this. For now I'll settle for a static list of vehicles.


    Anyhow - I'd also like to report that the game takes 10k rail vehicle definitions like a champ. Gui gets borked though if there are more then, say 10, grouped on a list.


    On a totally unrelated note. Did anyone figure out how to add particle effects to road vehicles?