Search found 5206 matches
- Sat Sep 23, 2017 8:57 pm
- Forum: Modding discussion
- Topic: Large guide to modding Factorio
- Replies: 21
- Views: 51086
Re: Large guide to modding Factorio
*snap* If you're looking for an example mod Hand Crank Generator was originally written (by me :P) as an example mod, and has extensive comments on why things are done the way they are. It demonstrates among others: general localization, mod settings localization, localization of dynamic hotkeys ho...
- Sun Sep 17, 2017 6:43 am
- Forum: Modding discussion
- Topic: Somethings not (or hidden) in doc but you need to know
- Replies: 43
- Views: 25027
Re: Somethings not (or hidden) in doc but you need to know
B) For any semi-complex gui (that is to say anything with more than let's say 10 buttons) code readability and maintainability is greatly improved by not having to care about prefixing every button. How is readability reduced by prefixing objects/variables? Naming conventions in projects are made t...
- Sat Sep 16, 2017 7:26 pm
- Forum: Modding discussion
- Topic: Somethings not (or hidden) in doc but you need to know
- Replies: 43
- Views: 25027
Re: Somethings not (or hidden) in doc but you need to know
@Mooncat: Concerning GUI Naming i consider it good practice to always check for the root name. This way i only have to keep the upper-most elements name unique and can keep the other buttons with more convenient namings. Don't know how other people handle this. local function is_my_gui(element) if ...
- Sat Sep 16, 2017 6:52 pm
- Forum: News
- Topic: Friday Facts #208 - Tips and tricks improvement
- Replies: 58
- Views: 27327
Re: Friday Facts #208 - Tips and tricks improvement
Loading complete, press any key. I herby preemptively request a (cli-)option to skip the "any key" event and jump directly to main menu. :roll: ### Also i'm not sure if a hotkey is really the best option to view tips and tricks. People (especially those who need tips the most) tend to for...
- Tue Sep 12, 2017 9:53 pm
- Forum: Modding help
- Topic: Curved Rail Mod in Version 15
- Replies: 15
- Views: 4620
Re: Curved Rail Mod in Version 15
Have you tried making a blueprint of a single curved rail? You'd need two of them tho becaues blueprints can only rotate 4-ways and not 8 as the original curved rail.
- Tue Sep 12, 2017 9:28 pm
- Forum: Modding interface requests
- Topic: Selection Box coords; support for semi-trucks.
- Replies: 6
- Views: 2920
Re: Selection Box coords; support for semi-trucks.
As far as i can tell from building bounding boxes (trains probably work similar) the game tries to snap objects either to the center of a single tile or the intersection point of four tiles. So an object of {{-0.4,-0.4}{0.4,0.4}} would be centered on the tile it's placed on but an object {{-0.9,-0.9...
- Tue Sep 12, 2017 9:13 pm
- Forum: Implemented mod requests
- Topic: Slider (LuaGuiElement)
- Replies: 8
- Views: 3691
Re: Slider (LuaGuiElement)
The slider is a combination of 4 different GUI elements and has no single-purpose design. Everywhere it's used in-game is custom fit to make it work in that scenario. What four elemets are that? If i had to guess without any knowledge of the code it looks like a progressbar with a "sliding but...
- Sun Sep 10, 2017 9:31 pm
- Forum: Not a bug
- Topic: [kovarex] [0.15.33] Self-replacable entity revive in on_put_item
- Replies: 5
- Views: 1981
Re: [kovarex] [0.15.33] Self-replacable entity revive in on_put_item
The decision was made to not allow fast replace from ghost with different direction. Maybe i'm understanding that wrong, but this bug report wasn't concerning fast-replacing ghosts. It's concerning ghosts that were revived before being fast-replaced and should thus be normal entities. If you need m...
- Sun Sep 10, 2017 9:15 pm
- Forum: Modding help
- Topic: need a german mod creator
- Replies: 12
- Views: 4035
Re: need a german mod creator
(For the sake of readability for other ppl i'll answer in english too.) If you want to add a statement to an existing table and you dont care about it's position it's better and less prone to errors to use the table.insert() This couldn't be truer. I'd go even further and say you should _never_ use ...
- Sun Sep 10, 2017 9:03 pm
- Forum: Modding help
- Topic: Get the total count of Item prototypes
- Replies: 9
- Views: 3058
Re: Get the total count of Item prototypes
If you count the number of keys in data.raw['item'] in data-final-fixes.lua you should get a mostly correct value for the number of item types. Be aware tho that: even tho uncommon mods are technically allowed to add more items even in -final-fixes, which will mess up your count if they load after y...
- Thu Sep 07, 2017 4:25 pm
- Forum: Not a bug
- Topic: [0.15.33] .set_tiles should clean more entities up
- Replies: 3
- Views: 1613
Re: [0.15.33] .set_tiles should clean more entities up
Well. Even assuming i was just looking for trees and ore and doodads, i'd still have to call those 272 get_tiles because i don't know which tiles were corrected. Meh :/. Mh. I looked up the definition for water tiles and they _do_ collide with the resource-layer. So this is clearly ore where it shou...
- Thu Sep 07, 2017 7:53 am
- Forum: Not a bug
- Topic: [0.15.33] .set_tiles should clean more entities up
- Replies: 3
- Views: 1613
Re: [0.15.33] .set_tiles should clean more entities up
Erm. If this is "not a bug" then how am i supposed to handle this? The only method available for tile reading is a one-position-per-call function. This means after changing a chunk of 32x32 tiles i'd then have to call get_tile on the outside of all four edges of the chunk, that's 34*2*4=27...
- Thu Sep 07, 2017 7:42 am
- Forum: Modding help
- Topic: Hooking a non-logistic entity up to the logistics network
- Replies: 13
- Views: 4358
Re: Hooking a non-logistic entity up to the logistics network
That's a nifty way of stepping with stride. Benchmark results for 480 Void chests using either version as on_tick over 100k ticks: My current version: avg 11805.281 ms Your version: avg 11776.126ms Thanks (also for the numbers). It's amazing that the difference would be so tiny despite your frequen...
- Wed Sep 06, 2017 10:02 pm
- Forum: Ideas and Requests For Mods
- Topic: [Request] Vehicles from "Z"
- Replies: 3
- Views: 1720
Re: [Request] Vehicles from "Z"
TA actually used 3D models internally. Though they'd be too low-polygon by now . Nice Page tho. That picture of the constructor denanolizing the natives :3.
- Wed Sep 06, 2017 10:18 am
- Forum: Modding discussion
- Topic: Somethings not (or hidden) in doc but you need to know
- Replies: 43
- Views: 25027
Re: Somethings not (or hidden) in doc but you need to know
But yes, end of the story is, until someone defines exactly what should or should not be prefixed, there is a lot of leeway in it, and these are my personal opinions on what should and shouldn't be. "Is made via a common/base-game process" seems like a good indicator for when to use prefi...
- Wed Sep 06, 2017 9:57 am
- Forum: Modding help
- Topic: Hooking a non-logistic entity up to the logistics network
- Replies: 13
- Views: 4358
Re: Hooking a non-logistic entity up to the logistics network
I've benchmarked that to be 40% faster than above snippet in Void Chest + The last time i tried to to a tick-distrubuted update i used a construct like this: local UPDATEDELAY = 60 local function on_tick(event) local tock = tick % UPDATEDELAY for index=#global.mystuff-tock,1,-1*UPDATEDELAY do --stu...
- Sat Sep 02, 2017 6:21 am
- Forum: News
- Topic: Friday Facts #206 - Workflow optimisation
- Replies: 84
- Views: 42831
Re: Friday Facts #206 - Workflow optimisation
The fast replacing really looks neat :D. I'm suprised nobody so far mentioned the possibility of half-underground belts left over so far tho. For example if the player runs out of belt during the replacing. Instead of extra hotkeys, I would think a more elegant solution would be to only allow the fa...
- Fri Sep 01, 2017 5:49 am
- Forum: Not a bug
- Topic: [kovarex] [0.15.33] Self-replacable entity revive in on_put_item
- Replies: 5
- Views: 1981
Re: [kovarex] [0.15.33] Self-replacable entity revive in on_put_item
@Bilka:
Err, that was obviously meant to only cancel when there was reviving going on, and - as marked by the smiley - was half-jokingly because i didn't actually expect that to happen.
Err, that was obviously meant to only cancel when there was reviving going on, and - as marked by the smiley - was half-jokingly because i didn't actually expect that to happen.
- Thu Aug 31, 2017 4:46 pm
- Forum: Not a bug
- Topic: [kovarex] [0.15.33] Self-replacable entity revive in on_put_item
- Replies: 5
- Views: 1981
[kovarex] [0.15.33] Self-replacable entity revive in on_put_item
Symptom: If an entity that is fast-replacable by itself (i.e. inserters, belts, mining drills) is .revive()'d in defines.events.on_put_item in a different rotation, then during the following fast replace the entity loses it's circuit network cables. Background: I was trying to write a small script ...
- Thu Aug 31, 2017 4:02 pm
- Forum: Not a bug
- Topic: [0.15.33] Disabled GUI element produces empty on_click event
- Replies: 2
- Views: 1035
Re: [0.15.33] Disabled GUI element produces empty on_click event
Oh. Heh. Yea, that would do it. I didn't expect the root itself to raise that event.
Thanks for the answer tho
Thanks for the answer tho