Page 1 of 1
help with belt interaction
Posted: Wed Apr 27, 2016 8:40 pm
by snafets
Hello Modders,
before I spend 20 hours to figure out it will not work properly I'll just ask for some help/hints

Is it possible and also work in bigger numbers to make own belts? sure five or ten are no problem but 100 or 1000? The TransportLine looks very promising maybe someone can point me to a mod using it so I can look at some examples.
Thanks and happy modding
Re: help with belt interaction
Posted: Wed Apr 27, 2016 10:02 pm
by Adil
snafets wrote:
Is it possible and also work in bigger numbers to make own belts? sure five or ten are no problem but 100 or 1000?
This probably needs elaboration. If you're speaking of adding extra-express-belts, super-extra-express-belts, and so on then you need o get acquaintanced with data.lua and prototypes definitions. They're not explained in the modding api docs, they're on wiki, at least what devs documented long ago.
Bob's mods feature programmatic generation of prototypes have a look there too.
Re: help with belt interaction
Posted: Wed Apr 27, 2016 10:57 pm
by snafets
Unfortunately the data.lua didn't expose the functions and how they interact. A swapper is one thing that I'm interested to do as well as compressed belts that can combine 3 belts into one. In a perfect (virtual) world a swapper could easily implemented like this
Code: Select all
-- override function, swap line 0 and line 1
function get_transport_line(n)
return parent.get_transport_line(1-n)
But the implementation of BeltSwitch (by ThaPear) has to handle every item on the belt.
Also something that might be good to know it one Belt shares the transport lines or if any tile has there own lines.
I have to look deeper into Bob's mod, for now I didn't found the interactions just a speed tweak.
Re: help with belt interaction
Posted: Wed Apr 27, 2016 11:43 pm
by Adil
Oh, so that's what you're trying to do. The bob's mod don't add such entities. And you can only do belt manipulations like in ThaPear's mods. You can't simply break into C++ engine with lua. And it'd be way too demanding to expect it work after that were such feat possible.
Re: help with belt interaction
Posted: Thu Apr 28, 2016 7:39 pm
by snafets
ok thanks, that's why I ask before

without a hock on/into the belt I need a totally different approach.