Page 1 of 1

Unit production per factory ?

Posted: Fri Jan 30, 2015 1:14 pm
by Holy_Master
Hi

I try to learn which code doing in Openra by modding exist game with little change just to see how it work, I want to apply unit production per factory feature from TD to Dune2k mod but i don't know where to work on these function.

it would be grateful if you can tell me how to do it or at least where to look on it. :\

thank you

Posted: Fri Jan 30, 2015 1:22 pm
by abcdefg30
A look at https://github.com/OpenRA/OpenRA/wiki/T ... ctionqueue should help.


The yamls:

You have in d2k:
https://github.com/OpenRA/OpenRA/blob/b ... er.yaml#L3

And in cnc e.g. this:
https://github.com/OpenRA/OpenRA/blob/b ... s.yaml#L28
or this:
https://github.com/OpenRA/OpenRA/blob/b ... .yaml#L238

(I think, you need this on every structure that produces something.)

Posted: Fri Jan 30, 2015 2:18 pm
by Holy_Master
thank you for your answer all those link help me understand alot

but sorry to ask again but do i need to put every sub code of such as Type , Group , RequireOwner,BuildSpeed,ect

in order to make ProductionQueue@ work on structures.yaml?

because i put only ProductionQueue@#####: to the code but the game didn't start for me,

from what i seen TD and D2K code management is quite different while TD use separate code per factions but D2K all factions seem to share everything on same code.

Posted: Fri Jan 30, 2015 2:53 pm
by abcdefg30
Did you use the "Production" trait?
ProductionQueue... will only work together with the Production: trait.

Posted: Fri Jan 30, 2015 3:20 pm
by Holy_Master
*Edit* seem like i understand now thank you.. look like it will be ton of work on these production code just to make it support this feature. = =