How can I Change cargotypes for freightwaggons?

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


  • As the title says I wish to modify some of the cargowaggons on the exchange to accept or not accept certain cargo types.
    For example on the map I am currently playing, I wish to prohibit the container waggons by Kaleut from carrying crude oil.
    I tried to delete the section of code related to that cargotype in the modelfile, but then the game refused to load, so I suspect I didn't get it entirely right...


    I would hencely appreciate any hints or tutorials as to how to modify the types of cargo a waggon can carry.
    The game has a way to deal with the problem by letting You choose what cargo type to accept, but I would also like a way to do the opposite, meaning choosing what cargo NOT to carry since I would otherwise have to change that parameter every time a train arrives at a station.


    But since this likely has to do with the game's coding I would be happy to be able to change the cargotypes myself in the corresponding modelfile, but do I have to change any more files for each waggon to change the cargo acceptance?

  • Thanks for the tip, but it seems that eat1963's mod does not do the thing I want.
    As I understand it, the mod only adds new values and compartments to the existing waggons.
    What I want to do is to delete a certain type of cargo from the waggon entirely so that it can not load that type of cargo.


    For example I want the Sggrss waggons not to load crude oil, but accept oil and fuel on the return trip.
    The way the game works it selects the type of cargo that the station has the most of to load first which in my case means that the waggons will load lots of crude oil in one direction which I do not want.
    However I like the model and wish to use it in my trains carrying plastics, food, planks and a lot of other things.
    The only way I can do this at the moment is to manually decide what the waggon should load, but then I have to do that with every waggon in every train at every station which is a bit to much for my brain... :D


    So basically what I want is a mod that lets me choose cargotypes just as it works in vanilla mode, but reversed so that the cargo I choose will NOT be loaded in the waggon.


    Does anyone know of such a mod or how to alter the modelfile and any possibly related files correspondingly?

  • It is not possible to decide what not to load per station.


    Either a vehicle can load everything that is defined as possible good, or only one of these that is manually selected.


    If you have the requirement for remove a good from a wagon completely, it is possible to make a mod that removed this good. E.g. you can create a waggon that can only load oil and fuel (but no crude oil) - this will then be fixed for this wagon and it can never load crude oil at all.

  • That is exactly what I was after, but since I am not familiar with programming I guessed what lines to remove from the model file with the result that the mod didn't function and stopped the game from loading.
    Hencely I would appreciate if someone could point out exactly what lines to delete.


    I tried to delete everything between the first { of the desired cargotype and the first { for the next cargotype in the file and hoped that that would do the trick, but it obviously it didn't.

  • Most likely, you have to buy the wagon again after changing stuff.
    From the capacities as seen below, just remove a line.

    Code
    capacities = {
    				{ type = "LIVESTOCK", capacity = 16 },
    				{ type = "PLASTIC", capacity = 16 },
    				{ type = "MACHINES", capacity = 16 },
    				{ type = "TOOLS", capacity = 16 },
    				{ type = "FOOD", capacity = 16 },
    				{ type = "GOODS", capacity = 16 },
    			},
  • That I understand, but in this case it looks like this:

    Unfortunately Kaleut has announced that he will no longer be active here, so I can't ask him about the code.
    What I tried was to erase everything from the fourth row in the picture down to the corresponding character between CRUDE and capacity 135.
    This however caused the game to crash before it even reached the opening menu, so I guess I should have deleted something else?

  • What I did was to delete the lines in question and then started the game, but it crashed before I could even choose my saved game.
    I hav had this problem before and then it was caused by faulty modding by others than myself although I can't remember right now which one it was.


    But Your comment about the unknown cargo was good, it might help.

  • So i have successfully removed a cargo type (wood & planks) from the container wagons mod from kaleut, by removing the stuff between, and the curly braces but now the containers corresponding to these cargo types are always there. Has anyone an idea how to fix this?

  • ok thanks, i didnt find out how to do this, but instead just changed the undesired types for types i dont mind and it works now with this workaround.

BlueBrixx