Jump to content

List of Variables and Formulas?


Mask

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?

Link to comment
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
Link to comment
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
Link to comment
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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...