Search found 184 matches

by moon69
Sun May 17, 2020 5:49 am
Forum: Implemented mod requests
Topic: Prototype/ArtilleryTurret#gun from API
Replies: 1
Views: 1060

Prototype/ArtilleryTurret#gun from API

Access Prototype/ArtilleryTurret#gun from API please.
Similarly for Prototype/ArtilleryWagon#gun.

Should they not appear in LuaEntityPrototype.guns ?

Cheers.
by moon69
Sun May 17, 2020 5:43 am
Forum: Modding discussion
Topic: Fixing data stage spam
Replies: 39
Views: 13940

Re: Fixing data stage spam

For those (re)visiting this topic, please also consider justarandomgeek's debugger as highlighted in FFF - good stuff!
Friday Facts #337 - Statistics GUI and Mod Debugger
by moon69
Tue May 12, 2020 6:32 pm
Forum: Resolved Problems and Bugs
Topic: [0.18.24] choose-elem-button missing some signals
Replies: 4
Views: 3682

[0.18.24] choose-elem-button missing some signals

signal-everything, signal-anything, signal-each are missing from LuaGuiElement.add→choose-elem-button→elem_type=signal

I don't remember if they were missing in the past or not.
FactorioMissingSignals.png
FactorioMissingSignals.png (125.09 KiB) Viewed 3682 times
by moon69
Mon May 11, 2020 12:27 pm
Forum: Implemented mod requests
Topic: LuaRendering.draw_on_map
Replies: 31
Views: 13009

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 ...
by moon69
Sun May 10, 2020 9:14 am
Forum: Modding help
Topic: [0.18.22] ArtilleryTurret.gun from LuaEntityPrototype?
Replies: 0
Views: 550

[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: 550

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: 1032

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: 632

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 ...
by moon69
Sat May 02, 2020 8:31 pm
Forum: Documentation Improvement Requests
Topic: LuaGameScript.auto_save - valid chars?
Replies: 1
Views: 1491

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 ...
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: 1459

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: 1459

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: 1459

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: 1766

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 ...
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: 4216

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 Deflate ...
by moon69
Thu Apr 30, 2020 8:31 pm
Forum: Tools
Topic: Zip file compression metadata curiosity
Replies: 3
Views: 2819

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: 2819

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 ...
by moon69
Sun Apr 26, 2020 7:55 pm
Forum: Wiki Talk
Topic: Rich Text uses #AARRGGBB or #RRGGBBAA ?
Replies: 2
Views: 2070

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: 2070

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: 1766

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 ...
by moon69
Wed Apr 22, 2020 8:09 pm
Forum: Modding help
Topic: selection-tool and construction zone visualisation
Replies: 2
Views: 1407

Re: selection-tool and construction zone visualisation

Sneaky! Unfortunately not practical as I need members of selection-tool not available in decendant planners.

Go to advanced search