Page 1 of 1

Grant multiple prerequisites?

Posted: Thu Aug 13, 2015 7:21 pm
by thebestwes
Is it possible to make a building provide multiple prerequisites? Specifically I'm trying to make it so that the construction yard grants a prerequisite to the GDI race and another to the Nod race, thereby allowing me to use the same HQ building to give different airstrikes to the two races. Is this possible, and if not is there a better way to do it?

Re: Grant multiple prerequisites?

Posted: Thu Aug 13, 2015 8:43 pm
by abcdefg30
thebestwes wrote: Is it possible to make a building provide multiple prerequisites?
You can use

Code: Select all

ProvidesPrerequisite@one:
    Prerequisite: one
ProvidesPrerequisite@two:
    Prerequisite: two
...
thebestwes wrote: Specifically I'm trying to make it so that the construction yard grants a prerequisite to the GDI race and another to the Nod race, thereby allowing me to use the same HQ building to give different airstrikes to the two races. Is this possible, and if not is there a better way to do it?
You can use the "Race: nod/gdi" property on ProvidesPrerequisite (see https://github.com/OpenRA/OpenRA/wiki/T ... erequisite).

Posted: Thu Aug 13, 2015 9:56 pm
by thebestwes
Thanks! I did that and it works perfectly for the GDI. The airstrike ability just doesn't show up for Nod, though.

Here's what I'm working with:

Code: Select all

FACT:
[snip]
	ProvidesPrerequisite@buildingname:
	ProvidesPrerequisite@gdiair:
		Prerequisite: gdiair
		Race: gdi
	ProvidesPrerequisite@nodair:
		Prerequisite: nodair
		Race: nod

[...]

HQ:
[...]
	AirstrikePower@GDI:
		Prerequisites: gdiair, ~techlevel.superweapons
		Icon: airstrike
		ChargeTime: 5 [this is just for ease of testing]
		SquadSize: 3
		QuantizedFacings: 8
		Cordon: 900
		Description: Gun Run
		LongDesc: Deploy an A-10 squad.\nFires a GAU-8 minigun and\ndrops MK-83 bombs along a line.
		EndChargeSound: airredy1.aud
		SelectTargetSound: select1.aud
		InsufficientPowerSound: nopower1.aud
		IncomingSound: enemya.aud
		UnitType: a10
		DisplayBeacon: True
		BeaconPoster: airstrike
		BeaconPosterPalette: beaconposter
		DisplayRadarPing: True
		CameraActor: camera
	AirstrikePower@Nod:
		Prerequisites: nodair, ~techlevel.superweapons
		Icon: airstrike
		ChargeTime: 5
		SquadSize: 3
		QuantizedFacings: 8
		Cordon: 2560
		Description: Air Strike
		LongDesc: Deploy a group of B-52 bombers against hard or soft\ntargets.
		EndChargeSound: airredy1.aud
		SelectTargetSound: select1.aud
		InsufficientPowerSound: nopower1.aud
		IncomingSound: enemya.aud
		UnitType: b52
		DisplayBeacon: True
		BeaconPoster: airstrike
		BeaconPosterPalette: beaconposter
		DisplayRadarPing: True
		CameraActor: camera

[...]


Posted: Thu Aug 13, 2015 10:01 pm
by thebestwes
I took out the Race attribute, and it still only gives me the GDI airstrike ability. Is it just that you can't have a structure give more than one type of airstrike?

Posted: Fri Aug 14, 2015 12:59 pm
by Graion Dilach
What does --check-yaml say about it?