Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - boodals 2

Pages: [1] 2 3
1
Modification Help / [Resource] Simple Task Manager
« on: May 28, 2015, 01:45:26 PM »
A simple task manager that was built into the original TGE FPS kit. I recreated it because I figured it would be really useful to have around. I recreated it from the documentation, and tested it using the given examples (and also a bunch of other tests).

As documented here on pages 367 to 377.

In short, lets you queue up functions to be called in a specified order, with optional delays.

Code: [Select]
////Simple Task Manager
//As documented http://www-rohan.sdsu.edu/~stewart/GPGT/Appendix%20A%20-%20Quick%20References.pdf
// on pages 367 to 377

function newTaskManager(%target) {
%mgr = new ScriptGroup() {
class = SimpleTaskMgr;

target = isObject(%target) ? %target.getID() : 0;
useTarget = isObject(%target);
selfExecution = 0;
defaultTaskDelay = -1; //Defaults to instant
useDefaultDelay = 0;
};

return %mgr;
}

function SimpleTaskMgr::setTarget(%mgr, %target) {
%mgr.target = isObject(%target) ? %target.getID() : 0;
%mgr.useTarget = isObject(%target);
}
function SimpleTaskMgr::clearTarget(%mgr) {
%mgr.target = 0;
%mgr.useTarget = 0;
}
function SimpleTaskMgr::getTarget(%mgr) {
return %mgr.useTarget ? (isObject(%mgr.target) ? %mgr.target : 0) : 0;
}
function SimpleTaskMgr::setDefaultTaskDelay(%mgr, %delay) {
%mgr.defaultTaskDelay = %delay;
}

function SimpleTaskMgr::selfExecuteTasks(%mgr, %useDefaultDelay) {
%mgr.selfExecution = 1;
if(%useDefaultDelay !$= "") {
%mgr.useDefaultDelay = %useDefaultDelay ? 1 : 0;
}

if(%mgr.getCount() <= 0)
return;

%task = %mgr.getObject(0);
if(!isEventPending(%mgr.tickSch)) {
%time = %mgr.useDefaultDelay ? %mgr.defaultTaskDelay : %task.delay;
if(%time == -1) {
%mgr.executeNextTask(); //Instant execution
} else {
%mgr.tickSch = %mgr.schedule(%time, executeNextTask);
}
}
}
function SimpleTaskMgr::stopSelfExecution(%mgr) {
//Doesnt cancel the next function call
//Stops after the next function execution

%mgr.selfExecution = 0;
}


function SimpleTaskMgr::addTask(%mgr, %task, %recycleCount, %preempt, %taskDelay) {
%recycleCount = mFloor(%recycleCount); //Convert to int, just incase
if(%recycleCount == 0) //0 recycles (or left blank) executes once
%recycleCount = 1;
if(%taskDelay $= "") //Undefined time executes instantly
%taskDelay = -1;

%taskObj = new ScriptObject() {
class = EGTask; //I have no idea why its EGTask, just following the documentation

task = %task;
recycleCount = %recycleCount;
preempt = %preempt;
delay = %taskDelay;
};
%mgr.add(%taskObj);

if(%mgr.selfExecution && !isEventPending(%mgr.tickSch)) {
//Start the schedule again
%firstTask = %mgr.getObject(0);
if(!isEventPending(%mgr.tickSch)) {
%time = %mgr.useDefaultDelay ? %mgr.defaultTaskDelay : %firstTask.delay;
if(%time == -1) {
%mgr.executeNextTask(); //Instant execution
} else {
%mgr.tickSch = %mgr.schedule(%time, executeNextTask);
}
}
}

return %taskObj;
}
function SimpleTaskMgr::addTaskFront(%mgr, %task, %recycleCount, %preempt, %taskDelay) {
%task = %mgr.addTask(%task, %recycleCount, %preempt, %taskDelay); //Slightly less efficient, however less code duplication

%mgr.bringToFront(%task);

return %task;
}
function SimpleTaskMgr::clearTasks(%mgr) {
//Delete all tasks
while(%mgr.getCount() > 0) {
%mgr.getObject(0).delete();
}
}

function SimpleTaskMgr::executeNextTask(%mgr) {
if(%mgr.getCount() <= 0)
return "";

%task = %mgr.getObject(0);
%result = %task.execute();

if(!isObject(%mgr)) //If the manager was deleted during execution (eg with TERMINATE# token)
return "";

//If the LOCK# token is in the task, dont store the return value for current task
if(strPos(%task.task, "LOCK#") == -1)
%mgr.lastReturnVal = %result;

if(%task.recycleCount == -1 || %task.recycleCount-- > 0) {
if(%task.preempt) {
//Dont push to back, leave at front
} else {
%mgr.pushToBack(%task);
}
} else {
%mgr.pushToBack(%task); //This is to make sure the set keeps its order
%task.delete();
}

if(%mgr.selfExecution && %mgr.getCount() > 0) {
//Start the schedule for the next execution
%task = %mgr.getObject(0);

if(!isEventPending(%mgr.tickSch)) {
%time = %mgr.useDefaultDelay ? %mgr.defaultTaskDelay : %task.delay;
if(%time == -1) {
%mgr.executeNextTask(); //Instant execution
} else {
%mgr.tickSch = %mgr.schedule(%time, executeNextTask);
}
}
}

return %result;
}


function EGTask::execute(%task) {
%mgr = %task.getGroup();

%eval = %task.task;

//LOCK# is handled in SimpleTaskMgr::executeNextTask, but we still need to remove it
%eval = strReplace(%eval, "LOCK#", "");
%eval = strReplace(%eval, "LASTRET#", %task.getGroup() @ ".lastReturnVal"); //Replace with last return value
%eval = strReplace(%eval, "TASKMGR#", %task.getGroup()); //Replace with %mgr
%eval = strReplace(%eval, "TASK#", %task.getID()); //Replace with task.getID();

%eval = strReplace(%eval, "%this", %mgr.getID()); //Allows for "func(%this.val)"

switch$(%eval) {
case "TERMINATE#": //Delete mgr
%mgr.delete();
//echo("Terminate");
return "";
case "NULL#": //Empty task, used for delays
//echo("Null");
return "";
default:
//Need to use eval (unfortunately) to keep to documentation
if(%mgr.useTarget && strPos(%eval, "STMT#") == -1) {
if(isObject(%target = %mgr.target)) {
%result = eval(%mgr.target @ "." @ %eval);
//echo("eval(\"" @ %mgr.target @ "." @ %eval @ "\");");
}
} else {
//Execute as a stand alone function, not a method
%result = eval(strReplace(%eval, "STMT#", ""));
//echo("eval(\"" @ strReplace(%eval, "STMT#", "") @ "\");");
}

return %result;
}

}

function EGTask::setTaskDelay(%task, %delay) {
%task.delay = %delay;
}
task = %task;
recycleCount = %recycleCount;
preempt = %preempt;
delay = %taskDelay;
};
%mgr.add(%task);

if(%mgr.selfExecution && !isEventPending(%mgr.tickSch)) {
//Start the schedule again
%firstTask = %mgr.getObject(0);
if(!isEventPending(%mgr.tickSch)) {
%time = %mgr.useDefaultDelay ? %mgr.defaultTaskDelay : %firstTask.delay;
if(%time == -1) {
%mgr.executeNextTask(); //Instant execution
} else {
%mgr.tickSch = %mgr.schedule(%time, executeNextTask);
}
}
}

return %task;
}
function SimpleTaskMgr::addTaskFront(%mgr, %task, %recycleCount, %preempt, %taskDelay) {
%task = %mgr.addTask(%task, %recycleCount, %preempt, %taskDelay); //Slightly less efficient, however less code duplication

%mgr.bringToFront(%task);

return %task;
}
function SimpleTaskMgr::clearTasks(%mgr) {
//Delete all tasks
while(%mgr.getCount() > 0) {
%mgr.getObject(0).delete();
}
}

function SimpleTaskMgr::executeNextTask(%mgr) {
if(%mgr.getCount() <= 0)
return "";

%task = %mgr.getObject(0);
%result = %task.execute();

//If the LOCK# token is in the task, dont store the return value for current task
if(strPos(%task.task, "LOCK#") == -1)
%mgr.lastReturnVal = %result;

if(%task.recycleCount == -1 || %task.recycleCount-- > 0) {
if(%task.preempt) {
//Dont push to back, leave at front
} else {
%mgr.pushToBack(%task);
}
} else {
%mgr.pushToBack(%task); //This is to make sure the set keeps its order
%task.delete();
}

if(%mgr.selfExecution && %mgr.getCount() > 0) {
//Start the schedule for the next execution
%task = %mgr.getObject(0);

if(!isEventPending(%mgr.tickSch)) {
%time = %mgr.useDefaultDelay ? %mgr.defaultTaskDelay : %task.delay;
if(%time == -1) {
%mgr.executeNextTask(); //Instant execution
} else {
%mgr.tickSch = %mgr.schedule(%time, executeNextTask);
}
}
}

return %result;
}


function EGTask::execute(%task) {
%mgr = %task.getGroup();

//LOCK# is handled in SimpleTaskMgr::executeNextTask
%task.task = strReplace(%task.task, "LASTRET#", %task.getGroup() @ ".lastReturnVal;"); //Replace with last return value
%task.task = strReplace(%task.task, "TASKMGR#", %task.getGroup()); //Replace with %mgr
%task.task = strReplace(%task.task, "TASK#", %task.getID()); //Replace with task.getID();

%task.task = strReplace(%task.task, "%this.", %mgr.getID() @ "."); //Allows for "func(%this.val)"

switch$(%task.task) {
case "TERMINATE#": //Delete mgr
%mgr.delete();
return "";
case "NULL#": //Empty task, used for delays
return "";
default:
//Need to use eval (unfortunately) to keep to documentation
if(%mgr.useTarget && strPos(%task.task, "STMT#") == -1) {
if(isObject(%target = %mgr.target)) {
%result = eval(%mgr.target @ "." @ %task.task);
//echo("eval(\"" @ %mgr.target @ "." @ %task.task @ "\");");
}
} else {
//Execute as a stand alone function, not a method
%result = eval(strReplace(%task.task, "STMT#", ""));
//echo("eval(\"" @ strReplace(%task.task, "STMT#", "") @ "\");");
}

return %result;
}

}

function EGTask::setTaskDelay(%task, %delay) {
%task.delay = %delay;
}

2
Modification Help / [Resource] Advanced Vector Math
« on: November 17, 2014, 07:06:25 PM »
These are some vector functions I've built up over time. I find myself sharing them frequently, so I'm just gonna put them here. They require the stickied euler/axis conversion functions.


"Basic" vector manipulation
Code: [Select]
function vectorLerp(%init, %end, %t) {
return vectorAdd(%init, vectorScale(vectorSub(%end, %init), %t));
}

function vectorSlerp(%init, %end, %t) { //Thanks wikipedia! Returns spherical interpolation of two vectors
%ang = vectorAngleBetween(%init, %end);
//vecA * (sin((1-t)*a)/sin(a)) + vecB * (sin(t*a)/sin(a))
return vectorAdd(vectorScale(%init, mSin((1-%t) * %ang) / mSin(%ang)), vectorScale(%end, mSin(%t * %ang) / mSin(%ang)));
}

function vectorAngleBetween(%vec1, %vec2) { //Returns the angle between two vectors in radians
return mACos(vectorDot(%vec1, %vec2)/(vectorLen(%vec1) * vectorLen(%vec2)));
}

function vectorComponent(%vec1, %vec2) { //Returns the component of vec1 in the direction of vec2. This is a float.
return vectorDot(%vec1, vectorNormalize(%vec2));
}

function vectorProjection(%vec1, %vec2) { //Returns the vector projection, similar to component, but this is a vector
return vectorScale(vectorNormalize(%vec2), vectorComponent(%vec1, %vec2));
}

function vectorRejection(%vec1, %vec2) { //Returns the vector rejection of vec1 from vec2, this is another vector
return vectorSub(%vec1, vectorProjection(%vec1, %vec2));
}



Just a useful vector function ill throw in free of charge
Code: [Select]
function vectorFloatLength(%vec, %float) {
return mFloatLength(getWord(%vec, 0), %float) SPC mFloatLength(getWord(%vec, 1), %float) SPC mFloatLength(getWord(%vec, 2), %float);
}


Angle conversion, use along side Trader's eulerToAxis/axisToEuler
Code: [Select]
function eulerToVector(%ang) {
if(getWordCount(%ang) == 2) //Support for giving pitch and yaw, but not roll.
%ang = getWord(%ang, 0) SPC 0 SPC getWord(%ang, 1);

%yaw = mDegToRad(getWord(%ang, 2));
%pitch = mDegToRad(getWord(%ang, 0));
%x = mSin(%yaw) * mCos(%pitch) * 1;
%y = mCos(%yaw) * mCos(%pitch);
%z = mSin(%pitch);

return %x SPC %y SPC %z;
}

function axisToVector(%ang) {
return eulerToVector(axisToEuler(%ang));
}

function vectorToEuler(%vec) {
%vec = vectorNormalize(%vec);
%yaw   = mRadToDeg(mATan(getWord(%vec, 0), getWord(%vec, 1)));
%pitch = mRadToDeg(mASin(getWord(%vec, 2)));
return %pitch SPC 0 SPC %yaw;
}

function vectorToAxis(%vec) {
return eulerToAxis(vectorToEuler(%vec));
}


Angle rotating
Code: [Select]
function vectorRotateVector(%vec1, %vec2) {
return vectorRotateAxis(%vec1, vectorToAxis(%vec2));
}

function vectorRotateEuler(%vec, %euler) {
return vectorRotateAxis(%vec, eulerToAxis(%euler));
}

function vectorRotateAxis(%vec, %axis) { //Epic function found online. Credits to Blocki <3. Id also like to thank Zeblote for finding this for me <3
%u["x"] = getword(%axis,0);
%u["y"] = getword(%axis,1);
%u["z"] = getword(%axis,2);

%angl = getword(%axis,3) * -1;
%cos = mcos(%angl);
%sin = msin(%angl);

%a[1,1] = %cos + (%u["x"] * %u["x"] * (1 - %cos));
%a[1,2] = (%u["x"] * %u["y"] * (1 - %cos)) - (%u["z"] * %sin);
%a[1,3] = (%u["x"] * %u["z"] * (1 - %cos)) + (%u["y"] * %sin);

%a[2,1] = (%u["y"] * %u["x"] * (1 - %cos)) + (%u["z"] * %sin);
%a[2,2] = %cos + (%u["y"] * %u["y"] * (1 - %cos));
%a[2,3] = (%u["y"] * %u["z"] * (1 - %cos)) - (%u["x"] * %sin);

%a[3,1] = (%u["z"] * %u["x"] * (1 - %cos)) - (%u["y"] * %sin);
%a[3,2] = (%u["z"] * %u["y"] * (1 - %cos)) + (%u["x"] * %sin);
%a[3,3] = %cos + (%u["z"] * %u["z"] * (1 - %cos));

%x = getWord(%vec, 0);
%y = getWord(%vec, 1);
%z = getWord(%vec, 2);

%newx = (%a[1,1] * %x) + (%a[1,2] * %y) + (%a[1,3] * %z);
%newy = (%a[2,1] * %x) + (%a[2,2] * %y) + (%a[2,3] * %z);
%newz = (%a[3,1] * %x) + (%a[3,2] * %y) + (%a[3,3] * %z);

%pos = %newx SPC %newy SPC %newz;
return %pos;
}



Its worth noting that there are better ways to do these, mainly the vectorRotateAxis using matrix multiplication, somebody has kept throwing code at me but every time I try it I cant get it to work. These functions are tried and tested (possibly with the exception of vectorRotateVector, but I honestly don't even know why you'll need that, I never have, hence it not being as tested as the rest). But yeah, generally, these functions suck, but they're so damn useful I don't mind.

3
Modification Help / Boodals' Untitled D&D-like RPG
« on: July 30, 2014, 10:21:34 AM »
So, I've been making an RPG. I'm not gonna make a fancy topic or anything, if you want to see stuff working, go to my server. This topic is just another place for me to organize my thoughts, and get opinions on things. If the topic dies, I will still continue working on it, however ideally people will discuss things here so it doesn't die.

You now need a client sided mod to join the server. If you wanna know why, see here.

Server not letting you join, even after you installed the client? Download the latest version, it might help.
If all else fails, remove any client sided add-ons you have. This includes Client_X, Script_X, and System_X if they have a client.cs.
Add me on steam if you did the above but still have problems connecting. I want to find all the add-ons breaking this so I can patch them.

The general idea behind the RPG: Its a party-based/coop adventure RPG, heavily inspired from dungeons and dragons. Expect dice rolls for your damage and d20s for your chance to hit.

I need builders to make props for the generators to use! Come by the server and build anything. If its good ill keep it, if not ill either dwand it or move it to the 'not used' section. In the end, build anything. I don't mind clearing stuff up unless its spam, and who knows, maybe I can use your futuristic-thing-which-has-nothing-to-do-with-the-rpg somehow. Also, eye candy is nice when coding for inspirations.

Plans and progress:

Dungeon Generator v3 65%
Mostly done, lags a little when its positioning each room, so ill have to slow that stage down. It can currently put the walls into place, but not the floor or ceiling. I am doing a slight revision for v4 in how the props are created and loaded so I can do more stuff with them.
It uses a 'tetris' like algorithm, first it randomly picks room sizes between a min and a max that I choose, then it puts the first room in the center. After that, for each room, it picks a random direction (N/E/S/W), and finds the closest position to the center where the room will fit, repeat for the other 3 sides in a random order, and the best position is where the room goes. This creates dungeons that have no stuffty 50 mile hallways in between rooms, keeps everything compact, and tons of possible places to put doors.

Terrain Gen v3 20%
Terrain is created and loaded in a chunk-based system, similar to Minecraft. Terrain is currently brickscapped, inspired from Dione's random terrain that he built in the server. Trees, bushes, rocks, dungeons, towns, paths, etc will all be generated on the terrain.
I am having issues with lag for this though. It takes like 5 minutes to generate a chunk, and its fairly optimized. I think im either gonna have to recode it as optimized as i can, or write a C++ program to be injected into blockland, to be used as a resource, however that's gonna take a lot of work. If i can do it, i could also do AI in the same way.

Towns v1 0%
Towns will be created on the terrain, preferably in flat areas. Paths will connect them together. In towns you will find many AI NPCs which you can talk to, trade with, and join parties.

Building generator? v1 0%
Not sure if I will do this. If I dont, then ill just use the buildings people have built in the server.

Roads v1 0%
Roads will connect towns together. They will be created in such a way that they will avoid going up/down hills. AI will prefer to walk over paths.

AI v1 10%
Real AI, not like the crappy default bots or zombie mod stuff. Bots will actually think, and that isn't just waiting for a few seconds before doing stuff, they will plan out a task, and then do the task in order, whether its exploring a dungeon, or attacking another party. They also have their own memory, so if they're hunting a certain player, they will look where they last saw them, and then work out what they could have been doing, and attempt to follow the players path. I'm using Goal-Driven behavior, go google it. I can't make much more progress on this until the rest of the RPG is more finished. AI will be able to form parties with other AI, join parties with players, and generally do anything a player can do.
One huge issue with this system is the lag it would create with many AIs. I honestly doubt I can do the AI this complex without lagging the server to stuff, so I may have to simplify the AI significantly, or buy a super computer. The only reason im still continuing with this is because its fun to code, and it alone could probably get me a job somewhere.

Items v1 10%
Mainly act as aesthetics, since their damage is dice rolls. I think ill make all weapon have random stats, so you can keep exploring looking to upgrade your weapons. Ill also have armor. Not really sure how spells will work, perhaps using a wand/staff will increase its accuracy and/or damage. I have Jakeblade for models, so they're all lovey.

Battles v3 80%
When parties collide, a battle starts (well, you have to actually start the battle by attacking someone). Battles will be turn based, as it is in D&D. This is also pretty inspired from Divinity Original Sin.

Characters, classes, races v1 20%
When you first start, you can build your character, including race, class, skills, appearance, and stats. When you die, your character is lost forever. You can however continue playing as an AI's player in the party you were in, however if you do that, you wont be able to customize them at all, but you wont have to start again from level 1. Or, you can create a fresh character, however don't expect to be able to find your old party again, you will spawn randomly miles away, and sure, you could go chasing after them, but its not worth it. I encourage players to role play a little here too, and don't take knowledge from previous lives into your new one, although there is nothing I can do to stop it.

Parties v1 5%
You are able to form a party. Parties are mostly just a way to mark players as allies, however it does have friendly fire. There wont be loot sharing, or any magical item sharing, or long ranged communication. Being in a party should be a big deal. You should know everyone in your party pretty well, so you share loot between you as friends, not because the game forces you to. AIs will be able to join your party, and you will be able to join AIs party. However, keep in mind that just because they're in your party, doesn't mean they're your friend. An AI can decide to join a party to get help going through a dungeon, then when you get to the loot, kill you all and take it for himself.


Pictures of props and stuff:
Magus' Stone things


Some nice portals originally by BL_ID 43277, modified by me.


The small plants used for the terrain generator.


Magus' "Evil Statues"


Magus' regular statues


Magus' trees for the terrain gen


Magus' dungeon wall tiles. I like magus' stuff, okay?


"Mineshaft" dungeon walls from Dione.


Me and some others in a generated dungeon using the above dungeon walls.


Some terrain Dione made. I am hoping to create a generator to use this style.




Huge thanks to Magus, Bit, Whirlwind, Dione, JakeBlade, and all the other amazing people who consistently come to my server and help me plan stuff, give me new ideas, build stuff (seriously check out Magus' statues), and generally keep this project alive <3

4
Games / Divinity - Original Sin
« on: June 28, 2014, 08:50:21 PM »

The next game in the Divinity series.

D:OS is an isometric, single player and co-op multiplayer RPG with tactical turn based combat, featuring an innovative co-op dialog system, a highly interactive, systemic and reactive world, classless character development, and lots of choice and consequence situations.
Shipped with the powerful editor the game was made with, allowing you to create your own single player and multiplayer adventures, and publish them online.

In-game images

   

   




Turn based combat

All combat is turn based. You get a certain amount of action points (AP). Each turn you will regain a certain amount of AP, out of a total max AP. Saving AP will result in having more AP in your next turn. AP is used to attack, move, use or equip items and use abilities.
Outside of combat, everything is real time, even when there's combat going on somewhere else.

Elements

There are four base elements which can be combined to create various 'surfaces' which can be used in or out of combat to your advantage.

Fire: Melts ice into water, evaporates water into steam which lowers visibility, ignites toxic clouds causing explosions.
Water: Puts out fires, can be used with lightning to damage a large amount of targets. Or heal yourself or allies.
Air: Throw around your enemies, or throw a crate at them. Create tornadoes to remove surfaces, or summon lightning to electrocute targets.
Earth: Create acidic goo which damages anything that stands in it or summon giant spiders to help you in battle.

The Divinity Engine Toolkit

D:OS comes with the very same toolkit that Larian Studios used to create D:OS. Coming with full Steam Workshop integration, making mods is easy. Create dialogues, scripts, maps, enemies, spells, items, etc.

News

June 30th: D:OS is finally released.

June 26th: The Divinity Engine toolkit beta on steam.
We're just waiting for Valve to press the button to make it go live so everyone can download it. They're busy with the summer sale.

April 2nd: D:OS goes beta

5
As suggested here.

Allows you to place ghost bricks when in camera mode where you are looking.

I recommend Orb Shifting Corrector - Download by Nexus, to complete the ability to build when in camera mode.

Download

Note this is server-sided.

v1.1 update: Fixed a glitch that stopped players from being able to respawn. Oops..

6
Add-Ons / God damnit
« on: April 30, 2014, 11:15:43 AM »
Just as i pressed submit, the forums went down or something and the cloudflare stuff came up, and now theres two topics..

Locking.

7
For my new event pack to replace VCE, I would like to create a separate scriptObject for each variable, simply so I can create functions for each variable 'class' (Numbers, vectors, strings, etc). These variable objects will mostly be created and deleted instantly, but some will remain as a sort of global variable.

Before I start work on this, is there any disadvantages or problems with doing it this way? The only problem i'm expecting is the object ID count to go mental, but this isn't a huge concern (unless some sort of integer overflow happens).

The two alternatives are:
Reuse the scriptObjects. Probably the best solution, but toughest to code.
Or just use variable arrays.

8
Modification Help / Event Script - VCE replacement
« on: February 26, 2014, 08:41:45 PM »
Event Script
Bringing Eventing closer to Scripting


Please note, everything and anything is very likely to change. I am open to suggestions.

Description
Event Script is my attempt to drastically increase the capabilities of eventers. VCE brought a whole new skill set to Blockland, however once you got too deep into it, things started breaking apart. Inspired by the usefulness of my Expression event (which I doubt anyone has heard of), I've decided to recreate VCE using a similar structure. Now you will not need 3 lines of events just to get a random number, or 50 lines to make a basic RPG tree with exp and levels, or an entire system to reserve chairs in a theater (that damn thing took hours!)

Planned Features
(In order of complexity)
 + Specialized events designed for members used to VCE's style.
    + Similar to ModVariable, IfVariable, etc

 + Multiple operations on one line.
    + (%var * 15) ^ 3.14 + 15 / $pi all on one line

 + Special tags used in centerprints, chat messages, etc similar to VCEs var replacers, but much more versatile.
    + Eg. <var:cl:name> as your used to
    + Including the ability to code within tags
       + Eg. <ct:print[(%var * 15) ^ 3.14 + 15 / $pi]> See Code Examples for more info

 + Inline variable operations, conditionals, and loops
    + Eg. for[%i = 0, %i < 10, %i++] { %i % 2 == 0 ? { print["You are a friend"] } : { print["You suck"] }}

 + Variable classes (Torquescript doesn't even have this!)
    + Numbers stay as numbers, vectors, arrays, strings, and easy to convert between them.

 + Much closer to real scripting. Learn to script while eventing. Its how I and many others started.

 + Ability to call multiple events on a single line. No compatibility issues.
    + Note that this may have security flaws. I am still currently looking into a secure method.
    + Eg. $self.setColor[ getRandom[0, 63] ] would call the setColor event on the brick calling the event.
    + Allows for any event to be called, including other add-ons. No issues with parameters not taking variable replacers.

 + Triggered functions, no more VCE relay loops!
    + Method to remove the need of relay loops to check when a player does something.
    + Still working out the details on this one.
    + Will probably be something like onPlayerJump, or onPlayerJet. Less abusable than you would think.


Code Examples

onActivate > EventScript > Eval > %client = $client !%client.gender.isset ? { %client.gender = getRandom[0, 1] }
onActivate > Client > CenterPrint > You are a <ct:%client.gender == 1 ? {print["Boy"]} : {print["Girl"]}>.

Technical explanation:
%client = $client
     %client is a local variable stored for the duration of the eval. $client is a global variable that is set to the client that is triggering the event.

!%client.gender.isset
     Checking if the gender variable is not set (The ! inverts the Boolean)

? { ... } : { ... }
     If the previous statement is true, execute the code within the { }, otherwise execute the code in the { } after the colon.

%client.gender = getRandom[0, 1]
     Set the variable 'gender' on the client to be a random integer between (and including) 0 and 1. This variable will be kept on the client and can be accessed in other scripts.

print["Boy"]
     Replaces the code tag with the contents of the string. Does nothing outside of a codetag. Similar to how VCE variable replacers work.


Variable Info
Classes:
  Numbers (Integers and floats)
    Eg. %number = 4
  Strings (Letters, words, sentences, that sort of thing)
    Eg. %string = "Hello world!"
  Booleans (True or false)
    Eg/ %bool = $client.hasPlayer
  Vectors (infinite dimensions)
    Eg. %vector = [5, 2, 10]
    Technically just an array of numbers.
  Objects (Clients, players, other bricks, vehicles, bots...)
    Eg. %player = $player, %brick = $self
  Arrays (of each other type, number arrays, vector arrays, etc)
    Eg. %friends = ["Boodals", "Jam Jar", "Blobo", "Elm", "Cant think of friends", "etc", 5.251, ["and even", "multidimensional", "arrays!"] ]

Types:
  Local variables are variables that are deleted when the code is finished executing.
    Eg. %local = 3.14
  Global variables are read only, used to get info from Blockland into Event Script.
    Eg. $player, gets the player who activated the brick (if there is one)

Privacy:
  Variables will be able to be set as public or several cases of private.

  Private variables will be able to be read by other users, but only modified by your bricks.
  Trusted variables will be available to be modified by people with your full trust. This may change depending on a few things.
  Whitelist variables will be modifiable by people with certain IDs. Probably will use syntax like private[3504, other, IDs, here] %var
  Public variables will be available to be modified by anyone.


Suggestions welcome!
I need to know what you guys want to see. I am especially interested in how I can make this more user friendly, as i'm sure this topic alone has scared many uses off. VCE itself was hard to get into if you didn't know where to start. Id like to be able to give this to anyone and have them be able to use it within a couple hours max (obviously not to its full capability, but you get the idea).


Help?
I think I could pull this off on my own, however it would take much longer than I have before life gets in the way (uni, exams, etc). If you think you can help me, send me a PM or post here, and we can meet up and chat.

9
General Discussion / Boodioware Public Beta - The return
« on: January 23, 2014, 01:29:45 PM »
Boodioware
The Return
Working title
Previous Topic



          Gameplay
Boodioware is a remake of TF2ware, with its own character and twists. TF2ware is a gamemode for TF2 that emulates the gameplay style of the WarioWare games. Each game is filled with random minigames that range from simon says to frogger. For each minigame you win, you gain a point. At the end of each game there is a boss round worth 5 points. The goal is simple, get as many points as you can each game.


          Minigames
There are currently only 7 Minigames. I plan to have around 20 before it leaves Beta. Ideas are not needed, but very welcomed.
  • Simon Says - Do what Simon tells you to do. Don't do what anyone else says.
  • Kill another player - Everyone gets an insta-kill weapon. Kill someone else to win the round.
  • Math - Type the answer to a randomly generated math question.
  • Rocket Jump - Everyone gets a rocket launcher, just rocket jump high enough to win.
  • Platforms - The water is rising, get on a platform or it will kill you!
  • Don't move - Don't move, or don't stop, depending on the random message you get.
  • Colors - Type the color or the word that is colored depending on the instructions.


          Bosses
I've only made 2 boss so far. I need 5 before I leave Beta. These take a long time to make, please be patient. Bosses will give the winner(s) 5 points, but they are much tougher.
  • Obstacle Course - Two moving walls lock you in. Touching the rear one will kill you. Get to the other side of the obstacle course without falling into the water.
  • Ducker - Similar to Frogger; simply get to the far side to win. However, there are many perils blocking you way, such as busy roads, sharks, and poisonous rivers.



          Screenshots
The main arena filled with players.
Just after a rocket jump round.
A wild boss appears!

The arena..
Platforms minigame, before the water
reached the top.
Platforms minigame, water at max height.
Touching it is instant death.
The two moving walls and moving platforms
in the boss round, Obstacle Course.
Birds eye view of two players in the Obstacle
Course boss.

The final obstacle.


          Want to help?

Want to help? Didn't think so..
Wait, your still reading this? Okay. I need builds! Making bosses takes a very, very long time. Most of it is coding and tweaking, but theres a lot of time spent on the build, and i'm a terrible builder.
What I want is builds that are base off (not necessarily copied from) TF2ware bosses. Here is a video showing the general style of each boss. I use that video for most of my referencing. Don't worry about getting all the technical bits perfect, I will modify the build to be better suited to what I can code. If you plan to have a certain object at a certain point in the map, leave a sign there explaining what it is you want. I might not do it, but it might be a good idea.

If you can do any of the following things, let me know.
  • Images to replace the centerprint text, as seen in TF2ware, check out the video in the paragraph above.
  • Modelers are always welcome. I can model myself well enough, but i'm not amazing.
  • Builds, builds builds. PM or ask me ingame for details, depends on what i'm working on at the time.


          I need a server!

Previously, I was hosting this using HamHost. Unfortunately, the service provider has been beaten to death by a mob of angry players, and as a result I am forced to host this on my own PC, and as I live in the middle of no-where, my internet connection is terrible. I would put a donation link up and pay for a RTB server myself, however I do not have a bank account set up, and I can't use my parents or a friends.
To cut the crap, I'd like to borrow someone else's server. If you have a server that you are not using, please send me a PM, or talk to me in-game, and hopefully we will be able to finally sort the lag out.


          Updates
0.2.6 23rd January 2014
Added minigame Colors

0.2.5 22nd January 2014
Back to work on Boodioware.
Fixed a few glitches, mainly rocket jump.
Nearly finished Ducker. Public testing for the boss started. Large lag issues with vehicles, disabled until a solution can be found.
New minigame: Don't Move.
Happy birthday Boodals!
Hosted Boodioware Birthday Beta.

0.2.2 9th September 2013
Had a break from BL. Back to work.
Fixed a bunch of minor bugs.
Reduced sound volume.
More work on Ducker. I've only got one more trap, and a few bugs to fix, then its ready.

0.2.1 - 29th August 2013
Added player names into the list of Simon Says names. Inb4SimonConnected.
Work on new Boss; Ducker.
Reduced chance of player name in Simon Says.
Added Spear, Bow, and Sword to the kill minigame. Its most likely a gun though.

0.2.0 - 28th August 2013
Dedicated server running. It requires a bit of manual work to get the game running, but then its fully automatic.

< 0.2.0
Added everything.
I cant remember.

10
Games / Searching for a Coop Adventure RPG, no MMO's
« on: October 21, 2013, 02:13:53 PM »
I need to find an adventure RPG game that me and at least one other friend (preferably more) can play coop. I'm thinking Dungeons and Dragons style, id prefer turn based combat, with a large story line and lots of character customisation. I don't really mind about graphics, as long as its not 2d platformer style. Voice chat isn't an issue, as we can use Skype. Preferably free, however I am willing to pay for it if we think its worth it. Id prefer if it wasn't dark, I dont like games that are depressing just to look at..

Games i've found so far:
Secrets of Grindea, a bit too much combat/action. In development anyway.
Divinity - Original Sin, pretty much perfect, but in development. Love the conversation system, look it up on youtube.
Neverwinter Nights 2, alright, seems like not enough combat and strategy.
Torchlight 2, pretty good. A little too much action.
Diablo 3, too dark, but looks fun.
Path of Exile, again, too dark. Goes online in one day I think, so pretty neat timing.

Feel free to post any games that fit my requirements, whether they're good or not.

MMOs are too grindy for what I want. It would be a lot easier otherwise..

Oh, also, before you give me something, check to make sure someone hasn't posted it yet. Ill try to keep everything I've looked at here.

11
General Discussion / Boodioware Public Beta
« on: August 29, 2013, 11:17:53 AM »
Boodioware
[Insert non-existent logo here!]



Gameplay
Boodioware was inspired by TF2ware, and is a remake of it. TF2ware is a gamemode for TF2 that emulates the gameplay style of the WarioWare games. Each game is filled with random minigames. For a list of minigames, see the minigame section. For each minigame you win, you gain a point. At the end of each game there is a boss round worth 5 points. The goal is simple, get as many points as you can each game.


Minigames
There are currently only 5 Minigames. I plan to have around 20 before it leaves Beta. Ideas are not needed, but welcomed anyway.
  • Simon Says - Do what Simon tells you to do. Don't do what anyone else says.
  • Kill another player - Everyone gets an insta-kill gun. Kill someone else to win the round.
  • Math - Type the answer to a randomly generated math question.
  • Rocket Jump - Everyone gets a rocket launcher, just rocket jump high enough to win.
  • Platforms - The water is rising, get on a platform or it will kill you!


Bosses
I've only made 1 boss so far. I need 5 before I leave Beta. These take a long time to make, please be patient. Bosses will give the winner(s) 5 points, but they are much tougher.
  • Obstacle Course - Two moving walls lock you in. Touching the rear one will kill you. Get to the other side of the obstacle course without falling into the water.



Screenshots
The main arena filled with players.
Just after a rocket jump round.
A wild boss appears!

The arena..
Platforms minigame, before the water
reached the top.
Platforms minigame, water at max height.
Touching it is instant death.
The two moving walls and moving platforms
in the boss round, Obstacle Course.
Birds eye view of two players in the Obstacle
Course boss.

The final obstacle.


Want to help?

Want to help? Didn't think so..
Wait, your still reading this? Okay. I need builds! Making bosses takes a very, very long time. Most of it is coding and tweaking, but theres a lot of time spent on the build, and i'm a terrible builder.
What I want is builds that are base off (not necessarily copied from) TF2ware bosses. Here is a video showing the general style of each boss. I use that video for most of my referencing. Don't worry about getting all the technical bits perfect, I will modify the build to be better suited to what I can code. If you plan to have a certain object at a certain point in the map, leave a sign there explaining what it is you want. I might not do it, but it might be a good idea.


Updates
0.2.2 9th September
Had a break from BL. Back to work.
Fixed a bunch of minor bugs.
Reduced sound volume.
More work on Ducker. I've only got one more trap, and a few bugs to fix, then its ready.

0.2.1 - 29th August
Added player names into the list of Simon Says names. Inb4SimonConnected.
Work on new Boss; Ducker.
Reduced chance of player name in Simon Says.
Added Spear, Bow, and Sword to the kill minigame. Its most likely a gun though.

0.2.0 - 28th August
Dedicated server running. It requires a bit of manual work to get the game running, but then its fully automatic.

< 0.2.0
Added everything.
I cant remember.

12
Modification Help / Silently setting timescale [Solved]
« on: August 23, 2013, 09:59:07 PM »
I've searched and found that setTimescale(%num); commandToAll('timescale', %num); should work. However after testing, I found that setTimescale does nothing in a dedicated server. The clients are still getting their timescale set correctly.
Note: Doing this on a non-dedicated server seems to work, I think since your client is being told to modify the timescale, its doing it to the server as well.
setTimescale is a function, timescale isn't.
Port said here to make sure mainServer.cs.dso is being executed. When starting up the dedicated, I see a message something like "Loading mainServer.cs", so i'm pretty sure thats working.

I have attempted to package commandToAll and commandToClient to stop the "Blockhead changed the timescale to #" message, however serverCmdTimescale doesnt call either. And I think gameConnection::chatMessage calls commandToClient, so I cant think what else to package to hide the message.

Id prefer to do this without a client sided mod, however its looking like that is the easiest way.

Any help is appreciated.

Edit: Been looking through v0002, and i cant find any mention of timescale. It might not even of been implemented at that time, so that doesn't help me. I did find that all the messaging functions i found called commandToClient, which I doubt is packageable. I will give it a try when my dedicated is working again anyway.

13
Boodals' Grapple Rising Lava

By original I only mean for the grapple idea. Credits to Zapk and Scriode for the gamemode.

Features
  • Map Cycler - Multiple maps cycling automatically.
  • Rounds - 3 rounds per map, in higher rounds the lava rises faster.
  • Microgame System - At random, some rounds will get a Microgame. These can be anything from removing pushbrooms or grapples, to adding guns and spears. (See Microgame section)
  • Height records - Each map has a height record which you can try to beat. If you do manage to beat the height record, it will be announced in chat.
  • Dynamic Lava speed - The speed of the lava is calculated and adjusted by the height of the map, what round it is, Microgames, and I have plans to add more dynamic effects.
  • Score system - The closer you are to the lava, the more points you get over time! Points can be used in a few microgames.

Maps
ACM City
Credits: ACM.

Afghanistan DM
Credits: Diggy, Ephialtes, Facechild,
Hamburger, Ladios, and many others.
Beta City
Credits: Mocheeze, Bones4, Ephialtes, Kaje,
Moose, Nitramtj, Rotondo, Facechild, Wedge.
Building 6
Credits: Unknown.
Crysta Castle
Credits: SBDjango.
Festung der Schwarzung
Credits: VerticalHorizon.
Fort Papa
Credits: Sampapa.
Jetpuff's Towers
Credits: Jetpuff.
Plates
Credits: Boodals.
Pyramid
Credits: Afkpuz.
If you want to have a map on the server, please send me the .bls, and a list of people who made it. I can add it to the cycle easily.

Microgames
  • Pacifist - No push brooms. Twice as likely as any other Microgame.
  • Classic - No grapples.
  • Assassin - Gives swords.
  • Deathmatch - Gives guns, but removes pushbrooms. Currently disabled.
  • Double Speed - Doubles the lava's speed. Can be very tough on round 3.
  • Acceleration - Lava starts of half as fast, but slowly accelerates.
  • Deceleration - Lava starts of twice as fast, but slowly decelerates.
  • Spears - Gives spears, but removes pushbrooms.
  • creeps - WIP. 1/3rd of players are picked to be creepbears. When a creepbear touches a non-creepbear, the non-creepbear dies and the creepbear gains a point. Disabled until finished.
  • Martyrdom - You blow up when you die. The more points you have, the larger the explosion will be!
  • Fast Forward - Timescale is increased to 1.5x normal! This effects lava speed as well.
  • Slow Mo - Timescale is decreased to half of normal. Again, everything is effected.
  • Increasing Time - The timescale slowly increases throughout the round. Things slowly get faster!
  • Decreasing Time - The timescale slowly decreases. Don't worry, it doesnt go below 0.25x, so you wont be sitting around for hours on a single round.
  • Micro - Everyone is little, or is everything else big?
  • Large - Everyone is big, or is everything else little? You can just about fit through 4 wide doors.
  • Fatty - Shouldn't have eaten that last cake. Your too fat to fit through most doors!
  • Giant - WIP. Everyone is three times their normal size!
  • Genetics - Everyone is different sizes, you can only blame your genes.. This can be really funny.
I accept any Microgame ideas. However the more complex ones will take some time to make.

Story
Rising Lava is an idea first made a long time ago. Fairly recently Zapk made a Rising Lava server. It had pushbrooms to knock other players around and cycling maps. The server was a hit, with many players on the server 24/7. Then Scriode made and released a gamemode similar to Zapk's. I just happened to find it on the forums, and thought id take a look at the script and give it a go as a server. I could only host non-dedis, but while it was up somebody (can't remember who) said that it would be good to add Grapples. The idea was amazing, so I added it, and from there started modifying the code, adding new features and fixing bugs. Then recently, I managed to get a dedicated server hosted by HamHost. With nothing else to host 24/7, I decided that I might as well host Grapple Rising Lava. Only now have I decided to create a topic.

News
  • August 19th - Dedicated server started.
  • August 19th-20th - Bug fixes.
  • August 20st - Added Plates map.
  • August 20st - Added Microgame system.
  • August 21st - Tezuni hosts Rising Lava [Grapple] server. [/rage]
  • August 21st - Topic created.
  • August 22nd - Tezuni changes his server to Rising Lava [Parkour]. [/rageover]
  • August 22nd - Added Score system and Martyrdom microgame. Also fixed a couple of issues in Fort Papa.

14
Modification Help / Math help; physically parenting objects
« on: June 26, 2013, 06:15:09 PM »
I have two staticshapes, which i am trying to parent together so that when i rotate the parent, the child's position is updated, in 3d.

This is what i have:
When the child is set to be the child, it is given a position and rotation offsets, and a scale factor. Rotation offset is simply the parent's rotation minus the child's rotation. Position offset is just vectorSub(%parent.position, %child.position). Scale factor is just the fraction of the child's scale to the parent.
When i rotate the parent, I call a function which loops through all the children, and move, rotate and scale the child based on the three variables mentioned above. Currently, i have it rotating and scaling the child perfectly, however it doesn't move the child when the parent is rotated. This is easy enough using trig functions, but I need it to be in 3d.

Heres a picture to show you what i'm trying to do, but i need it in 3d instead of 2d. The parent is staying stationary, and only rotating.


Heres the relevant code:
Code: [Select]
function holo_addChild(%parent,%child)
{
if(%parent.class !$= "holo" || %child.class !$= "holo" || !isObject(%parent) || !isObject(%child) || isObject(%child.parent))
return;
holo_unChild(%parent, %child); //Remove it if it is already a child
%parent.children = trim(%parent.children SPC %child);

advVCEDebug("Set" SPC %parent SPC "as the parent of" SPC %child @ ". child list: \"" @ %parent.children @ "\"");

%child.posOffset = VectorSub(%child.getPosition(),%parent.getPosition());

%child.rotOffset = VectorSub(axisToEuler(getWords(%child.getTransform(),3,6)),axisToEuler(getWords(%parent.getTransform(),3,6)));

%pScale = %parent.getScale();
%pScaleX = getWord(%pScale,0);
%pScaleY = getWord(%pScale,1);
%pScaleZ = getWord(%pScale,2);

%cScale = %child.getScale();
%cScaleX = getWord(%cScale,0);
%cScaleY = getWord(%cScale,1);
%cScaleZ = getWord(%cScale,2);
%child.scaleFactor = %cScaleX/%pScaleX SPC %cScaleY/%pScaleY SPC %cScaleZ/%pScaleZ;

%child.parent = %parent;
}

// Gets called whenever a holo is moved, rotated or scaled
function holo_updateChildren(%parent)
{
advVCEDebug("Updating children on" SPC %parent @ ".");
if(%parent.class !$= "holo" || !isObject(%parent) || getWordCount(%parent.children) < 1)
return;

%parentPos = %parent.getPosition();
%parentPosX = getWord(%parentPos,0);
%parentPosY = getWord(%parentPos,1);
%parentPosZ = getWord(%parentPos,2);

%parentRot = axisToEuler(getWords(%parent.getTransform(),3,6));
%ParentRotX = getWord(%parentRot,0);
%ParentRotY = getWord(%parentRot,1);
%ParentRotZ = getWord(%parentRot,2);

%parentScale = %parent.getScale();
%parentScaleX = getWord(%parentScale, 0);
%parentScaleY = getWord(%parentScale, 1);
%parentScaleZ = getWord(%parentScale, 2);

for(%i=0; %i < getWordCount(%parent.children); %i++)
{
%child = getWord(%parent.children,%i);
// Check if the child exists, and if it is a Hologram
if(isObject(%child) && %child.class $= "holo")
{
advVCEDebug("Updating child" SPC %child @ ".");
%childPos = %child.posOffset;
%childPosX = getWord(%childPos,0);
%childPosY = getWord(%childPos,1);
%childPosZ = getWord(%childPos,2);

%childRot = axisToEuler(getWords(%child.getTransform(), 3, 6));
%childRotX = getWord(%childRot,0);
%childRotY = getWord(%childRot,1);
%childRotZ = getWord(%childRot,2);

%childPosOffset = %child.posOffset;
%childRotOffset = %child.rotOffset;

%childScale = %child.scaleFactor; //Gets set when parented
%childScaleX = getWord(%childScale, 0);
%childScaleY = getWord(%childScale, 1);
%childScaleZ = getWord(%childScale, 2);

%scale = %childScaleX*%parentScaleX SPC %childScaleY*%parentScaleY SPC %childScaleZ*%parentScaleZ;

%pos = vectorAdd(%parentPos, %childPosOffset); //This is a temporary. Need math help with this
%rot = vectorAdd(%parentRot, %childRotOffset);

%child.setTransform(%pos SPC eulerToAxis(%rot));
%child.setScale(%scale);
holo_updateChildren(%child); //Update any of the child's children
} else
%parent.unChild(%child);
}
}

Again, just to be clear, I have rotating and scaling the child done perfectly, I only need to find its position when the parent is rotated, in 3d.

15
Modification Help / Advanced Event Packs (Beta test downloads!)
« on: March 15, 2013, 10:14:41 PM »
I wanted somewhere to organize and advertise some new event packs i'm making, including my already released event pack AdvVCE. The Raycast part of it is being changed to a seperate add-on, as not everybody wants to/knows how to use it. Plus I want to be able to update it separately without having to go through and remove all the changes to the other events in the pack which are for a later update.

Current Event packs:
Advanced VCE
Old topic here!

Requirements:
Event_Variables (Vanilla VCE).

Includes:
Self Output: VCE_AdvModVar > "Target list", "Variable Name", "Logic", "Second Variable/Number"
Similar to VCE_ModVar, but with new Logic:
Sin or ASin (Put -1 as the second variable). Note: Uses radians!
Cos or ACos.
Tan or ATan.
DegToRad (Converts degrees into radians).
RadToDeg (Converts radians into degrees).
FloatLength (Rounds numbers to the decimal place in the second box).
VectorAdd (Adds two or three dimensional vectors).
VectorSub (Subtracts two or three dimensional vectors).
VectorScale (Scales a two or three dimensional vector by a scale).
VectorDist (Gets the distance between two vectors).
VectorLen (Gets the length of the given vector in the second box).
VectorNormalize (Gives a scaled vector of the one supplied, so that the length = 1).
SubStr (Gets part of a string defined by one or two numbers in the second box).
StrPos (Gets the position of a given string in the first string).

Self Output: VCE_Expression > "Expression", "Expression", "Expression", "Expression"
A WIP but functional method to condense hundreds of lines of ModVar into a single line. Works with:
+, -, *, /, sin, asin, cos, acos, tan, atan, degToRad, radToDeg, floatLength, and random.
New variable replacer method to keep the expressions short and clean. Use Target%Variable. Target being:
"" (nothing), C, Client > Client.
P, Player > Player.
B, Brick, S, Self > Brick.
M, Mini, Minigame > Minigame.
V, Vehicle > Vehicle.

Variable Replacers
Player:
  • rhealth
  • renergy
  • rdamage
  • pos
  • state
  • isPassenger
  • isDriver
  • altFire
  • veDamage
  • veHealth
  • veMaxHealth
  • veDatablock
  • weDamage
  • weRadiusDamage
  • weDamageRadius
  • weSpeed
  • weArc
  • item6
  • item7
  • item8
  • item9
  • item10
  • yaw
  • pitch
  • eyevec
  • eyevecx
  • eyevecy
  • eyevecz
  • eyepos
  • eyeposx
  • eyeposy
  • eyeposz
  • damage (Fixes for setting health to less than 0 deleting player)
  • health (Fixes for setting health to less than 0 deleting player)

Brick:
  • pos
  • type

Vehicle:
  • pos
  • yaw
  • pitch
  • roll

Global:
  • simSecond
  • simMinute
  • simHour

Server command "/VCEGet Variables"
Sends the player a chat message with the variable tags replaced. A great way to find out your position or a certain variable. Doesn't work with brick targets.

Beta test download!
Cant find the password? Read the entire post.

Raycast
Requirements:
AdvVCE

Input Event: > onVCERaycast > Targets; Self, Player, Client, Minigame, TargetBrick, TargetPlayer, TargetClient, TargetVehicle

Target: Brick > VCE_Raycast > "Setting", "Vector", "Range", "Targets"
Target: Player > VCE_Raycast > "Setting", "Vector", "Range", "Targets"
Fires a raycast in the given direction. Setting modifies what the Vector does:
World, uses world coordinates.
Forward (Player only), uses the players eye vector.
Variable, uses whatever <var:brick/player:rcvec. is set to.

The raycast then outputs details into variables brick or player:
'rctype' type of object hit.
'rcpos(x,y,z)' position raycast hit.
'rcdist(x,y,z)' Distance from starting position.

If range is set to 0, it will use the vectors distance. If not it will only go as far as the range.

Targets is what to look for:
Bricks (Or fxPlane (floor of map)).
Players (Or bots).
Vehicles
Or any combination of the three.

If the raycast hits something, it triggers OnVCERaycast.

Update: Added the fxPlane (floor) to the Brick category.

Beta test download!
Cant find the password? Read the entire post.

Holograms
Video demonstration!

Requirements:
AdvVCE

Target: Brick > Holo_Create > "Shape"
Shapes are:
Cube (Same width as a 1x1).
Plane (Twice the width as a 1x1, invisible on one side).
Sphere (Same width as a 1x1, geosphere).
Cylinder (Same width as a 1x1, same height as width).
Cone (Same width as a 1x1, same height as width).

Target: Brick > Holo_Move > "Type", "Vector", "Variable"
Type is a list of either Set or Move. If no Variable is given, then it uses the Vector. Simply for slightly less confusion (I might remove the vector altogether)
Target: Brick > Holo_Rotate > "Type", "Vector", "Variable"
Type is a list of either Set or Add. Same behavior as Holo_Move. Rotates the holo.
Target: Brick > Holo_Scale > "Type", "Vector", "Variable"
Type is a list of either Set, Add, or Scale. Same behavior as Holo_Move. Scale allows you to change its size. It allows for XYZ scaling, so you can create stretched shapes if you want.
Target: Brick > Holo_Color > "Color", "Manual/Variable"
Color is a selection of colors from the colorset. Or you can use Manual, which allows for variable replacers. It takes RGB or RGBA values. If no alpha is given, it assumes 1 (Alpha is transparency).

Variable Replacers:
Brick:
  • holopos(x,y,z)
  • holorot Rotation
  • holoyaw
  • holoroll
  • holopitch
  • holoscale(x,y,z)

RTB Pref: Max holo amount, to limit the amount of holos a person can create.
RTB Pref: Max holo size, to limit the max size a holo can be.

Beta test download!
Cant find the password? Read the entire post.

Advanced Bots
Controlling bots by vectors. Mainly copy paste edit from Bot_Hole's events.cs.

Requirements:
Bot_Hole.

Only pack that i'm really satisfied with. Does not require VCE, although its highly recommended.

Target: Bot > GoToVector > "Type", "Variable"
Type is a list of either World or Vector:
World, moves the bot to the world coordinates.
Vector, moves the bot by the vector given.

Target: Bot > LookAtVector > "Type", "Variable"
Type is a list of either World, Vector Pos, or Vector.
World, make the bot look at the world coordinates
Vector Pos, the position from the bot's eyes
Vector, make the bot look in a direction, rather than a point in space (noticeable when the bot is moving).

Target: Bot > PathTo > "Coordinates"
Makes a bot path to the closest node to the coordinates.
Place "Node Bricks" from the Special tab to set up nodes. They will automatically connect to nearby nodes that have a wide enough passage for a bot to move through. This literally can make bots walk through huge mazes without going the wrong way once.

Server Command "/resetNodes"
Resets all of your nodes. May lag for a second or two if you have a lot of nodes. 5 second cooldown.

Server Command "/resetAllNodes"
Resets all nodes on the server. May lag if there is a lot of nodes. 5 second cooldown. Admin only.

Beta test download!
Cant find the password? Read the entire post.

Advanced Camera Control
Allows for bad asses like server sided Pathcam. Most of the script copied off Event_Camera_Control - Badspot.

Target: Client > SetCameraPos > "Position", "Type", "Rotation/Vector"
Position is the world coodinates of the camera.
Type is a list of either Locked or Look At:
Locked, forces the player to see only in the direction of the vector given.
Look At, forces the camera to face a certain position.

Target: Client > MoveCameraPos > "Position", "Type", "Rotation/Vector", "Speed"
Position is the world coodinates of the camera.
Type is a list of either Locked or Look At:
Locked, forces the player to see only in the direction of the vector given.
Look At, forces the camera to face a certain position.
Speed is the speed the camera moves at towards the position.

Target: Client > CancelCamera
Stops any MoveCamera events, and resets the camera back to normal for the client. Also has /cancelCamera command for anyone.

All events also have a Minigame variant, which just calls the client function for each player.

RTB Pref: Change the update time of moving cameras. 5 settings from High Quality to High Performance.

Server command "/cancelcamera"
Forcefully sets your camera back to its normal position.

Currently being worked on. I didn't realise how badly coded this was. I will post the download here when its ready.

I need beta testers so I can know if the events are working as intended for other clients. Just keep an eye out for my server, hit me with a hammer if i'm not responding, i'll probably be coding.

Hopefully you've read the entire post now. If you have; thank you. The password to download the files is "betatesters". Please do not share this, as I want people to read the topic before downloading, otherwise they will not know how to use some of the features. Any bugs you find, please post in the comments.


Known bugs
Please read these before you post any bugs.
  • Packs that do not require AdvVCE with the exception of Bots (currently none, but I will be changing that) do not have the advVCEDebug function.
  • Packs that do not require AdvVCE will not run without it. A simple fix, but not worth an update for.
  • Loading nodes will take a lot longer than it should.

Please post suggestions.

Also, if somebody can tell me why Event_AdvVCE hasn't been approved or failed by an RTB moderator yet, after two months, please do.
Its been 5 months now. Jesus christ, it would have been quicker to make my own auto updater than to wait for RTB... Is there somewhere I can rage?

Pages: [1] 2 3