A hotchpotch of Arma2 functions, aimed to offer tools to build better random missions (like in something coherent, meaningful and whatnot..). Evaluating the world in some meaningful way, finding reasonable positions, planing routes from A to B, spawning lots of stuff and interesting behaviour (well, not yet), computing the convex hull of stuff to spawn even more stuff, ...
The ultimate aim is to be able to offer a set of `recepies` such as spawnForestCamp (of any faction) including the desired infrastructure/-type aswell as units with appropriate behaviour. Or a spawnRoadBlockade, spawnFOB, ... procedural stuff building stuff, if you will, as opposed to the given set of fixed compositions.
You will note, that I'm not there yet. Some ideas are carried out pretty poorly (some stuff is just silly and bound to be removed), other stuff doesn't even work yet... But feel free to take what you might find usefull, rip it apart, enhance it, use it.
I hope that one day, I can proudly present you a mission that will use this stuff, spawning stuff for you to enjoy infinitely. Don't hold your breath though. :/
loading the RUBE library might look something like this (init.sqf):
//////////////////////////////////////////////////////////////
// loading RUBE function library
// (which includes the BIS functions library; so there is
// no need to place the module on the map/in the editor)
[] call (compile preprocessFileLineNumbers "RUBE\init.sqf");
waitUntil{!(isnil "RUBE_fnc_init")};
And you'll also need a description.ext with the following contents:
#include "RUBE\core.hpp"
#include "RUBE\common.hpp"
class RscTitles
{
#include "RUBE\rsctitles.hpp"
};
class CfgSounds
{
#include "RUBE\sounds.hpp"
};
A pseudo-scientific weather generator, generating forecast for n days, based on a seasonal model (out of many), statistically verified with a small test suite... (see details, summary). So weather will be continuous/permanent (e.g. for a campaign) and forecastable (including a nice weather report dialog; notebook and print-version). That is: the quality of a forecast rapidly drops with only a few days, which is realised by mutating/evolving days more, the further they're in the future... what RUBE weather models:
what RUBE weather does not model:
And while this is a drop'n'forget (at least if you use the RUBE library as addon and run the module), you may pretty much customize/script anything. You can manipulate all the forecast data prior to launching the weather engine. Or you can write your own `disturbance masks` (by which those storm-models are realized): by those you can throttle overcast and precipitation by means of a linearly interpolated keyframe-approach over the day. Basically you can tweak the whole band (minimum, maximum) and the disturbance mask's exponents for its oscillators (which are biased by latitude by default)... so all in all you still should have full control over the weather, and be able to script it as your missions needs it.
Btw. that forecast stack of weather data for n days can be absolutely abused, s.t. a forecast for one day could be the forecast of a much smaller time-entity... by simply manipulating the forecast data on your own and resetting the weather engine as desired... (for example you could transition to a drastically different weather on some event by scripting; all there is to this is the weather engine's cycle time as a natural delay for the transition; though you could tweak this time too, so...)
Dragging stuff around (like ammocrates or supplies) and letting stuff beeing dragged around by AI. Simply releasing stuff again or drop it onto a vehicles or even tents cargo area or let the AI do it. Let the AI unload a fully loaded truck and other cool stuff. Oh and an alternative to CoIn where you initially spawn building sites instead of the desired structures, on which units can work, as long as enough supplies/draggables are around... (droppables use the RUBE_rectanglePacker, so every vehicle is naturally limited by its cargo area; needs to be manually measured, which is already done for probably all usefull core objects from A2/AO)Check out the RUBE drag'n'drop demo mission
Are you kidding me? Sure. But think about it, you've spawned some stuff that should represent some sort of stuff like a base and you're missing a fence around it? No problem, pass your objects, and we'll compute the convex hull and now we're ready to spawn the fence or the sandbags around our stuff, e.g. with RUBE_spawnObjectChain.
So there is this area we know is empty and we'd like to fill this space with lots of random stuff... sounds like an awefull job? Try the rectanglePacker. Wanna spawn a random paintball arena? Try the rectanglePacker.
Calculate bézier curves for map drawings, some clever functions (such as coloring functions for your ppEffects, depending on daytime, overcast, rain or something...), object spawning, animation or just for nice camera shots. Functions of higher order are supported (up to a degree of 20; 21 control points). Can process an array of scalar or an array of arrays of scalar (such as positional data).
Spawning them in a chain? Like in fences and sandbags? Groovie. Though make sure the place is even (no gradient) for you may not be that happy with the results otherwise :/
A grid? Well, you may just use the border- and corner-elements, and there, you have a nice sandbag fort.
And a chair and stuff upon the table.
Ambush. Ambush! Aaaaambush!!!! And supply routes, and escort missions, and .. really, there is so much more than ambushing the shit out of shit. Give it a try. Compute the most efficient route or detours from here to there, anywhere, aslong as the road network isn't fucked up - which unfortunately isn't that uncommon. :/