Page 1 of 1

Usefull commands for Map-tests

Posted: Sun Jan 31, 2016 12:37 am
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

Re: Usefull commands for Map-tests

Posted: Tue Mar 01, 2016 5:30 am
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}

Re: Usefull commands for Map-tests

Posted: Tue Mar 01, 2016 8:58 pm
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

Re: Usefull commands for Map-tests

Posted: Fri Jun 03, 2016 5:37 pm
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 :))

Re: Usefull commands for Map-tests

Posted: Sat Aug 13, 2016 10:24 pm
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! :)

Re: Usefull commands for Map-tests

Posted: Sun Aug 14, 2016 12:37 am
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.

Re: Usefull commands for Map-tests

Posted: Tue Aug 16, 2016 11:20 pm
by Ohz
Thank you I will edit later !

Re: Usefull commands for Map-tests

Posted: Thu Aug 18, 2016 9:23 pm
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}})

Re: Usefull commands for Map-tests

Posted: Sun Oct 30, 2016 12:07 am
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

Re: Usefull commands for Map-tests

Posted: Fri Dec 15, 2017 1:10 am
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

Re: Usefull commands for Map-tests

Posted: Fri Dec 15, 2017 8:26 am
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)

Re: Usefull commands for Map-tests

Posted: Wed Dec 27, 2017 10:41 am
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