SenL Posted January 23, 2016 Share Posted January 23, 2016 Is there a way to specify a batch console command (but not using mod with GLOBAL.CHEATS_ENABLED = true)? For example: Hit ` Type in "spawncombatgear" And it would automatically do c_spawn("armorwood"); c_spawn("spear"); c_spawn("bandage"); Thanks. Link to comment https://forums.kleientertainment.com/forums/topic/63122-batch-console-commands/ Share on other sites More sharing options...
ailailou Posted January 23, 2016 Share Posted January 23, 2016 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. Link to comment https://forums.kleientertainment.com/forums/topic/63122-batch-console-commands/#findComment-712991 Share on other sites More sharing options...
SenL Posted January 23, 2016 Author Share Posted January 23, 2016 Thanks, will try! Link to comment https://forums.kleientertainment.com/forums/topic/63122-batch-console-commands/#findComment-713018 Share on other sites More sharing options...
Muche Posted January 23, 2016 Share Posted January 23, 2016 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. Link to comment https://forums.kleientertainment.com/forums/topic/63122-batch-console-commands/#findComment-713038 Share on other sites More sharing options...
Developer V2C Posted January 23, 2016 Developer Share Posted January 23, 2016 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. Link to comment https://forums.kleientertainment.com/forums/topic/63122-batch-console-commands/#findComment-713041 Share on other sites More sharing options...
SenL Posted January 24, 2016 Author Share Posted January 24, 2016 Thanks V2C and Muche. Another question, how do you use c_maintainhealth(player, percent)? I'd like to use this command on another player (not me the host). Link to comment https://forums.kleientertainment.com/forums/topic/63122-batch-console-commands/#findComment-713197 Share on other sites More sharing options...
Muche Posted January 24, 2016 Share Posted January 24, 2016 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. Link to comment https://forums.kleientertainment.com/forums/topic/63122-batch-console-commands/#findComment-713210 Share on other sites More sharing options...
SenL Posted January 24, 2016 Author Share Posted January 24, 2016 Ah ok. Many thanks. Link to comment https://forums.kleientertainment.com/forums/topic/63122-batch-console-commands/#findComment-713227 Share on other sites More sharing options...
Arcita Posted January 24, 2016 Share Posted January 24, 2016 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! Link to comment https://forums.kleientertainment.com/forums/topic/63122-batch-console-commands/#findComment-713304 Share on other sites More sharing options...
Recommended Posts
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.