Search found 260 matches: replace game.on_load() with script.on_load()

Searched query: replace game on load| with script on load|

ignored: on on

by bobingabout
Wed Jan 22, 2020 10:44 pm
Forum: Bob's mods
Topic: [0.18.x] Bob's Mods: General Discussion
Replies: 149
Views: 53704

Re: [0.18.x] Bob's Mods: General Discussion

... material processing 4 and Oil refinery 4 research. Added Electrolyser 5 with stats of old Electrlyser 4, but with 600 health. Changed Electrolyser ... to bodies Classes 0.18.2: Added raise_built = true in the function that replaces your character entity when you choose a class. Moved the class ...
by PyroFire
Thu Dec 19, 2019 9:32 am
Forum: Modding discussion
Topic: Breaking change/fix: script.raise_event rework - opinions wanted
Replies: 88
Views: 22214

Re: Breaking change/fix: script.raise_event rework - opinions wanted

... has permission to un-raise the event. It's almost like you're posting without actually reading the thread or informing yourself of what's being ... If I have a non-valid entity do I let the event go forward? Should I replace it with nil and continue the event functions? One may want to act ...
by Honktown
Thu Dec 19, 2019 1:48 am
Forum: Modding discussion
Topic: Breaking change/fix: script.raise_event rework - opinions wanted
Replies: 88
Views: 22214

Re: Breaking change/fix: script.raise_event rework - opinions wanted

... If I have a non-valid entity do I let the event go forward? Should I replace it with nil and continue the event functions? One may want to act on a nil situation or non-valid ...
by mrvn
Thu Nov 28, 2019 3:56 pm
Forum: Modding discussion
Topic: Breaking change/fix: script.raise_event rework - opinions wanted
Replies: 88
Views: 22214

Re: Breaking change/fix: script.raise_event rework - opinions wanted

... game.delete_surface. It's how we get from 144 down to about 30 to start with. [\quote] And I was talking of the few remaining events that i quoted. ... I like the original proposal to basically remove script.raise_event and replace it with a few simple changes/additions which could make up any ...
by PyroFire
Thu Nov 28, 2019 1:37 pm
Forum: Modding discussion
Topic: Breaking change/fix: script.raise_event rework - opinions wanted
Replies: 88
Views: 22214

Re: Breaking change/fix: script.raise_event rework - opinions wanted

... game.delete_surface. It's how we get from 144 down to about 30 to start with. Any action taking by scripts that would normally raise an event when ... I like the original proposal to basically remove script.raise_event and replace it with a few simple changes/additions which could make up any lost ...
by PyroFire
Tue Nov 26, 2019 11:59 am
Forum: Modding discussion
Topic: Breaking change/fix: script.raise_event rework - opinions wanted
Replies: 88
Views: 22214

Re: Breaking change/fix: script.raise_event rework - opinions wanted

With the Lua event filters coming out in the next experimental version of the game (2~ hours ... behavior. What about 3. Keep raise_event but validate its parameters for game events. 4. Replace raise_event for game events with an equivalent function that validates all parameters. ...
by Cobaltur
Sun Nov 17, 2019 9:53 pm
Forum: Modding help
Topic: How to match blueprint entities to actual entities?
Replies: 8
Views: 2225

Re: How to match blueprint entities to actual entities?

... a combinator to store the functional behavior I integrated it with minor so it can even reuse even more easily. It looks nice. Here are ... deprecated items in chests and in blueprints -- sp this script will replace them by on demand local migratedEntity = Migration.migrateEntity(event.created_entity) ...
by Bilka
Tue Nov 12, 2019 11:09 am
Forum: Modding discussion
Topic: Breaking change/fix: script.raise_event rework - opinions wanted
Replies: 88
Views: 22214

Re: Breaking change/fix: script.raise_event rework - opinions wanted

... mod developer suffer from poorly written mods that call game events with wrong data. 2. Remove raise_event for game events so mod developers ... 3. Keep raise_event but validate its parameters for game events. 4. Replace raise_event for game events with an equivalent function that validates ...
by 8mobius8
Sat Nov 09, 2019 4:33 am
Forum: Modding help
Topic: How do GUIs events for custom/no-core entities work?
Replies: 6
Views: 1116

Re: How do GUIs events for custom/no-core entities work?

... consuming = "game-only" } data:extend{mouse_click} -- Should replace with custom entity instead of copying data.raw local transmitter = table.deepcopy(data.raw["constant-combinator"]["constant-combinator"]) ...
by eradicator
Fri Oct 25, 2019 3:59 pm
Forum: Modding help
Topic: Creating Assembly machine with integrated Electric pole
Replies: 32
Views: 6800

Re: Creating Assembly machine with integrated Electric pole

... and p.selected.name == 'superwhateverassemblyfurnace' and p.cursor_stack.valid_for_read and p.cursor_stack.name == 'whateverpole' then --replace furnace --consume cursor stack --etcpp end end)
by mrvn
Tue Oct 08, 2019 11:49 am
Forum: Mods
Topic: [MOD] Deadlock's Stacking Beltboxes & Compact Loaders
Replies: 741
Views: 213182

Re: [MOD 0.17] Deadlock's Stacking Beltboxes & Compact Loaders

... provide to mod developers who want a quick path to make stacked icons without fiddling pixel-by-pixel in an image editor (and possibly support ... nothing like the unstacked icon. Now you need another compat mod to replace the stacked icons to make it look right again.
by Lindor
Sat Oct 05, 2019 6:12 am
Forum: Modding help
Topic: [Solved] various themes: comparing tables, general code quirks, blueprint modding and how not to behave as modder(sorry)
Replies: 22
Views: 3113

Re: How to get a logistic chests items being fetched?

... a problem i can't solve in a few hours. In case anybody wants to know without downloading the mod, this is my final code for version 0.1.0: --setting ... "logistic-chest-overflow-provider"}} or {} end) --fast replace a chest with another and delete the old one from global.chests We ...
by Lindor
Wed Oct 02, 2019 9:41 pm
Forum: Modding help
Topic: [Solved] various themes: comparing tables, general code quirks, blueprint modding and how not to behave as modder(sorry)
Replies: 22
Views: 3113

Re: really annoying bug

... for all mods coming after yours (@Bilka opinion/knowledge regarding the event.mapping when the BP is overwritten by stack.create_blueprint?). With the new event.mapping you don't even need to swap the chests, you can just fetch the data from your global table. I really hoped to be able to ...
by Lindor
Wed Oct 02, 2019 5:12 pm
Forum: Modding help
Topic: [Solved] various themes: comparing tables, general code quirks, blueprint modding and how not to behave as modder(sorry)
Replies: 22
Views: 3113

Re: really annoying bug

... I wanted to trigger the old batch vibes xd The moment i wrote it down i knew you would complain. I have no clue what you're trying to count there with the repeat loop, but that thing will always count to 1800 and then "goto stop". Exactly. I give the player 30 sec to confirm the blueprint. ...
by Lindor
Tue Oct 01, 2019 4:24 pm
Forum: Modding help
Topic: [Solved] various themes: comparing tables, general code quirks, blueprint modding and how not to behave as modder(sorry)
Replies: 22
Views: 3113

Re: really annoying bug

... you don't want me to. Why are you filling the first table element with an empty table just to override it during the next loop? If you need ... way to see how many keys i need to get to the final value. The fast replace works great. It's probably not even worth defining a whole function ...
by Lindor
Tue Oct 01, 2019 2:18 am
Forum: Modding help
Topic: [Solved] various themes: comparing tables, general code quirks, blueprint modding and how not to behave as modder(sorry)
Replies: 22
Views: 3113

Re: really annoying bug

... mode via API i solve the problem by creating two different entities with the same ingame name and replacing each other depending on their inventory ... "logistic-chest-overflow-provider"}} end) --replace a chest with another and keep the inventory. It's a lot bette than ...
by eradicator
Mon Sep 30, 2019 5:53 pm
Forum: Modding help
Topic: [Solved] various themes: comparing tables, general code quirks, blueprint modding and how not to behave as modder(sorry)
Replies: 22
Views: 3113

Re: really annoying bug

... chest. Also your method will destroy all additional properties of transferred items (i.e. half used science packs, damaged walls, modular armor with equipment inside, etcpp). You should use LuaItemStack.transfer_stack() instead. If the target inventory is not guaranteed to have the same or more ...
by Lindor
Sun Sep 29, 2019 5:43 am
Forum: Modding help
Topic: [Solved] various themes: comparing tables, general code quirks, blueprint modding and how not to behave as modder(sorry)
Replies: 22
Views: 3113

[Solved] various themes: comparing tables, general code quirks, blueprint modding and how not to behave as modder(sorry)

... I think you get the idea. How else am i supposed to lets say replace a requester chest with a buffer chest if i can't save the request slots in the script? Do i really have to create ...
by bobingabout
Sat Jul 13, 2019 12:59 pm
Forum: Bob's mods
Topic: [0.17] Please post bugs and balance issues here.
Replies: 495
Views: 135136

Re: [0.17] Please post bugs and balance issues here.

I'm having an issue trying to blueprint and paste a vanilla blueprint with all the bob's mods installed. When the blueprint is pasted with the ... migrations script (that deletes the entity ghost upon being placed and replaces it with a bob's version, however doing it this way loses wire connections ...
by slippycheeze
Tue Jul 09, 2019 10:52 am
Forum: Mods
Topic: [MOD 0.16.x] NiceFill
Replies: 68
Views: 26464

Re: [MOD 0.16.x] NiceFill

... it. Quick check: I am 99.9 percent sure from the code this’ll work with mods that add extra surfaces. Is that correct? (eg: Space Exploration ... just in case of the 0.1 % where water is still forced NF will no longer replace water with water, like when a mod places water that is not called ...

Go to advanced search