MegaGlest Forum

Archives (read only) => Glest Advanced Engine => General discussion => Topic started by: lazyanttu on 16 February 2012, 21:06:58

Title: Defeat when game begins - Defeat conditions?
Post by: lazyanttu on 16 February 2012, 21:06:58
Well I have started testing my third faction and immediately when the game begins, it states that you have lost the game? The faction starts with main base and 2 workers (currently no other units are implemented on the third faction, only the worker and the base).

The main base has rally point and is able to train workers. The workers are able to build/repair the main base. Main base also stores resources and gives consumable resource.

What are the defeat conditions, and why this happens? Other factions have no problem with this, but they also start with base and 4 workers. What could have possibly gone wrong :scared:.
Title: Re: Defeat when game begins - Defeat conditions?
Post by: Coldfusionstorm on 16 February 2012, 22:40:33
Does the main base have a cellmap?.
Title: Re: Defeat when game begins - Defeat conditions?
Post by: lazyanttu on 16 February 2012, 22:49:47
Yes it does. I copy-pasted it from my another faction, the only thing I changed was the storage capacity, cost, hp and removed detection-ability. And of course name and models etc.
Title: Re: Defeat when game begins - Defeat conditions?
Post by: John.d.h on 17 February 2012, 00:29:38
Does the main base have a be-built skill?  This is the same issue I ran into with Project Green.  Adding a be-built skill solved it.  The victory conditions (unless they're different in MG) are based on whether the faction has any units with a be-built skill left.
Title: Re: Defeat when game begins - Defeat conditions?
Post by: Ishmaru on 17 February 2012, 04:19:25
Does the main base have a be-built skill?  This is the same issue I ran into with Project Green.  Adding a be-built skill solved it.  The victory conditions (unless they're different in MG) are based on whether the faction has any units with a be-built skill left.

Yes, its the same in Megaglest
Title: Re: Defeat when game begins - Defeat conditions?
Post by: Omega on 17 February 2012, 06:01:47
The default defeat condition is simply to have no units with a "be-built" skill alive. Could you please post the XML of this main building?
Title: Re: Defeat when game begins - Defeat conditions?
Post by: lazyanttu on 17 February 2012, 13:57:04
That was it! Thank you guys, now it works :D.

Actually the base is never "built" in my mod, but instead morphed from another building. So that's why I removed the "be-built" skill. So is the best method just to leave the "be-built"-skill, although it is never used?

I was sure I read about this kind of issue somewhere in the forums, but I couldn't find it.
Title: Re: Defeat when game begins - Defeat conditions?
Post by: Omega on 18 February 2012, 04:50:37
Actually the base is never "built" in my mod, but instead morphed from another building. So that's why I removed the "be-built" skill. So is the best method just to leave the "be-built"-skill, although it is never used?
It doesn't have to be used. With the exception of the move skill, having an extra skill that isn't used will simply be ignored (however, a unit with an unused move skill will be able to rotate, even though it won't be able to move). That's what Project Green did; the hero units were given a be-built skill, thus requiring them to be defeated to win the game.