Page 1 of 1

Prototypes properties ingame. (JA data-to-control thread)

Posted: Thu May 05, 2016 1:09 pm
by ArderBlackard
Hello guys.
I'm a newbie to Factorio modding (luckily not to programming). I have digged through a numerous threads about "how to get the data.raw prototypes in control.lua script", and as far as I understood there is currently no way to read most of the prototypes properties during the game (e.g. in control.lua). Particulary I'm interested in vehicles parameters, but this includes many other objects stuff like animations parameters, different properties and so on. It's easy to understand why many of those properties cannot be exposed for writing (many of them are immutable even in C++ code), but why not provide them as read-only? Why can it hurt to expose all the prototypes as read-only tables, to make possible for a mod to get for example properties of all the ammo types in the game?
Perhaps it sounds more like a modding interface request, but I'm not sure, maybe this idea was already discussed and dismissed by the developers (and I've skipped it while searching the forum). So I would be grateful if anyone can enlighten me with this question. Thanks in advance!

Re: Prototypes properties ingame. (JA data-to-control thread)

Posted: Thu May 05, 2016 3:26 pm
by Rseding91
Adding read support takes a lot of time to ensure both it's done correct and tested to stay working.

If you've got some list of things you're looking for I can probably add in those.

Re: Prototypes properties ingame. (JA data-to-control thread)

Posted: Thu May 05, 2016 3:41 pm
by DaveMcW
Rseding91 wrote:Adding read support takes a lot of time.
That is a game design bug. :P

Re: Prototypes properties ingame. (JA data-to-control thread)

Posted: Thu May 05, 2016 4:12 pm
by ArderBlackard
Rseding91 wrote:If you've got some list of things you're looking for I can probably add in those.
Thanks a lot for the quick answer!
So it can be done by request. Then for now I'd better continue studying the provided API to decide exactly which parameters could be helpful for my ideas. :)

Re: Prototypes properties ingame. (JA data-to-control thread)

Posted: Thu May 05, 2016 4:20 pm
by Rseding91
DaveMcW wrote:
Rseding91 wrote:Adding read support takes a lot of time.
That is a game design bug. :P
Everything takes time. Even now replying to these posts takes time that I could be spending programming :P

Re: Prototypes properties ingame. (JA data-to-control thread)

Posted: Sun May 08, 2016 9:37 am
by Sean Mirrsen
Rseding91 wrote:
DaveMcW wrote:
Rseding91 wrote:Adding read support takes a lot of time.
That is a game design bug. :P
Everything takes time. Even now replying to these posts takes time that I could be spending programming :P
That's a life design bug. :P

You should have automated the posting process long ago. Just takes a whole heap of processor units, smart robot arms, and lubricant. Never skimp on lubricant.