Small documentation improvement requests

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 4983
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Small documentation improvement requests

Post by eradicator »

Wtf is "generate_sdf" :lol:.

Saw it on the character-bonus technology-icon definitions and noticed it's supported by several sprite related prototypes but it's explained nowhere.


-> Explained on https://wiki.factorio.com/Types/Sprite, it's unused in the rest of the sprite types.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 4983
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Small documentation improvement requests

Post by eradicator »

UnlockRecipeModifierPrototype looks like someone copied the wrong template.
It says "item" and "count" instead of "recipe" :D.


-> The doc for this ended up on https://wiki.factorio.com/Types/TurretA ... rPrototype somehow. Thanks for noticing, fixed :D
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 4983
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Small documentation improvement requests

Post by eradicator »

Maybe add a small note to the API doc that

Code: Select all

LuaForce.research_queue = {'automation','construction-robotics','automation'}
behaves the same as if a player did it. Aka:

Code: Select all

Note: Technologies that could not be normally researched by the force are silently ignored.
I.e. If their prerequisites are not met, or they have already been researched.
I found it a bit suprising, as usually the API allows mods to ignore normal limitations.

-> Thanks, added for the next release.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 4983
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Small documentation improvement requests

Post by eradicator »

Shortcut icons (normal + small + disabled) Are not normal "Sprite" types as they ignore the scale property to keep shortcut button style unified. (didn't test for other things like shift). As such the example is also misleading as it explicitly defines "scale = 1" for all icons.

-> Example updated to 1.1.34. It comes from the base game which sets the scale. I'm investigating why the scale is set when it doesn't seem to do anything.

=> If it is intentionally as I suspect and not a bug then I still think that showing scale in the example gives the wrong impression that it is somehow meaninful or nessecary. All my shortcuts are defined without scale and work as expected.


-> Scale removed from example, page updated to explain why it may not work as expected.
Last edited by eradicator on Thu Jun 10, 2021 8:39 pm, edited 3 times in total.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

User avatar
Muppet9010
Fast Inserter
Fast Inserter
Posts: 220
Joined: Sat Dec 09, 2017 6:01 pm
Contact:

Re: Small documentation improvement requests

Post by Muppet9010 »

LuaSurface.can_place_entity() requires inner_name when the the entity you are trying to test place is an "entity-ghost". The docs don't mention it, but you get a missing key error.
https://lua-api.factorio.com/latest/Lua ... ace_entity

Looks to be the same usage as the "entity-ghost" other attributes listed for the LuaSurface.create_entity().
https://lua-api.factorio.com/latest/Lua ... ate_entity

Pi-C
Smart Inserter
Smart Inserter
Posts: 1059
Joined: Sun Oct 14, 2018 8:13 am
Contact:

Re: Small documentation improvement requests

Post by Pi-C »

Regarding LuaPlayer.create_local_flying_text:
time_to_live :: uint (optional)
speed :: double (optional): Movement per second
Units are missing here! Generally, ticks are used for time_to_live, but it wouldn't hurt if this was explicitly mentioned. However, "movement per second" is absolutely not enough: Does that refer to tiles per second, or is it a multiplier applied to the speed of vanilla flying text?

-> Thanks for the hint, I overhauled that whole method for the next release.
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!

Post Reply

Return to “Modding interface requests”