Search found 21 matches
- Fri Dec 02, 2022 7:37 pm
- Forum: Implemented mod requests
- Topic: Silent Print
- Replies: 2
- Views: 912
Re: Silent Print
I'm also in need of this. Did you find any solution or workaround? (i.e. mute -> print -> unmute)
- Fri Dec 02, 2022 7:37 pm
- Forum: Implemented mod requests
- Topic: Quiet game.print
- Replies: 5
- Views: 1426
Re: Quiet game.print
I'm also in need of this. Did you find any solution or workaround? (i.e. mute -> print -> unmute)
- Mon May 02, 2022 7:48 pm
- Forum: Modding help
- Topic: Any possibility to get the length of a sound?
- Replies: 1
- Views: 609
Re: Any possibility to get the length of a sound?
The goal is to chain sounds of varying lengths without overlapping or huge gaps.
- Mon May 02, 2022 7:30 pm
- Forum: Modding help
- Topic: Any possibility to get the length of a sound?
- Replies: 1
- Views: 609
Any possibility to get the length of a sound?
Hi everyone, I am wondering if it is at all possible to get the length of a sound like this (in ticks or seconds)? data:extend({ { type = "sound", name = "mysound", filename = "__MyMod__/sounds/mysound.ogg", category = "alert", volume = 1.0 } } Cheers
- Wed Apr 27, 2022 12:39 pm
- Forum: Modding help
- Topic: How to properly print a train stop's name containing symbols
- Replies: 3
- Views: 1120
Re: How to properly print a train stop's name containing symbols
I found this solution, which seems to work for what I have tested: function corrected_train_stop_name(str) if not string.find(str,"=") then return str else return string.gsub(string.gsub(str, "=", "/"), "%[", "[img=") end end It converts [item=copper...
- Wed Apr 27, 2022 12:16 pm
- Forum: Modding help
- Topic: How to properly print a train stop's name containing symbols
- Replies: 3
- Views: 1120
Re: How to properly print a train stop's name containing symbols
I just found this page and I guess it has something to do with it:
https://wiki.factorio.com/Rich_text
https://wiki.factorio.com/Rich_text
- Wed Apr 27, 2022 11:42 am
- Forum: Modding help
- Topic: How to properly print a train stop's name containing symbols
- Replies: 3
- Views: 1120
How to properly print a train stop's name containing symbols
Hi everyone, if I use a copper-plat symbol for a train stop name: Screenshot_20220427_133355.png then print its name: game.print(train_stop.backer_name) it prints the symbol plus an item description next to it: Screenshot_20220427_133613.png How can I print the symbol only as it is displayed for the...
- Sun Apr 10, 2022 7:14 pm
- Forum: Minor issues
- Topic: [1.1.34] play_sound{...} not playing sound globally
- Replies: 5
- Views: 2559
Re: [1.1.34] play_sound{...} not playing sound globally
Just for reference, I just found a solution accidentally!!! :) I stumbled over this: https://wiki.factorio.com/Prototype/Sound#audible_distance_modifier Just configure your sound with an exorbitantly high audible_distance_modifier in data.lua, e.g. data:extend({ { type = "sound", name = &q...
- Sun Apr 10, 2022 7:00 pm
- Forum: Modding help
- Topic: Play a sound position-independently for all passengers of a train
- Replies: 4
- Views: 1160
Re: Play a sound position-independently for all passengers of a train
Got it!!! I accidentally stumbled over this: https://wiki.factorio.com/Prototype/Sound#audible_distance_modifier Just configure your sound with an exorbitantly high audible_distance_modifier in data.lua, e.g. data:extend({ { type = "sound", name = "my_sound", filename = "__M...
- Sun Apr 10, 2022 11:25 am
- Forum: Minor issues
- Topic: [1.1.34] play_sound{...} not playing sound globally
- Replies: 5
- Views: 2559
Re: [1.1.34] play_sound{...} not playing sound globally
Did you find any way to play a custom sound globally for all players and position-independently?
- Sun Apr 10, 2022 11:24 am
- Forum: Modding help
- Topic: Play a sound position-independently for all passengers of a train
- Replies: 4
- Views: 1160
Re: Play a sound position-independently for all passengers of a train
Btw I already searched for other threads beforehand and also found this one: Modifying mod so sound is heard everywhere in multiplayer But it only mentions https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.play_sound, which according to the documentation: position:: MapPosition? Where t...
- Sat Apr 09, 2022 4:24 pm
- Forum: Modding help
- Topic: Play a sound position-independently for all passengers of a train
- Replies: 4
- Views: 1160
Play a sound position-independently for all passengers of a train
Hi everyone, would it be possible at all to play a sound for all players sitting in a certain train, but in a position-independent way, so that the sound doesn't become silent when the train moves away from the original play_sound position? The intention is to have a sound being played for all passe...
- Sat Apr 09, 2022 4:09 pm
- Forum: Modding help
- Topic: Play random audio file out of some folder
- Replies: 2
- Views: 818
Re: Play random audio file out of some folder
Thank you very much!!!
- Sat Apr 09, 2022 2:34 pm
- Forum: Modding help
- Topic: Play random audio file out of some folder
- Replies: 2
- Views: 818
Play random audio file out of some folder
Hi everyone,
I am wondering if it is at all possible to play a random audio file out of some folder or if you have any workarounds in mind?
I would like to be able to put any *.ogg files in there and have a random choice of these files played upon a certain event.
Thank you for any ideas!
I am wondering if it is at all possible to play a random audio file out of some folder or if you have any workarounds in mind?
I would like to be able to put any *.ogg files in there and have a random choice of these files played upon a certain event.
Thank you for any ideas!
- Thu Dec 16, 2021 4:47 pm
- Forum: Modding help
- Topic: Lua way to Shift+Click a blueprint?
- Replies: 6
- Views: 1727
Re: Lua way to Shift+Click a blueprint?
Just realized, I didn't reply. Many many thanks! Works like a charm.
- Tue Dec 07, 2021 8:24 pm
- Forum: Modding help
- Topic: Lua way to Shift+Click a blueprint?
- Replies: 6
- Views: 1727
Re: Lua way to Shift+Click a blueprint?
Many thanks for your replies!
Is there a way to hard-code a constant blueprint in Lua code? (I need some way to ensure it is the correct blueprint)
Is there a way to hard-code a constant blueprint in Lua code? (I need some way to ensure it is the correct blueprint)
- Sat Dec 04, 2021 8:10 pm
- Forum: Modding help
- Topic: Lua way to Shift+Click a blueprint?
- Replies: 6
- Views: 1727
Re: Lua way to Shift+Click a blueprint?
Waoh, that looks easy. Thank you!
How do I access the blueprints though? Preferably the team blueprint book's ones (alternatively my own blueprint book's ones)?
How do I access the blueprints though? Preferably the team blueprint book's ones (alternatively my own blueprint book's ones)?
- Fri Dec 03, 2021 3:10 pm
- Forum: Modding help
- Topic: Lua way to Shift+Click a blueprint?
- Replies: 6
- Views: 1727
Lua way to Shift+Click a blueprint?
Hi everyone, I'm looking for the Lua way to simulate a Shift-Click-Placement of a certain blueprint at a certain position without relying on the mouse pointer. Does anybody have an idea on how that could be achieved? What I actually want to achieve is that a moving spidertron continuously places a s...
- Thu Dec 02, 2021 8:01 pm
- Forum: Modding help
- Topic: Lua command to place ghost landfill?
- Replies: 3
- Views: 1114
Re: Lua command to place ghost landfill?
I've found out already that I placed multiple tiles over each other. This is why it's looking differently.
- Thu Dec 02, 2021 7:53 pm
- Forum: Modding help
- Topic: Lua command to place ghost landfill?
- Replies: 3
- Views: 1114
Re: Lua command to place ghost landfill?
Thank you very much, that helps! Do you also know why the created ghost tile looks different to a landfill ghost placed by the cursor manually? The screenshot shows a ghost landfill entity placed manually (top-left), a "tile-ghost" landfill entity placed by the mod (middle), and a landfill...