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.


Messages - mctwist

Pages: 1 2 3 4 [5] 6 7 8 9 10 ... 70
61
Add-Ons / Re: Blockland Glass 4.2.0
« on: January 13, 2018, 11:42:11 AM »
I've highlighted the information for easier reading.

it keep making noises when people leave and join the IRC [...] ive specifically turned off notifications for that yet it keeps making [...] noises
I checked and apparently there is no way to disable it, but I guess that if you decrease its volume to lowest it could solve your issue for now.

62
I wont provide mine, but I'll give a link to the add-on I'm developing to make it easier to develop.

Evaluate

However, most of it is concept except for automatic reload of scripts.

63
Modification Help / Re: [Library] SHA-256
« on: January 11, 2018, 04:36:53 PM »
Time to revive this thread with an addition from my part. I managed to make a more optimized version of the binary addition that was inlined into this function.

I've tested it several times on different values, and I did not find any issues with it so far. I even checked against several hashes to make sure that it worked as intended.

Benchmark:
Running sha1("") 999999 times: 1408 ms, or ~1.4 µs per call
Running Port's sha256("") 9999 times: 74384 ms, or ~7.4 ms per call
Running McTwist's sha256("") 9999 times: 44368 ms, or ~4.4 ms per call

This makes it roughly 40% faster than previous version.

64
Due to how TorqueScript works, arithmetic operators break integers for any value equal or bigger one million. It automatically transforms into a floating operator that makes it impossible to do calculations on.

Port made his own addition and subtraction and everyone was happy. However, I found myself in need of both multiplication and division. And why stop there and try to recreate the wheel when I found a rather quick unsigned integer addition made in JavaScript, so I ported it and then made my own version on the subtraction(Basically the same thing, but with recursion).

Unsigned Integer

I even put it to the test by adding it to sha256 with great results, up to 40% performance boost.

65
Modification Help / Re: Scratch for Blockland
« on: January 09, 2018, 02:55:30 PM »
pretty sure he meant clay's website, which is in his profile

http://clayhanson.x10host.com/

That is exactly what I meant. If you haven't included your Blockland name for verification, then you are not able to use his site. (Unless you are a guest)


66
Modification Help / Re: Scratch for Blockland
« on: January 09, 2018, 02:10:08 AM »
why didn't you just email the webmaster of his website which is linked in his profile instead of buying a $10 dollar account just to make one post on the forums

Because his site requires you to have bought the game.

67
I updated the script, making it optional support for the new addition of case-insensitiviness, makes it possible to go around the issue of breaking other mods while still giving them the support to this kind of feature.

68
General Discussion / Re: EventScript - Eventing 2.0
« on: December 18, 2017, 07:25:50 AM »
I do try my best.

69
-event snip-

Code: [Select]
onActivate -> Self -> fireRelayNum ("1 2", Brick)
onRelay -> Self -> spawnExplosion (jeepfinalExplosion)
onRelay -> Self -> fireRelayNum ("1 2", Brick)

70
Code: (Changelog v7) [Select]
Fixed delay issue for fireRelayRandomNum
Performance and security improvements

71
General Discussion / Re: EventScript - Eventing 2.0
« on: December 03, 2017, 03:29:26 AM »
That is an additional functionality that I rather not add. Fonts and colors are literally impossible, and links are an extra feature that will be more of a nuisance than an addition.

72
General Discussion / Re: EventScript - Eventing 2.0
« on: December 02, 2017, 08:16:37 AM »
I've already talked to him about it and we both agreed that they were different from each other and he had nothing against me from using the name anyway. They are a bit different due to him having a space and I am not. Also, his was a bit error prone due to the use of eval.

73
The last solution have been pushed. If anyone is against it, then please tell me an alternative version that is better. I do hope this wont destroy how Add-Ons uses this feature. Vanilla Blockland seem to work correctly.

74
And now a script for solution 4.

Code: [Select]
package EventTableClientPackage
{
// Add new text entry with id to popup menu controller
function GuiPopUpMenuCtrl::add(%this, %entryText, %entryID, %entryScheme)
{
Parent::add(%this, %entryText, %entryID, %entryScheme);

if (%this.table[%entryText] $= "")
{
%this.table[%entryText] = %entryID;
%this.count += 0;
%this.list[%this.count] = %entryText;
%this.count++;
}
}

// Find text in popup menu controller
function GuiPopUpMenuCtrl::findText(%this, %text)
{
if (%this.table[%text] !$= "")
return %this.table[%text];
return Parent::findText(%this, %text);
}

// Clear popup menu controller
function GuiPopUpMenuCtrl::clear(%this)
{
for (%i = 0; %i < %this.count; %i++)
{
%this.table[%this.list[%i]] = "";
%this.list[%i] = "";
}
%this.count = "";
Parent::clear(%this);
}
};
activatePackage(EventTableClientPackage);

I have tested it, but I do know that this will replace the functionality that people might use. That leaves for question if this is way too dirty and is only a "quick fix".

But, the best part with this is that this makes it possible for EventScript to handle parameter lists without having to be exact values. This also completely replaces my previous optimization on NTNames, as it uses this system as well.

75
Did a quick script for the first possible solution. Not tested, but should work. A similar approach can be reused for the local solution.

Code: [Select]
package EventTableClientPackage
{
// When opening the events dialog
function WrenchEventsDlg::onWake(%this)
{
Parent::onWake(%this);

// Generate once
// In normal conditions, this will work correctly
// One could keep track on amount of events and add them as one goes
if (%this.haveTable)
return;
%this.haveTable = true;

// Make sure there's no leftovers
deleteVariables("$InputEvent_Table*");
deleteVariables("$OutputEvent_Table*");

// Note: ClassList is not used anywhere on the default client,
// therefore might be created by an Add-On. Create it to make sure
// we have it.
if ($InputEvent_ClassList $= "")
$InputEvent_ClassList = "fxDTSBrick";

// Input events
%count = getWordCount($InputEvent_ClassList);
for (%i = 0; %i < %count; %i++)
{
%class = getWord($InputEvent_ClassList, %i);
for (%n = 0; %n < $InputEvent_Count[%class]; %n++)
{
$InputEvent_Table[%class, $InputEvent_Name[%class, %n]] = %n;
}
}

// Output events
%count = getWordCount($OutputEvent_ClassList);
for (%i = 0; %i < %count; %i++)
{
%class = getWord($OutputEvent_ClassList, %i);
for (%n = 0; %n < $OutputEvent_Count[%class]; %n++)
{
$OutputEvent_Table[%class, $OutputEvent_Name[%class, %n]] = %n;
}
}
}
};
activatePackage(EventTableClientPackage);

I'm still looking for a fix for my issue, though, as it should be possible to somehow override or package the client commands.

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