Jump to content

Is it possible to create a "smart" accuracy system that eliminates streaks?


Recommended Posts

There was a post on the Steam forums that got me thinking. With most games, the accuracy system just uses a "dumb" RNG that will be correct for sufficiently long playthroughs, but can still result in streaks of good or bad luck that last for most/all of a mission (if not longer).

While the streaks of good luck are nice, they generally don't seem to alleviate the frustration caused by the streaks of bad luck.

My question is thus: Is it hypothetically possible to override the accuracy calculations in order to create a "smart" RNG that prevents streaks (both good and bad)?

If so, where would be the place to look if I wanted to attempt to write such a "smart" RNG? The algorithm itself probably wouldn't be too hard to get working on a basic level, but I'm not familiar with modding Xenonauts, and have no idea where/how the best place/way to get started is.

Link to comment
Share on other sites

Drat. In that case, I suppose this would have to be done by someone who's got a bit more coding experience than I, since that sounds like it would require a bit more competence than simply throwing a few scripts together and assembling them into a mod would require.

Thanks for the info.

Link to comment
Share on other sites

There are aspects of randomness you can control without diving into the code. For example, you can control the randomness of damage caused by reducing the random portion of the damage calculation. You can up the odds of shots landing per-weapon or across all weapons and it's possible to prevent alien from having a lucky streak by reducing the range at which they are permitted to start attacking. Would those sound like attractive alternatives?

Link to comment
Share on other sites

Not especially, I was mostly interested in it as a neat idea to try and implement, rather than as a cure for personal annoyances.

I *have* had these type of streaks with other games though (*cough* Shadowrun Returns *cough*), but my experience with Xenonauts has, thankfully, been relatively frustration free.

Link to comment
Share on other sites

I have recently played (and quickly completed) a game by the name of Ironcast where the RNG is so up and down that despite the devs protesting they don't fix the numbers, accusations of the AI opponent cheating are widespread. How exactly would you smooth out streaks? What kind of sampling would you use? What kind of limits would you set?

(EDIT: Incidentally nice avatar! Rings a bell, but can't place where I last saw it...)

Link to comment
Share on other sites

Ironcast did seem to have lots of RNG, though thankfully it seemed to save me as often as it hurt me. Granted, I didn't play the game for more than a few hours, so others could easily have had worse luck.

For smoothing the streaks, I'd planned to try having the system keep a list of the shots each unit made, and compare their actual accuracy per weapon with their predicted accuracy, and then grant some hidden bonus or penalty to each shot based on how close to the predicted accuracy the tally was. (Burst/auto fire would, of course, count each bullet as it's own entry on the list.)

The main difficulty would probably be finding the right ratio of how much of the difference to apply to the bonus, since that part seems like it would be a subjective issue, without any particular mathematically ideal answer. (I'd maybe even have that ratio be user configurable, so that people could set it anywhere from "deterministic shots" to "fully random shots").

If I were to take a random stab in the dark, I'd probably start by applying about 25% of the deviation to the next bullet, but it would almost certainly need tweaking up or down from there to get the best feel. Long matches tend to get more varied towards the end though (since each bullet affects the total average less), so perhaps it'd be better to only record the past x number of shots per weapon per soldier, instead of all shots since the beginning of the mission. (Most likely with faster firing weapons keeping record of more bullets than slower firing weapons, and also being user configurable, for those who want to change it.)

The predicted accuracy would, of course, only factor in the base chance to hit, and not the hidden bonus/penalty, since the goal would be to leave the average accuracy the same as in vanilla, just to enforce that average over a smaller time frame.

As for the avatar, thanks! It's from this fanart of the Touhou game series:

http://www.pixiv.net/member_illust.php?mode=medium&illust_id=16246985

It's quite possible that it was a background on a youtube video of one of the song remixes somewhere (though it might have cropped up almost anywhere, the Touhou fanbase is generally quite... enthusiastic, about the series, and it tends to show up in a lot of places).

Link to comment
Share on other sites

  • 6 months 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...