mt-mods / machine_parts

Generic machine parts for Minetest mods
Other
0 stars 1 forks source link

Add train recipes #5

Closed S-S-X closed 3 years ago

S-S-X commented 3 years ago

Add more recipes for more trains and wagons.

Check decide shape and materials for recipes that I've already added, did not think much about cost balance or anything as I wanted to just verify that registration actually works like it should.

Railbus:

https://github.com/mt-mods/machine_parts/blob/4469c3c46f46683e1dc50737ed1eb7cc341a7713/recipes/advtrains_railbus.lua#L2-L9

Japan engine and wagon:

https://github.com/mt-mods/machine_parts/blob/4469c3c46f46683e1dc50737ed1eb7cc341a7713/recipes/advtrains_train_japan.lua#L2-L18

Subway (this actually already has recipe and recipe from subway mod will be used):

https://github.com/mt-mods/machine_parts/blob/4469c3c46f46683e1dc50737ed1eb7cc341a7713/recipes/advtrains_train_subway.lua#L2-L9 TBD: Original subway wagon recipe, if aiming for balance and machine parts for all recipes straight we could override original recipes:

minetest.register_craft({
    output = 'advtrains:subway_wagon',
    recipe = {
        {'default:steelblock', 'default:steelblock', 'default:steelblock'},
        {'default:steelblock', 'dye:yellow', 'default:steelblock'},
        {'default:steelblock', 'default:steelblock', 'default:steelblock'},
    },
})

Subway, colored variants (override recipes?)

https://github.com/pandorabox-io/advtrains_subway_colored/blob/master/register.lua

Trains / wagons without recipes:

6r1d commented 3 years ago

Does a railbus need no gearbox, btw? Overriding old recipes sounds reasonable to me.

BuckarooBanzay commented 3 years ago

Subway, colored variants (override recipes?) https://github.com/pandorabox-io/advtrains_subway_colored/blob/master/register.lua

This could be fixed directly in the advtrains_subway_colored mod and this mod added as dependency

S-S-X commented 3 years ago

Does a railbus need no gearbox, btw?

What I've found some do actually use direct drive electric motors and if there's diesel engine it is used just for generators and do not use full feature gearboxes so to add some variation to recipes I decided to not add gearbox there. Then some have simply toque converter / hydraulic coupling between wheels and engine.

However I'm not really expert on this matter but I've learned that I can ask my web browser just about anything 😄 Well... should we have wheels with embedded motors...

Subway, colored variants (override recipes?) https://github.com/pandorabox-io/advtrains_subway_colored/blob/master/register.lua

This could be fixed directly in the advtrains_subway_colored mod and this mod added as dependency

That would be better and cleaner option, maybe I'll drop PR for that.

That leaves just overriding advtrains:subway_wagon here, it will not look very nice because machine_parts should really try to avoid all dependencies, it is important to also keep optional dependencies away.

6r1d commented 3 years ago

Well... should we have wheels with embedded motors... I can draw it if the wiring isn't too complex (and most of it will be lost with scaling if it's not covered by a case, anyway).

Which type of motor did you see in an article? (Huh, I can do [ ] in issue comments, neat!)

maybe I'll drop PR for that

That leaves just overriding advtrains:subway_wagon here, it will not look very nice because machine_parts should really try to avoid all dependencies, it is important to also keep optional dependencies away.

Yes, we can't check if a recipe is defined yet, but I'm sure it will help if advtrains devs will know about machine_parts 🙂

S-S-X commented 3 years ago

Which type of motor did you see in an article?

6r1d commented 3 years ago

Some attempts were made:

I dislike the right one the least: coloring is altered, perspective is noticeable and pixel artefacts are fixed manually.

S-S-X commented 3 years ago

I dislike the right one the least: coloring is altered, perspective is noticeable and pixel artefacts are fixed manually.

I think these are good enough to be used, I'd say use this one:

Details are nice but model is probably just too complex and that makes it harder to actually recognize what it is supposed to be, I bet simpler model would probably be better in the end.

Can be updated later if needed, I bet black one from https://github.com/mt-mods/machine_parts/issues/5#issuecomment-779567959 screenshot would be simpler and easier to recognize as large electric motor.

6r1d commented 3 years ago

I had to remember a bit about FreeCad to draw this motor, play with materials and find a nice lighting setup, cover and material. Well, and draw uglier ones I'm not happy with at all... Anyway, there it is:

And here is the tiny version:

S-S-X commented 3 years ago

traction_motor_64 Scaled down again from large one to same resolution. Just bit smaller file size but with smooth edges.

6r1d commented 3 years ago

Is material itself not too dark? I can recolor it or do something else if you'd like.

S-S-X commented 3 years ago

Is material itself not too dark? I can recolor it or do something else if you'd like.

I think it is good but should test in game to get better idea how it actually looks. Any ideas how motor should be used in recipes? Just repeating what already said @discord: we only have 3x3 crafting grid.

So I think if you happen to have free time then better use for your time would be powered wheels (unless there's some better ideas for crafting). Adding powered wheels makes already complex recipes to become very complex recipes, personally I do like that but not sure about other players.

Should probably visualize some train recipes to get better idea about it. Maybe it is not that bad, technic also has some not so straightforward but still very good and interesting recipes.

S-S-X commented 3 years ago

All train recipes implemented. Traction motor things moved to separate issue.