Hi
Here some suggestions of interfaces (not in a correct order, sorry!), that would make the jobs of modders a lot easier
- A method to add items directly in a circuit network (For now, we have to go through a constant combinator)
- Consider any item as connectable through wires green, red and copper (For now, we have to add an invisible item of type electric pole)
- Add tabs for gui elements. Ideally, instead of creating a new window each time a mod open a top, left or center window, it adds a tab to the existing window
- Add invisible gui elements (Well, flow can do the job actually, but it would be proper)
- choose-elem-button is great, but we have too choose the kind of element. What if I want to display entities and items... or all kind, like for the constant combinator? Besides, fluid are missing
- Mix sprite button and button in one-> If sprite attribute is filled, then it becomes a sprite button. If caption is filled, it becomes a button. If both are filled, it display the image of the item with the quantity (like for... constant combinator... ok, I have some obsession with this item!)
- raise an event when an item is clicked. This would be easier to manage the open of guis, and actually avoid to go through tick events (Those are already overloaded)
- provide a up-to-date list of all types and their methods as xml list (-> Transform the current API pages as XML). This one -for me- is for my next app -> Provide a development environment dedicated to Factorio (Not sure I will make it, but I'll try)
- Ensure that methods from one mod cannot be accessed from another mod -> Lots of bugs on my mods came from that. Everything worked fine on my system because I was actually calling functions from other mods. When people used my mods without those of others, it crashed!
- Retrieve items using their unit_number (i.e., create/give access to a dictionary unit_number->item). This dictionary would be related to the game
- Give unit_number to train
- Create groups for train stations. Thus, we can define if a train goes to a specific train station (because this one is on an outpost which need refuel) or to a train station of a kind (for example this train goes to an "ore resource" outpost, any of this kind)
- Allow us to detect middle and right click (Already mentioned in another post)
I think that's all for today
- Improve the mod portal : We may receive an email each time someone posts something on one of our mods.
Thanks
Hermios
Different suggestions
Re: Different suggestions
The circuit network does not support this concept so it can't happen unless it gets re-written (which is not likely). *Something* must be sending the signal each tick or must own the signal. A Lua API can do neither of those.Hermios wrote:A method to add items directly in a circuit network (For now, we have to go through a constant combinator)
This again is not how the circuit network works - and not how the core game works - each prototype supports some properties and that's all it supports. That's not likely to ever change.Hermios wrote:- Consider any item as connectable through wires green, red and copper (For now, we have to add an invisible item of type electric pole)
This is on my to-do but it's not so simple because of how our GUI system works internally and how the custom mod GUI system works.Hermios wrote:Add tabs for gui elements. Ideally, instead of creating a new window each time a mod open a top, left or center window, it adds a tab to the existing window
You can already do this by setting visible = false on any widget.Hermios wrote:Add invisible gui elements (Well, flow can do the job actually, but it would be proper)
It's on my to-do to support filtering of what's shown.Hermios wrote:choose-elem-button is great, but we have too choose the kind of element. What if I want to display entities and items... or all kind, like for the constant combinator? Besides, fluid are missing
Why? That just sounds like more work to have more work - the current buttons already work fine.Hermios wrote:Mix sprite button and button in one-> If sprite attribute is filled, then it becomes a sprite button. If caption is filled, it becomes a button. If both are filled, it display the image of the item with the quantity (like for... constant combinator... ok, I have some obsession with this item!)
Maybe some day. Right now it's not that simple.Hermios wrote:raise an event when an item is clicked. This would be easier to manage the open of guis, and actually avoid to go through tick events (Those are already overloaded)
We'd love to have a full docs page for all prototypes but that's not likely to happen until 1.0 is done because it changes so frequently it would be outdated before it was even finished.Hermios wrote:Provide a up-to-date list of all types and their methods as xml list (-> Transform the current API pages as XML). This one -for me- is for my next app -> Provide a development environment dedicated to Factorio (Not sure I will make it, but I'll try)
I might look into making sure mods don't leave behind functions/extra data but right now it's a low priority.Hermios wrote:Ensure that methods from one mod cannot be accessed from another mod -> Lots of bugs on my mods came from that. Everything worked fine on my system because I was actually calling functions from other mods. When people used my mods without those of others, it crashed!
This isn't ever going to happen. That's an O(N) (scan all surfaces and every entity on them) operation - store references to entities you want to track in the global table.Hermios wrote:Retrieve items using their unit_number (i.e., create/give access to a dictionary unit_number->item). This dictionary would be related to the game
Not unit number specifically but maybe some unique ID.Hermios wrote:Give unit_number to train
That sounds like a general feature request and nothing to do with modding.Hermios wrote:Create groups for train stations. Thus, we can define if a train goes to a specific train station (because this one is on an outpost which need refuel) or to a train station of a kind (for example this train goes to an "ore resource" outpost, any of this kind)
Huh? You can already do so with mod hotkeys.Hermios wrote:Allow us to detect middle and right click (Already mentioned in another post)
If you want to get ahold of me I'm almost always on Discord.
Re: Different suggestions
Hey Rsendings
Many thanks for the answers.
Well, my answers to your answers (If the answer is no, and I don't answer, please consider this as a global answer....)
"Why? That just sounds like more work to have more work - the current buttons already work fine" -> Take the comparison combinator for example. The second element can be an item, or an integer. If I want to implement it, I need to destroy the current sprite-button, then recreate a button with the correct value (or inverted). Besides, I would allow us to have both an image and a string on the same button, which would be awesome
"We'd love to have a full docs page for all prototypes but that's not likely to happen until 1.0 is done because it changes so frequently it would be outdated before it was even finished."-> How do you update the current API info? Don't you generate it from an xml? If yes, can you just give us access to this xml (Or any format actually, JSON is fine too). If not... can you change all your procedure for me.... please?
"This isn't ever going to happen. That's an O(N) (scan all surfaces and every entity on them) operation - store references to entities you want to track in the global table."-> The idea is more to add the unit_number and entity in a dictionary, as soon at the entity has been placed. So, when you generate a unit_number, add a function to import it with the corresponding entity in a dictionary. This would allow us to directly get the info, without having to trace. This maybe useful when people load a mod in the middle of a game, or we update our mod in the middle of their game. Thus, we wouldn't need to first scan on all surfaces to find all items and register them in our own dictionary... this is possible, but not really practical.
"That sounds like a general feature request and nothing to do with modding."-> Yes and no. This is part of the gameplay, but may be then used in the modding as well (we schedule on the grouping or the train station). I add to this > If you implement groups, you should then ensure that 2 stations cannot have the same name.
"Huh? You can already do so with mod hotkeys."-> I didn't find it. Can you give me an example?
And btw, thanks for the positive answers, sounds awesome
Many thanks
Hermios
Many thanks for the answers.
Well, my answers to your answers (If the answer is no, and I don't answer, please consider this as a global answer....)
"Why? That just sounds like more work to have more work - the current buttons already work fine" -> Take the comparison combinator for example. The second element can be an item, or an integer. If I want to implement it, I need to destroy the current sprite-button, then recreate a button with the correct value (or inverted). Besides, I would allow us to have both an image and a string on the same button, which would be awesome
"We'd love to have a full docs page for all prototypes but that's not likely to happen until 1.0 is done because it changes so frequently it would be outdated before it was even finished."-> How do you update the current API info? Don't you generate it from an xml? If yes, can you just give us access to this xml (Or any format actually, JSON is fine too). If not... can you change all your procedure for me.... please?
"This isn't ever going to happen. That's an O(N) (scan all surfaces and every entity on them) operation - store references to entities you want to track in the global table."-> The idea is more to add the unit_number and entity in a dictionary, as soon at the entity has been placed. So, when you generate a unit_number, add a function to import it with the corresponding entity in a dictionary. This would allow us to directly get the info, without having to trace. This maybe useful when people load a mod in the middle of a game, or we update our mod in the middle of their game. Thus, we wouldn't need to first scan on all surfaces to find all items and register them in our own dictionary... this is possible, but not really practical.
"That sounds like a general feature request and nothing to do with modding."-> Yes and no. This is part of the gameplay, but may be then used in the modding as well (we schedule on the grouping or the train station). I add to this > If you implement groups, you should then ensure that 2 stations cannot have the same name.
"Huh? You can already do so with mod hotkeys."-> I didn't find it. Can you give me an example?
And btw, thanks for the positive answers, sounds awesome
Many thanks
Hermios
Re: Different suggestions
About the add of items in the circuit network >
Can you add a "add" method to all entities, that are concerned with circuit network? i.e. the train station, inserter, lamp etc.?
Thanks
Can you add a "add" method to all entities, that are concerned with circuit network? i.e. the train station, inserter, lamp etc.?
Thanks