[MOD 0.15.29+] Creative Mode 0.3.12 - Infinite resources

Topics and discussion about specific mods
User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1196
Joined: Wed May 18, 2016 4:55 pm
Contact:

Re: [MOD 0.14.13+] Creative Mode 0.2.0 - Epic update!!

Post by Mooncat »

aubergine18 wrote:Also, how to clear/reset alt-mode actions? Maybe allow clicking the labels in that section at the bottom to remove them?
Forgot to answer this. :P
The actions are cleared automatically when you open another modification dialog and perform any action. Yes, I will think about adding a remove button besides each stored action.
alfonsomatador wrote:EDIT: I found it. It's hidden in the one of the menus and is disabled by default. :/
If you choose "Yes with cheats" in the initial popup, the recipes will be automatically enabled. :mrgreen:

User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1196
Joined: Wed May 18, 2016 4:55 pm
Contact:

Re: [MOD 0.14.13+] Creative Mode 0.2.0 - Epic update!!

Post by Mooncat »

Found the cause of bug that Creator cannot create ore patches.
It was broken when I set conrete as the default selection.

If you need such feature urgently, please go to scripts/magic-wand-creator.lua:
1) find function magic_wand_creator.set_selected_tile_prototype(player, tile_prototype)

2) whenever you see these

Code: Select all

tile_name = nil
resource_name = nil
replace the nil by "", so they become

Code: Select all

tile_name = ""
resource_name = ""
3) repeat step 2 for function magic_wand_creator.set_selected_resource_prototype(player, resource_prototype)

I want to add some improvements in v0.2.1. It will be ready tmr. ;)
(No time for updating the OP yet)

User avatar
atlas1205
Inserter
Inserter
Posts: 30
Joined: Tue Oct 11, 2016 2:18 am
Contact:

Re: [MOD 0.14.13+] Creative Mode 0.2.0 - Epic update!!

Post by atlas1205 »

can barely wait for 0.21 and the ability to create ore patches :P

Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [MOD 0.14.13+] Creative Mode 0.2.0 - Epic update!!

Post by Choumiko »

When printing on_train_changed events i got an error:

Code: Select all

194.677 Error MainLoop.cpp:788: Exception at tick 77660: Error while running event on_train_changed_state (ID 23)
LuaTrain doesn't contain key type.
stack traceback:
	__creative-mode__/scripts/events.lua:458: in function <__creative-mode__/scripts/events.lua:457>
	(...tail calls...)
	__creative-mode__/scripts/events.lua:667: in function <__creative-mode__/scripts/events.lua:643>
The event only has train as an interesting parameter, i added an additional function for the event (and changed it in the param_message_look_up table):

Code: Select all

local function getStateKey(state)
  for key, id in pairs(defines.train_state) do
    if id == state then return key end
  end
end

local function get_train_param_message(log_prefix, param_name, param)
  local name = "CargoWagons"
  if #param.locomotives.front_movers > 0 then
    name = param.locomotives.front_movers[1].backer_name
  elseif #param.locomotives.back_movers > 0 then
    name = param.locomotives.back_movers[1].backer_name
  end
  return (log_prefix .. "\"" .. param_name .. "\" :: LuaTrain: {state = " .. getStateKey(param.state) .. " (" ..param.state .."), " .. "backer_name = \"" .. name .. "\"}")
end
Edit: An option to have the events being logged via log() would be nice, this writes to factorio-current.log and also adds a timestamp (plus it shows up in the terminal/console if Factorio is started there)

User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1196
Joined: Wed May 18, 2016 4:55 pm
Contact:

Re: [MOD 0.14.13+] Creative Mode 0.2.0 - Epic update!!

Post by Mooncat »

Choumiko wrote:When printing on_train_changed events i got an error:

Code: Select all

194.677 Error MainLoop.cpp:788: Exception at tick 77660: Error while running event on_train_changed_state (ID 23)
LuaTrain doesn't contain key type.
stack traceback:
	__creative-mode__/scripts/events.lua:458: in function <__creative-mode__/scripts/events.lua:457>
	(...tail calls...)
	__creative-mode__/scripts/events.lua:667: in function <__creative-mode__/scripts/events.lua:643>
The event only has train as an interesting parameter, i added an additional function for the event (and changed it in the param_message_look_up table):

Code: Select all

local function getStateKey(state)
  for key, id in pairs(defines.train_state) do
    if id == state then return key end
  end
end

local function get_train_param_message(log_prefix, param_name, param)
  local name = "CargoWagons"
  if #param.locomotives.front_movers > 0 then
    name = param.locomotives.front_movers[1].backer_name
  elseif #param.locomotives.back_movers > 0 then
    name = param.locomotives.back_movers[1].backer_name
  end
  return (log_prefix .. "\"" .. param_name .. "\" :: LuaTrain: {state = " .. getStateKey(param.state) .. " (" ..param.state .."), " .. "backer_name = \"" .. name .. "\"}")
end
Edit: An option to have the events being logged via log() would be nice, this writes to factorio-current.log and also adds a timestamp (plus it shows up in the terminal/console if Factorio is started there)
Just wanted to press the submit button and then saw this. So close. :lol:
Thanks for the report and fix, I will check on it. :D

About log(), I think I have checked it before implementing the event log and decided to not use it, but I forgot the reason. I will check it again for the next version. ;)

User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1196
Joined: Wed May 18, 2016 4:55 pm
Contact:

Re: [MOD 0.14.13+] Creative Mode 0.2.1 - Epic update!!

Post by Mooncat »

Done. Released v0.2.1 to the mod portal! :D
Originally it was just a hotfix, then I decided to add some improvements on the UX. Then, some more features, then more and more. :lol:
So, a little bit delayed, but more features than expected. :mrgreen:

And thanks Choumiko, you inspired me to add backer name to the entity event message. :D


User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1196
Joined: Wed May 18, 2016 4:55 pm
Contact:

Re: [MOD 0.14.13+] Creative Mode 0.2.1 - Epic update!!

Post by Mooncat »

atlas1205 wrote:Yaaaay ore patch creation works! NICE WORK.
Yeah~ it's great to hear that. :D

User avatar
atlas1205
Inserter
Inserter
Posts: 30
Joined: Tue Oct 11, 2016 2:18 am
Contact:

Re: [MOD 0.14.13+] Creative Mode 0.2.1 - Epic update!!

Post by atlas1205 »

Eh... but the ore patches it created are poor... especially the crude oil patches (yield 13%/0.6 unit/s with bob's MK5 pumpjack)
how can i increase the richness?

Suggestion: maybe you can add a slider to adjust the richness of created resource patches? I know it could be a lot of work, but definitely makes the mod shine brighter.

User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1196
Joined: Wed May 18, 2016 4:55 pm
Contact:

Re: [MOD 0.14.13+] Creative Mode 0.2.1 - Epic update!!

Post by Mooncat »

atlas1205 wrote:Eh... but the ore patches it created are poor... especially the crude oil patches (yield 13%/0.6 unit/s with bob's MK5 pumpjack)
how can i increase the richness?

Suggestion: maybe you can add a slider to adjust the richness of created resource patches? I know it could be a lot of work, but definitely makes the mod shine brighter.
Yes, I think it should be doable. I can just grab the slider from the Color Picker mod and paste to here. :lol:
But before that, please allow me to spend some time on updating the document first. :mrgreen:

Right now I am working on the wikia: http://factorio-creative-mode.wikia.com ... _Mode_Wiki
I am tied of managing the large post in this forum without having real time preview. :roll:
Furthermore, I can separate different topics into pages. It should be easier to read. ;)

User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: [MOD 0.14.13+] Creative Mode 0.2.1 - Epic update!!

Post by aubergine18 »

Have you ever considered using the github wiki - I've found it particularly productive for creating docs.
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.

User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1196
Joined: Wed May 18, 2016 4:55 pm
Contact:

Re: [MOD 0.14.13+] Creative Mode 0.2.1 - Epic update!!

Post by Mooncat »

aubergine18 wrote:Have you ever considered using the github wiki - I've found it particularly productive for creating docs.
One disadvantage about github is that it does not allow me to upload images to it. I have to upload to another website and copy-and-paste the image URL. Quite troublesome.
But wikia allows me to upload images to it directly.
While github wiki is good for programmers, because example code is usually more important than images, when delivering information about a game or a mod, I believe images are more important. That's why I used wikia.
For example, you can see the gifs and jpgs here: http://factorio-creative-mode.wikia.com ... enu/Cheats. I feel no hesitate to add more, because it is simple and quick. But I am not sure if it will be the same if I was using github. :mrgreen:

User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: [MOD 0.14.13+] Creative Mode 0.2.1 - Epic update!!

Post by aubergine18 »

You can upload images to github wiki - install github desktop (or use command line if preferred) then sync the wiki to local drive (git url shown in wiki sidebar), drop the images in, commit the changes back to wiki :)
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.

User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1196
Joined: Wed May 18, 2016 4:55 pm
Contact:

Re: [MOD 0.14.13+] Creative Mode 0.2.1 - Epic update!!

Post by Mooncat »

aubergine18 wrote:You can upload images to github wiki - install github desktop (or use command line if preferred) then sync the wiki to local drive (git url shown in wiki sidebar), drop the images in, commit the changes back to wiki :)
hm.. haven't used github desktop (using SourceTree instead). I will check about it tomorrow. Just finished the wiki about cheats, but I can still change it if github is really good. ;)

User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: [MOD 0.14.13+] Creative Mode 0.2.1 - Epic update!!

Post by aubergine18 »

I've not tried doing it with source tree - I tend to only use source tree when rebasing, etc.
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.

Zulan
Long Handed Inserter
Long Handed Inserter
Posts: 52
Joined: Mon Jan 25, 2016 5:55 pm
Contact:

Re: [MOD 0.14.13+] Creative Mode 0.2.1 - Epic update!!

Post by Zulan »

Just wanted to say thank you! The new version is awsome. Love it, so useful!

User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1196
Joined: Wed May 18, 2016 4:55 pm
Contact:

Re: [MOD 0.14.13+] Creative Mode 0.2.1 - Epic update!!

Post by Mooncat »

Zulan wrote:Just wanted to say thank you! The new version is awsome. Love it, so useful!
You're welcome! :D

UlyssesSword
Burner Inserter
Burner Inserter
Posts: 9
Joined: Fri Oct 21, 2016 3:34 am
Contact:

Re: [MOD 0.14.13+] Creative Mode 0.2.1 - Epic update!!

Post by UlyssesSword »

I found a bug when using the Magic Wand - Creator to place water (water, deep water, green water, or deep green water) onto some tiles (Dirt, dark dirt, sand, dark sand). It occasionally misses placing some of the water when "correct tiles" mode is selected.

User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1196
Joined: Wed May 18, 2016 4:55 pm
Contact:

Re: [MOD 0.14.13+] Creative Mode 0.2.1 - Epic update!!

Post by Mooncat »

UlyssesSword wrote:I found a bug when using the Magic Wand - Creator to place water (water, deep water, green water, or deep green water) onto some tiles (Dirt, dark dirt, sand, dark sand). It occasionally misses placing some of the water when "correct tiles" mode is selected.
Yes, I noticed that too. But I am not sure whether it is a bug or not, as I don't know the algorithm behind tile correction, because it is done by the game, not me. :)
I just know that it can correct the edges between tiles, making them blend nicely. Maybe it computed dirt cannot fit into those tiles so it just ignored them. :mrgreen:

User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: [MOD 0.14.13+] Creative Mode 0.2.1 - Epic update!!

Post by aubergine18 »

Tile correction, especially for water tiles adjacent to land tiles, is a bit unreliable as I found out while developing my bridges mod: viewtopic.php?f=25&t=34428

There's not much that can be done about it from a modding perspective, I found that regardless of tile correction state, some tile correction still occurs, and the results are often a bit weird.
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.

Post Reply

Return to “Mods”