Release/Provide MOD IDE

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

User avatar
mojo2012
Inserter
Inserter
Posts: 25
Joined: Fri Apr 01, 2016 8:05 am
Contact:

Release/Provide MOD IDE

Post by mojo2012 »

Hi guys,

I've been playing aroud with moding for quite some time now. If you get the hang it's quite easy to create basic mods (like new recipes). But it's a very tedious process to find the bits and peaces to make more complex mods.
Most of the documentation (wiki, api docs) only provides minimal and sometimes outdated information.

Also it's very error-prone to develop lua script in a text editor.

My question for the DEV team is: Are you really developing this (the lua script part) in a text editor? If not, why not release those tools?

My wish: At least include some lua script debugging library, so we can use a lua script IDE and connect to the debugger to look into our mod's code.

The best thing would be a graphical mod builder, that allows us add new items/entites etc with a single click - also helping us with intellisense etc. Don't know which field on an entity belongs to what kind of entityTemplate? No problem, the IDE prefills that for you. You just have to fill in the actual data.

I think this would speed up the mod development a lot.

Also - because I was just thinking about it - provide a lot more events and hooks:
* Clicks on a surface (middle, left, right, long, double)
* key strokes (pressed, up, down, hold)
* allow to replace entity windows with a custom gui
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Release/Provide MOD IDE

Post by ssilk »

Hm.

What you suggest is a mod, that can create mods.

What you want is an IDE with LUA-support. I personally use PhpStorm, which has a very fine plugin for lua, which - when added the right includes - becomes quite comfortable. But I'm sure that is also possible with Eclipse etc.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
User avatar
mojo2012
Inserter
Inserter
Posts: 25
Joined: Fri Apr 01, 2016 8:05 am
Contact:

Re: Release/Provide MOD IDE

Post by mojo2012 »

Hi,

sorry if there was a misunderstanding. No I don't want a mod that creates mod - that makes no sense??

I want a tool, that creates mod for me and a tool (=IDE) that allows me to debug (debug as in real programming languages, like java) the code, that is currently running in factorio.

Let me explain the desired workflow:
I want to fire up the IDE, create new project (=Factorio mod). Right click, new recipe, fill in the details. Click save.
Start factorio, connect the debugger of my IDE, wait till the control.lua kicks in and BAMMM, my IDE stops at the "created player" event, allowing me to inspect variables, modify variable contents etc ...

Well PhPStorm might have nice syntax highlighting - but it surely won't supply the above, right?
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Release/Provide MOD IDE

Post by ssilk »

mojo2012 wrote:sorry if there was a misunderstanding. No I don't want a mod that creates mod - that makes no sense??
Sorry, it makes very much sense. :)
-> Start game. Open a saved game. Open GUI of mod. If you know the test-mode-mod then like so, but much, much bigger and more comfortable and with the described functionality.

Or think to mod-extension to the built-in map-editor.
Well PhPStorm might have nice syntax highlighting - but it surely won't supply the above, right?
It supplies start/stop and so on. And the problem is also, that Factorio has no Lua-Debugger built in, otherwise I think debugging would be possible. It is still a lot of tweaking needed to make that work.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
User avatar
jockeril
Filter Inserter
Filter Inserter
Posts: 375
Joined: Sun Feb 08, 2015 11:04 am
Contact:

Re: Release/Provide MOD IDE

Post by jockeril »

Ssilk, im interested in trying Phpstorm - can you provide the configuration files you use ?

Maybe a screen shot or two of the integration you made
ssilk wrote:
I personally use PhpStorm, which has a very fine plugin for lua, which - when added the right includes - becomes quite comfortable. But I'm sure that is also possible with Eclipse etc.
My mods

Formerly Hebrew translator for FARL & EvoGUI - two mods I highly recommend for anyone to check-out

join me on
- Twitter[@jockeril],
- Twitch.tv/jockeril,
- Youtube/jocker-il (or JoCKeR-iL)
- and steam !
Image
User avatar
Ranakastrasz
Smart Inserter
Smart Inserter
Posts: 2173
Joined: Thu Jun 12, 2014 3:05 am
Contact:

Re: Release/Provide MOD IDE

Post by Ranakastrasz »

If you are talking about a debugger for ingame usage, letting you follow the script and figure out what variables are set to what, that would be very useful.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
User avatar
mojo2012
Inserter
Inserter
Posts: 25
Joined: Fri Apr 01, 2016 8:05 am
Contact:

Re: Release/Provide MOD IDE

Post by mojo2012 »

To be honest I haven't tried the test-mode mod, but it seems more like a map building tool. it maybe about testing your mod, but it doesnt help me build one.

This mod you refer to would have to provide an entire IDE with prjoect support and all in a mod. It would also be fairly complicated to interact.

My idea currently is to build a java based framework, that provides syntax and logic checks and renders to mod/lua code.

the rest would be just the control.lua - when debugging kicks in again ;)
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Release/Provide MOD IDE

Post by ssilk »

jockeril wrote:Ssilk, im interested in trying Phpstorm - can you provide the configuration files you use ?
Well. That is quite simple till now I just added an include path
/Applications/factorio.app/Contents/data
to the include-paths.
Which looks then through all the provided libs etc. that Factorio will bring.

What would be quite useful would be abstract lua functions heads for each of Factorio functions, so that the IDE can built internal documentation. I don't see a big problem with that: If the can generate the provided doc-html folder, they can also generate lua-function headers, like

Code: Select all

file: LuaSurface.lua

...

---
-- Get the pollution for a given position.
--
-- @param position :: Position
-- @return double
-- @example
-- game.get_surface(1).get_pollution({1,2})
--
function get_pollution(position) {}
... so that when I click in my code on "get_pollution" I come to this function-head.

Maybe there are better methods; I'm not so used to lua, for php this is some kind of standard...

And that is in my opinion an own suggestion.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
User avatar
jockeril
Filter Inserter
Filter Inserter
Posts: 375
Joined: Sun Feb 08, 2015 11:04 am
Contact:

Re: Release/Provide MOD IDE

Post by jockeril »

ssilk wrote:
jockeril wrote:Ssilk, im interested in trying Phpstorm - can you provide the configuration files you use ?
Well. That is quite simple till now I just added an include path
/Applications/factorio.app/Contents/data
to the include-paths.
Which looks then through all the provided libs etc. that Factorio will bring.

What would be quite useful would be abstract lua functions heads for each of Factorio functions, so that the IDE can built internal documentation. I don't see a big problem with that: If the can generate the provided doc-html folder, they can also generate lua-function headers, like

Code: Select all

file: LuaSurface.lua

...

---
-- Get the pollution for a given position.
--
-- @param position :: Position
-- @return double
-- @example
-- game.get_surface(1).get_pollution({1,2})
--
function get_pollution(position) {}
... so that when I click in my code on "get_pollution" I come to this function-head.

Maybe there are better methods; I'm not so used to lua, for php this is some kind of standard...

And that is in my opinion an own suggestion.
Intresting. I might try it my eclipse setup
My mods

Formerly Hebrew translator for FARL & EvoGUI - two mods I highly recommend for anyone to check-out

join me on
- Twitter[@jockeril],
- Twitch.tv/jockeril,
- Youtube/jocker-il (or JoCKeR-iL)
- and steam !
Image
Post Reply

Return to “Ideas and Suggestions”