Joined: Fri Jan 07, 2011 8:01 am Posts: 6211 Location: In your office, earning your salary.
Console Commands
To begin with, this mod will not be your average mod. This mod mostly focuses on the purposes of testing, debugging, or generally messing around. What does it do?
This mod basically consist of a series of functions that can be easily called through the Lua console. They are simple, intuitive and designed to be used by everyone. So...?
To put it in simple words, this mod is somewhat like "enabling cheat codes". There are multiple functions with different utilities, ranging from adding additional funds to your team, to spawning entire squads of armed soldiers.
Couldn't we already do this?
Exactly! And that was my main motivation. To begin with, how many times has it been asked if you can change the amount of gold your team starts with? Many, and before B30, changing it could be really complicated for casual players that just wanted their shooty fun or players that just couldn't get around to messing around with the activity files or didn't know any Lua.
One of the typical solutions was making them type
Code:
ActivityMan:GetActivity():SetTeamFunds(100000,0);
However, that's quite hard to remember, and not really direct for people that simply can't get around Lua.
Now, let's get into a worse case. Let's suppose that, for example, you want to test a weapon shooting on an actor, or test the actor's resistance to guns or bombs. Ordering them all the time takes time, sometimes the delivery can result in failure or your funds will eventually get depleted. Most people think "hey, let's spawn them through the console!". But, to their surprise, doing so is a rather complicated process. You have to create the actor, give it a position (fairly hard since knowing which position is which isn't simple), a team, if you want to give it a weapon you have to define it and equip it to it... It's around 10 lines, nothing too hard for a script, but certainly painful to write down on the console.
This mod, however, does all of it in a single call! Definately not a miracle, probably not the best and maybe limited, but it's a nice step to simplify things and make testing/debugging a less tedious process. That sounds pretty cool.
And it is! Over time, with the suggestions people will hopefuly post, contributions on how to make the code run in a more optimized way or any other sort of feedback, this mod will begin to grow, making it more complete and reliable.
Tips:
-Lua Console is opened using the ~ key on most keyboards. -While in the Console, you can press UP and DOWN arrow keys to navigate through the functions you have already called. -Calling a function omitting most or all arguments will set them to their default value. Default values are shown in the documented data and can be changed inside ConsoleCommands.lua file. -More to come
No images because of the nature of this mod. ReadMe and documents on functions included inside the mod.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum