Custom building
Custom building
Hello. Recently I've been working on modding aspects of the game, specifically a mini game in RA with Zjordy called Ant base. The idea is 8 players fight against 3 others who are a team of ants. http://resource.openra.net/maps/3915/
Right now we have basically a super up ant for each player with lots of hp and attack power, and flying fire ants who are called in via paradrop by the ant. I plan to add also a chemical sprayer ant and a big queen ant.
I'm wondering if there is a way to make custom production facilities that would build only the ants and not the regular units of the game?
Thanks
Right now we have basically a super up ant for each player with lots of hp and attack power, and flying fire ants who are called in via paradrop by the ant. I plan to add also a chemical sprayer ant and a big queen ant.
I'm wondering if there is a way to make custom production facilities that would build only the ants and not the regular units of the game?
Thanks
- Graion Dilach
- Posts: 277
- Joined: Fri May 15, 2015 5:57 pm
This is the RA mod, right? If you resubclassify all units in a production queue (look at helicopters and aircrafts, how they have a subclass of the Aircraft queue along with them) then you can do that with an existing queue.
Mapmods can't do more - you have to go for complete mod if you intend to add a new button for it.
Mapmods can't do more - you have to go for complete mod if you intend to add a new button for it.
You could try something like:
And then
on "Ant:".
Code: Select all
FactAnt:
Inherits: ^Building
Valued:
Cost: 2000
Tooltip:
Name: Factory ant
Description: Produces ants
Health:
HP: 120
Armor:
Type: Light
RevealsShroud:
Range: 12c0
RenderBuilding:
Image: ant
Sequence: stand
Selectable:
Bounds: 36,28,0,0
Voiced:
VoiceSet: AntVoice
Building:
-GivesBuildableArea:
RallyPoint:
RallyPoint: 0,2
Exit:
SpawnOffset: -280,400,0
ExitCell: 0,1
Production:
Produces: Infantry
PrimaryBuilding:
ProductionBar:
-EmitInfantryOnSell:
ProvidesPrerequisite@buildingname:
Code: Select all
Buildable:
Queue: Infantry
BuildPaletteOrder: 10
Prerequisites: ~factant
- Graion Dilach
- Posts: 277
- Joined: Fri May 15, 2015 5:57 pm
Yes, this is for RA mod. thanks for the information and ideas! I don't know why i overlooked the dog hut, great idea! I am thinking i want to have the dog hut as an actor but possibly have it be rendered as an ant or tree if possible.
Production:
Produces: Infantry
^Wouldn't this allow the building to also build regular infantry?
Lets say I do this for the dog hut, could i make extra units available in the hut, or would it just be the one unit (originally the dog).?
One more question: Is there a way to allow a building to automatically build units say once every 20 seconds without the player clicking build?
Edit: The easier way for this may just be to create a way point, or use viceroidspawner? is this doable without lua?
Thanks all
abcdefg30 wrote: ↑ You could try something like:And thenCode: Select all
FactAnt: Inherits: ^Building Valued: Cost: 2000 Tooltip: Name: Factory ant Description: Produces ants Health: HP: 120 Armor: Type: Light RevealsShroud: Range: 12c0 RenderBuilding: Image: ant Sequence: stand Selectable: Bounds: 36,28,0,0 Voiced: VoiceSet: AntVoice Building: -GivesBuildableArea: RallyPoint: RallyPoint: 0,2 Exit: SpawnOffset: -280,400,0 ExitCell: 0,1 Production: Produces: Infantry PrimaryBuilding: ProductionBar: -EmitInfantryOnSell: ProvidesPrerequisite@buildingname:
on "Ant:".Code: Select all
Buildable: Queue: Infantry BuildPaletteOrder: 10 Prerequisites: ~factant
Production:
Produces: Infantry
^Wouldn't this allow the building to also build regular infantry?
Lets say I do this for the dog hut, could i make extra units available in the hut, or would it just be the one unit (originally the dog).?
One more question: Is there a way to allow a building to automatically build units say once every 20 seconds without the player clicking build?
Edit: The easier way for this may just be to create a way point, or use viceroidspawner? is this doable without lua?
Thanks all
- Graion Dilach
- Posts: 277
- Joined: Fri May 15, 2015 5:57 pm
Code: Select all
DOG:
Buildable:
Queue: Infantry
BuildAtProductionType: Dog
BuildPaletteOrder: 50
Prerequisites: ~kenn, ~techlevel.infonly
KENN:
Production:
Produces: Infantry, Dog
BuildAtProductionType: Dog
So, if i add that to any unit, will it be available in the dog kennel?
Im going to experiment now .
Edit: I was able to add the units, the sidebar says Giant Ant but the tool tips will all be different. Custom maps wouldn't support adding a new icon for the sidebar correct?
The ants look strange because they are flying, and one is cloaked. I plan to only let the small one fly.
So, if i add that to any unit, will it be available in the dog kennel?
Im going to experiment now .
Edit: I was able to add the units, the sidebar says Giant Ant but the tool tips will all be different. Custom maps wouldn't support adding a new icon for the sidebar correct?
The ants look strange because they are flying, and one is cloaked. I plan to only let the small one fly.
- Attachments
-
- a.png (375.58 KiB) Viewed 7632 times
Last edited by raymundo on Tue Aug 04, 2015 2:47 am, edited 3 times in total.
Only if you also have barracks captured.Production:
Produces: Infantry
^Wouldn't this allow the building to also build regular infantry?
Are you sure? Look at the prerequisites, "~factant" shouldn't allow that.That will still let the ant to be produced from the barracks. But this reminded me that the answer is even more straightforward - dogs are the perfect example.
- Graion Dilach
- Posts: 277
- Joined: Fri May 15, 2015 5:57 pm
Having it as prereq alone wouldn't solve the possibility of production. Without using BuildAtProductionType, having both a barracks and an ant hive would let ants being trained from barracks and regular infantry trained from the ant hive which I think raymundo doesn't want.
Listing ~factant only disables the production alone but if that's passed, your solution provides no limits against the buildings eligible from production.
I also acknowledge, using an explicit BuildAtProductionType might make listing the producer building as prereq redundant although I never tested this latter case.
EDIT: Damn, raymundo, downsize that frickin screenshot, it breaks the forum! Also pretty certain there are modmaps already with custom cameos, since those are part of sequences, so you can add such, what you can't add are UI elements (production queue buttons, etc).
That falls underHaving it as prereq alone wouldn't solve the possibility of production. Without using BuildAtProductionType, having both a barracks and an ant hive would let ants being trained from barracks and regular infantry trained from the ant hive which I think raymundo doesn't want.
But you're right, yes.Only if you also have barracks captured.Production:
Produces: Infantry
^Wouldn't this allow the building to also build regular infantry?