Beiträge von Bhaal

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


    Alright, I think I've got my head wrapped around this and have it loading a selection of random 40 foot Australian containers.


    Code
    {{capacity=150, customCargoModels={configurations={{slotLevels={ {}, {1}, {0,1}, },},},},type="GOODS",},},


    The only other question I have with this code is how can I make it load either 2 40' stacked or one 48' when full, randomly chosen? If I add it to the next entry, like so:


    Code
     {{capacity=150, customCargoModels={configurations={{slotLevels={ {}, {1}, {0,1}, {2}},},},},type="GOODS",},},

    It progesses through the single 40, the double 40 and onto the single 48, which I assume is what it's meant to do as it fills up. But I'd like either a single 48' or stacked 40's at random.


    I'm very happy with everything else so far. MaikC's code is top notch as always. :P


    Thanks so much for your time! :)


    Cheers

    Ah beautiful, I'm getting there!


    Can you break what I'm looking at a little bit?


    Code
    {{capacity=150, customCargoModels={configurations={{slotLevels={ {}, {2}, {2,3}, {2,3,4}, {2,3,4,5}, }, },},},type="FUEL",}, }

    What does slotLevels refer to? Part of how it tells what combination to load where?


    Group = 21 refers to what? Many groups have the same number and different transf, I assume for front and rear and upper front and rear loading?


    ( apologies if I'm a bit slow, I usually just make locomotives. ;)


    Thank you so much for the help mate!

    Greeting all,


    Just wondering if anyone can provide insight into a block of code that would randomly select a container from a pool I've made to go with my double stack well car? It's all in a single mod I'm just not sure how to have it randomly select one for the bottom and a different one for the top.


    Cheers

    1. I don't THINK I caused it myself, I could be mistaken. I haven't touched any of the trees or constructions lua stuff but sometimes things interact in weird ways I can't always figure out.

    2. I *THOUGHT* I had fixed it, but apparently not, no sooner had I made the post it resumed happening, so I removed the post, since it was no longer relevant. Although it's back apparently. :)


    I apologize for putting it in the wrong sub-forum.


    Still digging but I have no clue what's happened to it. Temperate maps appear to be fine but Tropical and Deserts are causing this error. :/



    Edit: It's only in the beta branch and only with mods, so it's probably an issue somewhere with the new patch and a certain mod, although I can't narrow it down anymore. Oh well, doesn't matter too much. :)

    Greetings all,

    Any idea what's causing this? I don't think it's anything I've done. It's in the Beta branch so it maybe a bug. It seems to be in the default files? I don't think it's anything I've done.








    Error message: error: res/scripts/constructionutil.lua:144: group 'random_large_tree_town' not found

    stack traceback:

    =[C](-1): ?

    =[C](-1): error

    @res/scripts/constructionutil.lua(144): addGroups

    @res/scripts/constructionutil.lua(262): addModelsAndGroups

    @res/scripts/townbuildingutil.lua(78): fn

    @res/config/base_mod.lua(847): ?

    @res/config/base_config.lua(41): ?



    File name: res/construction/building/era_c/com_1_3x4_04.con


    Key: game/config/ConstructWithModules


    Minidump: D:/games/Steam/userdata/61738488/1066780/local/crash_dump/fab599be-4f00-45ea-830c-b9850e57e8f9.dmp


    Mod: no mod


    In file: C:\GitLab-Runner\builds\1BJoMpBZ\0\ug\urban_games\train_fever\src\Lib\lua\State.cpp:641


    In function: void __cdecl lua::State::Call(int,int)



    __CRASHDB_CRASH__ struct lua::LuaException: C:\GitLab-Runner\builds\1BJoMpBZ\0\ug\urban_games\train_fever\src\Lib\lua\State.cpp:641: void __cdecl lua::State::Call(int,int): error: res/scripts/constructionutil.lua:144: group 'random_large_tree_town' not found

    stack traceback:

    =[C](-1): ?

    =[C](-1): error

    @res/scripts/constructionutil.lua(144): addGroups

    @res/scripts/constructionutil.lua(262): addModelsAndGroups

    @res/scripts/townbuildingutil.lua(78): fn

    @res/config/base_mod.lua(847): ?

    @res/config/base_config.lua(41): ?

    Good afternoon all,


    I see from the wiki I can manually set emissions level for a locomotive and if left to it's own devices it will calculate it based on top speed and power?


    Since I'm working on Gensets I'd like to be able to set the emissions manually about 70 or so percent less than the average for a 2000hp, 100km/h locomotive, but it's not clear exactly how this is achieved, if anyone could break it down for me, that would be much appreciated. ( Or just spoon feed me the answer, I'm easy. ;)


    Cheers




    Who does 1282 think he's special?! Y'all have the same code... they should all be like 1282... haha



    Update: It appeared to be related to the bogies, I reversed the TransF on the bogies so Bogie 1 has the -1 and Bogie 2 has the 1 and now it will let me flip the model apparently. I've never encountered this before. :)

    Greeting all!


    Long time no see,


    I've never encountered this problem before and I've been fiddling with this for a while. Making a reversed version of the locomotive I'm working on, usually I use Root node to flip it around;


    name = "RootNode",

    transf = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, },


    to


    name = "RootNode",

    transf = { -1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, },


    Works fine, works in the Model Editor, doesn't work in the game? Not sure exactly why but it continues down the line in the normal, decidedly NOT backwards manner it normally would and it's confusing me...


    What painfully obvious thing am I missing today.


    Cheers

    I do indeed.


    That's the whole set, it's fairly simple and hasn't had anything changed from my last mod except the names and directories... :/

    Next rando question,


    I posted this on the discord as well but I suspect the forum gets some other foot traffic as well. :)


    I'm not real good with Lua so why is this spitting out a 'Then' expected near 2300 error on line 9?



    shouldn't the line;


    if params.2300 == 0 then


    be fine? This code was copied from my earlier CLC wagon con file where it worked just fine?

    Greetings all,


    Long time no questions! :)


    In todays episode, I'm trying to get the text in the LabelList to a very specific colour. R: 231 G: 190 B: 111, but I'm not exactly sure which value (If any, I could be barking up the wrong tree) corresponds to RGB in the code;


    color = {231 / 190, 111 / 150, 0 /0},


    I've been randomly fiddling with it and have it close but it's not quite right so I'm probably missing something. The wiki is a bit.. .vague on which does what.


    What's the correct entry here?


    Cheers all,


    Thanks as always! :)

    Ahh thank you all again! :) I have pretty much everything I want to figure out sorted for now.


    Bar this;


    Can the game make this mesh spin? Or do have I have to learn to animate it in Blender? I noticed in some tutorials the game is capable of handling rotation with just code? Or am I misunderstanding, can anyone elaborate?


    EDIT: Nevermind, I figured it out as well. The object origin was the issue, now spins quite handily. :)


    Most issues I have are caused by a lack of experience, I overlook something tiny and then can't remember what I forgot to do hahaha