Usefull commands for Map-tests

Replaces resource spawning system, so that the distances between resources are much bigger. Railway is needed then.

Moderators: orzelek, Dark

Post Reply
User avatar
Ohz
Fast Inserter
Fast Inserter
Posts: 188
Joined: Tue Feb 03, 2015 11:40 am
Contact:

Usefull commands for Map-tests

Post by Ohz »

Hi,

Usefull and easy copy/past players command to generate your map while you're tinkering with RSO settings.
Most of you know them, but people like me that don't have a clue about commands/coding/searching on forum/wiki/reddit and stopped playing since a year wants to come back and have a shortcut to basic commands.

- Edited for 0.14 - Thanks Deadly-Bagel and Nexela

- Reveal 1024px around you:

Code: Select all

/c game.forces.player.chart(game.player.surface, {lefttop = {x = -1024, y = -1024}, rightbottom = {x = 1024, y = 1024}})
- Reveal 2048px around you:

Code: Select all

/c game.forces.player.chart(game.player.surface, {lefttop = {x = -2048, y = -2048}, rightbottom = {x = 2048, y = 2048}})
- Change the speed tick:

Code: Select all

/c game.speed=10

Hopefully I helped you.
Thanks for this awesome mod <3
Last edited by Ohz on Sun Sep 11, 2016 9:03 pm, edited 3 times in total.
I'm not english, sorry for my mistakes

Kane
Filter Inserter
Filter Inserter
Posts: 666
Joined: Fri Sep 05, 2014 7:34 pm
Contact:

Re: Usefull commands for Map-tests

Post by Kane »

Great to see these here. Been using these for a couple of years to get a decent setup.

I also suggest these:

Great to move around freely around the map (it kills you):

Code: Select all

/c game.local_player.character = nil
This one is great if you have Yarm in the combination of the above command to get a good idea how much ore is in a vein if your adjust numbers.

Code: Select all

/c game.players[1].insert{name="resource-monitor",count=1}

orzelek
Smart Inserter
Smart Inserter
Posts: 3911
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: Usefull commands for Map-tests

Post by orzelek »

One addition to above - changing of player to nil won't kill you - you switch to a godmode controller.

You can go back to normal mode again like this after mouse overing on your character that should be standing patiently where you left it:

Code: Select all

/c game.local_player.character = game.local_player.selected

eray
Burner Inserter
Burner Inserter
Posts: 7
Joined: Tue May 24, 2016 5:06 pm
Contact:

Re: Usefull commands for Map-tests

Post by eray »

orzelek wrote:One addition to above - changing of player to nil won't kill you - you switch to a godmode controller.

You can go back to normal mode again like this after mouse overing on your character that should be standing patiently where you left it:

Code: Select all

/c game.local_player.character = game.local_player.selected
Won't works if you player is inside a tank :))

ariades
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sat Aug 13, 2016 10:17 pm
Contact:

Re: Usefull commands for Map-tests

Post by ariades »

This would have been excellent for checking how my RSO worlds turn out, without having to turn on god mode and speed up the game time to be able to run around like the Flash.

However, I keep getting the following error message:

Code: Select all

 Cannot execute command. Error: LuaGameScript doesn't contain key local_player.stack traceback: [string "game.local_player.force.chart(game.local_play..."]:1: in main chunk 
Please do explain this to me as to an idiot. Downloaded RSO today, and it is the only reason I ever started messing around with the Factorio console, so I have absolutely no idea about what I'm doing.

Thanks in advance! :)

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

Re: Usefull commands for Map-tests

Post by Nexela »

local_player has been removed, use game.player.whatever_your_doing


edit: I think I fell asleep at the keyboard on this one fixed it up to be more understandable.
Last edited by Nexela on Wed Aug 17, 2016 1:39 am, edited 1 time in total.

User avatar
Ohz
Fast Inserter
Fast Inserter
Posts: 188
Joined: Tue Feb 03, 2015 11:40 am
Contact:

Re: Usefull commands for Map-tests

Post by Ohz »

Thank you I will edit later !
I'm not english, sorry for my mistakes

User avatar
Deadly-Bagel
Smart Inserter
Smart Inserter
Posts: 1498
Joined: Wed Jul 13, 2016 10:12 am
Contact:

Re: Usefull commands for Map-tests

Post by Deadly-Bagel »

Commands in OP no longer work, use the below for single player games:

1024 blocks:

Code: Select all

/c game.forces.player.chart(game.player.surface, {lefttop = {x = -1024, y = -1024}, rightbottom = {x = 1024, y = 1024}})
2048 blocks:

Code: Select all

/c game.forces.player.chart(game.player.surface, {lefttop = {x = -2048, y = -2048}, rightbottom = {x = 2048, y = 2048}})
Money might be the root of all evil, but ignorance is the heart.

onebit
Long Handed Inserter
Long Handed Inserter
Posts: 97
Joined: Mon Feb 02, 2015 4:32 pm
Contact:

Re: Usefull commands for Map-tests

Post by onebit »

Code: Select all

/c game.forces.player.chart(game.player.surface, {lefttop = {x = -2048, y = -2048}, rightbottom = {x = 2048, y = 2048}})
/c game.speed=10
/c game.player.character = nil

User avatar
morsk
Fast Inserter
Fast Inserter
Posts: 120
Joined: Fri Dec 15, 2017 1:00 am
Contact:

Re: Usefull commands for Map-tests

Post by morsk »

(I realize the thread is 1+ years old, but it still shows up on Google. I'm still using this thread in Dec 2017.)
I like to add a line to make the map always bright:

Code: Select all

/c game.forces.player.chart(game.player.surface, {lefttop = {x = -2048, y = -2048}, rightbottom = {x = 2048, y = 2048}})
/c game.speed=10
/c game.player.character = nil
/c game.player.surface.always_day=true
And you can use Lua syntax to cram it all into one line. Good when trying several maps in a row:

Code: Select all

/c game.forces.player.chart(game.player.surface, {lefttop = {x = -2048, y = -2048}, rightbottom = {x = 2048, y = 2048}}); game.speed=10; game.player.character = nil; game.player.surface.always_day=true

orzelek
Smart Inserter
Smart Inserter
Posts: 3911
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: Usefull commands for Map-tests

Post by orzelek »

If you have RSO then the whole map charting and speed change/god mode is under this command:

Code: Select all

/c remote.call("RSO", "runTest", 2000, 2000)

FlockeB
Manual Inserter
Manual Inserter
Posts: 1
Joined: Mon Dec 18, 2017 8:48 pm
Contact:

Re: Usefull commands for Map-tests

Post by FlockeB »

Reveals map 1k AROUND the current player position. Not some silly starting-position code that's not adjustable at all .

/c local radius=1000
game.player.force.chart(game.player.surface, {{game.player.position.x-radius, game.player.position.y-radius}, {game.player.position.x+radius, game.player.position.y+radius}})

Edit: This is also in the wiki.factorio as i learned now xD

Post Reply

Return to “Resource Spawner Overhaul”