Jump to content

Debugging Xenonauts - Tips and Tricks


Chris

Recommended Posts

Something that some of you modders may find useful - you can use the same debug output we use to test the accuracy / morale / suppression etc calculcations are working correctly to test your own creations.

Viewing Debug Output:

1) Download the debug viewer here: http://www.xenonauts.com/devfiles/xeno_debugger.exe

2) Run the Xenonauts_gc_editor.exe version of the game, which can be found in the same directory as Xenonauts.exe is.

3) The debugger will output real-time debug information from Xenonauts as you play (you may need to filter out the debug output from other programs running on your PC at the same time).

The debugger outputs a LOT of information, so it takes some getting used to....but it lets you understand exactly what is going on in a lot of combat situations.

In-Game Editor / Commands:

You can also press U in Xenonauts_gc_editor.exe. If you are in the ground combat and playing in windowed mode, this will pop-up an in-game browser that lets you view the TU / HP of all the units and move them around the battlefield for testing purposes.

Ctrl + Q also reveals the entire map, while Q hides it.

V automatically wins the mission.

Link to comment
Share on other sites

Uh.. I must say Chris... there doesn't seem to be anything wrong with the hit calculations afterall. Sorry about all the doubts. :/ The situation will surely improve as you get the scattered bullets to fly through the target tile. :)

Edited by Skitso
Link to comment
Share on other sites

  • 2 weeks later...

I was playing with the debugger again and there's one line in shot calculation that is a bit unclear to me.

Here a sebillian shot a civilian few tiles away and missed:

[6288] >>> Begin calc. projectile trajectory <<<[6288] Target tile = (19, 30)[6288] Unmodified accuracy calculation:[6288]   range penalty (1.000000) = 1 - ( max(0, dist. to target (2.828427) - weapon range (30)) / weapon range (30) )[6288]   shoot accuracy from props: 0.450000[6288]   shoot accuracy (0.450000) = shoot accuracy (0.450000) - max(0, weapon recoil (0) / 100 - strength (0.600000) )[6288]   weaponAccuracy (26.000000) = weaponAccuracy (35.000000) * accuracyModifier (0.750000)[6288]   unmodified accuracy (11.700000) = shoot accuracy (0.450000) * range penalty (1.000000) * weapon accuracy (26.000000)[6288] Damage for unit:[6288]   damage mul. (0.800000) = ( weapon range (30) / max(weapon range (30), dist. to target (2.828427)) ) * difficult mul. (0.800000) * ai race damage bonus (1.000000)[6288]   normal damage (55) = weapon damage (65) * random bonus/penalty (1.070000) * damage mul. (0.800000)[6288]   stun damage (0) = weapon stun damage (0) * random bonus/penalty (0.560000) * damage mul. (0.800000)[6288]   emp damage (0) = weapon emp damage (0) * random bonus/penalty (1.040000) * damage mul. (0.800000)[6288] Terrain bullet score:[6288]   terrain bullet score = 1.000000[6288] short range hit bonus (38.059) = (5 - dist. to target (2.828) + 1) * short range hit bonus per tile (12)[6288] chanceToHitTargetTile (49.759) = (unitAccuracy (11.700) + shortRangeHitBonus (38.059)) * terrainAccuracy (1.000)[6288] Random number (89) is > chanceToHitTargetTile (49.759) => miss shot

What is [6288] shoot accuracy from props: 0.450000? What halves sebillian's accuracy?

EDIT: ah, of course. It's the units accuracy stat. Stupid me.

Edited by Skitso
Link to comment
Share on other sites

  • 2 months later...

A somwhat related tip: A useful tool for making sure you're mod is compatible with the latest patch is some sort of Merge Tool. E.g. I use winmerge, which is for windows obviously. If you're on another OS there should be a few others as well.

What this tool allows is to compare side-by-side different versions of a file and it points out the differences between these files and helps you make decisions on which file to use, or makes it easy to just change either on the fly. You can also compare a folder, which makes it easy to detect which files have been changed in a patch. I don't know if you can already see the changed files through steam or something, but at least I'm not aware of such.

Link to comment
Share on other sites

  • 1 year later...
  • 6 years later...
  • 5 weeks later...

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...