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 - TheBlackParrot

Pages: 1 2 3 4 5 [6] 7 8 9 10 11 ... 27
76
Games / Running a Quake 3 server
« on: August 06, 2015, 11:31:12 PM »
Vanilla FFA, using the ioquake3 engine.




77
http://chattest.theblackparrot.us

It explains some stuff on the index page, feel free to drop by room "BLF"

EDIT: If you guys register a room, I'll put it up here

78
Off Topic / Blockland.txt
« on: July 12, 2015, 10:09:59 PM »

79
Off Topic / get a phrase [twitter account is a thing]
« on: July 09, 2015, 09:25:01 PM »

get a phrase
(could use some extra words, see the lists)












80
Off Topic / Northern Lights are apparently pretty strong tonight
« on: June 23, 2015, 01:24:51 AM »
http://www.aurora-service.org/aurora-forecast/

Seeing it mentioned a lot on Twitter, I'm too far south :(

81
MSP's mute command is apparently really bad, and I decided against using CSCS to create a new one.
I attempted to make it look as default as possible, even going as far as preventing serverCmdStartTalking from functioning (optionally) on muted players.

Command syntax is /mute victim minutes, the victim does not have to be on the server. Names will work if the victim is on the server, while BL_ID will always work.

Features:
  • Mutes remain persistent after restarts.
  • Blue names in the upper-left corner can optionally be prevented from working on muted players (their name will not show up when they're typing a message). By default, it is prevented from working.
  • Permanent muting can be used by using -1 for the amount of minutes.
  • Victims do not have to be on the server to be muted
  • Mutes do not have to be announced, they are by default.

Variables:
  • $Mute::Core::Config
    • Configuration location
    • config/server/mute/config.cs by default.
  • $Mute::Core::SaveDir
    • Muted player data goes here, this is where the DB will fetch muted players on server start.
    • config/server/mute/saves by default.
  • $Mute::Server::Announce
    • Option to announce mutes.
    • 1 by default.
  • $Mute::Server::AllowRank
    • Who is able to use the command.
    • Admin by default
    • Options include
      • Moderator*
        • *Must use %client.isModerator, wasn't sure what to actually use here so I just assumed the standard.
      • Admin
      • Super Admin
      • Host
  • $Mute::Server::AllowIsTyping
    • Option to enable/disable muted player's blue name in the upper left.
    • 1 by default.

I'll add RTB prefs by demand, considering it's supposed to be dead and there's no replacement for it.



Download
Stable: v1.0.0-2
Testing: v1.1.0-1

Support_Updater will work with this addon, delete version.txt if you wish for it not to.



Testing repository currently has a shadow mute option, set $Mute::Server::Shadow to 1 to try it out. The stable version does not currently have this option.

82
https://www.youtube.com/watch?v=3IkPW8P4iI4
He's the same guy who did Constant.

Trying to help spread the word, it's an amazing remix.

83
Code: [Select]
function GameConnection::spawnPlayer(%this) {
[irrelevant code]

$LoadingBricks_BrickGroup = %this.brickgroup;
$LoadingBricks_Client = %this;
$LoadingBricks_ColorMethod = 3;
$LoadingBricks_DoOwnership = false;
$LoadingBricks_FileName = "Add-Ons/Gamemode_Numb3rs/bls/station.bls";
$LoadingBricks_Silent = true;
$LoadingBricks_StartTime = getSimTime();
$loadOffset = %xpos SPC %ypos SPC %zpos;
ServerLoadSaveFile_Start($LoadingBricks_FileName);

return parent::spawnPlayer(%this);
}

function fxDTSBrick::onLoadPlant(%this) {
parent::onLoadPlant(%this);
// not everything is set automatically
%this.schedule(50,renameNumbersBrick);
}

function fxDTSBrick::renameNumbersBrick(%this) {
//only works on SP for whatever reason
//%client = %this.client;

if(%client $= "") {
%group_name = %this.getGroup().getName();
%client = findClientByBL_ID(getSubStr(%group_name,stripos(%group_name,"_")+1,strLen(%group_name)));
}

[irrelevant code]

When bricks are loaded by the first part of the code in Single Player, I can use %client = %this.client to get the client from the loaded brick. On internet/dedicated servers, I can't do this, it's "-1" for everything.
I have to resort to grabbing the brickgroup the brick is in and do string manipulation on the name of said brickgroup, then find the client via the BL_ID obtained from the group name. This works on everything fine, but it seems completely unnecessary.
Is there a reason for everything loaded being "-1" on internet/dedicated servers?

EDIT: It's actually a bigger issue now with clients using the same IDs, stuff.

84

It queries the master server every 5 minutes and displays stuff in a graph.
Anything you guys want to see tracked?

https://github.com/TheBlackParrot/blockland-statistics

85
It's gotten up to the point now to where I just keep my key in a password manager. I think after dealing with this issue for a few years now, you'd get a bit sick and tired of it. I wouldn't be quite as annoyed if all client add-ons executed after inputting the code, but that doesn't happen.

What's changing in the key algorithm that forces me to re-enter my key on random days?


86
http://twitch.tv/theblackparrot

Goal for 100S is to beat all levels (including secret ones) with all secrets found, I currently hold the world record for the category.

ye come join, i don't talk often tho

87
I'm attempting to get around this 30 second limit for projectile objects that I keep hitting by duplicating the original and then deleting the original.

Code: [Select]
function takeGameProjProjectileClass::onExplode(%this,%obj) {
%client = %obj.client;

if(%obj.markedForExplosion) {
%client.play2D(takeProjExplode);
if(%obj.combo > %client.highestCombo) {
%client.highestCombo = %obj.combo;
}
if(%obj.combo >= 20) {
%color = "<color:" @ RGBToHex(getColorIDTable(%client.color)) @ ">";
$DefaultMinigame.messageAll('',%color @ %client.name SPC "\c6obtained a\c3 x" @ %obj.combo SPC "combo!");
}
cancel(%obj.positionLoop);

Sky.flashColor(%client,1);

%client.saveTakeGame();
return parent::onExplode(%this,%obj);
}

%proj = new Projectile(TempProjectile) {
dataBlock = %obj.dataBlock;
initialPosition = %obj.getPosition();
initialVelocity = %obj.getVelocity();
position = %obj.getPosition();
rotation = %obj.rotation;
scale = "1 1 1";
sourceObject = %obj.sourceObject;
sourceSlot = %obj.sourceSlot;
client = %obj.client;
originPoint = %obj.getPosition();
sourceClient = %obj.sourceClient;
combo = %obj.combo;
};
MissionCleanup.add(%proj);
%proj.setName("Laser" @ %proj.getID());
%client.projectile = %proj;
%proj.checkPosition();
%obj.delete();
}

It correctly duplicates the projectile for the most part, except its velocity is set to 0 (and therefore I don't know if the trajectory is correct either). %proj.setVelocity() also doesn't exist.

88
Custom Server Command System is intended to replace Munk's Server Pack and allow for much greater modularity over MSP.

CSCS allows server hosts to add (or remove) drop-in commands created by them or other players. Commands remain separate from each other in their own respective script to allow for easier editing/updating and more specific detection of errors if need be.
It is also much easier for non TGE-savvy players to add commands, as it functions like the add-on system. Simply placing a script in config/server/CSCS/cmds and running /restartcscs on the server will allow it to be used. Removing a script obviously will remove it from CSCS listings.
TODO: null a removed command

The system also allows easier editing of permissions for these commands as each command is given a permission limit in a prefs.cs file (by default at config/server/CSCS/prefs.cs), or by editing $Pref::CSCS::Allow[command]Command variables on the server.
Each time a command is used, it can also optionally be logged, both on successes and failures.
TODO: Server_Permissions support? idk


CSCS format
Only //COMMAND and its first field, //LIMIT, and //enabled are required metadata, as the CSCS core needs these for commands to function correctly.
Setting //enabled to something else will disable the addon from being executed upon initialization (or reinitialization) of CSCS scripts.

//COMMAND^command^arg1 describe;arg2 the;arg3 arguments
//AUTHOR^name^bl_id
//INFO^describe the command
//LIMIT^host (3), super admin (2), admin (1), none (0) [see server.cs for alternate names, e.g. H, SA, RA, etc.]
//enabled

^ denotes a field (TAB)


Included CSCS functions
GameConnection::isHost(%this) -- Checks if the client is the host
GameConnection::isCSCSAllowed(%this,%var,%silent) -- Checks to see if the client can use the command specified (%var would be $Pref::CSCS::Allow[command]Command variables)
GameConnection::checkCSCSCommandSpam(%this) -- Checks to make sure the client isn't spamming commands
GameConnection::CSCSError(%this,%msg) -- Gives the client a chat message denoting an error in your command (see slap.cs below)
GameConnection::logCSCSCommand(%this,%cmd,%args,%success) -- Logs the command a client triggered (%args would be a space separated list or etc.). The logs are actually CSV files, but are named with the .txt extension to allow for viewing in most text editors without any hassle.


Example CSCS command scripts
cmds/dfg.cs
Code: [Select]
//COMMAND dfg
//AUTHOR TheBlackParrot 18701
//INFO Randomizes all of your bricks' color
//LIMIT none
//enabled

$Pref::CSCS::DFGLimit = 10000; // extra prefs CAN be defined and exported, the CSCS core takes care of exporting

function serverCmdDFG(%this) {
if(!%this.isCSCSAllowed($Pref::CSCS::AllowDFGCommand)) {
// this if statement will check to see if the player is allowed to use the command
// $Pref::CSCS::Allow[command]Command is the syntax
%this.logCSCSCommand("dfg","",0);
return;
}
if(!%this.checkCSCSCommandSpam()) {
// built in spam checker, this applies to all commands that have this if statement
return;
}

// logs that the user could use the command
%this.logCSCSCommand("dfg","",1);

%group = "BrickGroup_" @ %this.bl_id;
if(%this.isAdmin || %group.getCount < $Pref::CSCS::DFGLimit) {
%count = %group.getCount();
} else {
%count = $Pref::CSCS::DFGLimit;
}

for(%i=0;%i<%count;%i++) {
%brick = %group.getObject(%i);
if(%brick.originColor $= "") {
%brick.originColor = %brick.colorID;
}
%brick.setColor(getRandom(0,4));
}
}

cmds/list.cs
Code: [Select]
//COMMAND cmds
//AUTHOR TheBlackParrot 18701
//INFO Lists all available CSCS commands
//LIMIT none
//enabled

function serverCmdCmds(%this) {
if(!%this.isCSCSAllowed($Pref::CSCS::AllowResetCommand)) {
%this.logCSCSCommand("cmds","",0);
return;
}
if(!%this.checkCSCSCommandSpam()) {
return;
}

%this.logCSCSCommand("cmds","",1);

messageClient(%this,'',"\c4Command list:");
for(%i=0;%i<$CSCS::CommandCount;%i++) {
%args = "";
%arg = "";
%argstr = "";

%name = $CSCS::Command[%i,name] @ "Command";
%val = $Pref::CSCS::Allow[%name];

if(%this.isCSCSAllowed(%val,1)) {
%c++;

%args = $CSCS::Command[%i,args];
while(strLen(%args)) {
if(stripos(%args,";") != -1) {
%arg = getSubStr(%args,0,stripos(%args,";"));
} else {
%arg = %args;
}

if(%argstr $= "") {
%argstr = "[" @ %arg @ "]";
} else {
%argstr = %argstr SPC "[" @ %arg @ "]";
}

if(stripos(%args,";") != -1) {
%args = getSubStr(%args,stripos(%args,";")+1,strLen(%args));
} else {
%args = "";
}
}
%argstr = "\c5" @ %argstr @ " ";

switch(%val) {
case 0:
%limitstr = "";
case 1:
%limitstr = "<color:aaaaaa>(Admin)";
case 2:
%limitstr = "<color:ffbb00>(Super Admin)";
case 3:
%limitstr = "<color:00ffff>(Host)";
}

messageClient(%this,'',"\c2" @ %c @ ". \c3/" @ $CSCS::Command[%i,name] SPC %argstr @ "\c7--\c6" SPC $CSCS::Command[%i,desc] SPC %limitstr);
}
}
}
function serverCmdCommands(%this) { serverCmdCmds(%this); }
function serverCmdCSCS(%this) { serverCmdCmds(%this); }
function serverCmdCmdList(%this) { serverCmdCmds(%this); }

cmds/slap.cs
Code: [Select]
//COMMAND slap player or id
//AUTHOR TheBlackParrot 18701
//INFO Moves players out of the way
//LIMIT admin
//enabled

function serverCmdSlap(%this,%target) {
if(!%this.isCSCSAllowed($Pref::CSCS::AllowSlapCommand)) {
%this.logCSCSCommand("slap",%target,0);
return;
}
if(!%this.checkCSCSCommandSpam()) {
return;
}

%targetObject = findClientByName(%target);
if(!isObject(%targetObject)) {
%targetObject = findClientByBL_ID(%targetObject);
if(!isObject(%targetObject)) {
%this.CSCSError(%target SPC "does not exist!");
return;
}
}

if(!isObject(%targetObject.player)) {
%this.CSCSError(%targetObject.name SPC "has not spawned!");
return;
}

%this.logCSCSCommand("slap",%target,1);

messageClient(%targetObject,'',"\c3" @ %this.name SPC "\c6slapped you!");
%targetObject.play2D(CSCS_slap);
messageClient(%this,'',"\c6You have slapped\c3" SPC %targetObject.name);

%targetObject.player.addVelocity(getRandom(-20,20) SPC getRandom(-20,20) SPC getRandom(0,20));
}



I'm open to suggestions on things to add (wrappers for common, simple multi-line functions would be great too), feel free to mess around with it!

Download || GitHub repo
(current version: v0.1-1)



89
General Discussion / TheBlackParrot's Brickochet [v0.1.9-1]
« on: April 05, 2015, 06:50:48 PM »
demo video

The objective of Brickochet is to get your lasers to hit as many bricks as possible within 10 minute rounds. The winner is decided by who "owns" the most bricks after the round is over.
You ARE ALLOWED to steal bricks from other players.

This is somewhat still work in progress, but it's stable enough to start taking suggestions from you guys on what to add, modify, or remove, or etc.







90
Code: [Select]
//explosion
datablock AudioProfile(combo1)
{
filename = "./sounds/combo1.wav";
description = AudioClosest3d;
preload = true;
};
datablock AudioProfile(combo2:combo1) { filename = "./sounds/combo2.wav"; };
datablock AudioProfile(combo3:combo1) { filename = "./sounds/combo3.wav"; };
datablock AudioProfile(combo4:combo1) { filename = "./sounds/combo4.wav"; };
datablock AudioProfile(combo5:combo1) { filename = "./sounds/combo5.wav"; };
datablock AudioProfile(takeProjExplode:combo1) { filename = "./sounds/explode.wav"; };
datablock AudioProfile(takeProjHit:combo1) { filename = "./sounds/hit.wav"; };
datablock AudioProfile(takeProjFire:combo1) { filename = "./sounds/fire.wav"; };

datablock ParticleData(takeGameProjExplosionParticle)
{
dragCoefficient      = 3;
gravityCoefficient   = -0.0;
inheritedVelFactor   = 0.0;
constantAcceleration = 0.0;
lifetimeMS           = 700;
lifetimeVarianceMS   = 300;
textureName          = "base/data/particles/dot";
spinSpeed      = 0;
spinRandomMin     = 0;
spinRandomMax     = 0;
colors[0]     = "1 1 1 0.1";
colors[1]     = "1 1 1 0.5";
colors[2]     = "1 1 1 1";
sizes[0]      = 2;
sizes[1]      = 2;
sizes[2]      = 2;

times[0] = 0;
times[1] = 0.1;
times[2] = 0.2;

useInvAlpha = false;
};

datablock ParticleEmitterData(takeGameProjExplosionEmitter)
{
lifeTimeMS = 500;

ejectionPeriodMS = 1;
periodVarianceMS = 0;
ejectionVelocity = 15;
velocityVariance = 8.0;
ejectionOffset   = 1.25;
thetaMin         = 0;
thetaMax         = 180;
phiReferenceVel  = 0;
phiVariance      = 360;
overrideAdvance = false;
particles = "takeGameProjExplosionParticle";

uiName = "takeGameProj Explosion";
};
datablock ExplosionData(takeGameProjExplosion)
{
//explosionShape = "";
lifeTimeMS = 500;

emitter[0] = takeGameProjExplosionEmitter;

soundProfile = takeProjExplode;

faceViewer     = true;
explosionScale = "1 1 1";

shakeCamera = true;
camShakeFreq = "2.0 2.0 2.0";
camShakeAmp = "1.0 1.0 1.0";
camShakeDuration = 0.5;
camShakeRadius = 10.0;

// Dynamic light
lightStartRadius = 3;
lightEndRadius = 1;
lightStartColor = "00.0 0.6 0.9";
lightEndColor = "0 0 0";
};

//bullet trail effects
datablock ParticleData(takeGameProjTrailParticle)
{
dragCoefficient      = 3;
gravityCoefficient   = -0.0;
inheritedVelFactor   = 0.0;
constantAcceleration = 0.0;
lifetimeMS           = 15000;
lifetimeVarianceMS   = 0;
textureName          = "base/data/particles/dot";
spinSpeed      = 0;
spinRandomMin     = 0;
spinRandomMax     = 0;
colors[0]     = "1 1 1 1";
colors[1]     = "1 1 1 1";
colors[2]     = "1 1 1 1";
sizes[0]      = 4;
sizes[1]      = 4;
sizes[2]      = 4;

times[0] = 0;
times[1] = 0;
times[2] = 0;

useInvAlpha = false;
};
datablock ParticleEmitterData(takeGameProjTrailEmitter)
{
ejectionPeriodMS = 2;
periodVarianceMS = 0;
ejectionVelocity = 0.0;
velocityVariance = 0.0;
ejectionOffset   = 0.0;
thetaMin         = 0;
thetaMax         = 90;
phiReferenceVel  = 0;
phiVariance      = 360;
overrideAdvance = false;
particles = "takeGameProjTrailParticle";

uiName = "takeGameProj Trail";
};


datablock ProjectileData(takeGameProjProjectile)
{
projectileShapeName = "base/data/shapes/empty.dts";
directDamage        = 0;
directDamageType    = $DamageType::Default;
radiusDamageType    = $DamageType::Default;
classname = "takeGameProjProjectileClass";


impactImpulse       = 0;
verticalImpulse     = 0;
explosion           = takeGameProjExplosion;
bloodExplosion        = takeGameProjExplosion;
particleEmitter       = takeGameProjTrailEmitter;
explodeOnPlayerImpact = false;
explodeOnDeath        = true;

   brickExplosionRadius = 0;
   brickExplosionImpact = 0;             //destroy a brick if we hit it directly?
   brickExplosionForce  = 0;            
   brickExplosionMaxVolume = 0;          //max volume of bricks that we can destroy
   brickExplosionMaxVolumeFloating = 0;  //max volume of bricks that we can destroy if they aren't connected to the ground (should always be >= brickExplosionMaxVolume)

   sound = "";

   muzzleVelocity      = 65;
   velInheritFactor    = 1.0;

   armingDelay         = 15000;
   lifetime            = 15000;
   fadeDelay           = 14500;
   bounceElasticity    = 0.99;
   bounceFriction      = 0.00;
   isBallistic         = true;
   gravityMod          = 0.0;

hasLight    = false;
lightRadius = 3.0;
lightColor  = "0 0 0.5";

uiName = "takeGameProj";
};

function createDynamicTGProjectiles() {
for(%i=1;%i<64;%i++) {
%string[0] = "datablock ParticleData(takeGameProjTrailParticle" @ %i @ " : takeGameProjTrailParticle) { colors[0] = colors[1] = colors[2] = \"" @ getColorIDTable(%i) @ "\"; };";
%string[1] = "datablock ParticleEmitterData(takeGameProjTrailEmitter" @ %i @ " : takeGameProjTrailEmitter) { particles = \"takeGameProjTrailParticle" @ %i @ "\"; };";
%string[2] = "datablock ProjectileData(takeGameProjProjectile" @ %i @ " : takeGameProjProjectile) { particleEmitter = \"takeGameProjTrailEmitter" @ %i @ "\"; };";
for(%j=0;%j<3;%j++) {
echo(%string[%j]);
}
//eval()
}
//datablock ParticleData("takeGameProjTrailParticle" @ %i : takeGameProjTrailParticle) {
// colors[0] = colors[1] = colors[2] = getColorIDTable(%i);
//};
//datablock ParticleEmitterData("takeGameProjTrailEmitter" @ %i : takeGameProjTrailEmitter) {
// particles = "takeGameProjTrailParticle" @ %i;
//};
//datablock ProjectileData("takeGameProjProjectile" @ %i : takeGameProjProjectile) {
// particleEmitter = "takeGameProjTrailEmitter" @ %i;
//};
}
createDynamicTGProjectiles();

package takeGameProjPackage {
function Projectile::onAdd(%this,%obj) {
%obj.client.projectile = %obj;
return parent::onAdd(%this,%obj);
}
};
activatePackage(takeGameProjPackage);

function takeGameProjProjectile::onCollision(%this,%obj,%col,%fade,%pos,%normal)
{
if(%col.getType() & $TypeMasks::FXBrickObjectType) {
if(!isObject(%obj.client)) {
return;
}
if(!isObject(%obj.client.minigame)) {
return;
}
%client = %obj.client;

if(%col.takenBy != %client) {
%obj.combo++;
if(%obj.combo >= 5) {
$DefaultMinigame.messageAll('',"\c4" @ %client.name SPC "\c6obtained a\c3 x" @ %obj.combo SPC "combo!");
%sound = "combo" @ %obj.combo-4;
if(!isObject(%sound)) {
%sound = "combo5";
}
$DefaultMinigame.playSound(%sound);
}
%client.play2D(takeProjHit);
%col.playSound(takeProjHit);
}

%col.takenBy = %client;
%col.setColor(%client.color);
}
}

function takeGameProjProjectile::onExplode(%this,%obj) {
%obj.client.play2D(takeProjExplode);
}

I'm trying to create different colored projectiles that will use a defined color in the colorset from a client variable (e.g. %client.color = 12, so it would fire a projectile with that color and only that color).

I'm looking at the paint can projectiles as a base, and noticed they all use the same class name. So I figured I could do the same, but I can't? I get this when creating the initial datablock the dynamic ones are using as a base.
Error: Cannot change namespace parent linkage for takeGameProjProjectile from ProjectileData to takeGameProjProjectileClass
I searched the error here and only came up with results saying "try using a different name, you're using the same name somewhere else," but this isn't used anywhere else.

I assumed I could also just set the state of an emitter and just define 63 colors[##] variables, but it looks like I can't do that either.

pls help

edit: clarified to mention trails are ok too, namely takeGameProjTrailParticle

Pages: 1 2 3 4 5 [6] 7 8 9 10 11 ... 27