Tech levels and Prerequisites

Matthias Mailänder edited this page May 17, 2015 · 9 revisions

This is a guide that will show you what you can do with all the new changes made to the tech system in OpenRA.

First lets have a look at the feature that touches every last point in this guide. Prerequisites.

Prerequisites have existed for a while, they are added to actors and it makes you unable to make/build them unless you have fulfilled the prerequisite.

Prerequisites could be fulfilled in two ways:

  1. Using the name of another actor (in lowercase letters) as a prerequisite, that makes you unable to build your actor unless you already own the other actor.
  2. Use the ProvidesCustomPrerequisite, this trait allows you to "provide" a prerequisite that other actors can require to be built.

This allows for a basic tiered system, have to build this before you can build this and so on.

Now lets get to the juicy part, the new stuff (more coming soon).

The first change is a new symbol (~) which has been added to the old one (!), the old one made it possible to disable something if you fulfilled the prerequisite. You could for example if you had !barracks on the refinery disable the ability to build a refinery as soon as you own a barracks.

The new symbol adds the ability to hide an actor from the build queue if you dont fulfill the prerequisite, so you dont see it grayed out anymore it has just disappeared, ~barracks if we want to hide something until we own a barracks.

These symbols also work together so you can hide an actor if a prerequisite is fulfilled, ~!barracks in the example above (beware it has to be in this order ~! otherwise you will get wierd stuff happening).

There has been added a new prerequisite provider named ProvidesTechPrerequisite.

You add it to the player actor and when you come into the lobby of a game you will see a new option under tech levels which allow you to select between different providers, this would allow you to make a only infantry tech level or anything you really want.

The only thing you would need to add an infantry only tech level is add this to the player.yaml

		Name: Infantry Only
		Prerequisites: infonly

and add ~!infonly to everything you are not supposed to be able to build, this will disable and hide the actor that has it as long as you have infonly, and that will be provided by the Tech provider.


Inherits: ^Vehicle
	Queue: Vehicle
	BuildPaletteOrder: 40
	Prerequisites: dome, ~!infonly
	Owner: soviet
	Hotkey: v
	Cost: 900

There is a much better way to do this but this is basically how the provider works.

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.