Search found 1270 matches

by Pi-C
Tue Apr 19, 2022 12:25 pm
Forum: Modding help
Topic: Remove unlock Item from MOd Tech
Replies: 3
Views: 195

Re: Remove unlock Item from MOd Tech

Is there any solution to remove an unlock item from a mod tech, without changeing the other mod? You should change the other mod's technology prototype in data-updates.lua. What you're interested in is the "effects" property, which can be defined in technology.effects, technology.normal.e...
by Pi-C
Mon Apr 18, 2022 2:28 pm
Forum: Modding help
Topic: Need help replace items in all recipes
Replies: 4
Views: 230

Re: Need help replace items in all recipes

did i forget something? Handling recipes is something just short of dark magic. :mrgreen: There are different places in a recipe where ingredients, results etc. can be set. In the most simple case, it will be at the root, like recipe.ingredients. But a recipe could have difficulty (IIRC, if there i...
by Pi-C
Sun Apr 17, 2022 7:08 am
Forum: Mods
Topic: [MOD 1.1] "minime" is now "miniMAXIme"
Replies: 4
Views: 534

Re: [MOD 1.1] "minime" is now "miniMAXIme"

I've just uploaded version 1.1.9 , for which I've completely reworked the GUI. The old GUI didn't look much different at first glance, but it wasn't fit for handling huge amounts of new characters, like provided by Genshin Impact Skin 原神皮肤 . The new version is much better suited for using many chara...
by Pi-C
Sun Apr 17, 2022 6:50 am
Forum: Modding help
Topic: Need ideas for GUI
Replies: 4
Views: 304

Re: Need ideas for GUI

I've just released a new version of my mod. This is the new GUI:
minime_gui_1.1.9.png
minime_gui_1.1.9.png (96.95 KiB) Viewed 130 times
It probably could use some more polishing, but at least it's usable now even when lots of character prototypes are in the game. Thanks for your help, and happy Easter, everybody! :-D
by Pi-C
Fri Apr 15, 2022 1:20 pm
Forum: Modding help
Topic: How to handle long running functions?
Replies: 9
Views: 472

Re: How to handle long running functions?

How can I inspect how long my code for each state-machine state will run, or where bottle-necks are? Check out the LuaProfiler ! It's a vanilla tool, you can create profilers using game.create_profiler() . I'm not sure how expensive it is to run such profilers. You probably don't want to have them ...
by Pi-C
Mon Apr 11, 2022 5:13 pm
Forum: Modding discussion
Topic: Licensing question about interactions between mods
Replies: 13
Views: 542

Re: Licensing question about interactions between mods

You can definitely tell people they cannot modify your things. Though in factorio context, I suspect only mods which actually depend on your mod could be affected. Some slippery road ahead there! Say mod A forbids modifying their prototypes. Mod B adds a dependency on A -- it's safe to assume the a...
by Pi-C
Mon Apr 11, 2022 6:44 am
Forum: Modding help
Topic: Help, game error - no character
Replies: 23
Views: 1242

Re: Help, game error - no character

Such a mistake has occurred: Attempt to remote call outside of an event. stack traceback: [C]: in function 'call' Oh, of course! I've defined all my event handlers in a function that is called from script.on_init, script.on_configuration_changed, and script.on_load. So something like this should wo...
by Pi-C
Mon Apr 11, 2022 12:44 am
Forum: Modding help
Topic: Help, game error - no character
Replies: 23
Views: 1242

Re: Help, game error - no character

Also, there's this at the top of scripts/respawn.lua: --custon event --/c remote.call("space-exploration", "get_on_player_respawned_event") --script.on_event(remote.call("space-exploration", "get_on_player_respawned_event"), my_event_handler) So you must add ...
by Pi-C
Sun Apr 10, 2022 8:00 pm
Forum: Modding help
Topic: Help, game error - no character
Replies: 23
Views: 1242

Re: Help, game error - no character

I haven't found yet how SE bypasses on_player_respawned, but I've found this in the changelog: --------------------------------------------------------------------------------------------------- Version: 0.4.10 Date: 22. 09. 2020 … Compatibility: - Added remote interface for get_on_player_respawned_...
by Pi-C
Sun Apr 10, 2022 6:13 pm
Forum: Modding discussion
Topic: Licensing question about interactions between mods
Replies: 13
Views: 542

Re: Licensing question about interactions between mods

Is it possible for a mod's license to protect it's entities, recipes, items, technologies, etc, from being altered by a third party mod through factorio's data.raw table? How would you want to do that? Once the things have been extended to data.raw, mods usually can't tell what mod created a protot...
by Pi-C
Mon Apr 04, 2022 2:24 pm
Forum: Modding help
Topic: Need ideas for GUI
Replies: 4
Views: 304

Re: Need ideas for GUI

How about showing just 5 and make more pages to skip through? [previous] 1 2 3 [next] Good idea! It would save screen real estate, and it would be good for UPS because I could set character.active = false for all preview entities that are on a hidden page. But it might be cool if you make it look l...
by Pi-C
Mon Apr 04, 2022 12:27 pm
Forum: Modding help
Topic: Need ideas for GUI
Replies: 4
Views: 304

Need ideas for GUI

My character selector mod has a GUI showing previews of the different characters: https://assets-mod.factorio.com/assets/310bd9c05ed7c9294c4eac5def7a8c5559b54ec7.png That worked OK because there were only a couple of new character prototypes to choose from. I knew that there would be some trouble ah...
by Pi-C
Fri Apr 01, 2022 9:34 am
Forum: Modding help
Topic: Dependencies again
Replies: 4
Views: 456

Re: Dependencies again

That's such a pity …
by Pi-C
Thu Mar 31, 2022 3:57 pm
Forum: Modding help
Topic: Dependencies again
Replies: 4
Views: 456

Re: Dependencies again

Bilka wrote:
Thu Mar 31, 2022 3:52 pm
Pi-C wrote:
Thu Mar 31, 2022 2:43 pm
I understand that "~ for a dependency that does not affect load order" means it doesn't matter what mod is loaded first, but both mods must be active. Is that correct?
Yes.
Thanks!
currently not an option.
Does that mean it will be in the future? :-D
by Pi-C
Thu Mar 31, 2022 2:43 pm
Forum: Modding help
Topic: Dependencies again
Replies: 4
Views: 456

Dependencies again

Quick question: Each dependency is a string that consists of up to three parts: "<prefix> internal-mod-name <equality-operator version>", for example "? some-mod-everyone-loves >= 4.2.0". The possible prefixes are: ! for incompatibility, ? for an optional dependency, (?) for a hi...
by Pi-C
Wed Mar 30, 2022 7:31 pm
Forum: Modding help
Topic: Change crafting time
Replies: 4
Views: 1144

Re: Change crafting time

How would you do this for a recipe that has no "energy required" field? Every recipe has energy_required, see here : energy_required Type: double Default: 0.5 Optional. The amount of time it takes to make this recipe. This is the number of seconds it takes to craft at crafting speed 1. If...
by Pi-C
Wed Mar 30, 2022 7:37 am
Forum: Modding help
Topic: Is there any way for the data stage to effect the settings stage?
Replies: 9
Views: 873

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

darkfrei wrote:
Wed Mar 30, 2022 7:19 am
My question was: Why we have data.raw? I mean, why not just data? And why not settings.raw or data.settings?

Code: Select all

for k, v in pairs(data) do
        log("k: "..k.."\tv: "..tostring(v))
end
will show:

Code: Select all

k: raw	v: table
k: is_demo	v: false
k: extend	v: function
by Pi-C
Tue Mar 29, 2022 3:43 pm
Forum: Modding interface requests
Topic: Requesting an event for when a cutscene ends
Replies: 5
Views: 633

Re: Requesting an event for when a cutscene ends

I would like to request an event called on_player_controller_changed or something similar. … My use case is that I want to know when another mod changes the controller. There already is on_player_toggled_map_editor but obviously mods use other controllers as well. Agreed, such an event could be use...
by Pi-C
Mon Mar 28, 2022 5:40 pm
Forum: Modding help
Topic: Why can't I use this structure in localised in settings??
Replies: 3
Views: 272

Re: Why can't I use this structure in localised in settings??

I want to build the description and the name used localised, but it doesn't work the same as for items and entities. --in settings.lua: … localised_name = { "" , { { "base.one" }, 1 }, { "base.hello" } }, … You've got the part with "base.one" wrong. Basically...

Go to advanced search