-
-
Save tburrows13/687f7dc86da1840624575ba437e86cfa to your computer and use it in GitHub Desktop.
Any idea what is causing this:
Looks like you skipped point 1: disable quality mod. Get your mod working without quality first, then add it in for testing after.
That's where I'm at. I figured out that issue. Recipe results needs to be a list of tables, and not a singular table, so if you have only 1 result, you need to wrap it in an additional set of curly brackets
Another thing I would point out is that if your mod worked with in-game sprites for v1.1.110, but your having issues with 2.0, you can download a legacy linux version, and compare the in game assets with the current version, by extracting the linux tar ball
Thanks for the comments. I’d ask that in the future, please don’t post porting help requests here. Use the forums or #mod-dev-help on the official discord. And yes please follow step 1 (disable quality mod) at least before asking for help!
@anonhostpi not sure the advantage of that vs the following which is already in the guide
I've also found the 1.1 data files useful when porting - you can download them from the factorio-data repo.
Any idea how to replace the get_request_slot() and set_request_slot() methods?
Any idea how to replace the get_request_slot() and set_request_slot() methods?
Yes, see https://gist.github.com/tburrows13/687f7dc86da1840624575ba437e86cfa#logistic-points and the linked docs. You’ll need to do it through a logistic section.
Thanks for the comments. I’d ask that in the future, please don’t post porting help requests here. Use the forums or #mod-dev-help on the official discord. And yes please follow step 1 (disable quality mod) at least before asking for help!
@anonhostpi not sure the advantage of that vs the following which is already in the guide
I've also found the 1.1 data files useful when porting - you can download them from the factorio-data repo.
Oh apologies. I missed that.
Also, capitalized KW is no longer a valid electrical unit. kW is
If anyone wants to see some more example changes, here is a (draft PR) changes for moon logic: mk-fg/games@master...anonhostpi:mk-fg-games:master
EDIT: mk-fg no longer plans to maintain moon-logic 😔
Not mentioned in the change logs: virtual_signal_prototypes has been removed from LuaGameScript
I believe it has been moved to the virtual_signal field of LuaPrototypes
Not mentioned in the change logs: virtual_signal_prototypes has been removed from LuaGameScript
It is in the changelog, albeit not very searchable.
Moved prototypes access from LuaGameScript::X_prototypes to LuaPrototypes::X.
Couldn't find in the change logs, but ItemPrototypeFilter has also changed. The flag and filter fields appear to have been merged ('hidden' flag is now a filter)
It also appears that entity.connect_neighbour has been replaced with some other method
Here is an example of how to do programmatic circuit connections from my Moon Logic patch:
local Terminals = {
red = {
output = defines.wire_connector_id.combinator_output_red,
input = defines.wire_connector_id.combinator_input_red
},
green = {
output = defines.wire_connector_id.combinator_output_green,
input = defines.wire_connector_id.combinator_input_green
}
}
-- Create/connect/remove invisible constant-combinator entities for wire outputs
local function out_wire_connect(e, color)
local core = e.surface.create_entity{
name='mlc-core', position=e.position,
force=e.force, create_build_effect_smoke=false }
local terminals = Terminals[color]
local connectors = {
transmitter = e.get_wire_connector( terminals.output ),
receiver = core.get_wire_connector( terminals.input )
}
local success = connectors.transmitter.connect_to( connectors.receiver, false, defines.wire_origin.script )
if not success then
error(('Failed to connect %s wire outputs to core'):format(color))
end
core.destructible = false
return core
end
local function out_wire_connect_both(e)
return
out_wire_connect(e, "red"),
out_wire_connect(e, "green")
end
NOTE: the core entity is a mod item from Moon Logic. I would recommend replacing it and adding an additional argument for these objects so that the receiver can be arbitrary
Not mentioned in the change logs: virtual_signal_prototypes has been removed from LuaGameScript
It is in the changelog, albeit not very searchable.
Moved prototypes access from LuaGameScript::X_prototypes to LuaPrototypes::X.
If anyone else is losing their mind, because the current docs are incorrect, the old "game.item_prototypes" is now "prototypes.item".
I think there used to be a game.virtual_signal_prototypes, which is now prototypes.virtual_signal.
I'd guess that it's a relatively common thing to fetch stack sizes at runtime, so I hope they fix the docs. (They currently have a dead link from ItemPrototypeFilter to the game object.) I found the name by guessing!
no mention of the 'working_sound' changes and how the new system works - from the changelog:
Added support for sound accents for entities' working_sound. These are short sounds which play at a specific moment in the entity's animation.
Now in my 'KnightRider mod' theme music also plays if the player is in the car and opens the car GUI (BTW - the extension sounds that I add for KITT greeting Michel also sound for the tank and IDK how to remove that, because a 'tank' is also a 'car'...)
Please add a section about how main sounds work now (like why there are multiples defined for the 'car' 'working_sound' and how they are used) and help me fix the issue I mentioned above
@jocker-il I have no idea how sounds work. If the docs aren’t explaining them adequately then please make a documentation improvement request in the official forums.
@jocker-il I have no idea how sounds work. If the docs aren’t explaining them adequately then please make a documentation improvement request in the official forums.
A. thank you for the reply, as you are the second to propose this, it seems I will do that as a first step,
B. I owe you an apology as I (mistakenly?) thought you were part of the development team and I might have come-on too strong here - so please forgive any bad feeling, if I caused any (to anyone else, as well) - I tend to come on strong sometime as I'm a passionate person
It is recommended to open a separate GitHub repository for better maintenance and collaboration with everyone
Thanks for all your comments everyone. The guide has now been moved to a repository and gained some additional guidance for new 2.0 features: https://github.com/tburrows13/factorio-2.0-mod-porting-guide
https://wiki.factorio.com/Data.raw
see also
fucking love this