Jump to content

Batch console commands?


Recommended Posts

I'm guessing this is what you're looking for:

Go to: \Don't Starve Together\data\scripts

Open consolecommands.lua and add your function at the end of the file, such as:

function spawncombatgear()
    c_give("armorwood")
    c_give("spear")
    c_give("bandage")
end

While in game simply type spawncombatgear() in the console to spawn desired items.

Alternatively, you can add your function into customcommands.lua, saved in config folder (Documents/Klei/DoNotStarveTogether by default under Windows; next to log.txt and others). There you don't risk losing your changes when some future DST update overwrites consolecommands.lua.

25 minutes ago, SenL said:

Another question, how do you use c_maintainhealth(player, percent)?

I'd like to use this command on another player (not me the host).

It takes player parameter. The easiest is probably c_maintainhealth(AllPlayers[N], P), where N is that player's number - see http://dont-starve-game.wikia.com/wiki/Console/Don't_Starve_Together_Commands#Other_Player_Commands.

15 hours ago, V2C said:

Also, we added a new thing where you can put your custom commands into a seperate file:

\\Documents\Klei\DoNotStarveTogether\customcommands.lua

This way, it won't get overwritten by updates.

I'm constantly amazed at how awesome the klei devs are. You guys take extra time and effort doing things for the smallest group of people and that most people won't even be aware of. Thanks!

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...