Search found 300 matches

by justarandomgeek
Thu Jul 30, 2020 4:47 pm
Forum: Resolved Problems and Bugs
Topic: [0.18.38] LuaInventory.insert() broken on full blueprint-book
Replies: 1
Views: 1541

[0.18.38] LuaInventory.insert() broken on full blueprint-book

/c game.player.cursor_stack.set_stack('blueprint-book') game.player.cursor_stack.get_inventory(defines.inventory.item_main).insert('blueprint') produces an empty book, rather than the expected book with one print. Inserting does appear to work when there is already a print in the book and there are...
by justarandomgeek
Wed Jul 29, 2020 12:24 pm
Forum: Mod portal Discussion
Topic: Mod Portal Upload API Docs (for VSCode Extension)
Replies: 7
Views: 3419

Re: Mod Portal Upload API Docs (for VSCode Extension)

minor update: the captcha now seems to not appear on at least the first attempt so if your creds are good tools work again!
by justarandomgeek
Fri Jul 24, 2020 1:29 pm
Forum: Mod portal Discussion
Topic: Mod Portal Upload API Docs (for VSCode Extension)
Replies: 7
Views: 3419

Re: Mod Portal Upload API Docs (for VSCode Extension)

Another update seems to have added a captcha, totally thwarting my attempts to have automated uploading tools. Please can i have a real upload api?
by justarandomgeek
Sat Jun 27, 2020 5:46 pm
Forum: Mod portal Discussion
Topic: Mod Portal Upload API Docs (for VSCode Extension)
Replies: 7
Views: 3419

Re: Mod Portal Upload API Docs (for VSCode Extension)

For anyone else updating tools: the new login process is picky about the referer header on the submitted login form too, in addition to the form content (including csrf token of course)

The upload itself appears to work as-is.
by justarandomgeek
Sat Jun 27, 2020 5:02 pm
Forum: Mod portal Discussion
Topic: Mod Portal Upload API Docs (for VSCode Extension)
Replies: 7
Views: 3419

Mod Portal Upload API Docs (for VSCode Extension)

I've just noticed the portal update broke my mod uploader (in the vscode mod debugger extension ), and thought I might as well ask for some real docs/support this time before i start reverse engineering again to update it! Is there (or can there be) a documented API way to get logged in for uploadin...
by justarandomgeek
Sat Jun 27, 2020 2:09 pm
Forum: Resolved Problems and Bugs
Topic: [0.18.32] Crash to desktop when resuming autosave under debugger.
Replies: 4
Views: 1361

Re: [0.18.32] Crash to desktop when resuming autosave under debugger.

Minor follow up now that this is in resolved: We've changed the way the debugger `log()` hook works to no longer allow constructing this crash with the latest factorio(0.18.34) and debugger(0.18.25) when both are updated (if either is old it'll still use the old way).
by justarandomgeek
Fri Jun 26, 2020 9:48 pm
Forum: Modding discussion
Topic: Fixing data stage spam
Replies: 39
Views: 10238

Re: Fixing data stage spam

Is this a horrible idea, now that we can run Factorio under a debugger? =) if mods['debugadapter'] then log("Creating " .. new_item_name) end Actually, would it be possible to do something like have a `debug_log` function that only gets turned on when Factorio has failed to load, and on t...
by justarandomgeek
Wed Jun 24, 2020 6:18 pm
Forum: Resolved Problems and Bugs
Topic: [0.18.32] Crash to desktop when resuming autosave under debugger.
Replies: 4
Views: 1361

Re: [0.18.32] Crash to desktop when resuming autosave under debugger.

I'll dig into this more shortly, but yes, it is almost certainly caused by the debugger doing a little bit of evil to convert log() calls to debug console events with clickable links to source. You can disable this functionality for now by setting "hookLog": false in your launch.json, whic...
by justarandomgeek
Thu Jun 18, 2020 4:30 pm
Forum: Resolved Problems and Bugs
Topic: [0.18.32] Crash iterating through all chunks: "LuaHelper::pushTilePosition"
Replies: 2
Views: 2102

Re: [0.18.32] Crash iterating through all chunks: "LuaHelper::pushTilePosition"

I also looked into this a little and it seems to me that what is happening is that when the InfiniteRectangleIterator is being re-initialized for a new call to iterator(), it sometimes takes a path that leaves ->position on it null, but does *not* set the ended status, which later leads to that null...
by justarandomgeek
Sun May 10, 2020 4:48 pm
Forum: Modding discussion
Topic: Re-opened: breaking change/fix: script.raise_event rework
Replies: 26
Views: 7980

Re: Re-opened: breaking change/fix: script.raise_event rework

A more useful list would be how many mods use only script_raised vs how many still raise on_x. Most of the ones using script_raised_ don't do anything else, so it does indeed look like it's a before/after split and just old mods not fully updated to raise the new events. Within the ones using scrip...
by justarandomgeek
Fri May 08, 2020 6:19 pm
Forum: Modding discussion
Topic: Re-opened: breaking change/fix: script.raise_event rework
Replies: 26
Views: 7980

Re: Re-opened: breaking change/fix: script.raise_event rework

If I've understood correctly, the proposal has basically evolved into "raise_event can only be used for script_raised_* and custom mod events", which sounds pretty good to me.
by justarandomgeek
Mon Apr 20, 2020 7:44 pm
Forum: Won't implement
Topic: Remove the ability to load bytecode through load()
Replies: 17
Views: 4866

Re: Remove the ability to load bytecode through load()

I also happen to be spending a lot of time in the VM's guts along the way, so I'm looking for other unchecked assumptions that need testing as I go too, but most of the ones I've found so far are pretty boring (posila mentioned a few of the ones that seemed interesting and got some work). We also lu...
by justarandomgeek
Mon Apr 20, 2020 7:02 pm
Forum: Won't implement
Topic: Remove the ability to load bytecode through load()
Replies: 17
Views: 4866

Re: Remove the ability to load bytecode through load()

Aaron, the problem with restricting to bytecode produced internally is that i'm currently working on a project that is essentially a standalone compiler for a slightly extended language (things like ?. and += and type annotations in source rather than comments) that will ideally compile to lua52/fac...
by justarandomgeek
Wed Apr 01, 2020 10:53 pm
Forum: Resolved Problems and Bugs
Topic: [0.18.17] Crash when accessing LuaPlayer.entity_copy_source while player is dead
Replies: 3
Views: 2534

Re: [0.18.17] Crash using "--instrument-mod" "debugadapter" in specific use case

After some digging, this same crash is also reproduced by `/c game.print(game.player.entity_copy_source.valid)` while the current player is dead, even without my debugger attached, so it looks like this is a base game bug that I simply revealed by attempting to access every possible property. A more...
by justarandomgeek
Thu Mar 12, 2020 7:53 pm
Forum: News
Topic: Friday Facts #337 - Statistics GUI and Mod Debugger
Replies: 74
Views: 29294

Re: Friday Facts #337 - Statistics GUI and Mod Debugger

...a special mode which allows a selected mod to hook all the Lua instances Factorio creates, at the cost of disabling multiplayer and only allowing one Instrument at once. doesn't mean ONE mod? One mod that's doing the instrumentation, not one mod that's being instrumented. Yes, exactly - one mod ...
by justarandomgeek
Mon Mar 09, 2020 9:35 pm
Forum: News
Topic: Friday Facts #337 - Statistics GUI and Mod Debugger
Replies: 74
Views: 29294

Re: Friday Facts #337 - Statistics GUI and Mod Debugger

vedrit wrote:
Sun Mar 08, 2020 9:43 pm
Gergely wrote:
Fri Mar 06, 2020 4:29 pm
What if we need to... you know... test if things are multiplayer safe?
Or if you're testing a mod that requires another mod? Like an add-on to Bob's or Angels
Then you enable those mods too? the *debugger* is the one running in instrument mode.
by justarandomgeek
Fri Mar 06, 2020 4:32 pm
Forum: News
Topic: Friday Facts #337 - Statistics GUI and Mod Debugger
Replies: 74
Views: 29294

Re: Friday Facts #337 - Statistics GUI and Mod Debugger

What if we need to... you know... test if things are multiplayer safe? Then you turn off the debugger for a while. For the most part if you write correct code in the first place it just is mp-safe. I'm hoping to add some static analysis tools eventually to detect many kinds of mp-unsafeness in adva...
by justarandomgeek
Fri Mar 06, 2020 12:25 am
Forum: Releases
Topic: Version 0.18.10
Replies: 16
Views: 15762

Re: Version 0.18.10

Since we know have access to `debug` with `--instrument-mod`. Can we also get access to change `package.cpath` and `package.path`, it would make creating a remote debugger so much more simple :) we've had access to `debug` all along it turns out, Instrument Mode is a whole other set of super-powers...
by justarandomgeek
Thu Mar 05, 2020 11:40 pm
Forum: Releases
Topic: Version 0.18.10
Replies: 16
Views: 15762

Re: Version 0.18.10

Since we know have access to `debug` with `--instrument-mod`. Can we also get access to change `package.cpath` and `package.path`, it would make creating a remote debugger so much more simple :) we've had access to `debug` all along it turns out, Instrument Mode is a whole other set of super-powers...
by justarandomgeek
Tue Mar 03, 2020 2:43 pm
Forum: Releases
Topic: Version 0.18.10
Replies: 16
Views: 15762

Re: Version 0.18.10

kid2407 wrote:
Tue Mar 03, 2020 2:38 pm
Added Instrument Mode to support mod development tools.
I want more details on this, please.
You can find more info in the doc page for it. It was added to support my mod debugger, but I also planned for it to be used by other tools.

Go to advanced search