Search found 582 matches
- Sat Jun 24, 2017 6:51 pm
- Forum: Implemented mod requests
- Topic: "Get random chunk" from Surface
- Replies: 13
- Views: 3075
"Get random chunk" from Surface
Basically a random access into the surface's ChunkIterator. This would need both indexed/named lookup and the '#' operator. As per https://forums.factorio.com/viewtopic.php?f=25&t=50154 I am trying to make an ambient effect (i.e. not tied to any entity) that transforms tiles into other tiles, bu...
- Sat Jun 24, 2017 6:50 pm
- Forum: Implemented mod requests
- Topic: "On entity attacked" event
- Replies: 3
- Views: 1233
"On entity attacked" event
Exactly as it sounds, ideally cancelable as well. If you are familiar with MinecraftForge, that is the sort of implementation I am describing; right before the entity is dealt damage, the event is fired with information including damage type, amount, and source entity (if any) and ideally can be can...
- Sat Jun 24, 2017 4:28 pm
- Forum: Modding help
- Topic: Performant way to pick random positions in the world?
- Replies: 8
- Views: 1906
Re: Performant way to pick random positions in the world?
Is there a location to request new API hooks and/or ping a developer?Optera wrote:Chances are pretty good if you argue like this that it'll be added to some future version.
- Sat Jun 24, 2017 3:38 pm
- Forum: Modding help
- Topic: Performant way to pick random positions in the world?
- Replies: 8
- Views: 1906
Re: Performant way to pick random positions in the world?
I think that you can have the list of chunks, chose one with random and take a ransom coordinate in it. No, the only thing given is an iterator across ALL chunks. You could use the on_chunk_generated event to keep track of either all generated chunks or just to adjust the max/min x/y coordinates of...
- Sat Jun 24, 2017 1:52 am
- Forum: Modding help
- Topic: Performant way to pick random positions in the world?
- Replies: 8
- Views: 1906
Performant way to pick random positions in the world?
I am trying to make an ambient effect (i.e. not tied to any entity) that transforms tiles into other tiles, but the only way I know of to get the valid "in world" positions are using the surface:getchunks, which returns the ChunkIterator. The problem with that is that it provides no inform...
- Sun Jun 18, 2017 6:28 pm
- Forum: Modding help
- Topic: Non-burner heat source possible?
- Replies: 5
- Views: 2073
Re: Non-burner heat source possible?
Is there a way to have a heat source generator (something with a heat_buffer that produces heat, not consume it) that doesn't use a burner energy source type? Reactors use an obligatory burner field and adding heat_buffer to entities beyond reactors and heat pipes doesn't seem to have any effect. A...
- Tue Feb 21, 2017 11:38 pm
- Forum: Modding help
- Topic: Desync only on Modded Multiplayer - Unknown Cause
- Replies: 11
- Views: 3416
Re: Desync only on Modded Multiplayer - Unknown Cause
This already breaks in single player after a few seconds with Error while running event on_chunk_generated (ID 12) __Oreverhaul__/functions.lua:178: bad argument #1 to 'pairs' (table expected, got nil) (when commenting out the modded ores so it starts at all.) Try these files. This is what we meant...
- Tue Feb 21, 2017 1:52 am
- Forum: Modding help
- Topic: Desync only on Modded Multiplayer - Unknown Cause
- Replies: 11
- Views: 3416
Re: Desync only on Modded Multiplayer - Unknown Cause
For what it is worth, the mod has not been tested in a vanilla environment, but it should have no explicit dependencies. If you do have an issue, try commenting out every non-vanilla ore type in config.lua's oreTiers table (lines 13-34).
- Thu Feb 16, 2017 6:01 am
- Forum: Modding help
- Topic: Desync only on Modded Multiplayer - Unknown Cause
- Replies: 11
- Views: 3416
Re: Desync only on Modded Multiplayer - Unknown Cause
I am the friend described, and the custom random implementation has been discussed before here . As stated above, it is entirely based on simple mathematics; the only inputs are the game state (chunk data) and the configs, both of which are consistent, as should basic operations like arithmetic and ...
- Mon Nov 21, 2016 8:54 pm
- Forum: Modding help
- Topic: Custom mining drill behavior?
- Replies: 7
- Views: 2173
Re: Custom mining drill behavior?
If you swap out the resource it would still get picked up by large area mining drills. You could place a dummy chest inside the custom mining drill and adjust the drill's output location to feed into the dummy chest, then if anything gets put into the chest you could convert it to the dirty ore and...
- Mon Nov 21, 2016 6:59 pm
- Forum: Modding help
- Topic: Custom mining drill behavior?
- Replies: 7
- Views: 2173
Re: Custom mining drill behavior?
A mod like this already exists, see https://mods.factorio.com/mods/SeelenJaegerTee/SJT-DirtyOre. Looks like it was implemented in the ore, not the drill. I want this to be a late-mid game tech, and want it to work on pre-existing worlds. Both of those mean doing it on the ores will not work. That m...
- Mon Nov 21, 2016 8:36 am
- Forum: Modding help
- Topic: Custom mining drill behavior?
- Replies: 7
- Views: 2173
Re: Custom mining drill behavior?
A mod like this already exists, see https://mods.factorio.com/mods/SeelenJaegerTee/SJT-DirtyOre. Looks like it was implemented in the ore, not the drill. I want this to be a late-mid game tech, and want it to work on pre-existing worlds. Both of those mean doing it on the ores will not work. That m...
- Sun Nov 20, 2016 10:27 pm
- Forum: Modding help
- Topic: Custom mining drill behavior?
- Replies: 7
- Views: 2173
Custom mining drill behavior?
I am hoping to implement "Dirty Mining Drills", i.e. drills that (in-universe) dig deeper and less cleanly to yield a greater total yield of resources, i.e. pulling up more ore but also rock, mud, and so on. This 'dirty ore' would need to be pre-processed into the vanilla/default ore items...
- Mon Nov 14, 2016 10:17 pm
- Forum: Modding help
- Topic: How to access prototypes during script load?
- Replies: 11
- Views: 2221
Re: How to access prototypes during script load?
One, global cannot be properly used in on_init: Note, although the global table has not been setup if a mod does populate the table with some data it will be overwritten by any loaded data. Where is that from? Putting stuff into global in on_init works for me. Linked earlier in the thread: http://l...
- Mon Nov 14, 2016 12:44 am
- Forum: Modding help
- Topic: How to access prototypes during script load?
- Replies: 11
- Views: 2221
Re: How to access prototypes during script load?
One, global cannot be properly used in on_init: Note, although the global table has not been setup if a mod does populate the table with some data it will be overwritten by any loaded data. Where is that from? Putting stuff into global in on_init works for me. Linked earlier in the thread: http://l...
- Sun Nov 13, 2016 10:43 pm
- Forum: Modding help
- Topic: How to access prototypes during script load?
- Replies: 11
- Views: 2221
Re: How to access prototypes during script load?
So put that variable into global and handle mod version changes in on_configuration_changed. One, global cannot be properly used in on_init: Note, although the global table has not been setup if a mod does populate the table with some data it will be overwritten by any loaded data. Two, I have neve...
- Sun Nov 13, 2016 10:13 pm
- Forum: Modding help
- Topic: How to access prototypes during script load?
- Replies: 11
- Views: 2221
Re: How to access prototypes during script load?
Prototypes can't be changed after the game is started - you have to define all prototypes in the data loading stage. See: http://lua-api.factorio.com/latest/Data-Lifecycle.html If your goal is to create them runtime on_chunk_generated then you can use the on_init event when a game is started to det...
- Sun Nov 13, 2016 7:00 pm
- Forum: Modding help
- Topic: How to access prototypes during script load?
- Replies: 11
- Views: 2221
Re: How to access prototypes during script load?
Prototypes can't be changed after the game is started - you have to define all prototypes in the data loading stage. See: http://lua-api.factorio.com/latest/Data-Lifecycle.html If your goal is to create them runtime on_chunk_generated then you can use the on_init event when a game is started to det...
- Sun Nov 13, 2016 5:35 am
- Forum: Modding help
- Topic: How to access prototypes during script load?
- Replies: 11
- Views: 2221
How to access prototypes during script load?
I have a mod whose primary purpose is to revamp ore and enemy distribution, but I am adding an option to add a fourth tier of worm (green 'behemoth', like the biters and spitters) for the generation. I have a 'constants' class, which, among other things, ' statically ' defines the spawnable worm typ...
- Thu Oct 27, 2016 8:11 am
- Forum: Modding help
- Topic: Is there a way to get legacy assets?
- Replies: 3
- Views: 669
Re: Is there a way to get legacy assets?
I do not have it.aubergine18 wrote:There's a load of old files in __base__/sound/creatures/old (not sure if hat folder is in more recent releases tho)