Search found 2904 matches

by darkfrei
Tue Nov 19, 2024 8:19 am
Forum: Documentation Improvement Requests
Topic: LuaSurface points to a surface at index, and not to unique surface
Replies: 4
Views: 712

Re: LuaSurface points to a surface at index, and not to unique surface

Why the event has surface index, not surface name?

Code: Select all

on_post_entity_died ( event)
	local surface_index = event.surface_index
	local surface_name = game.surfaces[surface_index].name
	game.print ('surfaceindex: '..surface_index..'; surface name: '..surface_name)
end
surface_index_surface_name.png
surface_index_surface_name.png (31.28 KiB) Viewed 38 times
by darkfrei
Fri Apr 26, 2024 4:25 pm
Forum: Mod portal Discussion
Topic: [One Line Suggestions]
Replies: 53
Views: 23139

Re: [One Line Suggestions] Please autoconvert hyperlinks in the changelog

micromario wrote: Fri Apr 26, 2024 12:37 pm For Pyanodons we frequently love to leave extra context in the changelog via hyperlinks.
Would it be possible to automatically convert these into real links?

Image
He must be the markdown syntax as:

Code: Select all

[Annotorio](https://mods.factorio.com/mod/Annotorio)
by darkfrei
Fri Oct 27, 2023 10:17 am
Forum: Implemented mod requests
Topic: Quiet game.print
Replies: 5
Views: 1916

Re: Quiet game.print

boskid wrote: Mon Oct 09, 2023 11:28 am Implemented for 1.1.93: print's second parameter will accept a PrintSettings where { sound = defines.print_sound.never } can be given.
Thanks! Also custom sound?
LuaGameScript.html#print
concepts.html#PrintSettings
by darkfrei
Tue Feb 28, 2023 1:25 pm
Forum: Modding help
Topic: Copying colors from locomotive to wagon
Replies: 1
Views: 970

Re: Copying colors from locomotive to wagon

Lazarus_Octern wrote: Fri Feb 10, 2023 9:19 pm
If anybody has any idea on why that is happening i would love to hear it.
Are you sure that you have a mask while the prototype copying?
2023-02-28T14_24_10-D__Factorio_1.1_factorio-current-01.log - Notepad++.png
2023-02-28T14_24_10-D__Factorio_1.1_factorio-current-01.log - Notepad++.png (46.25 KiB) Viewed 861 times
by darkfrei
Tue Feb 28, 2023 1:11 pm
Forum: Modding help
Topic: Help with scripts
Replies: 1
Views: 753

Re: Help with scripts

Hi I want to create a script for a little more realism on a scenario... I would like that after a while, the pieces of wreckage disappear. Any idea how to proceed? Thank you all If your entity is ghost, combat robot, highlight box or smoke then https://lua-api.factorio.com/latest/LuaEntity.html#Lua...
by darkfrei
Tue Feb 28, 2023 1:04 pm
Forum: Modding help
Topic: Effects on screen
Replies: 1
Views: 852

Re: Effects on screen

MekoNix wrote: Mon Feb 27, 2023 4:24 pm I'm new to modding and looking for advice. I want to make a mod that adds weather and I need something like falling snow, rain and lightning on the screen. How to make such effects for the player, and is it even possible?
Thank you in advance!
https://lua-api.factorio.com/latest/LuaRendering.html
by darkfrei
Thu Aug 04, 2022 10:29 am
Forum: Modding help
Topic: character_running_speed inaccuracy
Replies: 5
Views: 1574

Re: character_running_speed inaccuracy

What if the speed is less than 1/256 tiles per tick? No movement at all or the movement will be accordingly accumulated?
by darkfrei
Sun Jul 17, 2022 12:09 am
Forum: Texture Packs
Topic: [Request] Train textures
Replies: 5
Views: 4131

Re: [Request] Train textures

Autor of model: Jesper Landin https://sketchfab.com/JesperLandin Model: EMD GP7 Western Pacific 713 https://sketchfab.com/3d-models/emd-gp7-western-pacific-713-1c89cb9f2c224b78b6fea50f82e042c3 License: CC Attribution (credit the author) 0048-hr.png Spritesheet (not tested): train-best_spritesheet_4x...
by darkfrei
Tue Jul 12, 2022 12:25 pm
Forum: Texture Packs
Topic: [Request] Train textures
Replies: 5
Views: 4131

Re: [Request] Train textures

For the electric and diesel train mods, currently the trains are the same texture but with a different standard colour. I want to retexture them to make the electric one look like the Bombadier Traxx (https://railway-news.com/wp-content/uploads/2020/12/200th-Bombardier-TRAXX-for-Railpool-scaled.jpg...
by darkfrei
Tue Jun 21, 2022 9:54 am
Forum: Modding help
Topic: indestructible tiles with collision masks?
Replies: 1
Views: 1186

Re: indestructible tiles with collision masks?

Set the minable to false or replace tile-placeholder with the tile by the script.
by darkfrei
Tue May 31, 2022 10:25 am
Forum: Modding help
Topic: Linked belts reversing when placed or upgraded.
Replies: 4
Views: 1811

Re: Linked belts reversing when placed or upgraded.

Don't forget to set the input and out type:

Code: Select all

inputEntity.linked_belt_type = "input"
outputEntity.linked_belt_type = "output"
by darkfrei
Mon May 30, 2022 1:39 pm
Forum: Modding help
Topic: [SOLVED] Make an entity unplaceable on stone path/concrete/refined concrete/etc?
Replies: 6
Views: 1811

Re: [SOLVED] Make an entity unplaceable on stone path/concrete/refined concrete/etc?

Anyone know if there's a collision_mask or other method (ie, do I need to make checks in control while placing?) that prevents an entity from being placed on path tiles, both vanilla and mod added? Basically, I want to make it so you can't plant a tree on anything but bare, regular ground. :) See a...
by darkfrei
Wed Apr 27, 2022 7:04 am
Forum: Modding help
Topic: Question about the global table
Replies: 10
Views: 3234

Re: Question about the global table

Is it okay if I recycle this code with credit? This is my current code, if that's not the case - perhaps you might know how to retool it to have the functionality I need. function inserter_utils.get_max_range(inserter, this_force) -- The original function appears to grab the maximum range from the ...
by darkfrei
Mon Apr 25, 2022 9:29 am
Forum: Modding help
Topic: Question about the global table
Replies: 10
Views: 3234

Re: Question about the global table

See code of https://mods.factorio.com/mod/RocketExplosions function get_tech_level (force, tech_name) local level = 0 local techs = force.technologies local tech = techs[tech_name] or techs[tech_name..'-1'] if tech and tech.researched then level = tech.level local i = 1 local fl = true while fl do i...
by darkfrei
Mon Apr 04, 2022 10:21 am
Forum: Modding help
Topic: I want "electric furnace" to manually select the recipe
Replies: 3
Views: 1531

Re: I want "electric furnace" to manually select the recipe

I want "electric furnace" to manually select the formula like an assembly machine. Where should I modify it? thank you Just create the assembling machine with furnace's recipe category "smelting". https://wiki.factorio.com/Prototype/RecipeCategory https://wiki.factorio.com/Data....
by darkfrei
Mon Apr 04, 2022 7:15 am
Forum: Modding help
Topic: Can you realize the dynamic conversion of formula
Replies: 4
Views: 1736

Re: Can you realize the dynamic conversion of formula

Table tabl ={ { type = "recipe", name = "transformation-copper-ore-from-coal", category = "transformation-copper-ore", ingredients = {{"coal", 5}}, result = "copper-ore", }, { type = "recipe", name = "transformation-copper-ore-from-sto...
by darkfrei
Wed Mar 30, 2022 7:19 am
Forum: Modding help
Topic: Is there any way for the data stage to effect the settings stage?
Replies: 9
Views: 3215

Re: Is there any way for the data stage to effect the settings stage?

My question was: Why we have data.raw? I mean, why not just data? And why not settings.raw or data.settings?
by darkfrei
Mon Mar 28, 2022 3:23 pm
Forum: Modding help
Topic: Is there any way for the data stage to effect the settings stage?
Replies: 9
Views: 3215

Re: Is there any way for the data stage to effect the settings stage?

No. The reason is: Data stage is defined based off the values of the settings stage. If the settings stage could be defined based off the values of the data stage it would be an infinite loop. Must be something like (but never will be implemented) data-pre-settings settings data data-updates data-f...
by darkfrei
Wed Mar 23, 2022 10:46 am
Forum: Technical Help
Topic: [Solved] Can't change the data directory.
Replies: 34
Views: 17918

Re: [Solved] Can't change the data directory.

Make it portable: Factorio/config-path.cfg must be: config-path=__PATH__executable__/../../config #This value specifies the way the aplication generates default values for path.read-data and path.write-data #When set to true, it will use system directories (Users/Name/AppData/Roaming/Factorio on win...
by darkfrei
Fri Mar 04, 2022 1:04 pm
Forum: Modding help
Topic: How to offset sprite so that it looks good when entity rotates?
Replies: 6
Views: 2680

Re: How to offset sprite so that it looks good when entity rotates?

AlveKatt wrote: Tue Mar 01, 2022 1:37 pm Your sprite sheet will be bigger with a lot of empty space, but I think you have to live with that.
There is a script for that:
viewtopic.php?p=335708#p335708

Go to advanced search