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

Pages: 1 2 3 [4] 5 6 7 8 9 ... 17
46
Off Topic / Self-referentiality
« on: July 25, 2014, 07:36:30 AM »
This image describes the number of non-transparent pixels within itself:


Post self-referential images, stories, or quotes!

47
Modification Help / ÿ character causes a syntax error
« on: July 20, 2014, 12:21:32 AM »
This has bugged me for a while now. The ÿ character, or \xFF, causes a syntax error if put into code as its raw form.
It's fine if you have a pre-existing ÿ character and manipulate it via string functions, but actually having one in code causes the compiler to say there's a syntax error.

Does anyone know why this happens?

48
General Discussion / RTB Archive Update
« on: July 13, 2014, 08:20:31 PM »
I've changed the location of my RTB Archive to a new Gmail account so that my storage space won't be cluttered up by two gibibytes of add-ons.

Full RTB Megadump

SectionSize (in kibibytes)   Files
Game Modes6,345 KiB33
Weapons78,252 KiB253
Tools3,202 KiB45
Prints119,888 KiB165
Bricks9,069 KiB165
Decals31,325 KiB292
Effects2,453 KiB54
Players3,295 KiB68
Sounds159,454 KiB130
Vehicles42,875 KiB160
Color Sets188 KiB204
Interactive7,469 KiB37
Environments44,795 KiB35
Hello there! :D
Event Mods399 KiB114
Server Mods14,340 KiB188
Miscellaneous3,836 KiB41
Client-side Mods6,140 KiB109
Are you lonely?
[ARCHIVED] Maps370,190 KiB199
[ARCHIVED] Game-Modes5,274 KiB26
I am lonely. :(
Bargain Bin63,109 KiB233


I'll leave the old links up for 15 days. Anyone who's linked to the old archive should change their links before then.

For questions or comments, please e-mail rtbarchive@gmail.com.

49
I already know exactly what I want, I just can't get it to come out of the other side correctly.

What I need is a cylinder that has 64 faces, is 0.5 Blender units in radius, and is 0.2 Blender units deep.
It should have a material with the name of "blank", and should be exported as a visible .dts model with collision.


By all rights I should be able to do it myself, but I can't get the .dts exporter to work correctly or figure out how to rename materials. Joy.

50
Everything is better with eye scanners.

Gaze is a server modification which allows you to trigger brick events based upon when a player looks at a brick. There are three different inputs you can use, all of which have different effects.

  • onGaze          Called repeatedly while you look at a brick.
  • onGazeStart   Called once, when you start looking at a brick - this counts if you go from one brick to another!
  • onGazeStop    Called once, when you stop looking at a brick - this counts if you go from one brick to another!

There's also a setGazeName output event! Well, what does this do?

Gaze lets you see player names. While you can't set the gaze names of players (for OBVIOUS REASONS), you can set the names of bricks. These names can be anything from "Click the light to turn it on" (toggling to "turn it off" when clicked) to "Nuclear Launch Button". Never have people wonder what that obscure control panel does again!

The range of your Gaze can be set in the RTB preferences. The range is 0-100 in Torque Units. Do NOT complain about the gaze maximum being too short - one hundred TU is three 64x64 baseplates end to end and then another eight block studs!

onGaze can be toggled on and off in RTB preferences as well. While the event will still be available, only onGazeEnter and onGazeLeave will be triggered.

The entire Gaze mod can be set to one of four settings: Bricks, Players, and Bots; Players and Bots; Bricks Only; or Sightless.
Minigame support enabling/disabling via prefs is not yet included. This will be added when I de-lazy.

Below is some large text that says download.
If you cannot find the large text that says download,
I simply cannot and will not help you.

>>> DOWNLOAD <<<


The original mod topic is far too old to edit, but this is an update that fixes the bottomprint flicker issue caused by Server_Gaze.

51
Modification Help / Lower-than-user rank names?
« on: July 09, 2014, 05:05:01 PM »
So I'm considering making a mod to add a more gradiented admin system, but first I need to figure out what to call lower-than-zero ranks.

Set in stone:
 8: Host
 7: Cohost
 6: Superadmin
 5: Admin
 4: Subadmin
 3: Operator
 2: Moderator
 1: Trusted User
 0: User

Not set in stone (yet):
-1: Untrusted User
-2: Troublemaker
-3: ???
-4: Problem User
-5: ???
-6: ???
-7: Community Menace

Does anyone have suggestions for ranks -1 through -7?

53
Add-Ons / Server_Whisper
« on: June 14, 2014, 05:16:24 AM »
I should really release my private messaging mod.

So I did. Right now.


/whisper (Name) (Message)
/reply (Message)

/w and /r also work.

There's also /revokeMsgRights (Victim) and /grantMsgRights (Victim), which revoke and restore the whispering rights of a given victim.


Download

54
Code: (Extended Defaults.cs) [Select]
/// Returns a string with only characters inside the %tokens variable.
/// %text: The text to filter.
/// %tokens: The legal characters.
function filterString(%text, %tokens)
{
    for(%i=0;%i<strLen(%text);%i++)
        if(strPos(%tokens, getSubStr(%text, %i, 1)) != -1)
            %result = %result@getSubStr(%text, %i, 1);
    return %result;
}

/// Returns a random value within two limits.
/// %lim0: One of the two limits.
/// %lim1: One of the two limits.
function getRandomF(%lim0, %lim1)
{
%diff = %lim1 - %lim0;
return getRandom() * %diff + %lim0;
}

/// Returns the last word of the given string.
function lastWord(%text)
{
//TorqueScript doesn't complain if we get an out-of-bound word,
//but it's still a bad habit to get into.
if((%words = getWordCount(%text)) <= 0)
return "";
return getWord(%text, getWordCount(%text) - 1);
}

/// Returns a tab-delimited string with %item added to %list, if it isn't already.
/// %list: The list of items to add to.
/// %item: The item to add to the list.
function addItemToList(%list, %item)
{
if(hasItemOnList(%list, %item))
return %list;
if(%list $= "") return %item;
return %list TAB %item;
}

/// Returns whether or not a tab-delimited %list contains a given %item.
/// %list: The list of items to check against.
/// %item: The item to check for.
function hasItemOnList(%list, %item)
{
return striPos("\t"@%list@"\t", "\t"@%item@"\t") != -1;
}

/// Returns a tab-delimited string with all instances of %item removed from %list.
/// %list: The list of items to remove from.
/// %item: The item to remove from the list.
function removeItemFromList(%list, %item)
{
%fields = getFieldCount(%list);
for(%i=%fields-1;%i>=0;%i--)
if(getField(%list, %i) $= %item)
%list = removeField(%list, %i);
return %list;
}

/// Returns a random string of a given length given a set of characters.
/// %length: The length to build the string to.
/// %chars: The character set to use. Defaults to A-Z and 0-9.
function strRandom(%length, %chars)
{
if(%chars $= "")
%chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
%rMax = strLen(%chars) - 1;
for(%i=0;%i<%len;%i++)
%out = %out @ getSubStr(%chars, getRandom(0, %rMax), 1);
return %out;
}

/// Returns a string with the first character capitalized.
/// %text: The string to capitalize.
function strCapitalize(%text)
{
if(%text $= "") return "";
return strUpr(getSubStr(%text, 0, 1)) @ getSubStr(%text, 1, strLen(%text));
}

/// British English equivalent to strCapitalize.
function strCapitalise(%text)
{ return strCapitalize(%text); }

/// Echoes an set's child objects.
/// %object: The set to echo all children of.
function echoChildClassData(%object)
{
if(!isObject(%object)) return;
%count = %object.getCount();
if(%count <= 0) return;
for(%i=0;%i<%count;%i++)
{
%child = %object.getObject(%i);
%name = %child.getName();
echo( "ID: " @ %child.getID() @ ";"
@ (%name $= "" ? "" : " Name: " @ %name)
@ " Class: "@%child.getClassName() );
}
}


If you have any functions that you feel really ought to be default, but aren't, please post them.
NOTE: I will not be including abbreviations like "fcbn", because I believe in self-documenting code. Approach this like a new coder:

function servercmdThrow(%c,%v){if(%c.isAdmin||isO(%f=pl(fcbn(%v))))%f.vel("0 0 20");}


EDIT 1: Added a bunch of functions from Ninjaman 4 and elm.
I did not add pullIntFromString because it appears to be an almost exact replica of what Torque itself does when converting a string to an int.
==>echo("-5ar4" + 3);
-2

55
Forum Games / Heading for Absolute Zero
« on: June 10, 2014, 07:05:02 PM »
We're in a lab, which is rapidly being cooled to absolute zero. The lab starts at 295.65000°K, and every fifteen seconds (every post), this value is reduced by 10%. (In other words, take the previous value, and multiply it by 0.9.) The poster then describes what happened to the lab as a result of the cooling. (Note: the effects don't have to be realistic; "the room is at 26.20328°K, causing a sun to spontaneously appear.")

The room is now at 266.08500°K. The scientists caught in the lab are desperately trying to burn everything they can to keep themselves from freezing to death. Only one thinks to use the (unlocked) door. The room is cold enough to freeze water, but it hasn't yet long enough for any to freeze. Badspot bans Betelgeuse for complaining about the cold.

56
    Zone gravity does not work, and never has worked, on vehicles or items or projectiles. For my purposes (Realistic Space Mod), items and projectiles can be worked around, but if vehicles don't work within zones I have exactly three options, all unappealing.
  • Have players without vehicles, meaning there's always a definite up and down.
  • Have a velocity loop on the vehicles, which is very very visible to anyone with a latency above TEN.
  • Change the gravity constant for vehicles, making the gamemode permanently unreleasable.

    This is an example of a problem that simply cannot be worked around from the script level. I really want to continue work on RSM, but I don't see a way to continue to make it more realistic without being able to affect vehicles with zone gravity.


<discuss>

57
Off Topic / It's my Forumday!
« on: May 31, 2014, 11:01:11 AM »
Four years of foruming today! Hooray!

59
General Discussion / Wireworld Automaton
« on: April 18, 2014, 02:09:32 PM »
Until the RSM C&E update is ready for public release, I will be hosting a public Wireworld Automaton server. Post pictures if you make any cool contraptions!

60
Add-Ons / Pecon Boss Info
« on: April 17, 2014, 06:32:39 PM »
Shows Pecon's server's boss healths in HP instead of as a percentage!

Note: This does not work for Kaje 2.0, because he does not have a boss info page on Pecon's website.


Download (V3)

  • V2: Fixed Penthselia/esilea having health show up as a percentage.
  • V3: Fixed Penthesilea having health show up as a percentage. Again.

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