Search found 53 matches

by asdff45
Thu Nov 19, 2020 4:28 pm
Forum: Modding help
Topic: __core__/lualib docs
Replies: 1
Views: 122

Re: __core__/lualib docs

The only thing i know of, are the original files on github: https://github.com/wube/factorio-data/
Directory is /core/lualib: https://github.com/wube/factorio-data/t ... ore/lualib
by asdff45
Thu Nov 05, 2020 12:46 am
Forum: Resolved Problems and Bugs
Topic: [wheybags] Version 1.0.0 not tagged on github.
Replies: 1
Views: 976

[wheybags] Version 1.0.0 not tagged on github.

I'm unsure where to put it, so i'm posting it here. Just move it, whereever it should be. Version 1.0.0 is not tagged in the github factorio data repository (https://github.com/wube/factorio-data). It has a commit for it, but no release, so please also create a release for it, so we can directly dow...
by asdff45
Tue Aug 18, 2020 10:05 pm
Forum: Modding help
Topic: How to get current surface and all entities with some name?
Replies: 42
Views: 907

Re: How to get current surface and all entities with some name?

It depends, on when you want to call that function.
Here is the list of all available events: https://lua-api.factorio.com/latest/events.html

For further help, please provide, what you want to achive and when you want to run that code.
by asdff45
Fri Aug 14, 2020 2:06 pm
Forum: Releases
Topic: Version 1.0.0
Replies: 127
Views: 58708

Re: Version 1.0.0

perfect, then i have nothing to do xD
Going back to other projects :)

Thanks for that quick answer and lets all celebrate the release :D
by asdff45
Fri Aug 14, 2020 2:01 pm
Forum: Releases
Topic: Version 1.0.0
Replies: 127
Views: 58708

Re: Version 1.0.0

One simple question: Are mods automatically compatible, if they where marked for 0.18?
I wanted to adjust my mods, so they are compatible with v1.0, but it seems like they will be loaded automatically...
by asdff45
Thu Jun 25, 2020 12:38 am
Forum: Modding help
Topic: scenario scripts and areas
Replies: 3
Views: 164

Re: scenario scripts and areas

As far as i understand it: An scenario is an advanced mod. For scripts, to run, you have to create a control.lua file and in there you can program whatever you want to do. Wikipage about Scenarios: https://wiki.factorio.com/Scenario_system The `control.lua` Events, your interested in: Startup script...
by asdff45
Fri May 29, 2020 12:56 am
Forum: Modding help
Topic: incompatibility setting info.json
Replies: 5
Views: 233

Re: incompatibility setting info.json

You use `! creative-mod >= 1.4.1` to mark the incompatible with creative-mod. This means, every creative-mod that has a higher version than 1.4.1 is incompatible. You have creative-mod 1.4.0 installed, so it is compatible. Completely agree. That is exactly my point: Why is it marked incompatible? S...
by asdff45
Thu May 28, 2020 7:45 pm
Forum: Modding help
Topic: incompatibility setting info.json
Replies: 5
Views: 233

Re: incompatibility setting info.json

You use `! creative-mod >= 1.4.1` to mark the incompatible with creative-mod. This means, every creative-mod that has a higher version than 1.4.1 is incompatible. You have creative-mod 1.4.0 installed, so it is compatible. If you want to be completely incompatible with every creative-mod, just write...
by asdff45
Sun Apr 26, 2020 11:12 pm
Forum: Modding help
Topic: Solved: Regular expression help
Replies: 12
Views: 658

Re: Regular expression help

I just noticed, that LUA has no full RegEx implementation and both mine and Oktokolo's are not working. So i created one within the LUA playground: `^(.+)%-_%-.+`, this returns the same, as the first one in my last post: prefix = string.match(name, "^(.+)%-_%-.+") hover-car-0-_-driver => hover-car-0...
by asdff45
Sun Apr 26, 2020 7:39 pm
Forum: Modding help
Topic: Solved: Regular expression help
Replies: 12
Views: 658

Re: Regular expression help

So, `.+?(?=-_)` would match everything until `-_`, so it will return hover-car-0-_-driver => hover-car-0 Dodge-Challenger-0-_-driver => Dodge-Challenger-0 Hauling-Truck-0-_-drive => Hauling-Truck-0 hcraft-entity-0-_-driver => hcraft-entity-0 car-vehicle-machine-gun-_-driver => car-vehicle-machine-gu...
by asdff45
Fri Apr 24, 2020 10:16 pm
Forum: Modding help
Topic: Solved: Regular expression help
Replies: 12
Views: 658

Re: Regular expression help

If you want to ignore the rest after the `-`, then `^[^-]+` is a way to do it. item_name = string.match("item-_-ghost", "^[^-]+") log(tostring(item_name)) item_name = string.match("item-0-_-driver", "^[^-]+") log(tostring(item_name)) This will print out `item` in both cases. To clarify how it works:...
by asdff45
Sun Apr 05, 2020 4:02 pm
Forum: Modding interface requests
Topic: Readd extra_padding_when_activated, with same functionality as margin/padding
Replies: 0
Views: 122

Readd extra_padding_when_activated, with same functionality as margin/padding

In version 9.18.13, the option `LuaStyle::extra_padding_when_activated` got removed. It would be great, if this gets readded, with the same functionality as LuaStyle::margin/LuaStyle::padding. padding :: int or array of int [Write-only] Sets top/right/bottom/left paddings to this value. An array wit...
by asdff45
Fri Mar 06, 2020 1:38 am
Forum: Releases
Topic: Version 0.18.10
Replies: 16
Views: 10086

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 asdff45
Fri Mar 06, 2020 12:17 am
Forum: Releases
Topic: Version 0.18.10
Replies: 16
Views: 10086

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 asdff45
Thu Mar 05, 2020 11:38 pm
Forum: Releases
Topic: Version 0.18.10
Replies: 16
Views: 10086

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 :)
by asdff45
Thu Feb 27, 2020 11:39 pm
Forum: Development-Tools
Topic: Code Completion for jetbrains IDEs
Replies: 5
Views: 1284

Re: Code Completion for jetbrains IDEs

These fixes where released a while ago, but i forgot to post it here :)
Update 1.2.2:
Fixed:
  • endless "Download Factorio LuaApi" on startup
  • download of lualib and core prototypes failed
by asdff45
Fri Jan 31, 2020 12:12 am
Forum: Modding help
Topic: What's wrong with my attempt to overwrite the attack sound?
Replies: 2
Views: 209

Re: What's wrong with my attempt to overwrite the attack sound?

You are trying to create a new prototype with data:extend. What you want to do, is override it. That is possible, by editing the data.raw table. https://wiki.factorio.com/Data.raw So, in your case: data.raw["utility-sounds"].default.alert_destroyed = { filename = "__CustomAttackSound__/sound/alert-d...
by asdff45
Thu Jan 30, 2020 1:16 pm
Forum: Modding help
Topic: Detect a click on inventory screen (before craft)
Replies: 10
Views: 575

Re: Detect a click on inventory screen (before craft)

I'm not sure, but the event `on_gui_click` could help.

But when you only want to disable handcrafting, you can type `/permissions` in the chat, to open the permissions tab and there you can remove the checkbox on "Craft" to disable Handcrafting.
by asdff45
Wed Jan 29, 2020 1:41 pm
Forum: Modding help
Topic: [SOLVED]unexpected symbol near '='
Replies: 6
Views: 333

Re: unexpected symbol near '='

data:extend() expects a table of tables of Prototypes: `data:extend({prot1, prot2}). In Lua you can use `{` instead of `(` to create a table as first parameter, so `data:extend{ }` equals `data:extend({ })`. In your case, you use `data:extend(prot)`, which is not correct. You can use: data:extend( {...
by asdff45
Mon Jan 20, 2020 2:45 pm
Forum: Development-Tools
Topic: Code Completion for jetbrains IDEs
Replies: 5
Views: 1284

Re: Code Completion for jetbrains IDEs

Update 1.2.1:
Fixed:
  • Added missing log() and table_size() functions
  • Defines-Table is now available again (was defined local)
  • functions and variables inside base/core Prototype definitions are not shown in auto-completion anymore.

Go to advanced search