Sadly, there is a limit in the Sight value. It's about 1/5 of the map. In order to give full vision of the map, you can create an invisible unit that have the maximum sight and place it everywhere around the map.
<StatusColorsindex="Life"EmptyColor="255,0,0,255"/><!-- Inside StatusColors there is an Array. <ColorArray value="255,208,34,0"/> However, since we are inheriting default array and can't reset it ... We can't change the ColorArray :x--><BarWidthvalue="275"/><BarHeightvalue="20"/><BarOffsetvalue="10"/>
Custom Image
You can insert images into text with StringToText.
<!-- Create a base class that contains all the common features --><CUnitid="BaseMonster"><DefaultAcquireLevelvalue="Defensive"/><Speedvalue="2.8125"/><Accelerationvalue="2.5"/><LateralAccelerationvalue="46.0625"/><Radiusvalue="0.375"/><Sightvalue="1000"/><InnerRadiusvalue="0.375"/><SeparationRadiusvalue="0.375"/><MinimapRadiusvalue="0.375"/><KillDisplayvalue="Always"/><AbilArrayLink="attack"/><AbilArrayLink="move"/><CardLayouts><LayoutButtonsAbilCmd="attack,Execute"/></CardLayouts></CUnit><!-- Then create another virtual unit that defines more attributes --><CUnitid="BaseGround"parent="BaseMonster"><PlaneArrayindex="Ground"value="1"/><Collideindex="Ground"value="1"/></CUnit><!-- And now, create a bunch of units that inherit the previous unit. Now you just have to set the special values. It makes unit creation really easy--><CUnitid="Drone"parent="BaseGround"><LifeStartvalue="15"/><LifeMaxvalue="15"/><WeaponArrayLink="Drone"/><BehaviorArrayLink="DropCoin50"/></CUnit><CUnitid="Zergling"parent="BaseGround"><LifeStartvalue="50"/><LifeMaxvalue="50"/><WeaponArrayLink="Zergling"/><BehaviorArrayLink="DropCoin100"/></CUnit>
Creating a new unit from scratch
Creating a new unit from scratch in the XML files is a tedious process because there are a lot of hidden dependencies. After hours of work here is the minimal setup to create a new building based off a Pylon.
<!-- UnitData.xml --><CUnitid="TDMain"><LifeStartvalue="200"/><LifeMaxvalue="200"/><Foodvalue="200"/><Footprintvalue="Footprint4x4DestructibleRockDiagonal"/><PlaneArrayindex="Ground"value="1"/><Collideindex="Burrow"value="1"/><Collideindex="Ground"value="1"/><Collideindex="Structure"value="1"/><BehaviorArrayLink="PowerSource"/></CUnit><!-- ModelData.xml --><CModelid="TDMain"parent="Pylon"/><!-- ActorData.xml --><CActorUnitid="TDMain"parent="GenericUnitStandard"><Parentvalue="Pylon"/></CActorUnit><!-- parent="Pylon" does not work, this is really strange. You have to parent="GenericUnitStandard" which is the parent of Pylon. And you can use <Parent value="Pylon"/> to inherit from the Pylon attributes. All those are not working: parent="A" parent="B" parent="A,B" <Parent value="A" /> <Parent value="B" /> So it seems not possible to have more than a double inheritance-->
Vision
Sadly, there is a limit in the Sight value. It's about 1/5 of the map. In order to give full vision of the map, you can create an invisible unit that have the maximum sight and place it everywhere around the map.
Status Bar
You can change a little the status bar.
Custom Image
You can insert images into text with StringToText.
Also, you can change the unit icon in ActorData.xml. It will be green'ed :)
XML Inheritance
Creating a new unit from scratch
Creating a new unit from scratch in the XML files is a tedious process because there are a lot of hidden dependencies. After hours of work here is the minimal setup to create a new building based off a Pylon.
Unit Aggressivity
In the UnitData.xml file you can set the aggressivity of a unit with:
Thanks, vjeux.
Great stuff! Good work Vjeux.