Search found 181 matches

by moon69
Mon May 11, 2020 12:27 pm
Forum: Modding interface requests
Topic: LuaRendering.draw_on_map
Replies: 21
Views: 7866

Re: LuaRendering.draw_on_map

I would use this instead of (or in addition to) chart tags to combine symbols and shapes at runtime rather than hard code them in numerous sprites. Currently I only need 12 sprites to display required combinations, but adding one extra symbol would require ~60 sprites! I think it would also be cool ...
by moon69
Sun May 10, 2020 9:14 am
Forum: Modding help
Topic: [0.18.22] ArtilleryTurret.gun from LuaEntityPrototype?
Replies: 0
Views: 439

[0.18.22] ArtilleryTurret.gun from LuaEntityPrototype?

How can I access Prototype/ArtilleryTurret#gun from API?
Similarly for Prototype/ArtilleryWagon#gun.

It doesn't seem to appear in LuaEntityPrototype.guns.

I also wonder why multiple guns can't be mounted on an ArtilleryWagon!?

Cheers.
by moon69
Fri May 08, 2020 6:43 pm
Forum: Modding help
Topic: Get mod name in data phase
Replies: 0
Views: 426

Get mod name in data phase

In data.lua, I can scrape the current mod name from debug.getinfo(1).source, but is there a more elegant way?
by moon69
Fri May 08, 2020 6:27 am
Forum: Modding help
Topic: LuaRendering blend mode (currently additive?)
Replies: 1
Views: 797

Re: LuaRendering blend mode (currently additive?)

Does this help?
Friday Facts #172 - Blending and Rendering

I was reminded recently that in general Factorio expects a premultiplied alpha colour - there is a pre-mult function in core/lualib/util.lua I often use.
by moon69
Thu May 07, 2020 10:44 pm
Forum: Modding help
Topic: How to vertically align cells in a table?
Replies: 0
Views: 489

How to vertically align cells in a table?

I want to center a row in a table (rather than center the cell content in the row). The table has a minimal_height as shown by it's background image. The minimal_height setting appears to affect the table but not the row. The StyleSpecification.vertical_align affects the contents of the rows, but no...
by moon69
Sat May 02, 2020 8:31 pm
Forum: Documentation Improvement Requests
Topic: LuaGameScript.auto_save - valid chars?
Replies: 1
Views: 1182

LuaGameScript.auto_save - valid chars?

RE: LuaGameScript.auto_save Is there definitive info anywhere on which characters are/not permitted for the filename? My random spot use of unicode chars suggests that if the factorio fonts support it, so does auto_save - with some (presumably file system driven) exceptions. It's these exceptions I'...
by moon69
Fri May 01, 2020 4:44 pm
Forum: Modding help
Topic: Subscribing to on_tick for 1 tick - is it OK?
Replies: 4
Views: 1028

Re: Subscribing to on_tick for 1 tick - is it OK?

Thanks for advice.
by moon69
Fri May 01, 2020 1:57 pm
Forum: Modding help
Topic: Subscribing to on_tick for 1 tick - is it OK?
Replies: 4
Views: 1028

Re: Subscribing to on_tick for 1 tick - is it OK?

Current intent is to close all mod guis that are saved open, remove custom selection-tool from hand, enable personal roboport and such things to give a clean start on resuming play.
by moon69
Fri May 01, 2020 1:29 pm
Forum: Modding help
Topic: Subscribing to on_tick for 1 tick - is it OK?
Replies: 4
Views: 1028

Subscribing to on_tick for 1 tick - is it OK?

I want to do some light maintenence of my mod (using game object) once on every game load, so I do this by subscribing to on_tick and then unsubscribing in it's handler.

Is this the recommended method? Are there any pitfalls I need to look out for? Particularly wrt to multiplayer?

Cheers
by moon69
Fri May 01, 2020 12:45 pm
Forum: Resolved Requests
Topic: LuaRendering.draw_polygon - confusing vertices description
Replies: 2
Views: 1442

Re: LuaRendering.draw_polygon - confusing vertices description

Thanks Bilka, I think the confusion was because I've become used to most things like ScriptRenderTarget having a reference on the Concepts page - often with extra explanation or examples. So it's much better that CustomScriptRenderTarget avoids confusion with ScriptRenderTarget as you show, but I su...
by moon69
Thu Apr 30, 2020 8:42 pm
Forum: Minor issues
Topic: Various minor issues (should be fixed) when running with Valgrind
Replies: 7
Views: 3254

Re: Various minor issues (should be fixed) when running with Valgrind

Just curious really... If someone looks into the zlib stuff at some stage, perhaps you could look at why 'autosave-compression-level=none' is still setting the compression method to Deflate (8) rather than Store (0)? The compression level appears to be "no compression", so it's fast, but D...
by moon69
Thu Apr 30, 2020 8:31 pm
Forum: Tools
Topic: Zip file compression metadata curiosity
Replies: 3
Views: 2196

Re: Zip file compression metadata curiosity

Interesting thanks.

Edit:
Rseding91 wrote:
Fri May 01, 2020 2:31 am
I fixed it for the next release so it will mark them as stored when no-compression is used.
by moon69
Thu Apr 30, 2020 8:25 am
Forum: Tools
Topic: Zip file compression metadata curiosity
Replies: 3
Views: 2196

Zip file compression metadata curiosity

Is there any info around on the implementation of Factorio's zip file handling? I've started using the 'autosave-compression-level=none' option in config.ini, but getting some unexpected values in the file headers of the resulting zip file (well possibly unexpected because I don't fully understand t...
by moon69
Sun Apr 26, 2020 7:55 pm
Forum: Wiki Talk
Topic: Rich Text uses #AARRGGBB or #RRGGBBAA ?
Replies: 2
Views: 1560

Re: Rich Text uses #AARRGGBB or #RRGGBBAA ?

Thanks Posila. Apologies for that.

For my future reference... you can't currently use lualib util.color(hex) function for this!

Code: Select all

function util.color(hex)  -- supports 'rrggbb', 'rgb', 'rrggbbaa', 'rgba', 'ww', 'w'
by moon69
Sun Apr 26, 2020 6:32 pm
Forum: Wiki Talk
Topic: Rich Text uses #AARRGGBB or #RRGGBBAA ?
Replies: 2
Views: 1560

Rich Text uses #AARRGGBB or #RRGGBBAA ?

wiki.factorio.com/Rich_text shows #AARRGGBB, but it looks to me in-game like #RRBBGGAA ?
by moon69
Sun Apr 26, 2020 12:59 pm
Forum: Resolved Requests
Topic: LuaRendering.draw_polygon - confusing vertices description
Replies: 2
Views: 1442

LuaRendering.draw_polygon - confusing vertices description

From LuaRendering.draw_polygon ... vertices :: array of ScriptRenderTarget: target :: Position or LuaEntity target_offset :: Vector (optional): Only used if target is a LuaEntity. but 'vertices' doesn't seem to take ScriptRenderTargets ! To be fair, the ScriptRenderTarget in the above code is plain ...
by moon69
Wed Apr 22, 2020 8:09 pm
Forum: Modding help
Topic: selection-tool and construction zone visualisation
Replies: 2
Views: 973

Re: selection-tool and construction zone visualisation

Sneaky! Unfortunately not practical as I need members of selection-tool not available in decendant planners.
by moon69
Wed Apr 22, 2020 2:00 pm
Forum: Technical Help
Topic: [0.18.19] Minor issue with log spam
Replies: 3
Views: 951

Re: [0.18.19] Minor issue with log spam

Apologies - meant as a question rather than complaint!

Verbose option now (re?)discovered and tamed thank you.
by moon69
Tue Apr 21, 2020 10:50 pm
Forum: Modding help
Topic: selection-tool and construction zone visualisation
Replies: 2
Views: 973

selection-tool and construction zone visualisation

Does anyone know how to trigger the construction zone visualization?

I've made a Prototype/SelectionTool, but can't make it trigger the personal roboport construction radius visualisation (like that of a Deconstruction planner).

Cheers.
by moon69
Tue Apr 21, 2020 9:49 pm
Forum: Modding help
Topic: [0.18.19] Hidden deconstructable chest
Replies: 0
Views: 435

[0.18.19] Hidden deconstructable chest

I create_entity the below invisible chest, set_stack some items into it and can then order_deconstruction and the construction bots will happily empty then deconstruct it. I can't figure out though how to hide the red X when I order_deconstruction - any suggestions? { type = "container", n...

Go to advanced search