Skip to content
RMuskovets edited this page Jan 9, 2020 · 6 revisions

Were you looking for...?

Confusing, huh? Just you wait...

Overview

From an end-user perspective, Objects are things that appear on the "Objects" menu. However, from a modding perspective Objects define a vast range of additional things that appear on the map.

To try and avoid confusion, the wiki splits Objects in to several categories as shown in the sidebar (along with the Properties used to put stuff in that category, where applicable).

Modding

Objects are highly moddable...

Menus

Objects appear in different menus (or no menus) depending on the settings used in their definition blocks within materials.txt. For detailed information, choose your menu from the list below:

Stuff on other menus is defined elsewhere, see Menus for details.

Menu Icons

Regardless of which of the three menus an object appears in, its menu icon can be defined in one of the following two ways:

Sprites

The Sprite of an object defines what it looks like on the map. There are two approaches to defining sprites (keep reading before choosing one):

If you're using a sprite that's already part of the base game, use the first approach (objects.png). All you'll need to do is refer to the existing sprite by its name.

If you want to use a custom sprite, use the second approach (sprites.png). There's even an [online sprite editor](Chad's Sprite Editor) you can use.

You can define multiple sprites for an object, and use either the SpriteVariants setting to choose one at random when the object is placed on the map, or use .SubType scripting to have precise control over which sprite is used.

###Object Definitions

Add or replace objects (regardless of category) using BEGIN Object... definition blocks within data/materials.txt

A list of known settings is shown below. Which ones you can or should use depends on the category (see links in sidebar for more detailed information). Bullet points are just for aesthetics (don't include them in your definition). Bold settings are mandatory, the others are optional.

BEGIN Object

END

Scripting

All objects, regardless of category, can be scripted using data/scripts/

todo: grants.lua

todo: campaign scripting

Notes

To move the object to the "Utilities" menu you'll need to add at least one of the following settings:

To move the object to the "Staff" menu you'll need to add the following setting:

See Also

^ Open "Pages" to Search



Scripting:

Categories:

Clone this wiki locally