New Lua Commands?

Post all other topics which do not belong to any other category.
User avatar
Stickman
Inserter
Inserter
Posts: 40
Joined: Fri Jul 17, 2015 2:34 pm
Contact:

New Lua Commands?

Post by Stickman »

So, since 0.12 has some kind of change to command syntax, can we get the wiki updated?

There are a few commands that I'd like to play with but I don't know the new syntax to rework the old commands.

When I try the commands listed currently in the wiki, I get string errors like map doesn't contain 1 player, attempt to index field (a nil value), LuaGameScript doesn't contain key, etc.
I tried snorting coke once. The ice cubes got stuck up my nose.
ratchetfreak
Filter Inserter
Filter Inserter
Posts: 952
Joined: Sat May 23, 2015 12:10 pm
Contact:

Re: New Lua Commands?

Post by ratchetfreak »

Stickman wrote:So, since 0.12 has some kind of change to command syntax, can we get the wiki updated?

There are a few commands that I'd like to play with but I don't know the new syntax to rework the old commands.

When I try the commands listed currently in the wiki, I get string errors like map doesn't contain 1 player, attempt to index field (a nil value), LuaGameScript doesn't contain key, etc.
I did a quick pass over them; which ones don't work?
User avatar
Stickman
Inserter
Inserter
Posts: 40
Joined: Fri Jul 17, 2015 2:34 pm
Contact:

Re: New Lua Commands?

Post by Stickman »

All the ones I'm trying. I tried half a dozen of them and I get error messages with every single one.

Wasn't there a change to Lua syntax or something in that periods or dots in item names were changed to underscores or something?

Here's a screenshot of some of the commands I've tried and the failure messages.

http://i.imgur.com/WljqHOM.png
Last edited by Stickman on Thu Jul 23, 2015 12:00 am, edited 1 time in total.
I tried snorting coke once. The ice cubes got stuck up my nose.
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: New Lua Commands?

Post by ssilk »

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
Stickman
Inserter
Inserter
Posts: 40
Joined: Fri Jul 17, 2015 2:34 pm
Contact:

Re: New Lua Commands?

Post by Stickman »

ratchetfreak wrote:I did a quick pass over them; which ones don't work?
Okay, so the kill_all_units works instead of kill_all_enemies.

I'll try some of the other commands I was goofing around with in a bit.

Thanks :mrgreen:
I tried snorting coke once. The ice cubes got stuck up my nose.
ratchetfreak
Filter Inserter
Filter Inserter
Posts: 952
Joined: Sat May 23, 2015 12:10 pm
Contact:

Re: New Lua Commands?

Post by ratchetfreak »

Stickman wrote:All the ones I'm trying. I tried half a dozen of them and I get error messages with every single one.

Wasn't there a change to Lua syntax or something in that periods or dots in item names were changed to underscores or something?

Here's a screenshot of some of the commands I've tried and the failure messages.

http://i.imgur.com/WljqHOM.png
a word separator was added to the names. "peacefulmode" changed to "peaceful_mode". The dots stayed.

Some commands changed where they were like the killallenemies went to the force of enemies where you can kill all units of the force.
User avatar
Stickman
Inserter
Inserter
Posts: 40
Joined: Fri Jul 17, 2015 2:34 pm
Contact:

Re: New Lua Commands?

Post by Stickman »

Okay, so I tried "/c game.player.selected.amount=7500" over a pump jack and also over the oil patch after removing the pump jack, but I can't get the oil patch to go back to 100%. Is this one broken or am I doing something wrong? I put my cursor right over the item so that the yellow outline popped up.
I tried snorting coke once. The ice cubes got stuck up my nose.
User avatar
Stickman
Inserter
Inserter
Posts: 40
Joined: Fri Jul 17, 2015 2:34 pm
Contact:

Re: New Lua Commands?

Post by Stickman »

/c for n,t in pairs(game.player.force.technologies) do t.researched=t.enabled end

doesn't work either
I tried snorting coke once. The ice cubes got stuck up my nose.
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: New Lua Commands?

Post by ssilk »

Please can you continue in modding help? Thanks.

https://forums.factorio.com/forum/viewforum.php?f=25
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
Stickman
Inserter
Inserter
Posts: 40
Joined: Fri Jul 17, 2015 2:34 pm
Contact:

Re: New Lua Commands?

Post by Stickman »

ssilk wrote:Please can you continue in modding help? Thanks.

https://forums.factorio.com/forum/viewforum.php?f=25
I don't know what you're asking me to do.

I'm not in to modding, I just want to see how commands work and what you can do with them.

Do you want me to create a thread there? Can't you just move this well-established thread?
I tried snorting coke once. The ice cubes got stuck up my nose.
Post Reply

Return to “General discussion”