[MOD 0.15.29+] Creative Mode 0.3.12 - Infinite resources

Topics and discussion about specific mods
Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: [MOD 0.14.4+] Creative Mode 0.1.5 - WIP Beta Test for 0.2.0

Post by Nexela »

Mooncat wrote:I wonder the error will force quit the game.
Depends on how the remote interface is coded would be my guess.

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

Re: [MOD 0.14.4+] Creative Mode 0.1.5 - WIP Beta Test for 0.2.0

Post by aubergine18 »

Oh wow, using the event printing tool I just found out that on_gui_click is triggered whenever any gui element (except flow) is clicked, not just buttons. <3 this mod!

For event categories, would it be better to use checkboxes rather than buttons - will take up less room and more clearly illustrate which categories are shown/hidden.
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.4+] Creative Mode 0.1.5 - WIP Beta Test for 0.2.0

Post by Mooncat »

aubergine18 wrote:Oh wow, using the event printing tool I just found out that on_gui_click is triggered whenever any gui element (except flow) is clicked, not just buttons. <3 this mod!

For event categories, would it be better to use checkboxes rather than buttons - will take up less room and more clearly illustrate which categories are shown/hidden.
haha, I was surprised too. All GUI elements that are visible to the player can trigger on_gui_click. :lol:

I didn't use checkboxes because the categories don't have just on or off state. Events are categorised based on all of their parameters. Each event may end up in multiple category. Like the on_player_alt_selected_area event, it has 5 parameters of different types. It is categorised in player events, position events, item events, entity events and tile events. Hiding any of these categories will also hide this event, and very likely make the other categories to become "partially shown". Checkbox cannot represent such state.

Other than that, I have actually thought about adding an event name search bar. But it will take time to implement, so I decided to do that after this version is released. :P

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

Re: [MOD 0.14.4+] Creative Mode 0.1.5 - WIP Beta Test for 0.2.0

Post by aubergine18 »

Is there something that could clear all decorations, entities, items, everything from the chunk I'm standing in and it's 8 adjacent chunks? I'm often tweaking collision/selection boxes of entities in my mod and just being able to quickly declutter the map would make life a little easier.
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.

Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: [MOD 0.14.4+] Creative Mode 0.1.5 - WIP Beta Test for 0.2.0

Post by Nexela »

OMG Matter Source "LOVE IT"!!!!!!!!! No more setting filters!!!!

aubergine18 wrote:Is there something that could clear all decorations, entities, items, everything from the chunk I'm standing in and it's 8 adjacent chunks? I'm often tweaking collision/selection boxes of entities in my mod and just being able to quickly declutter the map would make life a little easier.
This does a little more but also does what you want.
For items just add them to the table, if they exist they will be added to your inventory, if they don't then it won't error.
Drop this in your mod and require it, (also requires STDLIB for Events and Area)
quickstart.lua
(1.62 KiB) Downloaded 136 times
somewhere in your control:
QUICKSTART=true
if quickstart then require("quickstart") end

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

Re: [MOD 0.14.4+] Creative Mode 0.1.5 - WIP Beta Test for 0.2.0

Post by Mooncat »

Nexela wrote:OMG Matter Source "LOVE IT"!!!!!!!!! No more setting filters!!!!
You found it! :lol:

To test recipe in assembling machine....
Before: place the machine, place item sources, for each item source - set filters to generate ingredients, also place fluid sources if any fluid is needed, for each fluid source - set recipe to generate fluid
Now: place the machine, place a matter source, get some popcorn 8-)

I may also add an option to Matter Void later, to make it only works on output inventory. (Maybe after I can find a way to determine which fluidbox is output.)

To remove things, please wait for the magic wands. The creator magic wand will be able to remove everything, including doodads, within the selected area. ;)
Select mode = create tiles or ores
Alt-select mode = remove things
Like Klonan's The Lab, with more options.

Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: [MOD 0.14.4+] Creative Mode 0.1.5 - WIP Beta Test for 0.2.0

Post by Nexela »

Here is one to add too your gui_on_click events_viewer to print out the complete path and type all they way to the root

Code: Select all

function print_path_and_type(event)
    local player=game.players[event.player_index]
    local element=event.element
        local gui_name_string = ""
        local last_element_name = ""  --luacheck: ignore
        local gui_parent_string = ""

        repeat
            if gui_name_string == "" then
                gui_name_string = element.name .."(" ..element.type.. ")"
            else
                gui_name_string = element.name .."(" ..element.type.. ")".."/".. gui_name_string
            end
            last_element_name = element.name
            element=element.parent
        until (not element.valid or element.parent == nil)

        if player.gui.top.children_names and table.in_list(player.gui.top.children_names, last_element_name) then
                gui_parent_string="top"
        elseif player.gui.left.children_names and table.in_list(player.gui.left.children_names, last_element_name) then
                gui_parent_string="left"
        elseif player.gui.center.children_names and table.in_list(player.gui.center.children_names, last_element_name) then
                gui_parent_string="center"
        end
        gui_name_string = gui_parent_string .."/".. gui_name_string
        player.print(gui_name_string)
end

Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: [MOD 0.14.4+] Creative Mode 0.1.5 - WIP Beta Test for 0.2.0

Post by Nexela »

Mooncat wrote:I may also add an option to Matter Void later, to make it only works on output inventory. (Maybe after I can find a way to determine which fluidbox is output.)
I was banging my head on wall recently. I had a a item source and and item void hooked up to an assembly machine and it took me a good few minutes to figure out why it wasn't loading stuff

Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: [MOD 0.14.4+] Creative Mode 0.1.5 - WIP Beta Test for 0.2.0

Post by Nexela »

Request Fancy boiler where you can set the temp of the output ;)

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

Re: [MOD 0.14.4+] Creative Mode 0.1.5 - WIP Beta Test for 0.2.0

Post by Mooncat »

Nexela wrote:Request Fancy boiler where you can set the temp of the output ;)
Sure!

canidae
Long Handed Inserter
Long Handed Inserter
Posts: 72
Joined: Thu Feb 18, 2016 6:24 pm
Contact:

Re: [MOD 0.14.4+] Creative Mode 0.1.5 - WIP Beta Test for 0.2.0

Post by canidae »

Sorry if this already is mentioned somewhere. Busy with my own modding, so I'll just dump this here and let you sort it out, Mooncat :)

Code: Select all

Error while running event on_gui_click (ID 1)
User isn't connected; can't read character
stack traceback:
	__creative-mode__/scripts/cheats.lua:194: in function 'increase_or_reset_character_reach'
	__creative-mode__/scripts/gui.lua:389: in function <__creative-mode__/scripts/gui.lua:342>
I got this error after loading an old multiplayer save (from 0.13.something), and enabling CM with the remote call in the console.
Let me know if you need the save (it's 23MB).

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

Re: [MOD 0.14.4+] Creative Mode 0.1.5 - WIP Beta Test for 0.2.0

Post by Mooncat »

canidae wrote:Sorry if this already is mentioned somewhere. Busy with my own modding, so I'll just dump this here and let you sort it out, Mooncat :)

Code: Select all

Error while running event on_gui_click (ID 1)
User isn't connected; can't read character
stack traceback:
	__creative-mode__/scripts/cheats.lua:194: in function 'increase_or_reset_character_reach'
	__creative-mode__/scripts/gui.lua:389: in function <__creative-mode__/scripts/gui.lua:342>
I got this error after loading an old multiplayer save (from 0.13.something), and enabling CM with the remote call in the console.
Let me know if you need the save (it's 23MB).
Thanks for the report.
Based on this line:

Code: Select all

User isn't connected; can't read character
I think I have already known the reason.

For a quick fix, please go to cheats.lua, inside the whole cheats.personal_cheats_data, whenever you find a checking of player.character, like

Code: Select all

if player.character then
please add the checking of player.connected to the front, so it will be

Code: Select all

if player.connected and player.character then
Tell me if the error still exists. :)

canidae
Long Handed Inserter
Long Handed Inserter
Posts: 72
Joined: Thu Feb 18, 2016 6:24 pm
Contact:

Re: [MOD 0.14.4+] Creative Mode 0.1.5 - WIP Beta Test for 0.2.0

Post by canidae »

Mooncat wrote:For a quick fix, please go to cheats.lua, inside the whole cheats.personal_cheats_data, whenever you find a checking of player.character, like

Code: Select all

if player.character then
please add the checking of player.connected to the front, so it will be

Code: Select all

if player.connected and player.character then
Tell me if the error still exists. :)
So if the error no longer exists after I changed that code I shouldn't tell you? :)
Checking if the player is connected first did do the trick though, no more errors :)

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

Re: [MOD 0.14.4+] Creative Mode 0.1.5 - WIP Beta Test for 0.2.0

Post by Mooncat »

canidae wrote:
Mooncat wrote:For a quick fix, please go to cheats.lua, inside the whole cheats.personal_cheats_data, whenever you find a checking of player.character, like

Code: Select all

if player.character then
please add the checking of player.connected to the front, so it will be

Code: Select all

if player.connected and player.character then
Tell me if the error still exists. :)
So if the error no longer exists after I changed that code I shouldn't tell you? :)
Checking if the player is connected first did do the trick though, no more errors :)
haha, if it still exists, I will need your save. :lol:
Thanks.

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

Re: [MOD 0.14.4+] Creative Mode 0.1.5 - WIP Beta Test for 0.2.0

Post by Mooncat »

Mooncat wrote:
Nexela wrote:Request Fancy boiler where you can set the temp of the output ;)
Sure!
Sadly, boiler cannot be copy-and-pasted. You will have to manually set the temp of each boiler. :?
Can't think of a better way to handle that.


Edit: just implemented all build options, having fun with the team option
I have wanted to do this since long long time ago

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

Re: [MOD 0.14.4+] Creative Mode 0.1.5 - WIP Beta Test for 0.2.0

Post by aubergine18 »

Modding > Events

Would be nice to have grid of following options at bottom of Categories panel (default checkbox states shown):

Code: Select all

[x] print() events  | [x] Include event properties
[ ] log() events    |     [ ] ...only in log file
For example: It would allow me to send verbose details (with event properties) to log file whilst showing brief details (just event name) in console.
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.4+] Creative Mode 0.1.5 - WIP Beta Test for 0.2.0

Post by Mooncat »

aubergine18 wrote:Modding > Events

Would be nice to have grid of following options at bottom of Categories panel (default checkbox states shown):

Code: Select all

[x] print() events  | [x] Include event properties
[ ] log() events    |     [ ] ...only in log file
For example: It would allow me to send verbose details (with event properties) to log file whilst showing brief details (just event name) in console.
ah... log to file!
I have seen this in Test Mode, but decided to add that later because I worried about the UI.
Now I am more experienced with it. 8-) I guess it won't need much time to do.

Instead of [ ] ...only in log file , I think I will just make it to be something like:
[x] print events - [x] show properties
[ ] log events - [x] show properties

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

Re: [MOD 0.14.4+] Creative Mode 0.1.5 - WIP Beta Test for 0.2.0

Post by aubergine18 »

Not sure if this bug persists in the very latest beta (I was running the version from some days ago) but I placed a car and got this:
img
I've since updated to the very latest beta so will let you know if it happens again.
Last edited by aubergine18 on Sun Oct 09, 2016 3:29 am, edited 1 time in total.
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
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: [MOD 0.14.4+] Creative Mode 0.1.5 - WIP Beta Test for 0.2.0

Post by aubergine18 »

Image

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

Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: [MOD 0.14.4+] Creative Mode 0.1.5 - WIP Beta Test for 0.2.0

Post by Nexela »

aubergine18 wrote:Image

wat?
Quite possibly a brain-to-keyboard typo on an "all your base are belong to us" scale

@Mooncat, I am thinking you want

Code: Select all

Immediately get anything you request from your personal logistic slots

Post Reply

Return to “Mods”