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 ... 9 10 11 12 13 [14] 15 16 17 18 19 ... 70
196
Modification Help / Re: Greek2Me's Theme Engine tweak question.
« on: April 01, 2017, 04:02:03 PM »
Under tweaks, is it possible to change positioning of the GUI or change the GUI itself through using the Torque Mission Editor to export .gui files?  For example, say, there's something you hate about the Credits screen, you want to reposition text, can you change the text positioning with Greek's theme engine?

No, you cannot modify the files that contain the GUI. Actually, Themes Add-On have nothing to do with it. If you want to modify an existing GUI, you can do so by finding the respective object name/id and then modify it as any other object the way you want. In some cases you even need to package or overload methods for some namespaces to apply your changes.

197
how many of you are seriously interested in learning how to make mods, enough to put in the time to learn whatever necessary (probably 3 hours a week minimum)? just making this topic to poll the forums if there is any real interest

When you say "make mods", do you mean: how to specifically create a certain Add-On; how to script; how to package an Add-On? All those are closely related, but even though still far away.

I have always enjoyed to help people out, so if you need a helping hand, just give me a heads up and I can see what I can do about it.

198
Modification Help / Re: [Library] SHA-256
« on: March 28, 2017, 05:10:32 AM »
In your chr function ( for some stupid reason cloudflare is bitching about me including it in the post ), consider using collapseEscape("\\x" @ %n ).
Consider not having a chr function at all if you're going for speed, and just look up the answer:

-snip-

Yeah, you're both right. However, I just threw this library together as a proof of concept. It was never intended to be optimal or perfect. It's funny when people in the encryption thread uses it as a comparison for their benchmarks. It's even funnier that few of them remarked on the fact that I was the only one with a working division operator.

I could go through it some other time and improve its performance and fix bugs. Also, why not add support for fixed floating point?

Edit: Didn't you actually came pretty far? Or did I miss something in that conversation?

199
Modification Help / Re: [Library] SHA-256
« on: March 27, 2017, 03:12:33 AM »
If you did, I don't think I was ever notified of it... It's got to work on arbitrarily large numbers.

It's right there on this line.

Looking at it, I'm assuming it does not work as intended. But as I mentioned earlier, I might be able to make an another version, if you request for it.

200
Modification Help / Re: [Library] SHA-256
« on: March 26, 2017, 02:54:33 AM »
Killed due to the finickyness of torque and 32-bit plus arithmetic and my lack of an ability to make a proper bignum modulus function :'(
rip BLCrypto

I might be wrong, but didn't I made a modulus function that actually worked(And was pretty fast, too)? I wouldn't mind if you steal borrow it for your project. Otherwise, I could look into it again to make one that works.

201
General Discussion / Re: Qualities of a good server host
« on: March 26, 2017, 02:51:29 AM »
I think some important qualities are flexibility (being able to change things when you must), patience (so you can work with as many people as possible and put up with some degree of annoyance), and reliability (so whenever you're needed, you're there for someone, some people, or something).

Sounds like marriage.

202
Modification Help / Re: [Library] SHA-256
« on: March 19, 2017, 03:36:08 PM »
Cool can it decode too?
xalos your next task is to make a sha256 decoder in torque script

Why not invent time travel while he's at it?



On topic: A bunch of scripters recommend using global variables instead of local variables as they are significantly faster (Up to 1000 times if I remember correctly).

203
Modification Help / Re: Sorting an array numerically - silly me
« on: March 01, 2017, 05:14:13 AM »
The GUI objects are built into the engine, and the engine is obviously always loaded up.
Furthermore, the sort built into the GUITextListCTRL is made in C++, so it's oodles and oodles faster than any sort you could possibly make in torque.

Of course. I just made it, because, why not?

204
Modification Help / Re: Sorting an array numerically - silly me
« on: February 26, 2017, 05:51:22 AM »
There's actually no difference between a dedicated server and the "server" part of a listen server. It's just running a server and a client that is locally connected to it in the same process.

You can also convert a listen server to a dedicated one by deleting the local client and closing the canvas window.
The GUI stuff is engine based so it'll be on both server and client. Most/All engine methods will be on both server and client.

This is indeed interesting information. However, there's one thing that bugs me: I found one crucial difference between client and dedicated server, and that is that when you start as a client a function named ClientVerifyAddOnScripts will exist, but when starting a dedicated an another function named VerifyAddOnScripts exists instead. Of course, if being a host with a client both functions will be available, but these functions directly tell you the difference between a client and a server.

205
Modification Help / Re: Sorting an array numerically - silly me
« on: February 25, 2017, 04:13:55 PM »
So... You mean that while the server is running you can manually create the canvas window and use it as it was a normal client? That sounds insane!

206
Modification Help / Re: Sorting an array numerically - silly me
« on: February 25, 2017, 08:24:45 AM »
That's completely unnecessary. Sorting a gui text list ctrl already uses quicksort.

True, but can you create GUI objects on a dedicated server?

Mind if I ask how that's more efficient than the method I posted since it has noticeably more lines?

It's all about complexity. Having an algorithm that is bigger does not mean that it's slower. In fact, your does n2 operations while mine on average does n*log(n). It's considerably faster. But, if you have few values like that, then your one works fine.

207
Add-Ons / Re: Blockland Glass 4.0
« on: February 25, 2017, 05:02:22 AM »
[...] however selecting 'forgot my password' on the login screen should allow you to change your password.

I've tried that, but apparently I didn't get any mail.

208
Modification Help / Re: Sorting an array numerically - silly me
« on: February 25, 2017, 04:30:07 AM »
Long time ago I made this quick sort for records.
Code: [Select]
// Quick sort implementation
function QuickSortRecord(%list, %func, %left, %right)
{
// Standard function
if (!isFunction(%func))
%func = getMax;
// Avoid crash
%size = getRecordCount(%list);
%right = mClamp(%right, 0, %size - 1);
%left = mClamp(%left, 0, %size - 1);

// Nothing to compare
if (%right <= %left)
return %list;
// There could be a implementation of median-of-three,
// but it is hard due of how TorqueScript is built up.
%pivotIndex = mFloor((%left + %right) / 2);
%pivotNextIndex = %left;

// Partition
%pivotValue = getRecord(%list, %pivotIndex);
%list = swapRecord(%list, %pivotIndex, %right);

%storeIndex = %left;
for (%i = %left; %i < %right; %i++)
{
%a = Call(%func, getRecord(%list, %i), %pivotValue);
if (%a < 0)
{
%list = swapRecord(%list, %i, %pivotNextIndex);
%pivotNextIndex++;
}
}
%list = swapRecord(%list, %pivotNextIndex, %right);

// Continue on next
%list = QuickSortRecord(%list, %func, %left, %pivotNextIndex - 1);
%list = QuickSortRecord(%list, %func, %pivotNextIndex + 1, %right);
return %list;
}

// Swap data in record list
function swapRecord(%list, %first, %second)
{
// Avoid crash
%size = getRecordCount(%list);
%first = mClamp(%first, 0, %size - 1);
%second = mClamp(%second, 0, %size - 1);

%a = getRecord(%list, %first);
%b = getRecord(%list, %second);
%list = setRecord(%list, %first, %b);
%list = setRecord(%list, %second, %a);
return %list;
}

I think it worked last time I tested it. It could easily be changed to work with other types as well. However, it would be troublesome, but not impossible, to make it work with "arrays".

Code: [Select]
%list = 3 NL 2 NL 1;
%list = QuickSortRecord(%list, getMax, 0, 3);

209
Modification Help / Re: Remove brick planting white colour?
« on: February 17, 2017, 12:50:33 PM »
mctwist, do you mean you packaged fxDTSBrick::onPlant? or fxDTSBrick::plant?

I packaged fxDTSBrick::plant. It's that one that you use to plant a brick. The other one should be used when you want to know when something i planted. I guess you already know this as you asked. Why do you ask?

210
Modification Help / Re: Remove brick planting white colour?
« on: February 15, 2017, 04:48:38 PM »
No Zeblote is saying that most engine methods cannot be packaged, they are protected

Didn't I say that I just packaged fxDTSBrick::plant?

I did a package on plant [...]

But yes, some, but not all, engine methods are package-protected. Plant, however, is not one of them.

Pages: 1 ... 9 10 11 12 13 [14] 15 16 17 18 19 ... 70