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

Pages: [1] 2 3
1
Modification Help / Clear all bricks
« on: July 09, 2014, 01:35:43 PM »
How do you delete all bricks on a server with a script? This is what I'm currently using:
Code: [Select]
for (%i = 0; %i < MainBrickGroup.getCount(); %i++)
{
%group = MainBrickGroup.getObject(%i);
for (%b = 0; %b < %group.getCount(); %b++)
{
%group.getObject(%b).delete();
}
}

Only 49-51% of the bricks are deleted every time I execute this, and it causes some bricks to not be cleared properly. What's the correct thing to do?

2
Modification Help / "$server::brickCount" does not work
« on: June 28, 2014, 03:05:39 PM »
Whenever I type echo($server::brickCount); into the console, it always returns an empty string. There are actually bricks on the BL server. Is there any other way to get the total brick count on the server?

3
Off Topic / First operating system you ever used
« on: June 26, 2014, 11:41:27 PM »

What was the OS on the first computer you ever used?

4
Off Topic / Rate the above user's CPU
« on: June 21, 2014, 11:17:22 PM »
I know this is a copy-off of the GPU topic, but here I go:
AMD FX-6300 @ 3.9 GHz

5
General Discussion / Player geolocation map [Atlantis explained]
« on: June 13, 2014, 04:23:15 PM »
Yesterday, the ID mapping project had collected 7088 unique BL_ID's in total, over 64 days of operation. So I decided to make a Google map out of them:



The map will take a LONG time to load, especially on mobile devices (the page's size is 3.3 MB), and 7000 markers use a lot of CPU to render. Statistics such as ISP distribution and country distribution will be added later.
View

Keep in mind that no usernames are revealed!

6
Sometimes, when I type this into the console:
Code: [Select]
serverDirectSaveFileLoad("saves/Mansion.bls", 3, "", 1);...this error appears in chat:


Is there a quick way to solve the problem?

7
General Discussion / Authentication/name-changing bug
« on: May 29, 2014, 02:43:44 PM »
I puchased a new Blockland key from Amazon yesterday, with the BL_ID 51965. After that, here was my list of alt accounts:

UsernameForum nameBL_ID   Activation method
HammereditorHammereditor^5   91456Steam
HammerHostHammereditor594180Steam
Blockhead51965   N/A51965Product key


Then I was curious if my 51965 ID could have the same in-game name as my 94180 ID. So I clicked the button, and changed my name to "HammerHost". And guess what, it worked! So now my 94180 and new account had the same in-game name.

After that, I used mobile tethering to access a different IP address. I then changed my new account's name back to "Blockhead51965", and connected to the new IP address. After that, I changed the name to "HammerHost", and it worked again! I tried "Hammereditor", and it worked.
I tested about 4 names of other, random players of random Steam BL_ID's, and I could have the same name as all of them. This is a real bug with BL's Steam authentication; test it yourself.

8
Modification Help / Set::add:: Object doesn't exist
« on: May 24, 2014, 12:16:23 PM »
I am reading lines from a file and adding them to a ScriptGroup. Once the size of the group is 50, the code sends all the objects in the Scriptgroup to a TCPobject, then empties the Scriptgroup.

Code: [Select]
%bufferSz = 50; //50 brick lines per JSON command
%lineGroup = new ScriptGroup();

while (!%f.isEOF())
{
%currL = %f.readLine();
%currL = strReplace(%currL, "\"", "\\\"");
%linesRead++;

if (%lineGroup.getCount() == %bufferSz)
{
%sendCmd = "{\"cmd\": \"UPLOAD_LINES\", \"sessionID\": \"" @ %this.sessionID @ "\", \"lineCt\": \"" @ %lineGroup.getCount() @ "\", \"lines\": [";

for (%i = 0; %i < %lineGroup.getCount(); %i++)
{
if (%i + 1 < %lineGroup.getCount()) //not the last iteration
%sendCmd = %sendCmd @ "{\"" @ %i @ "\": \"" @ %lineGroup.getObject(%i) @ "\"}, ";
else
%sendCmd = %sendCmd @ "{\"" @ %i @ "\": \"" @ %lineGroup.getObject(%i) @ "\"}";
}

%sendCmd = %sendCmd @ "]}";
%this.tcpObj.sendJSON(%sendCmd);
%lineGroup = new ScriptGroup(); //this empties the group, by creating a new object
}

%lineGroup.add(%currL);
echo("IBL client: Added line to group. %lineGroup's value: " @ %lineGroup);

if (%f.isEOF()) //last line
{
%sendCmd = "{\"cmd\": \"UPLOAD_LINES\", \"sessionID\": \"" @ %this.sessionID @ "\", \"lineCt\": \"" @ %lineGroup.getCount() @ "\", \"lines\": [";

for (%i = 0; %i < %lineGroup.getCount(); %i++)
{
if (%i + 1 < %lineGroup.getCount()) //not the last iteration
%sendCmd = %sendCmd @ "{\"" @ %i @ "\": \"" @ %lineGroup.getObject(%i) @ "\"}, ";
else
%sendCmd = %sendCmd @ "{\"" @ %i @ "\": \"" @ %lineGroup.getObject(%i) @ "\"}";
}

%sendCmd = %sendCmd @ "]}";
%this.tcpObj.sendJSON(%sendCmd);
}
}

Then I get these console errors, every time a line is read:

Code: [Select]
Set::add:: Object "2x2F\" -80.5 -68 6.7 0 0 15  0 0 1 1 1" doesn't exist

The string inside the quotes varies depending on what brick it is.

9
Modification Help / Getting the server's IP address
« on: May 22, 2014, 04:40:19 PM »
I am making a client-sided script, and I need to get the IP address and port of the Blockland server which the client is currenty connected to. Is this possible?

10
General Discussion / Instant .bls uploader
« on: May 20, 2014, 08:02:52 AM »
Don't you hate it when a save file of just 2 megabytes takes 8 minutes to load? "Why is the brick loading in this game so slow", you wonder. Surely your Internet connection can do it in two seconds.

It is because while loading bricks, Badspot decided to use the game's UDP connection to upload bricks. That is a poor choice for large builds because the game's maximum upload speed is 4 KB/s (limit imposed by Badspot; thank you Badspot). However, a TCP connection has no speed limit. So if you use TCP to upload the data, the only limit is your Internet's upload speed.



There are two approaches to TCP brick uploading:

A third-party server. A player who wants to upload bricks connects to a third-party server, and uploads them. Once that is finished, the third-party server gives the player a URL. The player then contacts the Blockland server and gives it the link. The BL server connects to the third-party one, and sends the URL. Once the third party server gets the URL, the BL server begins to download the save file. Once the DL is complete, the BL server creates the bricks.

A major advantage of this method is that the BL server does not need to run a separate TCP server. The third-party server does that. However, the third-party has the potential to steal the build, and it can take 1-2 seconds for all the coordination between the player, BL server, and third-party server to happen.

The Blockland server itself directly runs a TCP server. In this method, no third-party server is required. That means no coordination is required between the 3 entities, and nobody can steal your builds. However, there may be problems with port-forwarding.



Which approach do you prefer? /discuss.

11
Modification Help / Problem with arrays [Solved]
« on: May 18, 2014, 10:04:17 AM »
I have made a function which puts the contents of an array into a string:

Code: [Select]
function arrayToStr(%ar)
{
%str = "";
for (%i = 0; %i < %ar.length; %i++)
{
%str = %str @ %ar[%i];
}
return %str;
}

After that code is executed, when I type this into the console:
Code: [Select]
$testAr[0] = "bl";
$testAr[1] = "ah";
echo(arrayToStr($testAr));
...it echoes a blank string. What's wrong with my script?

12
Help / How to run Blockland with Steam on Linux
« on: May 11, 2014, 08:25:27 AM »
I recently installed Linux Mint onto my computer, and I do not have a product key for the game. Instead, I have a steam account. However, when I try running Blockland under Wine, the console says "steamAPI initialization failed" or something, and you know that little box at the bottom of the main menu, which tells you what your name is? That box said "Loading..." forever. Right now, Steam is natively installed on the computer (not being run under Wine), so I think m that's the cause of the problem. How do you get Steam authentication to work on Linux?

I would normally provide the console.log file, but I am not on my computer right now, and can't access the Mint partition on Windows.

13
General Discussion / One-click screenshot uploader
« on: April 26, 2014, 04:56:40 PM »
I have been thinking of creating an add-on which instantly uploads a Blockland screenshot to the web and gives you a link. This would be a lot easier than uploading to an image host manually.
Unfortunately, since it is impossible to read binary files with Torque script, the add-on would require an external program which reads the .png file and sends it. The program would be open-source, however, to prove that it is not malware.

14
Modification Help / Sending binary data to a server
« on: April 23, 2014, 09:02:42 PM »
Is it even possible to use a TCPobject  to upload a .png image to a web site with HTTP post?

15
Off Topic / Players who live in the same state/province as you
« on: April 17, 2014, 09:57:25 PM »
It's simple: Just list all Blockland players or forum users who reside in the same state or area as you.
For me in New Jersey:

Pacnet
Panquake
Kalphiter
Swat 3

Pages: [1] 2 3