So I tried to actually mod this and while it works in principle it really shows how lacking the modding API is in certain parts:
Search found 5206 matches
- Tue Aug 17, 2021 10:56 pm
- Forum: Ideas and Suggestions
- Topic: Make "all trees/rocks" into filters for deconstruction planners
- Replies: 17
- Views: 4859
- Tue Aug 17, 2021 8:13 pm
- Forum: Mod portal Discussion
- Topic: [Mod Portal] webm support
- Replies: 19
- Views: 5535
Re: [Mod Portal] webm support
I just noticed that if I upload a jpg to a mods "Gallery" the server converts it to png. The implications for size are similar as webm vs gif (thus I didn't make a new thread). I uploaded two very-high-resolution pictures to my mod Eradicator's Screenshot Maker Deluxe 3.0 . Because the pic...
- Tue Aug 17, 2021 7:47 pm
- Forum: Resolved Problems and Bugs
- Topic: [Klonan] Neutral force simple-entity-with-owner ignores force_visibility.
- Replies: 12
- Views: 4817
- Tue Aug 17, 2021 6:31 pm
- Forum: Modding help
- Topic: How do I hide entites from the deconstruction planner?
- Replies: 0
- Views: 700
How do I hide entites from the deconstruction planner?
So I'm working on a large update for my Stockpile mod. To facilitate user-selectable sizes I have to generate a prototype for every combination of (width x height). This all works find, except that the "Set filter" dialogue of the deconstruction planner now shows several thousand pointless...
- Tue Aug 17, 2021 6:14 pm
- Forum: Modding help
- Topic: Player Alliance Color
- Replies: 4
- Views: 1338
Re: Player Alliance Color
This is barely possible with the current modding tools. But it involves a lot of work. I think @OP wants RTS style team-relative colors. Aka Player1 sees their enemies as "red", while Player2 might want to see their enemies as "blue". This would require the same entity to be of ...
- Tue Aug 17, 2021 6:08 pm
- Forum: Implemented for 2.0
- Topic: Export currently held blueprint library object to item
- Replies: 18
- Views: 4114
Re: Export currently held blueprint library object to item
Utterly seconded! I made a mod that adds more wildcard filters to the decon planner (i.e. deocratives) and it works fine with items. But I need to read the whitelist/entity_filters which isn't possibly from library records. Given the sheer number of properties that might be relevant (entity_filters,...
- Tue Aug 17, 2021 5:42 pm
- Forum: Resolved Problems and Bugs
- Topic: [Klonan] Neutral force simple-entity-with-owner ignores force_visibility.
- Replies: 12
- Views: 4817
Re: [Klonan] Neutral force simple-entity-with-owner ignores force_visibility.
So for the next release I have added LuaForce::is_friend() and is_enemy(). Great! Thank you very much. So am I assuming correct... local is_ceasefire = (not is_friend()) and (not is_enemy()) ...that this would then be the third state where the force doesn't shoot at me but I also can't open their e...
- Tue Aug 17, 2021 2:41 pm
- Forum: Technical Help
- Topic: Client jitter/rubberbanding when shooting.
- Replies: 1
- Views: 869
Re: Client jitter/rubberbanding when shooting.
Client rubberbanding when switching in/out of "shooting state" (aka combat) is just how "lag hiding" in factorio works, nothing to be done about (search forum for "lan lag" or similar). Outside of combat I don't know (unless you accidentially pressed c/space). Posting s...
- Tue Aug 17, 2021 2:37 pm
- Forum: Technical Help
- Topic: error starting saved map
- Replies: 3
- Views: 937
Re: error starting saved map
You should report it to the author of the mod "QuickMapTag". Actually someone else already did:
https://mods.factorio.com/mod/QuickMapT ... b762e32abe
https://mods.factorio.com/mod/QuickMapT ... b762e32abe
- Mon Aug 16, 2021 7:40 pm
- Forum: Technical Help
- Topic: Ending not showing bug
- Replies: 5
- Views: 1570
- Sun Aug 15, 2021 2:23 pm
- Forum: Won't fix.
- Topic: Crash Inventory::getItemCount when saving lua methods to global
- Replies: 10
- Views: 2660
Re: Crash Inventory::getItemCount when saving lua methods to global
Things in the 'global' table and all LuaObjects are in the CRC. So LuaObjects are in the CRC even if they're stored in local variables? Interesting. Thanks for taking the time to clarify! :D I guess I could try storing the function references in a local table indexed by unit_number of the owning en...
- Sun Aug 15, 2021 1:02 pm
- Forum: Won't fix.
- Topic: Crash Inventory::getItemCount when saving lua methods to global
- Replies: 10
- Views: 2660
Re: Crash Inventory::getItemCount when saving lua methods to global
You need to not store them in the "global" table. Some other table. Yes. My workaround is storing them in __index so that they can be used *as if* they were in global without actually being in global. Modification of simplified code from above: script.on_load(function() for _, data in pai...
- Sun Aug 15, 2021 12:54 pm
- Forum: Already exists
- Topic: Read access to LuaEntityPrototype.max_logistic_slots
- Replies: 5
- Views: 2028
Re: Read access to LuaEntityPrototype.max_logistic_slots
There is about as much in common (if not less) between prototype explorer and data/control stage as between the stages themselves. So take what it shows with a grain of salt. Not as bad as you make it sound, but I know what you mean. And I did ctrl+f "slot" and "logistic" all ov...
- Sat Aug 14, 2021 9:53 pm
- Forum: Won't fix.
- Topic: Crash Inventory::getItemCount when saving lua methods to global
- Replies: 10
- Views: 2660
Re: Crash Inventory::getItemCount when saving lua methods to global
but if you store a full LuaObject anywhere it is part of the CRC. Any full LuaObjects should always be stored in the global table. Yes, I know. Function references aren't part of the CRC, That's my point: It seemed to me that they *are*. Here's a simplified version of my on_load. The inventory is a...
- Sat Aug 14, 2021 4:28 pm
- Forum: Resolved Problems and Bugs
- Topic: [Rseding91] [1.1.35] Partially used ammunition stacks do not combine in player inventory
- Replies: 4
- Views: 6201
Re: [Rseding91] [1.1.35] Partially used ammunition stacks do not combine in player inventory
Removing any .count from an item stack always does fill() and puts ammo/durability to max. I see. Do you happen to know why remove does that and insert does not? It assumes you have consumed or transferred the value to some other item before you go to remove the count. Well, I'm using *inventory* i...
- Sat Aug 14, 2021 4:23 pm
- Forum: Won't fix.
- Topic: Crash Inventory::getItemCount when saving lua methods to global
- Replies: 10
- Views: 2660
Re: Crash Inventory::getItemCount when saving lua methods to global
You need to keep the LuaInventory reference around if you are going to keep the method reference to it. Thanks for the tip :oops: :D ! This seems to work as expected and is about 10% faster even if I have to hide them in an __index metatable. It does feel a bit odd that cached methods are included ...
- Sat Aug 14, 2021 3:57 pm
- Forum: Already exists
- Topic: Read access to LuaEntityPrototype.max_logistic_slots
- Replies: 5
- Views: 2028
Re: Read access to LuaEntityPrototype.max_logistic_slots
Thank you very much! I must've had a mind-block because the prototype explorer shows it as max_logistic_slots.curiosity wrote: ↑Sat Aug 14, 2021 12:12 pmThen read it from the prototype: https://lua-api.factorio.com/latest/LuaEntityPrototype.html#LuaEntityPrototype.filter_count
Thead can be moved to "already exists".
- Sat Aug 14, 2021 10:12 am
- Forum: Ideas and Requests For Mods
- Topic: Fast replace entire belt
- Replies: 3
- Views: 1425
Re: Fast replace entire belt
or "quick-replace" (laying the new belt directly over the top of the existing belt)? Tedious and error prone manual work if the belt has lots of undergrounds and corners and/or is very long. How is this different from the upgrade planner (OK, requires robots), In vanilla it's not that muc...
- Sat Aug 14, 2021 9:50 am
- Forum: Won't fix.
- Topic: Crash Inventory::getItemCount when saving lua methods to global
- Replies: 10
- Views: 2660
Re: Crash Inventory::getItemCount when saving lua methods to global
You need to keep the LuaInventory reference around if you are going to keep the method reference to it. Thanks for the tip :oops: :D ! This seems to work as expected and is about 10% faster even if I have to hide them in an __index metatable. It does feel a bit odd that cached methods are included ...
- Sat Aug 14, 2021 8:59 am
- Forum: Modding interface requests
- Topic: LuaCustomChartTag.scale
- Replies: 0
- Views: 492
LuaCustomChartTag.scale
For a custom entity I'd like to show a map icon that is exactly the same size as the entity itself on the map. The same as "Recipe Icons" map toggle does for assemblers. It'd be really nice to have a runtime-writable "scale" property where scale = 1 means that the icon will be ap...