Data Realms Fan Forums
http://45.55.195.193/

Console Commands
http://45.55.195.193/viewtopic.php?f=61&t=45689
Page 1 of 1

Author:  Asklar [ Sat May 10, 2014 5:51 am ]
Post subject:  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:




No images because of the nature of this mod.
ReadMe and documents on functions included inside the mod.

Download:
Attachment:
ConsoleCommands.rte.rar [4.03 KiB]
Downloaded 796 times

Current functions:


Author:  haloman [ Sat May 10, 2014 7:18 am ]
Post subject:  Re: Console Commands

Hmmm it's hard to understand but I get how u work it

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/