Jump to content
Mask

List of Variables and Formulas?

Recommended Posts

I was trying to look up what the hpLimit variable is used for exactly, in weapon_gc.xml. I also wanted to know how recoil was calculated in the combat formulas.

 

Is there a resource that explains all the variables, and shows what formulas Xenonauts uses for calculations?

Share this post


Link to post
Share on other sites
1 hour ago, Mask said:

I was trying to look up what the hpLimit variable is used for exactly, in weapon_gc.xml.

Do you mean something else perhaps? There's no hpLimit (or hp_limit or anything similar) in that file.

1 hour ago, Mask said:

I also wanted to know how recoil was calculated in the combat formulas.

What do you mean by recoil? Accuracy? Scatter? There's no variable that the game calls recoil.

1 hour ago, Mask said:

Is there a resource that explains all the variables, and shows what formulas Xenonauts uses for calculations?

Not even close, unfortunately. What you see on this subforum is all there is, as far as I'm aware. Frankly it's not always easy to figure out how something is calculated, many things in the game can have a ton of different modifiers. The best bet, if you want anything specific, is to just ask here.

  • Like 1

Share this post


Link to post
Share on other sites

I guess hpLimit has been taken out since the earlier version.

 

	<Weapon name="weapon.laserpistol" bulletType="normal" emptySound="Empty Click 1">
		<props range="20" hands="1" recoil="0" weight="2" isHeavy="0" clipSize="6" reloadAPCost="20" reloadSound="Weapon Laser Pistol Reload" reactionModifier="2" hpLimit="60"/>

There does still appear to be a recoil variable, however. Unless it was added back into X-Division, which I'm tweaking/experimenting with.

 

Since the code was given over to the community for the Community Edition, I'm kind of surprised if more isn't known about the formulas and variables for modding.

Edited by Mask

Share this post


Link to post
Share on other sites

Ah right, that recoil is a penalty that should get applied to heavy weapons like LMGs. If the soldier isn't wearing a strength-enhancing armour suit, then the soldier's effective accuracy stat will be further modified by Max(0, (recoil / 100) - strength). Since recoil / 100 < strength for all vanilla weapons anyway, that's yet another bugged formula and wouldn't actually modify anything.

17 hours ago, Mask said:

Since the code was given over to the community for the Community Edition, I'm kind of surprised if more isn't known about the formulas and variables for modding.

New X:CE variables are documented, as for the old stuff, it's of course known, or can be looked up in any case, but it's not documented. There are probably a few hundred variables just in gameconfig/weapons/weapons_gc/aiprops files, and documenting them all accurately would be a lot of work.

  • Thanks 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×