Page 1 of 1

Polish Godmode

Posted: Thu Jun 25, 2015 3:02 am
by Neonity
having to setup an entire infrastructure just so I can test a build is annoying, god mode should be spruced up and finished

little to no crafting times, if possible, infinite items, but this is almost just as good
little to no destruction/mining times, having to clear out trees is annoying
ability to clear everything, rocks are difficult to deal with in god mode as they cannot be shot because nothing can be equipped nor can they be removed like trees
ability to create veins of ore and oil, or even alien bases, for testing builds this can be helpful
since the thing about god mode is that you are actually "god" and you have no character and can move extremely fast, this means that you cannot test modular power armor setups or weapons, I think that you should have the ability to create and remove an "avatar" that can equip weapons and armor

these are most of the competent suggestions I had, but I'm sure more can be done to make god mode more user friendly

Re: Polish Godmode

Posted: Fri Jun 26, 2015 3:02 pm
by PiggyWhiskey
Neonity wrote:little to no crafting times, if possible, infinite items, but this is almost just as good

Code: Select all

/c game.player.force.manualcraftingspeedmodifier = 2
doubles the speed. Set it to 50 or something.
Neonity wrote:little to no destruction/mining times, having to clear out trees is annoying

Code: Select all

/c game.player.force.manualminingspeedmodifier = 2
Same as above, change to a high number.
Neonity wrote:ability to clear everything, rocks are difficult to deal with in god mode as they cannot be shot because nothing can be equipped nor can they be removed like trees
A little bit trickier,

Code: Select all

/c for _, entity in ipairs(game.findentitiesfiltered{
        area={{game.player.position.x-32, game.player.position.y-32},
            {game.player.position.x+32, game.player.position.y+32}},
            name="stone-rock"})
do
    entity.destroy()
end
You can change "stone-rock" to trees and other stuff to remove it.
Neonity wrote:ability to create veins of ore and oil, or even alien bases, for testing builds this can be helpful

Code: Select all

/c game.createentity{name = "iron-ore", position = {5, 4}}
Probably better with a collision check

Code: Select all

if (game.canplaceentity{name = "iron-ore", position = {5, 4}}) then
     game.createentity{name = "iron-ore", position = {5, 4}}
  end
Neonity wrote:since the thing about god mode is that you are actually "god" and you have no character and can move extremely fast, this means that you cannot test modular power armor setups or weapons, I think that you should have the ability to create and remove an "avatar" that can equip weapons and armor
Seems like a good idea, but very complicated to implement, especially to test. However you can create a character and jump in and out of it (They have separate inventories.)

Code: Select all

/c game.character = nil
Change to God Mode

If you don't have a player entity in the game yet,

Code: Select all

/c game.player.character = game.createentity{name="player", position=game.findnoncollidingposition("player", game.player.position, 10, 1), force=game.player.force}
If you have a player entity in the game, highlight it with your mouse and use:

Code: Select all

/c game.player.character = game.player.selected

And while these aren't the answers you're looking for, with knowledge of this, it could be simple to make a "GodMode" mod with buttons in the GUI to provide the scripts automatically.

Re: Polish Godmode

Posted: Fri Jun 26, 2015 3:46 pm
by ssilk
Well, the test-mode-mod seems to be orphaned, but I think, that would be the right place...

Re: Polish Godmode

Posted: Fri Jun 26, 2015 3:55 pm
by DerivePi
What about Lithuanian, Romanian or even Czech? :D

Re: Polish Godmode

Posted: Fri Jun 26, 2015 3:57 pm
by ssilk
Come on, is your type of humor that flat? ;)

Re: Polish Godmode

Posted: Fri Jun 26, 2015 5:24 pm
by DerivePi
ssilk wrote:Come on, is your type of humor that flat? ;)
What's the matter ssilk, Hungary for more?

Re: Polish Godmode

Posted: Sat Jun 27, 2015 3:54 am
by Neonity
If you have a player entity in the game, highlight it with your mouse and use:

Code: Select all

/c game.player.character = game.player.selected
the other ones delete your character, and create a character respectively but what does this one do?
also the code to re enter god mode is

Code: Select all

/c game.player.character = nil

Re: Polish Godmode

Posted: Sat Jun 27, 2015 7:25 am
by PiggyWhiskey

Code: Select all

/c game.player.character = nil
That exits the player (leaving the player in the world with it's inventory) and allows you to be "god"

Use the other one to "undo" that. i.e. take over the player left in the world.

Test them out :)

Re: Polish Godmode

Posted: Sat Jun 27, 2015 8:04 am
by Neonity
ah okay! :D yeah this is actually pretty interesting, and if I had advanced knowledge of Lua, I'd most definitely make my own mod for this stuff, thanks for the commands btw

Re: Polish Godmode

Posted: Sat Jun 27, 2015 8:36 am
by PiggyWhiskey
Not a problem. I found everything on the wiki. If you're not sure of what you're looking for it can be tricky to navigate, but googling usually takes you to the right location

Re: Polish Godmode

Posted: Sat Jun 27, 2015 8:53 am
by ssilk
DerivePi wrote: What's the matter ssilk, Hungary for more?
Yes. Today I would like Swedes... (This one is so flat, even Netherlands is not going below)