GiveunitcrateAction?

Information and discussion for custom maps and mods.
Post Reply
bodomalo
Posts: 37
Joined: Tue Feb 20, 2018 7:35 pm

GiveunitcrateAction?

Post by bodomalo »

Hi

I tried to change the crate actions in misc.yaml

GiveUnitCrateAction:
Units: harv
SelectionShares: 8

Whatever unit I choose, it is not given to the player who found the crate, it is just a white unit that does not belong to anyone.

What am I doing wrong?

User avatar
Materianer
Posts: 195
Joined: Mon Jul 04, 2016 8:27 am

Re: GiveunitcrateAction?

Post by Materianer »

bodomalo wrote: Hi

I tried to change the crate actions in misc.yaml

GiveUnitCrateAction:
Units: harv
SelectionShares: 8

Whatever unit I choose, it is not given to the player who found the crate, it is just a white unit that does not belong to anyone.

What am I doing wrong?
I'm not sure but maybe you need to add:

ValidFactions: allies, england, france, germany, soviet, russia, ukraine

abcdefg30
Posts: 413
Joined: Mon Aug 18, 2014 6:00 pm

Post by abcdefg30 »

Hm, really weird. I just added

Code: Select all

	GiveUnitCrateAction@harv:
		SelectionShares: 699
		Units: harv
and it worked on my end.

bodomalo
Posts: 37
Joined: Tue Feb 20, 2018 7:35 pm

Post by bodomalo »

abcdefg30 wrote: Hm, really weird. I just added

Code: Select all

	GiveUnitCrateAction@harv:
		SelectionShares: 699
		Units: harv
and it worked on my end.
:-(
Whenever I did it all the units I find are "white" and are enemies.

Do I have to add the @harv ?

ValidFractions did not help or change anything (I tried GDI,NOD as it is cnc)

I tested it in "skirmish" mode on my local PC (not online)

Did anyone try that in Tiberian Dawn, or only Red Alert? (I play Tiberian Dawn)

bodomalo
Posts: 37
Joined: Tue Feb 20, 2018 7:35 pm

Post by bodomalo »

More confusion


This WORKS

GiveMcvCrateAction:
SelectionShares: 100
Units: stnk
(gives me a stealth tank)

This does NOT work:

GiveUnitCrateAction:
Units: stnk
SelectionShares: 80
(stealth tank appears, belongs to nobody)

mod is cnc

User avatar
MustaphaTR
Posts: 202
Joined: Mon Aug 04, 2014 6:38 am
Location: Kastamonu, Turkey

Post by MustaphaTR »

There is a Visceroid crate in TD mod, which has `Owner: Creeps`. `@Harv` should indeed solve your issue, as it would make it create a new instance of trait, rather than overriding Visceroid crate.

bodomalo
Posts: 37
Joined: Tue Feb 20, 2018 7:35 pm

Post by bodomalo »

MustaphaTR wrote: There is a Visceroid crate in TD mod, which has `Owner: Creeps`. `@Harv` should indeed solve your issue, as it would make it create a new instance of trait, rather than overriding Visceroid crate.
Thanks
Now I understood what to do...

Post Reply