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

Pages: 1 2 3 4 [5] 6 7
61
Add-Ons / Rain Blocking Script
« on: November 22, 2016, 09:09:08 PM »
Tired of being wet indoors?  Tired of rain going straight through your roof and onto your head?  Download this mod.



It works by creating a physics zone inside of every single brick.

There is an impact to brick loading time and ghosting time.
It does not work well with large ramp bricks as it can only create rectangular/cubular shaped zones.

If you want to make rain go through a brick, turn raycasting off on that brick.

Source & Downloads
Code: [Select]
function fxDTSBrick::createRainBlock(%brick)
{
   if(!(%brick.isRaycasting())||isObject(%brick.rainblock))
   {
      return;
   }
   %pz = new PhysicalZone()
   {
      polyhedron = "0 0 0 1 0 0 0 -1 0 0 0 1";
   };
   if(!isObject(%pz))
   {
      error("ERROR: Could not create physical zone for " @ %brick.getDatablock().getName() @ "brick!");
      return;
   }
   missionCleanup.add(%pz);

   %brick.rainblock = %pz;

   //set size
   %boxMin = getWords(%brick.getWorldBox(), 0, 2);
   %boxMax = getWords(%brick.getWorldBox(), 3, 5);
   %boxDiff = vectorSub(%boxMax, %boxMin);
   %pz.setScale(%boxDiff);
     
   //set position - this looks wierd because the the physical zone isn't positioned from it's center
   %posA = %brick.getWorldBoxCenter();
   %posB = %pz.getWorldBoxCenter();
   %posDiff = vectorSub(%posA, %posB);
   %pz.setTransform(%posDiff);
}

if(isPackage(BrickUmbrellas))
{
   deactivatepackage(BrickUmbrellas);
}

package BrickUmbrellas
{
   function fxDTSBrick::onPlant(%brick)
   {
      %brick.schedule(150,"createRainBlock");
      Parent::onPlant(%brick);
   }
   function fxDTSBrick::onLoadPlant(%brick)
   {
     %brick.schedule(150,"createRainBlock");
      Parent::onLoadPlant(%brick);
   }
   function fxDTSBrick::onRemove(%brick)
   {
      if(isObject(%brick.rainblock))
      {
         %brick.rainblock.delete();
      }
      Parent::onRemove(%brick);
   }
   function fxDTSBrick::setRaycasting(%brick, %value)
   {
      if(%value==1)
      {
         if(isObject(%brick.rainblock))
         {
            %pz = %brick.rainblock;

            %posA = %brick.getWorldBoxCenter();
            %posB = vectorSub(%pz.getWorldBoxCenter(),%pz.position);
            %posDiff = vectorSub(%posA, %posB);
            %pz.setTransform(%posDiff);
         }
         else
         {
            %brick.createRainBlock();
         }
      }
      else
      {
         if(isObject(%brick.rainblock))
         {
            %brick.rainblock.setTransform("0 0 -500" SPC %brick.rainblock.rotation);
         }
      }
      Parent::setRaycasting(%brick, %value);
   }
};

activatepackage(BrickUmbrellas);

Mediafire: http://www.mediafire.com/file/nn0v8tb5ny4qwz4/Script_BrickUmbrellas.zip
Dropbox: https://www.dropbox.com/s/4ph66knjav7k5oz/Script_BrickUmbrellas.zip?dl=0
Leopard(Pecon's Filehosting): http://leopard.hosting/download.php?f=idwic&name=Script_BrickUmbrellas.zip
Blockland Glass: [waiting for approval]

62
General Discussion / My server stayed up for 25 days.
« on: August 16, 2016, 05:21:02 PM »
My server finally crashed :D

Quote
From: Friday, July 22, 2016 at 11:11:58 AM
To: Tuesday, August 16, 2016 at 1:51:55 PM
Result: 25 days, 2 hours, 39 minutes and 57 seconds

The duration is 25 days, 2 hours, 39 minutes and 57 seconds
Alternative time units

25 days, 2 hours, 39 minutes and 57 seconds can be converted to one of these units:

    2,169,597 seconds
    36,159 minutes (rounded down)
    602 hours (rounded down)
    25 days (rounded down)
    3 weeks (rounded down)
    6.86% of 2016

It was running mostly default add-ons.  No autosavers or anything.

"Dipper pines fan" caused 2588 of these errors while he was on there.  I have no idea what he was doing.
Code: [Select]
base/server/scripts/allGameScripts.cs (10113): Unable to find object: '' attempting to call function 'getId'
BackTrace: ->ProjectileData::onExplode

It stopped recording in the log at this point:
Code: [Select]
Got Connect challenge Request from 81.159.186.186:28050
Got connect request from 81.159.186.186:28050
  net name = Blockhead208668
AUTHCHECK: Blockhead208668 = internet client -> internet server, regular auth
Got Connect challenge Request from 81.159.186.186:53632
Got connect request from 81.159.186.186:53632
  net name = Blockhead208669
AUTHCHECK: Blockhead208669 = internet client -> internet server, regular auth
Auth Init Successfull: Blockhead208669
CADD: 132202 81.159.186.186:53632
 +- bl_id = 208668
 +- no auto admin
Posting to master server
Auth Init Successfull: Blockhead208668
CADD: 132200 81.159.186.186:28050
 +- bl_id = 208667
 +- no auto admin


63
I have a few weapon add-ons that change your FOV when you right-click to use iron sights.  When you click again to get out of iron sights, they set your FOV to 90.

My default FOV is 120.  So setting it to 90 is annoying.

I want to fix the guns so they set just your FOV back to what it was.

Is there a default function to get someone's FOV?  Or- is the lack of such a function the reason why the guns just set it to 90.

64
Add-Ons / Support_LegacyDoors w/Fixed ghostbrick collision.
« on: July 26, 2016, 10:17:36 PM »
The JVS Content ghost bricks have collision when Support_LegacyDoors is enabled.
This allowed clients without jets to use their ghost bricks as floating platforms.
I didn't like this.
So I fixed it.
Code: (description.txt) [Select]
Title: Legacy Doors
Author: Rotondo
Support for the old door bricks
DGEDIT - Old version used the collision shape for the ghostbrick.
This causes numerous problems for games where clients shouldn't be allowed to fly, or block doorways at will.
I made it use the noncolliding shape for the ghostshape, and the colliding shape for the regular shape.
I tried to change the original code as little as possible.  Search for "DGEDIT" to see all edited sections.
https://www.dropbox.com/s/ekg26jxov2ziy1q/Support_LegacyDoors.zip?dl=0
Install it in Blockland/Add-Ons/
Modify file properties to make it read-only. (So the launcher doesn't overwrite it.)

If this is ever fixed in the default game, please let me know, and I will remove the file from dropbox.

65
General Discussion / Using Old Versions of Blockland [INFO]
« on: July 25, 2016, 06:57:42 PM »
Sometimes you may want to try something you can't do in the latest version.  Sometimes you may just want to revel in the nostalgia.  Whatever the reason, here is some info for using old versions of blockland.

Sources
You can get the last version of v20 from port's github.
port's github blockland-20 thing
As of 7/25/2016 you can get the following versions from old.block.land.(Hosted by Pecon)
v0002
v1.03
v8
v13
v16
v17
v19

I collected v0002, v1.03, v8, v16, v17, and v19 from web.archive.org aka "The Wayback Machine".
I received v13 from Barnabas

Running the game
For all of these old versions you will need to do two things.
1. Prevent Updates
2. Prevent Posting to the v21 master server.
         If you post to the v21 master server from an early version of Blockland you will get banned from the master server, and any future servers you host will not show up there.  I have heard rumours that you are no longer able to post on the v21 master server from earlier versions without falsifying some information, but do not hold me to that.

To prevent updates in v20, you must simply bypass the launcher.
port's github blockland-20 thing includes a "run.bat" file which bypasses the launcher, thus preventing updates.

To prevent updates in v8-v19 you can simply download this add-on and install it before you run the game for the first time:
Mediafire: http://www.mediafire.com/download/7g879abcy0q32dk/Client_PreventUpdate.zip
Dropbox: https://www.dropbox.com/s/38w2o8xlj3ogkum/Client_PreventUpdate.zip?dl=0
To install Client_PreventUpdates in v8 you may have to unzip the folder and install the script manually.

To prevent posting to the v21 master server you can use this add-on:
Mediafire: http://www.mediafire.com/download/vcdbd5t8lcr05mk/Script_CustomMS.zip
Dropbox: https://www.dropbox.com/s/cyhdfwswgfalquq/Script_CustomMS.zip?dl=0
To install Script_CustomMS in v8, you may have to unzip the folder and install the script manually.

Script_CustomMS.zip, by default points to blmaster.hostoi.com:80.  But this can be changed by modifying $Pref::MasterServer.

Broken things
Do not contact Badspot about any issues with an older version of Blockland.  They are no longer supported and most, if not all of the issues you face will have been fixed in the latest version.
That said, here is everything that we know will be broken.
Changelogs:
1.0 to 1.03 https://web.archive.org/web/20070705195900/http://blockland.us/
7 to 20 https://web.archive.org/web/20111011173628/http://blockland.us/Change-Log.html

More versions
I have done extensive searching for old versions of blockland on web.archive.org, however I have not found every version of Blockland out there.  If you find one, whether it's on an old hard-drive or in some deep corner of the web, please test it(to confirm it installs or runs the correct version) and pm it to me.
As of 7/25/2016 I am missing the following versions:
v1.0
v1.01
    v1.0 to v1.01 patch
v1.02
v7
   v1.03 to v7 patch
   v7 to v8 patch
v9
v10
v11
v12
v14
v15
v18

66
Modification Help / Get Types Script for $TypeMasks::
« on: June 07, 2016, 09:50:05 PM »
I need to know what typemasks an object falls under when working with container raycasts.  I got tired of doing objectID.getType() and trying to decode that every time.  So I made a script that does it for me.

Code: (gettypes.cs) [Select]
function servercmdgettypes(%client,%id)
{
if(isObject(%id))
{
servercmdgettypestype(%client,%id.getType());
}
else
{
messageclient(%client,0,"Invalid Object");
}
}

function servercmdgettypestype(%client,%val)
{
messageclient(%client,0,"\c6$TypeMasks::All");
if(%val>=536870912)
{
messageclient(%client,0,"UnknownObjectType - 536870912");
%val = (%val-536870912)|0;
}
if(%val>=$TypeMasks::DamagableItemObjectType)
{
messageclient(%client,0,"\c6$TypeMasks::DamagableItemObjectType");
%val = (%val-$TypeMasks::DamagableItemObjectType)|0;
}
if(%val>=$TypeMasks::StaticRenderedObjectType)
{
messageclient(%client,0,"\c6$TypeMasks::StaticRenderedObjectType");
%val = (%val-$TypeMasks::StaticRenderedObjectType)|0;
}
if(%val>=$TypeMasks::FxBrickAlwaysObjectType)
{
messageclient(%client,0,"\c6$TypeMasks::FxBrickAlwaysObjectType");
%val = (%val-$TypeMasks::FxBrickAlwaysObjectType)|0;
}
if(%val>=$TypeMasks::FxBrickObjectType)
{
messageclient(%client,0,"\c6$TypeMasks::FxBrickObjectType");
%val = (%val-$TypeMasks::FxBrickObjectType)|0;
}
if(%val>=$TypeMasks::StaticTSObjectType)
{
messageclient(%client,0,"\c6$TypeMasks::StaticTSObjectType");
%val = (%val-$TypeMasks::StaticTSObjectType)|0;
}
if(%val>=$TypeMasks::PhysicalZoneObjectType)
{
messageclient(%client,0,"\c6$TypeMasks::PhysicalZoneObjectType");
%val = (%val-$TypeMasks::PhysicalZoneObjectType)|0;
}
if(%val>=$TypeMasks::DebrisObjectType)
{
messageclient(%client,0,"\c6$TypeMasks::DebrisObjectType");
%val = (%val-$TypeMasks::DebrisObjectType)|0;
}
if(%val>=2097152)
{
messageclient(%client,0,"UnknownObjectType = 2097152");
%val = (%val-2097152)|0;
}
if(%val>=$TypeMasks::CorpseObjectType)
{
messageclient(%client,0,"\c6$TypeMasks::CorpseObjectType");
%val = (%val-$TypeMasks::CorpseObjectType)|0;
}
if(%val>=$TypeMasks::ExplosionObjectType)
{
messageclient(%client,0,"\c6$TypeMasks::ExplosionObjectType");
%val = (%val-$TypeMasks::ExplosionObjectType)|0;
}
if(%val>=$TypeMasks::ProjectileObjectType)
{
messageclient(%client,0,"\c6$TypeMasks::ProjectileObjectType");
%val = (%val-$TypeMasks::ProjectileObjectType)|0;
}
if(%val>=$TypeMasks::VehicleBlockerObjectType)
{
messageclient(%client,0,"\c6$TypeMasks::VehicleBlockerObjectType");
%val = (%val-$TypeMasks::VehicleBlockerObjectType)|0;
}
if(%val>=$TypeMasks::VehicleObjectType)
{
messageclient(%client,0,"\c6$TypeMasks::VehicleObjectType");
%val = (%val-$TypeMasks::VehicleObjectType)|0;
}
if(%val>=$TypeMasks::ItemObjectType)
{
messageclient(%client,0,"\c6$TypeMasks::ItemObjectType");
%val = (%val-$TypeMasks::ItemObjectType)|0;
}
if(%val>=$TypeMasks::PlayerObjectType)
{
messageclient(%client,0,"\c6$TypeMasks::PlayerObjectType");
%val = (%val-$TypeMasks::PlayerObjectType)|0;
}
if(%val>=$TypeMasks::StaticShapeObjectType)
{
messageclient(%client,0,"\c6$TypeMasks::StaticShapeObjectType");
%val = (%val-$TypeMasks::StaticShapeObjectType)|0;
}
if(%val>=$TypeMasks::CameraObjectType)
{
messageclient(%client,0,"\c6$TypeMasks::CameraObjectType");
%val = (%val-$TypeMasks::CameraObjectType)|0;
}
if(%val>=$TypeMasks::ShapeBaseObjectType)
{
messageclient(%client,0,"\c6$TypeMasks::ShapeBaseObjectType");
%val = (%val-$TypeMasks::ShapeBaseObjectType)|0;
}
if(%val>=$TypeMasks::GameBaseObjectType)
{
messageclient(%client,0,"\c6$TypeMasks::GameBaseObjectType");
%val = (%val-$TypeMasks::GameBaseObjectType)|0;
}
if(%val>=512)
{
messageclient(%client,0,"UnknownObjectType = 512");
%val = (%val-512)|0;
}
if(%val>=256)
{
messageclient(%client,0,"UnknownObjectType = 256");
%val = (%val-256)|0;
}
if(%val>=128)
{
messageclient(%client,0,"UnknownObjectType = 128");
%val = (%val-128)|0;
}
if(%val>=$TypeMasks::MarkerObjectType)
{
messageclient(%client,0,"\c6$TypeMasks::MarkerObjectType");
%val = (%val-$TypeMasks::MarkerObjectType)|0;
}
if(%val>=$TypeMasks::TriggerObjectType)
{
messageclient(%client,0,"\c6$TypeMasks::TriggerObjectType");
%val = (%val-$TypeMasks::TriggerObjectType)|0;
}
if(%val>=$TypeMasks::WaterObjectType)
{
messageclient(%client,0,"\c6$TypeMasks::WaterObjectType");
%val = (%val-$TypeMasks::WaterObjectType)|0;
}
if(%val>=$TypeMasks::InteriorObjectType)
{
messageclient(%client,0,"\c6$TypeMasks::InteriorObjectType");
%val = (%val-$TypeMasks::InteriorObjectType)|0;
}
if(%val>=$TypeMasks::TerrainObjectType)
{
messageclient(%client,0,"\c6$TypeMasks::TerrainObjectType");
%val = (%val-$TypeMasks::TerrainObjectType)|0;
}
if(%val>=$TypeMasks::EnvironmentObjectType)
{
messageclient(%client,0,"\c6$TypeMasks::EnvironmentObjectType");
%val = (%val-$TypeMasks::EnvironmentObjectType)|0;
}
if(%val>=$TypeMasks::StaticObjectType)
{
messageclient(%client,0,"\c6$TypeMasks::StaticObjectType");
%val = (%val-$TypeMasks::StaticObjectType)|0;
}
messageclient(%client,0,"\c6Remainder: "@%val);
}

Usage:
/gettypes [object id]
/gettypestype [typemask # eg. 19456 for a player object]

I had to make a small bit of code to subtract one number from another, because torque was turning everything into scientific notation.  That is what stringsubtract is.

The result of /gettypes [playerobject] would look like this:
$TypeMasks::All
$TypeMasks::PlayerObjectType
$TypeMasks::ShapeBaseObjectType
$TypeMasks::GameBaseObjectType
Remainder: 00000

67
General Discussion / How to fix food selling in CityRPGs
« on: May 19, 2016, 04:06:45 PM »
So currently in most cityRPGs, a grocer will sell food using the following event:
onActivate > Self > sellFood> [%portionsize][%foodname][%profit]

Using these settings:
onActivate > Self > sellFood> [Americanized][Cake Batter][4]
The result is something like, "Would you like to by an Americanized portion of Cake Batter, for $30?"
A client types /yes, the transaction occurs, and the person is fed.
The client loses $30, and gets fed.
The seller, gets whatever they put in the "Profit" box.  In this case, that is $4.
The extra $26 is lost to the wind, or supposedly, is used to buy the ingredients to make the food.

This is a cool system, it makes sense that the seller doesn't get the whole $30.  You can't make food out of thin air.

However the problem with this is that some people aren't interested in profit.  They'll sell the food for the minimum possible amount.  I don't know why, but that's just how it is.  I can always find SOME shop selling an americanized portion of food for $27.  And if there isn't such a shop, in most cases i'm free to switch jobs and sell food to myself for the minimum price.

This hurts every food seller on the server.  If one person sells an infinite resource for the minimum possible profit, all other sellers have to either match prices, or get nothing.

Here is my proposed solution:
Give food sellers EXP for the food they sell.  The higher the EXP the less the ingredients cost the food seller while the seller is online.
This means that if you sell food for a long time, you can sell food for cheaper, and still make profit off of it.
The most important part of this in my opinion is that if a seller dies or changes jobs, they lose all exp.
This is so that if a competing seller has shifted 200 units of food, and still has the profit set to 1, you can just- kill them.  And reset their prices.

I'm not sure how well this would work on a server with no crime observation system.  Right now it's like some omnipotent jerk is always watching and reporting your crimes to the police.  So resetting someone else's prices is likely to get you jailed, forcing you to switch to the inmate job, thus losing all exp.

The last thing I should mention is that while a food seller is offline, their experience isn't being utilized to purchase ingredients.  So the price would go back up to whatever it would cost a new food seller.

68
Suggestions & Requests / Blockland installer v12 v13 or v14
« on: April 27, 2016, 01:52:03 AM »
I want to mess around on some old maps which need a long draw distance.  As far as I know v14 was the last release where the draw distance went above 1000.

I've done some extensive googling but the closest version I've found is v16.  I ran into a couple of copies that claimed to be v14 v13 v12 whatever.  But the archive date was always after 2010-05-25.  Which is when v15 was released.  When a new version is released, all old version exes are updated to the new one.  Even if their names aren't changed.  So anything I download from after May of 2010 is going to be v15 or later.

I believe there is a NO EXE rule here or something like that.  So if you have it, please pm me a link.


Edit:
I have been collecting old versions of blockland.
You can find the ones that have been found @ old.block.land
Do not contact Badspot about any issues with an older version of Blockland.  They are no songer supported and most, if not all of the issues you face will have been fixed in the latest version.
If you download one of those, you may also want some of these add-ons:
Prevent Updates:
http://www.mediafire.com/download/xv0dxt5ijgtxrbt/Client_PreventUpdate.zip

Custom Master Server Script From Port's v20(Works for all versions):
http://www.mediafire.com/download/vcdbd5t8lcr05mk/Script_CustomMS.zip

[CustomMS_DG removed because it defaults to master2.blockland.us]

RTB v2 for Blockland v9:
https://www.dropbox.com/s/a4psq995xat6tbv/System_ReturnToBlockland.zip?dl=0

As for blockland installers, I am currently missing:
v1.0
v1.01
    v1.0 to v1.01 patch
v1.02
v7
   v1.03 to v7 patch
   v7 to v8 patch
v9
v10
v11
v12
v14
v15
v18

If you find one of these somewhere on your computer- please pm it to me.
If you find a file hosted on www.blockland.us, forum.blockland.us, or web.archive.org please DON'T pm it to me unless you've tested it and confirmed it is a missing version.

69
Suggestions & Requests / Option to disable the Alt+Return keybind.
« on: April 23, 2016, 10:40:18 PM »
When I'm building, I'll commonly use the alt key to toggle supershift on and off.
I'm on a laptop, so I use the return key to place bricks.

It's a common occurrence that I will accidentally hit alt and enter at the same time- freezing my game and making me wait 15 seconds before I get control again.

I know there is a mod to disable the Alt+Enter keybind.
But it would be better if the ability to disable or rebind switching to fullscreen were a part of the default game.

Thank you for your time.

70
General Discussion / My TDM Idea
« on: April 22, 2016, 11:16:16 PM »
Mmnom.  I am putting together a team deathmatch.  I've started constructing bases and a map.  But I'd like to outline my ideas here.

Weapons
Old School weapon pack.  The version I have has some console spam w/the baseball bat.  I need to check if the latest version fixes that or if I have to fix it myself.
Default Weapons.
I'd consider Teir+Tactical but I want this to run on lower end systems.  Also there's the reload time to consider.  I kinda miss having infinite ammo, and the old school weapon pack has that.

Map
The map was made via a randomly generated cave.  Made of 64x cubes.  Each cell is 64x64x128.  Chances of placing a wall instead of an open area are 3/10.  The map size is 12 cells by 12 cells.  The entire area is enclosed.  There are no exits from the cave.
I picked 5 locations for bases, and placed hills between bases that had a straight shot to each other.
Players will spawn in a map room, from which they can teleport to any of their bases.
I will definitely put a timer on each teleport button.  Something like 3 seconds between each teleport in.
This is to make it easier for a base to be captured, and reduce the kill rate of spawnkilling.
Each base will have a tank.

Teams
I started making the map before I decided on how many teams I'm making.  The result is 5.
Blue, Red, Yellow, Orange, and White.  The Floor of the map is green, so no green team.  The walls are black.  So no black team.
Each round, each team gets a random set of weapons.  The weapons are weighted by damage per second.  I tested dps ingame by hooking into the function that damages targets and recording how much damage was done and what time it was.
I think the random weapons will affect the results of each round.  But should allow unskilled players to get some kills if they get a good weapon.

If a team loses all of their bases, the players in that team will be split up among the remaining teams.
I am unsure how this will play out, but I imagine it will be fun.  And if your team loses- there's no downtime.  You can just keep playing.

Server
I plan to use HammerHost.  I have no idea of how good their service is, but it is considerably cheaper than blocknet.  If you know of any other hosting services with a good service record, hook me up.

The modlist is very small.  There's the mod to handle a team losing, and old school weapons.  I believe there will be some events I'll need to add.  Stuff like shifteventenabled.

As far as administration goes- there isn't much that needs to be done.  The rules consist of, don't glitch through the 64xcube walls to kill people.
So- the admins only need to spy on people occasionally.
I may end up not needing even that.  I could modify the 64x cubes to have a zone in them which checks for vehicles and players, and kills them.  However that is ALOT of checks.  A better idea would be to force the vehicles and players to check if the brick above them is a part of the 64x wall.

Adding killzones on the outer border of the map is a good idea too.

71
General Discussion / A quick script to resize a map [Tutorialish]
« on: February 04, 2016, 06:10:39 PM »
So I made a quick map out of 64x Cube 1/4h bricks.  But it was too big, and took to long to travel across.  So I wanted to resize it.

Instead of doing it by hand I made a quick script:
Code: (resizemap.cs) [Select]
function resizemap(%mapfile)    //"saves/aatemp.bls"
{
if(isFile(%mapfile))    //first we check if the file exists, if it doesn't, report that.
{
%fr = new FileObject(){};    //create a new file object, this is what manipulates the file
%fr.openforread(%mapfile);    //use the file object to open the map file for reading
%fw = new FileObject(){};    //create a new file object, this one will write a new file
%fw.openforwrite("saves/resizedmap.bls");    //open for write will overwrite a file if it already exists
while(!%fr.isEOF())    //while we're not at the end of the file, continue
{
%line = %fr.readline();    //read a line from the file and store it in a variable
if(getWord(%line,0) $= "64x")    //check word 0 of the stored line, this is actually the first word
{
%line = "32x" SPC getWords(%line,1,2) SPC getWord(%line,3)*0.5 SPC getWord(%line,4)*0.5 SPC getWord(%line,5)*0.5 SPC getWords(%line,6,14);    //replace 64x with 32x, fill in the next two words("cube and 1/4h"), rescale the next 3 words, fill in the rest of the words.  for this file there were 15 words on the line we were changing
}
%fw.writeline(%line);    //write the stored line, if it didn't start with 64x, the line is unedited
}    //if we're not at the end of the file, we'll loop back to the beginning of the while loop
%fr.close();    //close and clean up the file objects we were using
%fr.delete();
%fw.close();
%fw.delete();
echo("File written");    //report we're finished
}
else    //no map file
{
echo("Map file not found.");    //report no map file
}
}
discoverfile("base/resizemap.cs");
exec("base/resizemap.cs");
resizemap("saves/aatemp.bls");

It reads a line and checks if the first word on the line is 64x.
If it is, it changes 64x to 32x and scales down the position data by 1/2.
Then it writes the line to a new file.
If the first word is not 64x, it just passes it on to be written to the new file.

I hope this was clear enough for a newbie to figure it out.

This webpage has more information on file objects, and you can find links at the top for string manipulation. (getWord, getWords, etc.)
http://docs.garagegames.com/tge/official/content/documentation/Reference/Console%20Functions/TorqueScript_Console_Functions_7.html

72
Add-Ons / Slayer Events for World Domination
« on: February 04, 2016, 03:55:14 AM »
So uh- if you were taking over the world.  And you took over a country, some of the people in that country would run away.
And some of them would join your cause.

I made some events to make that happen in Blockland.  w/Slayer.

Event_Slayer_TDM_TeamDissolving
onWhatever > Team(Brick) > dissolveTeam
onWhatever > Team(Client) > dissolveTeam

This event removes all players from a team, locks the team, and disables autosorting for that team.
(This is all undone on minigame reset)
Then it takes all of those players, and splits them up among the remaining teams via the autosort function.
ie. a country was defeated so its population needs to pick a new team

Event_Slayer_TDM_AutosortWeight
onWhatever > Team(Brick) > incAutosort [-200 to 200]
onWhatever > Team(Client) > incAutosort [-200 to 200]
onWhatever > Team(Brick) > setAutoSort [0 to 200]
onWhatever > Team(Client) > setAutoSort [0 to 200]

This event lets you set or modify a team's autosort weight via event.  This means if say, a base was captured.  You could adjust the winning team's autosort weight to give them an advantage.
ie. A country owns more land, so more people want to join them.

So yeah.  Thats it.  Nothing fancy.
Here are the download links.  I've provided both mediafire and dropbox links.  Mediafire has ads, dropbox has a download limit.

TeamDissolving
Mediafire: http://www.mediafire.com/download/2v0hpcat8d7cclk/Event_Slayer_TDM_TeamDissolving.zip
Dropbox: https://www.dropbox.com/s/rxqce4wzh3hq7kh/Event_Slayer_TDM_TeamDissolving.zip?dl=0

AutoSortWeight
Mediafire: http://www.mediafire.com/download/pgz5vnis98w8gk9/Event_Slayer_TDM_AutosortWeight.zip
Dropbox: https://www.dropbox.com/s/a6bwhdxsod1rj91/Event_Slayer_TDM_AutosortWeight.zip?dl=0

73
I want to make a space station.  And I'm wondering what some good color schemes are for the walls/uniforms in the different sections of the station.
There are three different sections.
Utility/Maintenance - These guys fix the station when something goes wrong.  If they don't, everyone dies.
Administration - This includes guards, medical officers, etc.  They support the people themselves.
Civilian - They live here.

Any number of different color schemes is fine.  The galactic federation isn't the only group out there.

74
General Discussion / I got Blockland running on a Chromebook
« on: January 22, 2016, 07:12:52 PM »
I got Blockland running on a Chromebook.  Specifically the C200.







In order to do this I basically just followed a bunch of internet tutorials.  So- while not THAT great of an achievement, I can follow directions! :D
In the end the steps would probably be:
Put chromebook in Developer Mode.
Regret deleting all of your files in the process. :(
Access your linux shell. (Ctrl+Alt+T, type in shell)
Follow the online tutorial and screen prompts for installing Crouton.
Revel in your dual-booting operating system. (Ubuntu+ChromeOS)
Try to install WINE.
Realize they left a bunch of stuff out w/crouton.
Get a bunch of super necessary packages via command console.
Successfully install WINE.
Download BlocklandPortable.zip
Get an unzipper for unbuntu, cause oh- they left that out too.
Unzip BlocklandPortable.zip
Run BlocklandLauncher.exe w/WINE.

This all took roughly 3 hours.  And there was alot of googling involved.  In addition to being able to run Blockland.  I should be able to run other games as well.  Such as- Starcraft 1.  Or... Age of Empires, maybe.  Pinball?  Jeez idk.

Anyway, the game seems to run just fine.  I tested it briefly in a freebuild.  But I haven't done anything extensive yet.

75
General Discussion / Is this a good enough tutorial?
« on: January 19, 2016, 07:26:00 PM »
I was thinking the console is super useful.  So I wrote a very long explanation on how to use one command.  So uh- tell me if this helps you understand torque's structure at all.  Since that's what it mostly covers.



Hi there.

I want to teach you how to use the console.
It's not necessary to have fun with this game.
But it helps out a ton if you wanna do cool stuff.

So.
Let's uh, start with... teleportation.  Aight?
To teleport someone- we need to find the someone we're teleporting.

Each player has at least two object associated with them.
The first one is the GameConnection.  Or the client.  We'll call it a client, because that's how its refered to in ALOT of code. But just remember, it's the Game Connection.  Because that describes- perfectly- what it does.  Its a persons connection to the game.  It stores their Blockland ID, their Name, their LANname, all of their avatar preferences, etc.  Just like- information on who that person is.  If you delete it- the person is removed from the game.

The second object we'll be using is the Player object.  This is the little blockhead dude you see in the game.  The one you shot in the head and tea-bagged before he dissappeared in a cloud of dust.  The Player has health, a position, and items.

All objects in blockland have an object ID.  This is- a non-negative integer you can use in the console to mess with an object.  So like- if I look at the ground and type /getid.  I get an object id for the ground.  If I type in the ground's object id .delete();  it will delete the ground.
1337.delete();

Object ID's are assigned in the order the objects are created.  If I spawn before someone else, my player objects ID will be lower than their player object ID.
Same with Client objects.  If Badspot joins my server 30 minutes into a game.  My GameConnection Object ID will be lower than his.

Object IDs should bot be confused with Blockland IDs.  A blockland ID is basically just an invoice number.  This is the 13426th purchase of the game.

Ok so- forget i kinda got off track.

OK so an object can be found if you know it's ID number.  But it's real loving difficult to find the ID number of an object if you don't know where that object is.  And besides that it's not like we can use /getid on a client object.  A client object isn't represented visually- anywhere in the game.  All of your gui elements such as your item inventory, the main menu, the escape menu.  These have object Ids too.  How can we find them?  We can't use /getid on them.

There is a way- by searching through all objects currently created and comparing what we know about the object we're looking for to these objects.  But that takes a long time- And is loving impractical.  Like searching for a needle in a haystack.  Wouldn't it be better if these objects were sorted somehow?  Like if all player objects were in the same folder or something. ...  Oh wait yeah, that's how it works.

SimGroups.  Simulated groups.  Basically just information directories.  So if we wanted to keep a list of all of the clients connected to the game, we could make a client group, and add all of he clients to the client group.  Great.  That certainly reduces the size of the list we have to search through.  15 people on the server, that's only 15 entries we have to look through.
Only it's not a list of 15 objects, because we still have no way of finding the client group object we just created.  So it's still the 8000 or so objects created when we started the game.

This is where names come in.  Blockland does have a group for clients.  it's called ClientGroup.  If you type in ClientGroup.getObject(0);.  It will return the object ID of one of the clients currently in the game.  getObject(1); will return the next client, and so on.
...
Actually I'm- well I'm technically correct here. It WOULD return the object ID.  But you wouldn't see it.  You didnt tell the game to do anything with the object ID, so it would just throw it away.  If you wanted to... SEE the object id.  You would want to do echo(ClientGroup.getObject(0));  This will print the object ID to the console.  If you then took that ID number and did ID#.delete("lolkikd"); then it would kick that person from the game. Teehee.
You could also do ClientGroup.getObject(0).delete("hahahaha"); repeatedly.  And you would eventually kick everyone from the game.You're basically saying:  Search the list of named objects for an object named "ClientGroup". Pretend that object is a folder, and grab the first object in that folder. Then delete the object you grabbed.

Ok so now I should explain tags and functions.  Most of what we've been using so far are functions.  getObject(); is a function.  delete(); is a function.  quit(); is a function too.  That quits your game btw.  In case you couldn't tell.
One of the functions you will be using alot is the findclientbyname("name"); function.  This function- basically just searches through the client group for a connection with the same ingame name as the one you typed in. Which is great.  Cause instead of typing:
if(isObject(ClientGroup)){for(%i=0;%i<ClientGroup.getCount();%i++){if(ClientGroup.getObject(%i).name $= "Name"){ClientGroup.getObject(%i).delete("lol");}}}
Every time I want to kick someone.  I can just type: findclientbyname("Name").delete("lol");
Greaaaaat time savers.

Tags are a way of storing information.  If I knew someone was a national socialist sympathizer.  And I wanted to keep track of that.  I could do something like this: findclientbyname("RiddlerWasReicht44").isnational socialistsympathizer = "jawohl";  And from then on, as long as he stays in the server I can look that up about him.  Just- echo(findclientbyname("Name").isnational socialistsympathizer);  If he's a sympathizer, it says "jawohl".  Otherwise- it does nothing, or returns a blank line.  I can't remember which.

Ok so now you know about Groups, functions, and tags.  That's-  that's all you need I think.
By default, when a player spawns ingame.  The player object ID is stored on the client object of the person who owns it.
So something like findclientbyname("NewGuyJoe").player = 198347;  Or to be more accurate the game probably does something like 197220.player = 198347;
And likewise, the client object ID is stored on the player.
So something like: 198347.client = 197220;

In addition the player also has a position tag stored on it.  Something like "30 -12 4.5".  If you've ever taken math beyond the 7th grade level, you've probably run into a coordinate system.  These are just- x y z coordinates in relation to the center of the world.

SO.  With all of this in mind we can say.
findclientbyname("Name").player.position = "0 0 10"; to teleport you 10 units above the center of the world. (That's 20 brick studs btw)
OK. SO there.  It's done.  That's how you can teleport someone with the console.

You could also use findclientbyname("Name").player.setTransform("0 0 10 0 0 1 0");  And that would technically be more correct, since setTransform is a part of the default game engine, while updating the position tag to move someone seems to just be a hack some clever developer put in at some point.

Pages: 1 2 3 4 [5] 6 7