Hi, I added 3 new optional switches to unit.xml ( its in svn now ):
"count-unit-death-in-stats"
"count-unit-production-in-stats"
"count-unit-kill-in-stats"
update:
"count-kill-for-unit-upgrade"
This is meant for units which are for example just projectiles ( fo attack spawned units ) or to finally make resource production work.
How to do resource production now:
In general its done with an unvisibal unit, but this units is instantly killed after it is born ...
1. define a resource like this:
<resource>
<image path="images/housing.bmp"/>
<type value="static">
<recoup_cost value="false"/>
</type>
</resource>
( "recoup_cost value="false"" will keep the resource if the unit dies. )
2. build an "unvisible" unit with an empty model.
In this unit set:
- set a cellmap "0"
- set <max-hp value="10" regeneration="-10"/> ( by this the unit instantly dies after its produced, and you hear its death sound ... )
- set <count-unit-death-in-stats value="false"/>
- set <count-unit-production-in-stats value="false"/>