Search found 281 matches

by justarandomgeek
Sat Aug 01, 2020 2:07 pm
Forum: Modding interface requests
Topic: Localization for error()
Replies: 3
Views: 151

Re: Localization for error()

error(LocalisedString) already works as far as i know, it was a part of my old hack for translating things in the debugger before localised_print!

Edit: just tested, apparently it's only translated in control, wonder how i never noticed that!
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: 120

[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: 6
Views: 184

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: 6
Views: 184

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: 6
Views: 184

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: 6
Views: 184

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: 201

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: 2014

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 the error d...
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: 201

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, which should a...
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: 336

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: 1469

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: 1469

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: Modding interface requests
Topic: Remove the ability to load bytecode through load()
Replies: 17
Views: 610

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: Modding interface requests
Topic: Remove the ability to load bytecode through load()
Replies: 17
Views: 610

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: 397

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: 7858

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: 7858

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: 7858

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: 9499

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: 9499

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...

Go to advanced search