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

Pages: [1] 2
1
Add-Ons / Re: [Support] Baseplate Rules
« on: January 21, 2019, 08:04:32 AM »
I've released a new version to address an issue with loading bricks.



v1.0.2

Fixed
  • Baseplate Rules are now ignored while loading bricks

2
Add-Ons / Re: [Support] Baseplate Rules
« on: January 17, 2019, 10:12:27 PM »
does this break hackplant like the other one

I'm not familiar with that mod, so it's possible.

You can always temporally disable the baseplate rules if they're causing you trouble.

3
Add-Ons / [Support] Baseplate Rules
« on: January 17, 2019, 08:22:42 AM »
Baseplate Rules

Adds baseplate alignment and adjacency rules for building

Release: 1.0.2

About Baseplate Rules


Baseplate Rules provide Alignment and Adjacency rules for building. When Baseplate Rules are enabled, all players will be required to start all of their builds on a baseplate. When Baseplate Alignment is enabled, the starting baseplate must be aligned to a configurable grid. When Baseplate Adjacency is enabled, the starting baseplate must be placed adjacent (directly next to) another baseplate.

Preferences for Baseplate Rules


Baseplate Rules are completely configurable. Here are all of the preferences:

Baseplate Preferences

Baseplate Required

When enabled, players are required to start all of their builds on a baseplate.

> Note: You can use the /baseplaterules enable command require baseplates. Similarly, you can use the /baseplaterules disable command to no longer require baseplates. By default, baseplate rules are enabled.

Baseplate Type

It can be configured such that not all baseplates from the "Baseplates" category can be used as starting baseplates. Using this preference, you can configure the starting baseplate to be one of three types:

  • Any: Any brick from the baseplate category.
  • Plate: Any 1/3x tall plate brick from the baseplate category.
  • Plain: Any brick from the Plain baseplate subcategory.

 > Note: You can use the /baseplaterules type set <type> command to set the required baseplate type. By default, the required baseplate type is set to "Any".

Adjacency Preferences

Use Adjacency

When enabled, players are required to place their starting baseplate adjacent to another baseplate.

> Note: You can use the /baseplaterules adjacency enable command to enable adjacency rules. Similarly, you can use the /baseplaterules adjacency disable command to disable adjacency rules. By default, adjacency rules are enabled.

Include Diagonals

When enabled, baseplates diagonally positioned are considered adjacent.

> Note: You can use the /baseplaterules adjacency diagonals enable command to allow diagonal adjacency. Similarly, you can use the /baseplaterules adjacency diagonals disable command to no longer allow diagonal adjacency. By default, diagonal adjacency is not allowed.

Alignment Preferences

Use Alignment

When enabled, players are required to align their baseplates to a configurable grid.

> Note: You can use the /baseplaterules alignment enable command to enable alignment rules. Similarly, you can use the /baseplaterules alignment disable command to disable alignment rules. By default, alignment rules are enabled.

Auto Alignment

When enabled, players attempting to place a misaligned baseplate will have their ghost brick automatically realigned for them.

> Note: You can use the /baseplaterules alignment auto enable command to enable auto alignment. Similarly, you can use the /baseplaterules alignment auto disable command to disable auto alignment. By default, auto alignment is enabled.

Grid Cell Size

The alignment grid is configurable in such a way that allows you to control the grid cell size.

> Note: You can use the /baseplaterules alignment grid set <X> <Y> command to update the grid cell size. Both the <X> and <Y> values must be valid integers between 1 and 1024. By default, the grid cell size is set to 16x16.

Grid Offset

The alignment grid is configurable in such a way that allows you to control the grid offset. This should really only be used when trying to snap the grid to a preexisting build or terrain-based obstable. In an flat freebuild world, adjusting the grid offset is unnecessary.

> Note: You can use the /baseplaterules alignment offset set <X> <Y> command to update the grid offset. Both the <X> and <Y> values must be valid integers between 0 and 1024. By default, the grid offset is set to 0x0.

4
Modification Help / Re: Super Super Class
« on: April 17, 2017, 11:40:46 PM »
You are overwriting $d which therefor it no longer has a super class, which you are changing its class and that is why you get the error (I may be wrong, just a theory)

I wasn't saying to run both statements. I meant that executing either statement results in that error. Sorry for any confusion.



Is there any known way to get a fourth level of inheritance?

I know that I could technically use a wrapper, but Torque Script isn't really suited for such a thing.

Example:

Code: [Select]
$a = new ScriptObject() { class = A; };
$b = new ScriptObject() { superclass = A; class = B; };
$c = new ScriptObject(C) { superclass = A; class = B; };
$d = new ScriptObject() { parent = $c; class = D; };

function D::someMethod(%this, %arg)
{
    return %this.parent.someMethod(%arg);
}


But that doesn't quite carry the same effect. I'd have to know every method name, and anyone who extends A, B, or C, would have to know to add a similar wrapper method to D. Not to mention the potential variables used outside of accessors and mutators.

Some languages off a general catch-all method (like PHP's magic __call method), where wrappers are really easy.

5
Modification Help / Re: Super Super Class
« on: April 15, 2017, 03:30:50 PM »
Second of all: Not sure if topic title is misleading. I first thought you meant to have an object with three namespaces, which is possible.

Have you tried naming them and see if the issue goes away?

I'm aware that I can do this:

Code: [Select]
$a = new ScriptObject() { class = A; };
$b = new ScriptObject() { superclass = A; class = B; };
$c = new ScriptObject(C) { superclass = A; class = B; };

But then can I get a fourth level of inheritance?

I tried the following to no avail:

Code: [Select]
$d = new ScriptObject() { superclass = C; };
$d = new ScriptObject(D) { class = C; };

Both of which resulted in the follow error (similar to OP):


Error: cannot change namespace parent linkage for C from B to ScriptObject.




Finally: Is this an XY problem? What are you really trying to achieve?

Essentially what PhantOS said. I'd like to be able to have as many inheritances as I want. If this isn't possible, then what's the maximum? Three?

6
Modification Help / Super Super Class
« on: April 14, 2017, 09:32:58 AM »
I'm playing around with super classes for a project I'm working on, and I've run into a problem. I can't use a namespace as a superclass said namespace already has a superclass.

Example:
Code: [Select]
$a = new ScriptObject() { class = A; };
$b = new ScriptObject() { superclass = A; class = B; };
$c = new ScriptObject() { superclass = B; class = C; };

That last new script object ($c), throws an error:


Error: cannot change namespace parent linkage for B from A to ScriptObject.


Is there a way around this issue? I'd like to be able to have lengthy parent hierarchies.

7
Modification Help / Re: POLL: Condense Modification Boards?
« on: July 05, 2015, 12:02:51 PM »
I think that Coding Help and General Modification Help should be merged.

Coding Help to me is more about learning about packaging, function calls, vectors, and other quirks. Modification Help is about modelling, animations, making items, vehicles, etc. However, when I comes to datablocks, these two merge, and the line between them quickly becomes blurred. These two definitely need to be merged.

Modification Discussion can be more about theoretical things, or perhaps testing an add-on in beta, or running Blockland on a Linux server and other miscellaneous.

For now, merge the two helps, and possibly revisit another merge later on, if the first merge doesn't suffice.

8
Thanks for the help.

I'll mark this as solved.

~ Locked

9
I think I figured it out:
Code: [Select]
commandToClient(%client, 'OpenPrintSelectorDlg', %aspectRatio, $PrintARStart[%aspectRatio], $PrintARNumPrints[%aspectRatio]);

I'm hoping those are Server-Side Variables.

This works when I'm on my own server. I don't know about a dedicated server though.

10
Thanks!

How can I derive these values?

11
I'm trying to figure out the parameters for the 'clientCmdOpenPrintSelectorDlg(%aspectRatio, %a, %b)' function, because I need to call it.

I know it takes three variables, but I only know the first one.

Here's the traces I've used:
Code: [Select]
clientCmdOpenPrintSelectorDlg(1x1, 24, 0) // On a 1x1 Brick
clientCmdOpenPrintSelectorDlg(2x2f, 7, 7) // On a 2x2f Brick
clientCmdOpenPrintSelectorDlg(1x2f, 14, 10) // On a 1x2f Brick
clientCmdOpenPrintSelectorDlg(1x1f, 24, 0) // On a 1x1f Brick
clientCmdOpenPrintSelectorDlg(2x2r, 0, 7) // On a 2x2r Brick (Both Normal and Upside-Down)
clientCmdOpenPrintSelectorDlg(ModTer, 24, 22) // On a ModTer Brick

The first one is clearly the printAspectRatio. As for the others, I have no idea. I've only deduced that they're constant. No matter the color, print, position, etc, these remain constant for the type of brick.

I know that neither one of the last two parameters can be datablocks.

Right now, I only know to call it like this:
Code: [Select]
commandToClient(%client, 'OpenPrintSelectorDlg', %brick.getDatablock().printAspectRatio, %a, %b);

And just to a switch/case on the aspect ratio.



This is one of these moments where having certain functions being open source and/or documented would be awesome.

12
Add-Ons / [Support] VIP Items
« on: June 06, 2015, 07:01:16 PM »



I'm surprised no one ever made an Add-On like this. It took me more time to write this thread than it did the Add-On.

Basically, you can set certain items to be VIP only.



Here's how it works:

You have 6 different Server Preferences (Integrated via RTB Prefs):
  • Enabled - Toggles the Add-On
  • Item List - A Space Delimited list of Item Datablock Names.
    • Example: "wrenchItem swordItem hammerItem"
  • VIP List - A Space Delimited list of Blockland IDs that are VIPs.
    • Example: "9740 5621 336"
  • Auto VIPs - Determine what types of Players are automatically VIPs.
    • Options: Admins, Super-Admins, None
  • Message - The Message to display (Center Print) when a Player needs VIP to pick up an Item.
    • Example: "<color:FFFFFF>This is a <color:FCD116>VIP Only<color:FFFFFF> Item"
    • Displays As: "This is a VIP Only Item"
  • Message Time - Controls how long to display the Message.



This Add-On should be pretty straight forward. However, I did my best to make this Add-On easy to extend and change. For those wanting to do so, just intercept the GameConnection::isVIP(%client) function found in the utilities.cs file:
Code: [Select]
// Returns whether or not the Calling Client is a VIP
function GameConnection::isVIP(%client)
{
// Check if the Client is in the List of VIPs
if(containsWord($Pref::Support::VIP_Items::VIPs, %client.getBLID()))
return true;

// Check for Admin Auto-VIP
if(%client.isAdmin && $Pref::Support::VIP_Items::Auto == 1)
return true;

// Check for Super-Admin Auto-VIP
if(%client.isSuperAdmin && $Pref::Support::VIP_Items::Auto == 2)
return true;

// Check for LAN Game
if(%client.getBLID() == 999999)
return true;

// Client is not VIP
return false;
}

You may also want to alter the ItemData::isVIP(%item) function in utilities.cs as well. This function basically determines whether or not an Item is a VIP Item.
Code: [Select]
// Returns whether or not the Calling Item is a VIP Item
function ItemData::isVIP(%item)
{
// Check if the Item is in the List of VIPs
if(containsWord($Pref::Support::VIP_Items::Items, %item.getName()))
return true;

// Item is not VIP
return false;
}

If you change these, you can alter how the entire VIP system works.



Let me know if you have any questions, comments, concerns, etc. on this. This Add-On is pretty straight forward, and there's not a lot of code to it.

Also, for the most up to date version of this Add-On and this Thread, please go to: http://scatteredspace.com/forum/index.php?topic=2889.0. I'm not trying to advertise or anything. I'm just more active there than I am here.

For some reason the forums won't let me upload my add-on, so you'll have to go vist the thread I've linked, or download it off of my Dropbox (Link).

13
AoT General / Re: Great. Im New To Age Of Time
« on: October 09, 2011, 10:03:59 AM »
You sure do cough a lot. I'd get that checked.

14
Help / Re: V20 infected? (not badspots fault but maybe a hacker)
« on: October 09, 2011, 09:45:19 AM »
I would say just delete Norton, but we all know that's damn near impossible.

15
Off Topic / Re: Can someone resize this right?
« on: August 23, 2011, 01:23:55 PM »
Damn. I thought I had it right.

Pages: [1] 2