ScriptPolisher

ScriptPolisher helps VGA Planets game hosts by making it easier to fine-tune scripts. It is designed to be used in conjunction with another fully-featured script creator, such as ScriptZ0r.

ScriptPolisher allows you to select large groups of objects inside your script and change attributes for all of those objects at the same time. It also allows you to manually edit the script, which ScriptZ0r does not.

Download

There is one requirement to running ScriptPolisher. You must have the Microsoft .NET Framework v1.1 installed. The .NET framework is about a 20 meg download. Without it, you'll probably get an error message like "mscorlib.dll not found". You can download the .NET Framework from Windows Update.

Download ScriptPolisher.zip (20k)

Features

  • Provides an interface for quickly selecting groups of objects based on their attributes. e.g., selecting all objects owned by player 2
  • Allows you to set an attribute for multiple objects at once. e.g., select all the planets and set the "soil" attribute to 150
  • Set numeric attributes using equations. You can even use other attributes as variables in your equations!
  • Allows direct editing of an individual object's script (double-click it in the object list)
  • Allows you to move a group of selected objects all at once. Offset them by a specified amount OR center them at a new location.
  • Drag and drop interface for changing the order of objects in the script (useful for certain scripting tricks such as one-way wormholes)
  • Doesn't change anything unless you explicitly tell it to. ScriptZ0r has a tendency to randomize certain attributes every time you save a file.

What NOT to expect: unlike ScriptZ0r, this tool does not provide a visual map of what's going on in the script. The GUI is basically just a list of objects in the game. You select groups of objects - either manually or using attribute filters - and then modify their attributes.

Example 1

Let's say I'm scripting a game in the Echo cluster. I decide that I want all the planets in the top-right quadrant of the map to have a 0 soil rating.

First, we select all the planets in the top half:

1) In the view filter list (on the left), click "planet" so that only planet objects are visible.

2) Start up the Find feature by pressing Ctrl+F or choosing it from the menu.

3) Find the objects where the attribute "y" is greater than 2000

That ought to select everything in the top half of the map, assuming we're dealing with the echo cluster. Now, with those selected, we want to use Find again to weed out the planets on the left half of the map.

4) Start up the Find feature (Ctrl+F)

5) Find the objects where the attribute "x" is greater than 2000

Now we have all the planets in the top-right quadrant of the map selected. The only thing left to do is set their soil rating to 0.

6) Choose "Set an attribute" from the menu (Ctrl+E)

7) Set the "soil" attribute to 0

That's it! You should get a message about how many planets were updated. Double-click one of the planets to verify that the soil was changed correctly.

Example 2

Another likely scenario: let's say I've got a Crystal player in my game, and I want to set the climate for all of his planets to 100.

1) Switch to base view

2) Find the player's bases using the Find feature. Let's say he's player #2. In that case, you would Find all objects where the attribute "pnum" equals 2.

3) With his bases selected, choose the "Base <-> Planet" feature from the menu. This will deselect all bases and instead select the planets on which they are located.

4) Now just set the attribute "climate" to 100 for the selected planets (Ctrl+E)

Using Equations

Rather than setting numeric attributes using Set Attribute (Ctrl+E), you may choose to use equations (Ctrl+G). For example, if you wanted climate to be a function of position, you might set the attribute "climate" to the following equation:

int( 100 - (0.1/sqrt(2)) * sqrt( (x-2000)^2 + (y-2000)^2 ) )

For the Echo cluster, which is centered at (2000,2000), that equation (ought) to give you hot planets in the center of the map and cold planets on the outside.

Or, lets say you want planets with a climate > 50 to have a 50% chance of having 100,000 to 200,000 Amorphous natives. You would set the attribute "native(5)" to:

( climate > 50 && rnd > 0.5 ) ? int( rnd * 100000 + 100000 ) : 0

(all operators and functions are listed on the equation screen)