Jump to content
XCOMUFO & Xenocide

Combatants


dteviot

Recommended Posts

Hi dteviot. :)

 

Seeing as I have a little time on my hands now I figured I should take a look at combatants.xml to update that file. You are probably busy with other things right now, but could you take a minute or two and answer some questions?

 

First of all, I'm assuming that each race in Xeno will have the same rank subclass as in EU, correct? For instance, Sectoids have all ranks represented so I'm assuming that the Greys will too. Mutons only have ranks of Soldiers, Engineers and Navigators so Morlocks should be the same.

That decision was made before I joined. I believe you're correct, but I don't know for sure.

 

Ok, now on to the stats. Let's take a look at the Live Grey Soldier's entry in combatants.xml:

 

		<combatant name="LIVE_Grey_Soldier">
		<environments type="air martian"/>			
		<attributes>
			<timeunits mean="52" variance="5" xsi:type="normal"/>
			<stamina min="75" max="85" xsi:type="uniform"/>
			<health min="27" max="37" xsi:type="uniform"/>
			<reaction min="71" max="81" xsi:type="uniform"/>
			<strength min="27" max="37" xsi:type="uniform"/>
			<firingaccuracy min="61" max="71" xsi:type="uniform"/>
			<throwingaccuracy min="45" max="55" xsi:type="uniform"/>
			<bravery min="75" max="85" xsi:type="uniform"/>
			<psistrength min="55" max="65" xsi:type="uniform"/>
		</attributes>

		<carrier name="LO_Humanoid"/>

		<resistances>
			<resist region="all" type="DAMAGE_PIERCING" amount="0.5"/>
			<resist region="all" type="DAMAGE_EXPLOSIVE" amount="0.5"/>
			<resist region="all" type="DAMAGE_FIRE" amount="-0.5"/>
		</resistances>

	</combatant>

Do we really need/want to define a min and a max for each stat?

I'm guessing here, but I suspect the max/min was done to make alien stats similar to human stats.

That said, using mean and variance for each value would would work for me.

 

In EU, there is a single number (a constant) for each stat and that "core" (or "base") value is modified upwards according to the skill level you are playing on. I think this is an easier approach as there are less numbers to type and fewer chances of typing a number wrong. To get the stats of an alien would thus require a simple calculation for the stats that change.

 

I noticed that there are quite a few stats undefined in combatants.xsd. We are probably going to have to update that file at some point to include them (Psi Skill, Armor, Energy recharge rates, Victory Points, Aggression, Intelligence, Melee, Standing/Kneeling Height, Motion Scanner blip size, etc, etc). Do you think you could do that sometime? I'm still not comfortable defining attributes in xsd files yet. ;)

Sure. But I can't guarantee getting it done before the weekend.

Link to comment
Share on other sites

Zombie,

 

1. The existing XML file wasn't valid (illegal item names), I've tried to fix them up

 

2. I've added a new distribution for stats called "core".

It has a single, mandatory attribute "base".

 

3. I've added the additional attributes:

frontarmour

sidearmour

reararmour

underarmour

victorypoints

aggression

melee

intelligence

energyrecharge

standingheight

kneelingheight

floatingheight

damagemodifier

motionscannerblipsize

 

4. I've added a sample entry Live_Cloak_Soldier (Which should match an etherial soldier) so that you can see how the new attributes work.

<combatant name="LIVE_Cloak_Soldier">
<environments type="air martian"/>
<attributes>
	<timeunits			 base="68" xsi:type="core"/>
	<stamina			   base="96" xsi:type="core"/>
	<health				base="55" xsi:type="core"/>
	<bravery			   base="80" xsi:type="core"/>
	<reaction			  base="75" xsi:type="core"/>
	<firingaccuracy		base="74" xsi:type="core"/>
	<throwingaccuracy	  base="80" xsi:type="core"/>
	<strength			  base="48" xsi:type="core"/>
	<psistrength		   base="50" xsi:type="core"/>
	<psiskill			  base="40" xsi:type="core"/>
	<frontarmour		   base="35" xsi:type="core"/>
	<sidearmour			base="35" xsi:type="core"/>
	<reararmour			base="35" xsi:type="core"/>
	<underarmour		   base="35" xsi:type="core"/>
	<energyrecharge		base="40" xsi:type="core"/>
	<victorypoints		 base="20" xsi:type="core"/>
	<aggression			base="1"  xsi:type="core"/>
	<melee				 base="85" xsi:type="core"/>
	<intelligence		  base="6"  xsi:type="core"/>
	<standingheight		base="20" xsi:type="core"/>
	<kneelingheight		base="15" xsi:type="core"/>
	<floatingheight		base="0"  xsi:type="core"/>
	<damagemodifier		base="6"  xsi:type="core"/>
	<motionscannerblipsize base="4"  xsi:type="core"/>
</attributes>
<carrier name="LO_Humanoid"/>
</combatant>

 

5. I've removed the "flyer" attribute, as the new floatingheight replaces it.

 

6. I'm not certain of the relationship between

  • The new damagemodifier attribute
  • The new front/side/rear/under armour attributes
  • The previously existing resistances

So I've left the resistances in there.

 

Let me know if there's anything else you need.

combatants.zip

Link to comment
Share on other sites

Thanks greatly for points 1-4! :)

5. I've removed the "flyer" attribute, as the new floatingheight replaces it.

 

6. I'm not certain of the relationship between

  • The new damagemodifier attribute
  • The new front/side/rear/under armour attributes
  • The previously existing resistances

So I've left the resistances in there.

 

Let me know if there's anything else you need.

5. The floating height attribute just indicates how high above ground a unit is. Celatids have a floating height but cannot "fly". Etherals do not have a floating height, yet they can fly. ("Flying" is defined as the ability to change levels on the battlescape). So me thinks this is a necessary attribute. If all units who have a floating height actually flew, then I could see leaving out the flying attribute... What do you think?

 

6a. Um yeah, the damage modifier number in X-COM places a unit in a certain DM category. The actual modifiers are defined elsewhere in the executable. So I guess we don't really need it since we aren't going to make a separate xml file.

 

6b. I didn't realize that the armor attributes were already defined as "resist" in Xeno. But when I think of resistances, I think of Damage Modifiers, not armor. I think the new armor attributes make things easier to understand too, especially for players who will mod the game.

 

BTW, in combatants.xml there is an "upper" armor attribute. X-COM didn't have this. If we are going to have top armor, we are going to need a xml entry and create some appropriate values. Perhaps a number higher than under armor but lower than back armor will suffice for some aliens? We could also be creative and base it off of an existing model, but I'm sure AWD isn't finished with all of them yet. :P

 

Thanks again, dteviot. =b

 

- Zombie

Link to comment
Share on other sites

5. The floating height attribute just indicates how high above ground a unit is. Celatids have a floating height but cannot "fly". Etherals do not have a floating height, yet they can fly. ("Flying" is defined as the ability to change levels on the battlescape). So me thinks this is a necessary attribute. If all units who have a floating height actually flew, then I could see leaving out the flying attribute... What do you think?

Probably easiest if I put the flyer attribute back.

 

6a. Um yeah, the damage modifier number in X-COM places a unit in a certain DM category. The actual modifiers are defined elsewhere in the executable. So I guess we don't really need it since we aren't going to make a separate xml file.

And I remove the damagemodifier attribute

 

6b. I didn't realize that the armor attributes were already defined as "resist" in Xeno. But when I think of resistances, I think of Damage Modifiers, not armor. I think the new armor attributes make things easier to understand too, especially for players who will mod the game.

Personally, I think having explict armor values is also a good idea.

Then the resistances become a "bonus/penalty" that is applied to the different attack types.

 

BTW, in combatants.xml there is an "upper" armor attribute. X-COM didn't have this. If we are going to have top armor, we are going to need a xml entry and create some appropriate values. Perhaps a number higher than under armor but lower than back armor will suffice for some aliens? We could also be creative and base it off of an existing model, but I'm sure AWD isn't finished with all of them yet. :P

I guess it depends on what the "upper" armour would be used for.

I assume the "under armour" is used for grendades (or something like that).

So, is there some special attack that would need it?

Personally, I'd remove the upper armour, and just use the front/side/rear value, depending on the direction of the attack.

 

Also,

I think the additional changes need to be made:

1. Each combatant entry needs two additional fields "species" and "rank".

2. The rank enumeration already exists in basic.xsd. But a species one needs to be added.

3. Note, this would probably require soldiers and civilians to be different species. Either that, or we add the additional rank "civilian" (Which might be a better idea.)

4. We would probably need "tank" and "hovertank" species as well.

5. The combatant "name" can be removed, as it has no value.

 

If you agree, I'll have a go at making the modifications tonight.

Link to comment
Share on other sites

BTW, in combatants.xml there is an "upper" armor attribute. X-COM didn't have this. If we are going to have top armor, we are going to need a xml entry and create some appropriate values. Perhaps a number higher than under armor but lower than back armor will suffice for some aliens? We could also be creative and base it off of an existing model, but I'm sure AWD isn't finished with all of them yet. :P

I guess it depends on what the "upper" armour would be used for.

I assume the "under armour" is used for grendades (or something like that).

So, is there some special attack that would need it?

Personally, I'd remove the upper armour, and just use the front/side/rear value, depending on the direction of the attack.

 

*pops head out*

 

IIRC, under armour is only used for explosions (I think the stun bomb as well), and only if they are on top of the explosion or within 1 square of ground zero.

 

I would think an under and/or upper armor would be a nice touch to have in the game, especially concerning flying units

 

*pops head back underground*

Link to comment
Share on other sites

BTW, in combatants.xml there is an "upper" armor attribute. X-COM didn't have this. If we are going to have top armor, we are going to need a xml entry and create some appropriate values. Perhaps a number higher than under armor but lower than back armor will suffice for some aliens? We could also be creative and base it off of an existing model, but I'm sure AWD isn't finished with all of them yet. :P

I guess it depends on what the "upper" armour would be used for.

I assume the "under armour" is used for grendades (or something like that).

So, is there some special attack that would need it?

Personally, I'd remove the upper armour, and just use the front/side/rear value, depending on the direction of the attack.

 

*pops head out*

 

IIRC, under armour is only used for explosions (I think the stun bomb as well), and only if they are on top of the explosion or within 1 square of ground zero.

 

I would think an under and/or upper armor would be a nice touch to have in the game, especially concerning flying units

 

*pops head back underground*

 

OK, to clarify, I agree with having under armour.

But, I don't see what uppper armour would do. Surely the front, side and rear armours are the upper armours?

Link to comment
Share on other sites

But, I don't see what uppper armour would do. Surely the front, side and rear armours are the upper armours?
Emm, what happens if a flying alien (say, 2 levels above you) shoots at your soldier's head? I guess that's where upper armor applies

 

Edit: Idea: You could remove the upper armor, and in case such a calculation is needed, use the direction of the attack (front, back, side) and lower the armor value with a modifier (say, divide by 2), because (I guess that) a helmet can't provide as much protection as a kevlar vest for example (change accordingly for personal/body/flying armor)

Edited by kafros
Link to comment
Share on other sites

If you agree, I'll have a go at making the modifications tonight.

No argument from me. 100% agreement. :)

 

The upper armor attribute would be like kafros mentioned. Aliens (and not just flying aliens) can sometimes be found in elevated sniping locations throught the map. Shots coming from them would thus tend to hit the head more often. It would be a nice touch to have it, as shots would otherwise be routed to other parts of the body. (One of my pet-peeves in X-COM is that a head shot normally does diddly squat). ;)

 

- Zombie

Link to comment
Share on other sites

But, I don't see what uppper armour would do. Surely the front, side and rear armours are the upper armours?
Emm, what happens if a flying alien (say, 2 levels above you) shoots at your soldier's head? I guess that's where upper armor applies

 

Edit: Idea: You could remove the upper armor, and in case such a calculation is needed, use the direction of the attack (front, back, side) and lower the armor value with a modifier (say, divide by 2), because (I guess that) a helmet can't provide as much protection as a kevlar vest for example (change accordingly for personal/body/flying armor)

Firstly, work on the battlescape is probably 12 months off, so any decisions now are provisional, until I actually decide what's going to happen in the battlescape. (Because I'm the one that's going to have to implement it. - If you want to implement it, then you can do whatever you like.)

So, to keep things simple (and because X-Com:EU doesn't have it) upper armour is herby eliminated.

However, if time permits, "headshots" as suggested by Kafros will be implemented.

If game balance testing indicates that upper armour is needed, it will be added then.

Link to comment
Share on other sites

Firstly, work on the battlescape is probably 12 months off, so any decisions now are provisional, until I actually decide what's going to happen in the battlescape. (Because I'm the one that's going to have to implement it. - If you want to implement it, then you can do whatever you like.)

So, to keep things simple (and because X-Com:EU doesn't have it) upper armour is herby eliminated.

However, if time permits, "headshots" as suggested by Kafros will be implemented.

If game balance testing indicates that upper armour is needed, it will be added then.

That's indeed the most rational and practical course of action, the one a programmer would follow :wink1: :P :) Edited by kafros
Link to comment
Share on other sites

1. Restored "flyer" attribute

2. Removed "damagemodifier" attribute

3. Removed "upper" resistance

4. Removed "left" resistance

5. Renamed "right" resistance to "side" (to match armour)

6. Renamed "lower" resistance to "under" (to match armour)

7. Removed "name" from combatant element

8. Added "race" and "rank" to combatant element

9. Added "RANK_CIVILIAN" to ranks in basic.xsd

10. Added "raceTypeEnum" to basic.xsd

11. Updated combatants.xsd to match changes.

 

As an aside, if you've installed Visual C# Express, then if you open the combatants.xml, combatants.xsd and basic.xsd, you can edit combatants.xml, and the IDE will provide intellisense to help you edit the .xml file, and also do validity checks. It puts a wavy blue line, like a spelling checker, under the invalid elements

 

that violate the schema.

combatants.zip

Link to comment
Share on other sites

By the looks of combatants.xsd, I'm not sure that the idea of damage modifiers is understood. From the .xsd definition, it appears that the resistances is specific to a part of the armor. (For instance, side armor may be more susceptible to AP ammo than the under armor is). This sounds like more of a post v1.0 idea to me.

 

The way damage modifiers work in X-COM is rather complex, but let me try to simplify it. Armor is an attribute that is shared by all units in the game. The armor the aliens wear is no different from that of X-COM soldiers, tanks or even civilians. The only thing that changes is the amount of protection each offers. Damage modifiers play no role whatsoever in armor.

 

Damage modifiers apply only to the race of a unit. Some races are more susceptible to a damage type than others are. But each race must have a value for each damage type to tell the game if a modification on the damage roll needs to be applied. So for instance, just because a unit has a 100% susceptibility (no damage modification) to a certain damage type, it doesn't mean we can leave it blank or ignore it (well, I suppose you could if 100% susceptibility was the default and only a specific modifier would override it). Therefore we have to list the damage type and the quantity in combatants.xml sort of what is found in the Grey Soldier listing:

 

<resistances>
<resist region="all" type="DAMAGE_PIERCING" amount="0.5"/>
<resist region="all" type="DAMAGE_EXPLOSIVE" amount="0.5"/>
<resist region="all" type="DAMAGE_FIRE" amount="-0.5"/>
</resistances>

The amount of natural resistance is defined as a number greater than -1 in combatants.xsd. I would suggest redefining it as a positive integer greater than 0 (for a percent), or a positive real number greater than 0 (for a fraction) to simplify things. 0% susceptiblity to a damage type would mean complete invulnerability, numbers between 1% and 99% would mean a decrease in damage, 100% would mean no modification and anything greater than 100% would mean extra damage. Or, if you want to stick with fractions, it would be 0, 0.01-0.99, 1.00, and 1.01+. The call is yours.

 

While we are on the subject of damage types, might I suggest updating basic.xsd to remove the flashpod and psionic damage types? Those devices do not produce damage to a unit. If we are not going to use a tear gas grenade for v1.0, we should remove that damage type also. What causes suffocation damage? If nothing is slated to create that damage for v1.0 we should remove that too. What causes impact damage? Is it needed?

 

I may be opening up a real can of worms here, but the Stun Rod in X-COM produces stun damage while in Xeno the Stun Baton has electrical damage. But the result is the same: the unit takes stun damage no matter what the damage type is suppoded to be. (BTW, smoke produces stun damage in X-COM so this damage type would be unnecessary if we had a stun damage type). It would have been really easy to explain this fact when the Stun Baton CT was being written. However now that the CT is complete, perhaps it would better to leave the text alone. Another slight problem is that the damage type for the Stun Launcher isn't explicitly mentioned in the text. Whether it will be electrical or stun has yet to be determined. If we decide to define stun as a damage type, it would probably be worthwhile.

 

We are going to have to define melee as a type of damage though. Aliens such as the Zombie, Reaper and Silicoid have this type of damage. And if we are going to have a knife for our soldiers to carry we could define this as melee damage too (not to mention the Thermic lances and drills for underwater use in later versions). Same goes for the Celatid's acid spit: we need a damage type for that.

 

Ok, that's about it for Damage modifiers. Hurray. ;)

 

- Zombie

Link to comment
Share on other sites

The amount of natural resistance is defined as a number greater than -1 in combatants.xsd. I would suggest redefining it as a positive integer greater than 0 (for a percent), or a positive real number greater than 0 (for a fraction) to simplify things. 0% susceptiblity to a damage type would mean complete invulnerability, numbers between 1% and 99% would mean a decrease in damage, 100% would mean no modification and anything greater than 100% would mean extra damage. Or, if you want to stick with fractions, it would be 0, 0.01-0.99, 1.00, and 1.01+. The call is yours.

Either works for me.

Probably best to use whatever method is most intuitive.

 

While we are on the subject of damage types, might I suggest updating basic.xsd to remove the flashpod and psionic damage types? Those devices do not produce damage to a unit. If we are not going to use a tear gas grenade for v1.0, we should remove that damage type also. What causes suffocation damage? If nothing is slated to create that damage for v1.0 we should remove that too. What causes impact damage? Is it needed?

 

I may be opening up a real can of worms here, but the Stun Rod in X-COM produces stun damage while in Xeno the Stun Baton has electrical damage. But the result is the same: the unit takes stun damage no matter what the damage type is suppoded to be. (BTW, smoke produces stun damage in X-COM so this damage type would be unnecessary if we had a stun damage type). It would have been really easy to explain this fact when the Stun Baton CT was being written. However now that the CT is complete, perhaps it would better to leave the text alone. Another slight problem is that the damage type for the Stun Launcher isn't explicitly mentioned in the text. Whether it will be electrical or stun has yet to be determined. If we decide to define stun as a damage type, it would probably be worthwhile.

 

We are going to have to define melee as a type of damage though. Aliens such as the Zombie, Reaper and Silicoid have this type of damage. And if we are going to have a knife for our soldiers to carry we could define this as melee damage too (not to mention the Thermic lances and drills for underwater use in later versions). Same goes for the Celatid's acid spit: we need a damage type for that.

 

Ok, that's about it for Damage modifiers. Hurray. ;)

 

- Zombie

Tell you what, tell me how you want resistances and damages to work (and give me a list of all of them) and

I'll try and figure out how to implement them.

CTD will have to adjust the texts to match what is implemented.

Link to comment
Share on other sites

Either works for me.

Probably best to use whatever method is most intuitive.

I'd suggest the integer approach then since there is less typing involved, and thus, less errors introduced.

 

Tell you what, tell me how you want resistances and damages to work (and give me a list of all of them) and

I'll try and figure out how to implement them.

CTD will have to adjust the texts to match what is implemented.

Ok. Here are my proposed damage types for basic.xsd:

 

<xsd:simpleType name="damageTypeEnum">
<xsd:restriction base="xsd:string">
	<xsd:enumeration value="DAMAGE_PIERCING"/>
	<xsd:enumeration value="DAMAGE_FIRE"/>
	<xsd:enumeration value="DAMAGE_EXPLOSIVE"/>
	<xsd:enumeration value="DAMAGE_LASER"/>
	<xsd:enumeration value="DAMAGE_PLASMA"/>
	<xsd:enumeration value="DAMAGE_STUN"/>
	<xsd:enumeration value="DAMAGE_MELEE"/>
	<xsd:enumeration value="DAMAGE_ACID"/>
	<xsd:enumeration value="DAMAGE_SMOKE"/>
</xsd:restriction>
</xsd:simpleType>

Please note the removal of Impact, Flashpod, Psionic, Tear Gas, Suffocation and Electrical damage types and the addition of Stun, Melee and Acid. I left the Smoke damage type in-place for the time being as I'm not sure how we are going to handle Smoke Grenade explosions on the battlescape yet. It may come in handy, if only to define the size of the smoke bomb explosion. With these changes, I'll need to update item.xml again. I noticed that the Stun Baton and Stun Bomb both have a damage type of Electrical in item.xml. Initially I thought of keeping that damage type, but now I figure we can change it without any consequences as both have the word "Stun" in them. It would only stand to reason that the damage type was therefore stun. :)

 

As for resistances/Damage Modifiers I propose a combatants.xml listing similar to the one shown in my previous post. This would be a sample from a Sectoid/Grey

 

<resistances>
<resist type="DAMAGE_PIERCING" amount="100"/>
<resist type="DAMAGE_FIRE" amount="100"/>
<resist type="DAMAGE_EXPLOSIVE" amount="100"/>
<resist type="DAMAGE_FIRE" amount="100"/>
<resist type="DAMAGE_LASER" amount="100"/>
<resist type="DAMAGE_PLASMA" amount="100"/>
<resist type="DAMAGE_STUN" amount="100"/>
<resist type="DAMAGE_MELEE" amount="120"/>
<resist type="DAMAGE_ACID" amount="160"/>
</resistances>

Only difference is that I removed the region="all" attrinbute. Also these values technically aren't resistances anymore. (A higher number would mean more resistance, but you are never able to define a 100% immunity from the damage type). I'd therefore suggest rewording "resistances" to "susceptibilities" (and "resist" to "suscept") as that better describes the properties of the damage modifier.

 

Is that better? ;)

 

- Zombie

Link to comment
Share on other sites

Sorry about this Zombie, but I've had some more thoughts.

 

There are three things we’re trying to determine here:

  • What is the injury model for combatants?
  • What are the “damage types” that weapons can do?
  • How do we map damage to injury?

My suggestion would be, for injury, we have two sorts of damage: stun and physical (for want of a better word). Then for each combatant we have a susceptibility element, that maps each damage type to injury.

e.g. it looks like this

<susceptibility>
<damage type= "DAMAGE_PIERCING" physical="0.8" stun="0.2"/>
<damage type= "DAMAGE_EXPLOSIVE" physical="0.5" stun="0.5"/>
<damage type= "DAMAGE_FIRE" physical="1.5" stun="0.0"/>
  … etc. 
<susceptibility>

 

The way it works is we calculate the number of points of damage an attack does, and then we multiply the number of points by the damage numbers to get the number of points of physical and stun damage the attack does.

 

e.g. Assume that a Grey is shot by a piercing bullet, and after allowing for armour , weapon type, range, cover, etc. we come up with 10 points of damage. The damage would then be applied to the Grey as 10 x 0.8 = 8 points of physical damage, and 2 (10 x 0.2) points of stun damage.

 

A small problem with this model is that it doesn’t cover the fact that some races (e.g. cyberdisks) are invulnerable to psi attacks. (And presumably others are more or less resistant to them as well.) A possible solution would be to model this as a third damage type. E.g.

 

 

However, I think this needs more discussion before we reach a conclusion.

 

Which brings me to my final points.

First. this is all only relevant to the battlescape, which is some way off, and for the moment my priority is to get the geoscape working.

Second, someone should talk to UFO2000 (i.e. Serge) to see how they handle this (or even ask them how they would recommend doing this, based on their experience.)

Link to comment
Share on other sites

Planning so far ahead even such specific details as damage types is just a waste of time for Xenocide development right now. You overload yourself with excessive information and distract your attention from what is really important.

 

Damage types can be relatively easily added at any stage of project development unless you design some really bad and inflexible architecture.

Link to comment
Share on other sites

Sorry about this Zombie, but I've had some more thoughts.

 

There are three things we’re trying to determine here:

  • What is the injury model for combatants?
  • What are the “damage types” that weapons can do?
  • How do we map damage to injury?

My suggestion would be, for injury, we have two sorts of damage: stun and physical (for want of a better word). Then for each combatant we have a susceptibility element, that maps each damage type to injury.

e.g. it looks like this

<susceptibility>
<damage type= "DAMAGE_PIERCING" physical="0.8" stun="0.2"/>
<damage type= "DAMAGE_EXPLOSIVE" physical="0.5" stun="0.5"/>
<damage type= "DAMAGE_FIRE" physical="1.5" stun="0.0"/>
  … etc. 
<susceptibility>

 

The way it works is we calculate the number of points of damage an attack does, and then we multiply the number of points by the damage numbers to get the number of points of physical and stun damage the attack does.

 

e.g. Assume that a Grey is shot by a piercing bullet, and after allowing for armour , weapon type, range, cover, etc. we come up with 10 points of damage. The damage would then be applied to the Grey as 10 x 0.8 = 8 points of physical damage, and 2 (10 x 0.2) points of stun damage.

Ah, no problem dteviot, I know what you are getting at now. Thing is, in combatants we only have to really worry about specific unit stats, not battlescape damage models. Here is what happens on the battlescape (it's condensed a bit but you should get an idea nonetheless):

 

The first thing we look at is the type of weapon and ammo being used. Specifically, the listed damage and the damage type. If you are using normal "bullet" type weapons such as AP, Laser or Plasma (even stun, melee and acid spit fall in this category), the weapon can do between 0 and 2x the listed damage. (For instance, if an AP shell has a damage of 50, that is the average unmodified damage it can pump out. For this reason an AP-50 shell can do anywhere between 0 and 100 points of damage to a target). If you are using HE things are a little different. The listed damage is still the average, but the range is shortened to (0.5 x listed) to (1.5 x listed). (For instance, a HE-50 shell will do a minimum 25 points of damage to a maximum of 75 points).

 

Once the range is determined, the game rolls a random number within this range to get the damage for the shot. Shot damage is then applied to the armor rating. If it is armor rating, the game subtracts the armor rating from the shot damage to arrive at a pre-damage. Here's where the damage modifiers kick in. (Let's say we have an AP-50 round which rolled a perfect 100 damage, against a unit which has 50 for armor and 50% susceptibility to AP ammo). We have 100 damage - 50 armor = 50 pre-damage. Then we apply the damage modifier: 50 pre-damage * 0.5 = 25 points of damage applied to health. That's it for the damage aspect.

 

For the little bit of stun applied the game just divides the total damage done to health by 4. For a unit which took 25 damage points, the game would apply INT(25/4) points of stun = 6.

 

A small problem with this model is that it doesn’t cover the fact that some races (e.g. cyberdisks) are invulnerable to psi attacks. (And presumably others are more or less resistant to them as well.) A possible solution would be to model this as a third damage type. E.g.

 

 

However, I think this needs more discussion before we reach a conclusion.

Psi is a completely different model. It doesn't deal with health at all. So why try to fit it in with damage?

 

All aliens in the game can be mind controlled. This includes the Cyberdiscs, Sectopods and the Zombie. And just because the alien robotic units have 100 for psionic strength doesn't make them immune from psi attacks. This is because their psionic skill is 0. If you have a soldier with 80 psi strength and ~60 psi skill, he can easily MC a Cyberdisc or Sectopod. A second type of psionic attack (panic) deals with bravery and morale. A successful attack subtracts 110-bravery points from the units morale immediately. If a unit has 50 bravery, a successful panic attack subtracts 110-50 = 60 points from its morale. (Robotic units with 110 for bravery are immune from panic attacks but not mind control). Distance also plays a role in success of a psionic attack.

 

Let me reiterate. Psionics deal with complete control of a unit or panicking. It doesn't deal with health and thus plays no role in damage modifiers or a battlescape model of damage.

 

- Zombie

Link to comment
Share on other sites

Ah, no problem dteviot, I know what you are getting at now. Thing is, in combatants we only have to really worry about specific unit stats, not battlescape damage models. Here is what happens on the battlescape (it's condensed a bit but you should get an idea nonetheless):

 

The first thing we look at is the type of weapon and ammo being used. Specifically, the listed damage and the damage type. If you are using normal "bullet" type weapons such as AP, Laser or Plasma (even stun, melee and acid spit fall in this category), the weapon can do between 0 and 2x the listed damage. (For instance, if an AP shell has a damage of 50, that is the average unmodified damage it can pump out. For this reason an AP-50 shell can do anywhere between 0 and 100 points of damage to a target). If you are using HE things are a little different. The listed damage is still the average, but the range is shortened to (0.5 x listed) to (1.5 x listed). (For instance, a HE-50 shell will do a minimum 25 points of damage to a maximum of 75 points).

 

Once the range is determined, the game rolls a random number within this range to get the damage for the shot. Shot damage is then applied to the armor rating. If it is armor rating, the game subtracts the armor rating from the shot damage to arrive at a pre-damage. Here's where the damage modifiers kick in. (Let's say we have an AP-50 round which rolled a perfect 100 damage, against a unit which has 50 for armor and 50% susceptibility to AP ammo). We have 100 damage - 50 armor = 50 pre-damage. Then we apply the damage modifier: 50 pre-damage * 0.5 = 25 points of damage applied to health. That's it for the damage aspect.

 

For the little bit of stun applied the game just divides the total damage done to health by 4. For a unit which took 25 damage points, the game would apply INT(25/4) points of stun = 6.

OK, then under my system, this would ba an entry of

I'd like to seperate physical from stun, mostly because it's essentially the same amount of work to code as having a fixed calculation (0.25 * total damage) but allows modders to to change stun damage by species and attack mode (if they so choose.)

 

Psi is a completely different model. It doesn't deal with health at all. So why try to fit it in with damage?

 

All aliens in the game can be mind controlled. This includes the Cyberdiscs, Sectopods and the Zombie. And just because the alien robotic units have 100 for psionic strength doesn't make them immune from psi attacks. This is because their psionic skill is 0. If you have a soldier with 80 psi strength and ~60 psi skill, he can easily MC a Cyberdisc or Sectopod. A second type of psionic attack (panic) deals with bravery and morale. A successful attack subtracts 110-bravery points from the units morale immediately. If a unit has 50 bravery, a successful panic attack subtracts 110-50 = 60 points from its morale. (Robotic units with 110 for bravery are immune from panic attacks but not mind control). Distance also plays a role in success of a psionic attack.

 

Let me reiterate. Psionics deal with complete control of a unit or panicking. It doesn't deal with health and thus plays no role in damage modifiers or a battlescape model of damage.

Understood, psi is a completely different beast, with its own codepath.

Edited by dteviot
Link to comment
Share on other sites

OK, then under my system, this would ba an entry of

I'd like to seperate physical from stun, mostly because it's essentially the same amount of work to code as having a fixed calculation (0.25 * total damage) but allows modders to to change stun damage by species and attack mode (if they so choose.)

Hmm, so that would mean pre-calculating the stun modifier for every damage type and every race/rank combo in the game. That's an interesting non-battlescape approach to calculating stun. I guess it'll save a calculation step on the battlescape, but it would make the game more prone to stun problems if a modder doesn't understand the mechanics used to arrive at the answer. We better make a comment about this in combatants.xml. Anyhow, let me know when you finish defining in combatants.xsd so I can start work on the xml file. Thanks! :)

 

- Zombie

Link to comment
Share on other sites

OK, then under my system, this would ba an entry of

I'd like to seperate physical from stun, mostly because it's essentially the same amount of work to code as having a fixed calculation (0.25 * total damage) but allows modders to to change stun damage by species and attack mode (if they so choose.)

Hmm, so that would mean pre-calculating the stun modifier for every damage type and every race/rank combo in the game. That's an interesting non-battlescape approach to calculating stun. I guess it'll save a calculation step on the battlescape, but it would make the game more prone to stun problems if a modder doesn't understand the mechanics used to arrive at the answer. We better make a comment about this in combatants.xml. Anyhow, let me know when you finish defining in combatants.xsd so I can start work on the xml file. Thanks! :)

 

- Zombie

Well, it also makes writing the code to handle stun damage (from the electro-shock rods and the stun launcher) easier. I don't need to treat DAMAGE_STUN as a special case, with different rules for calcuating stun and physical damage from an attack. Instead the special case handling is done by the pre-computed table.

Link to comment
Share on other sites

OK, try this:

 

	<susceptibilities>
	<piercing  physical="1.0" stun="0.25"/>
	<fire	  physical="1.0" stun="0.25"/>
	<explosive physical="1.0" stun="0.25"/>
	<laser	 physical="1.0" stun="0.25"/>
	<plasma	physical="1.0" stun="0.25"/>
	<stun	  physical="0.0" stun="1.00"/>
	<melee	 physical="1.0" stun="0.25"/>
	<acid	  physical="1.0" stun="0.25"/>
	<smoke	 physical="1.0" stun="0.25"/>
</susceptibilities>

 

Note, for XML to be valid, all susceptibilities must be present, and in order.

I've also adjusted the damage types in basic.xsd as requested.

Combatants.zip

Link to comment
Share on other sites

Well, this should be enough to get me started at least. I'll work on combatants this week and try to get the aliens squared away. Thanks again! :)

 

- Zombie

Link to comment
Share on other sites

  • 1 month later...

Ok, this was a ton of work, but I managed to add almost all the stats to combatants.xml (the file size went from 11kb to 65kb if that is any indication of progress). The data entry went pretty smooth. (Probably because I have most of the stats memorized. Sad, isn't it). ;)

 

Let's see, I reorganized the entire file as the spacing was making stuff hard to follow. In addition, I changed the order of the attribute listing in .xsd to match the order in my records. Wasn't sure if this was necessary, but I did it to be safe. Once I had a format, it was just a matter of entering numbers. I wasn't sure about the flyer attribute. It is defined in the .xsd like this:

 

<xsd:element name="flyer" type="xsd:boolean" minOccurs="0"/>

Now, I wasn't really sure on the value as boolean can be defined as 0 or 1 (binary) or true or false (English). I picked 0 and 1. In xml it showed up in places as true. Is that the way it's supposed to be defined? If it needs to be defined as true or false, that can easily be fixed with a search and replace.

 

Didn't muck with the environments data - wasn't sure how that is going to be used. Also, I'm not sure we need the carrier thing for most units. It's basically unnecessary for civilians as they are unarmed. Human Soldiers? The player defines what is carried. Aliens? What weapons they get is random (for the most part). Tanks/Terrorists with integrated/irremovable weapons? Could be a problem the way it stands now. See, the chassis has one set of stats. We can't define a chassis to hold the cannon, rocket launcher and laser, can we? The only way around this problem is to define all the tanks with different weapons as separate entries in combatants. We definitely do not need the carrier for aliens with psi powers. Just make it so that their psi powers are inherent and do not require a device. (That's how the original game handled it. I don't really know how PX's research tree/alien items works. If the Psi-Amp is now an alien item instead of an X-COM item, then we may need to keep the carrier for the psi aliens).

 

The acquire and sell price stats are unnecessary in combatants.xml as they are found in item.xml, so that can probably be removed from combatants.xsd. There is a bunch of stuff for XCAPS at the end of combatants.xml which I don't think we need anymore either. Probably should be removed, but I wanted to ask first.

 

I didn't fool with starting soldier stats yet. The main thing is that I'm fresh out of time today. The other thing is that I found a problem with using mean and variance. Some stats average out to real numbers, not integers. Seeing as the min and max are still defined in the xsd file, I think I'll opt to use that instead. Finally, my records for soldier stats was incomplete. I need to send some of my X-COM recruits on a mission to fill in the blanks from unitref.dat.

 

For some reason, the Zombie was missing from the listing in basic.xsd so I added it in. By golly, I can't even find a mention of this alien type anywhere in the workshops. :wink1:

 

What else? Oh right. The damage modifiers. I added the data, but still need to check it out for consistency. Also, the smoke/stun thing isn't completely known in X-COM yet. I ran a few tests a while back, but never checked with differing damage modifiers. Same goes with fire. That goes on my "to-do" list. Right now the numbers are only "best-guessed" in combatants.xml.

 

As an aside, if you've installed Visual C# Express, then if you open the combatants.xml, combatants.xsd and basic.xsd, you can edit combatants.xml, and the IDE will provide intellisense to help you edit the .xml file, and also do validity checks. It puts a wavy blue line, like a spelling checker, under the invalid elements that violate the schema.

That brings me to my final point: I didn't validate anything yet. Don't know where to get Visual C# Express. (I looked for it a while back and think it's from Microsoft. Doesn't it require the latest .NET framework to run? My version is pretty old and I didn't want to spend the time and disk space to upgrade. Besides, even if I had downloaded everything, it wouldn't mean I could figure out how to use it). Is there another .xml/xsd validator out there which is free, easy to use and small in file size? Wishful thinking on my part as nothing I ever download fits the list. <_>

 

I've included a zip of basic.xsd and combatants.xml/xsd if you want to take a look at things. :) Combatants_New.zip

 

- Zombie

Link to comment
Share on other sites

Now, I wasn't really sure on the value as boolean can be defined as 0 or 1 (binary) or true or false (English). I picked 0 and 1. In xml it showed up in places as true. Is that the way it's supposed to be defined? If it needs to be defined as true or false, that can easily be fixed with a search and replace.

The legal values for a boolean element are ‘0’, ‘1’, ‘true’ and ‘false’. Note the case.

 

Also, I'm not sure we need the carrier thing for most units. It's basically unnecessary for civilians as they are unarmed. Human Soldiers? The player defines what is carried. Aliens? What weapons they get is random (for the most part)

I’d say don’t worry about that at this point in time. This is only relevant when we get to the battlescape, and we can figure out how to solve it then.

 

Tanks/Terrorists with integrated/irremovable weapons? Could be a problem the way it stands now. See, the chassis has one set of stats. We can't define a chassis to hold the cannon, rocket launcher and laser, can we? The only way around this problem is to define all the tanks with different weapons as separate entries in combatants.

Well, I’ve suggested a number of times that we should separate the Tanks into chassis and weapon. (And been told we can’t because the ART department won’t redo the models.) But worst case, we put in an entry for each type of Tank. There are only 5.

 

The acquire and sell price stats are unnecessary in combatants.xml as they are found in item.xml, so that can probably be removed from combatants.xsd.

Certainly true for X-Caps, however human soldiers are not in items. And we also need to do engineers and scientists. And it’s possible that we may want to associate a price with the alien forces. If we ever wind up giving the Overmind a budget to work with. Which on reflection is almost certainly post v1.0. Which means we’re not going to do it now. So you’re right, it can be removed.

 

There is a bunch of stuff for XCAPS at the end of combatants.xml which I don't think we need anymore either. Probably should be removed, but I wanted to ask first.

 

What else? Oh right. The damage modifiers. I added the data, but still need to check it out for consistency. Also, the smoke/stun thing isn't completely known in X-COM yet. I ran a few tests a while back, but never checked with differing damage modifiers. Same goes with fire. That goes on my "to-do" list. Right now the numbers are only "best-guessed" in combatants.xml.

Well, I’ll happily take what you’ve got for the moment. It can always be updated later. And thank you for your efforts.

 

That brings me to my final point: I didn't validate anything yet.

Not a problem. I’ve fixed it up and posted into Subversion (Mainline)

Combatants2007_04_25.zip

Link to comment
Share on other sites

Well, I’ve suggested a number of times that we should separate the Tanks into chassis and weapon. (And been told we can’t because the ART department won’t redo the models.) But worst case, we put in an entry for each type of Tank. There are only 5.

True. But the stats for each type of tank remain the same, except for the weapon mounted on it. I don't really see why AWD would need to redo the models (they are modeled with the weapon installed, correct)? All we would need to do is flag the tank somehow to use the right model on the battlescape.

 

Not a problem. I’ve fixed it up and posted into Subversion (Mainline)

Thanks for fixing it. I'll work on finishing the loose ends this week. :)

 

- Zombie

Link to comment
Share on other sites

  • 3 months later...
I didn't fool with starting soldier stats yet. The main thing is that I'm fresh out of time today. The other thing is that I found a problem with using mean and variance. Some stats average out to real numbers, not integers. Seeing as the min and max are still defined in the xsd file, I think I'll opt to use that instead. Finally, my records for soldier stats was incomplete. I need to send some of my X-COM recruits on a mission to fill in the blanks from unitref.dat.

Well, I had a chance to bring 26 rookies on a mission to check some of the lesser-known stats last night. Because of this I updated the soldier stats in combatants.xml. I used the min and the max (as noted above) due to some issues with variance. Not sure what we are going to do about Bravery though. See, starting soldier bravery is between 10 and 60 but at 10 point increments, not one point like the other stats. There are a number of ways we could circumvent this problem mathematically (if need be). Oh well. Still need to do some work on this file yet and I'll probably have some more questions/problems/issues. Such is life. :)

 

- Zombie

Link to comment
Share on other sites

I didn't fool with starting soldier stats yet. The main thing is that I'm fresh out of time today. The other thing is that I found a problem with using mean and variance. Some stats average out to real numbers, not integers. Seeing as the min and max are still defined in the xsd file, I think I'll opt to use that instead. Finally, my records for soldier stats was incomplete. I need to send some of my X-COM recruits on a mission to fill in the blanks from unitref.dat.

Well, I had a chance to bring 26 rookies on a mission to check some of the lesser-known stats last night. Because of this I updated the soldier stats in combatants.xml. I used the min and the max (as noted above) due to some issues with variance. Not sure what we are going to do about Bravery though. See, starting soldier bravery is between 10 and 60 but at 10 point increments, not one point like the other stats. There are a number of ways we could circumvent this problem mathematically (if need be). Oh well. Still need to do some work on this file yet and I'll probably have some more questions/problems/issues. Such is life. :)

 

- Zombie

Personally, I doubt it makes any difference if initial bravery is in steps of 10 or 1. And I'm certainly not planning on spending the effort to make it behave differently from the other stats.

Link to comment
Share on other sites

Yeah, I kinda figured you didn't want to mess with bravery. :)

 

- Zombie

Link to comment
Share on other sites

  • 3 months later...

I've just realized that with the current Xenocide build (0.3.0.1767) you can't equip soldiers with armor.

Not that surprising, because I haven't implemented armor for combatants yet.

 

Here's my thoughts/plan.

  • Currently, in Combatant.xml, armor is a collection of attributes in a soldier, e.g. Front Armor, Side Armor, etc.
  • The issue with this is while it works for aliens, it doesn't quite work for X-Corp soldiers, who can change their armor.
  • Therefore, I suggest each combatant has an "armor type" property, which points to an armor type object.
  • Armor type object has properties "front", "side", etc.
  • So combatants.xml gets changed into a list of armors and then a list of combatants, with each combatant having an "armor type" element.
  • This reduces duplication, because it appears all aliens of a given race have the same armor.
  • Looking a bit deeper, it occurs to me that "susceptibilities" are also a property of the armor, and can be added to the armor.

Hopefully that's all clear. Any questions/comments?

Edited by dteviot
Link to comment
Share on other sites

Guest Azrael Strife
I've just realized that with the current Xenocide build (0.3.0.1767) you can't equip soldiers with armor.

Not that surprising, because I haven't implemented armor for combatants yet.

 

Here's my thoughts/plan.

  • Currently, in Combatant.xml, armor is a collection of attributes in a soldier, e.g. Front Armor, Side Armor, etc.
  • The issue with this is while it works for aliens, it doesn't quite work for X-Corp soldiers, who can change their armor.
  • Therefore, I suggest each combatant has an "armor type" property, which points to an armor type object.
  • Armor type object has properties "front", "side", etc.
  • So combatants.xml gets changed into a list of armors and then a list of combatants, with each combatant having an "armor type" element.
  • This reduces duplication, because it appears all aliens of a given race have the same armor.
  • Looking a bit deeper, it occurs to me that "susceptibilities" are also a property of the armor, and can be added to the armor.

Hopefully that's all clear. Any questions/comments?

 

I think that is a great idea! It will also allow for different ranks to have different armor values than the standard foot soldier of a given race for whoever wants it to, it'll add more flexibility and moddability :)

Link to comment
Share on other sites

Sounds good dteviot. But susceptibilities are a property of a unit and not the armor itself (at least this is how it is in the original game). The only thing that armor did was sop up some of the damage applied. The susceptibilities are applied to the resulting damage after it gets past the armor. At least in my mind it makes more sense to have armor a universal attribute which doesn't have attached variables such as susceptibilities. ;)

 

- Zombie

Link to comment
Share on other sites

Sounds good dteviot. But susceptibilities are a property of a unit and not the armor itself (at least this is how it is in the original game). The only thing that armor did was sop up some of the damage applied. The susceptibilities are applied to the resulting damage after it gets past the armor. At least in my mind it makes more sense to have armor a universal attribute which doesn't have attached variables such as susceptibilities. ;)

 

- Zombie

I think it's really a matter of perspective.

The maths works out the same either way.

Link to comment
Share on other sites

Having susceptibilities and armor combined is fine if we are going to make it so that all the ranks in a race have the same resistances. If we are going to have different susceptibilities for a Viper soldier than a Viper Commander in later versions of the game, then susceptibilities need to be split from armor. Besides, it makes it easier for modders to hack the game. :wink1:

 

- Zombie

Edited by Zombie
Link to comment
Share on other sites

Having susceptibilities and armor combined is fine if we are going to make it so that all the ranks in a race have the same resistances. If we are going to have different susceptibilities for a Viper soldier than a Viper Commander in later versions of the game, then susceptibilities need to be split from armor. Besides, it makes it easier for modders to hack the game. :wink1:

 

- Zombie

Combining susceptibilities with armor is still going to be easy to mod. Just means hacker needs to create a new armor.

It also gives us one additional advantage, we can modify human susceptibilities based on armor they wear. e.g. Powered/Flying armor make soldiers immune to smoke/fire damage.

Link to comment
Share on other sites

Combining susceptibilities with armor is still going to be easy to mod. Just means hacker needs to create a new armor.

It also gives us one additional advantage, we can modify human susceptibilities based on armor they wear. e.g. Powered/Flying armor make soldiers immune to smoke/fire damage.

Good point. I forgot about those. :)

 

- Zombie

Link to comment
Share on other sites

Guest Azrael Strife
Combining susceptibilities with armor is still going to be easy to mod. Just means hacker needs to create a new armor.

It also gives us one additional advantage, we can modify human susceptibilities based on armor they wear. e.g. Powered/Flying armor make soldiers immune to smoke/fire damage.

Good point. I forgot about those. :)

 

- Zombie

Does this approach mean that we will never allow the units to remove their armors during combat? (a la Apocalypse), because if we are planning on doing so, we might want to have some sort of "default" armor when you're basically nude on the battlefield (no armor).

 

Of course if we plan on following X-Com 1 strictly, it wouldn't matter.

Link to comment
Share on other sites

I would suspect armor removal should only be allowed in the equip screen for v1.0 as implementing it would be difficult. Armor selection in the battlescape (if wanted at a later date) could be a dropdown menu listing the available types (probably need to be standing on a pile of armor suits to allow this). The "none" armor type would thus revert the soldier to the standard kevlar jumpsuit. ^_^

 

We could also make armor as separate pieces as in Apoc and allow soldiers to create a specialized suit with different capabilities. Post v1.0 of course. :wink1:

 

- Zombie

Edited by Zombie
Link to comment
Share on other sites

×
×
  • Create New...