Yesterday I talked about pulling data from QR codes. Today I’m thinking about how to use that data.

We’ve got eight values between 0 and 255. How many should we use?

There’s far more data than just eight values, sure, but how many can we realistically count on being there? I was planning on just using the first eight to be safe but it seems there’s insufficient variety there. In fact, on further inspection, there’s not enough variety between two URLs on the same site:

http://www.giantbomb.com/videos/quick-look-papers-please/2300-7787/

becomes:

43 86 87 47 47 03 a2 f2 f7 77 77 72 e6 76 96 16 e7 46 26 f6 d6 22 e6 36 f6 d2 f7 66 96 46 56 f7 32 f7 17 56 96 36 b2 d6 c6 f6 f6 b2 d7 06 17 06 57 27 32 d7 06 c6 56 17 36 52 05 f9 11 0e 0a 4a 11 6f ac 00 ec 11 ec 11 ec 11 ec 11 ec 11 ec 11 ec 11 ec 11 ec 11

Whereas http://www.giantbomb.com/articles/the-collusion-of-money-drama-and-pride/1100-4709/ becomes:

44 86 87 47 47 03 a2 f2 f7 77 77 72 e6 76 96 16 e7 46 26 f6 d6 22 e6 36 f6 d2 f6 17 27 46 96 36 c6 57 32 f7 46 86 52 d6 36 f6 c6 c7 57 36 96 f6 e2 d6 f6 62 d6 d6 f6 e6 57 92 d6 47 26 16 d6 12 d6 16 e6 42 d7 07 26 96 46 52 05 f9 00 5a 0a 45 d8 09 ac 00 ec 11

There’s barely any variance until 25 values in, first digit excepted.

Sounds like we’re going to need to pick eight values starting from a random point in the set, possibly excluding the first 8 to be safe.

Let’s assume we’ve got our eight values though and they are as follows:

231, 70, 38, 246, 214, 34, 230, 54

We could use all eight but I’m thinking that I might want to implement move sets or something else later. What if instead we just take the first four and go from there?

So, 231, 70, 38, and 246.

How about we make them mean HP, attack, defence, and luck?

For the moment let’s talk about it as if it were a tabletop game as that’s what I know. We’ll also keep things as simple as possible in an attempt to avoid confusion:

231 HP out of a possible 255. Pretty beefy!

70 attack out of a possible 255. Not so good.

38 defence out of 255? Eek, not great either.

246 luck – that could make all the difference.

At this stage perhaps we should use the other data set from yesterday:

55, 50, 230, 54, 246, 208, 236, 17

55 HP, 50 A, 230 Def., 54 luck.

These two face off in a turn-based battle. Let’s assume dataset 1 goes first due to its superior luck.

It strikes for 70 damage against a defence of 230 hitting for a grand total of –160 (i.e. 0). Well that’s no good. It’ll never be able to damage anything with a defence value over 69. Hmm.

I was considering having them roll virtual dice but the randomness element only really works on a small scale. Rolling 70 virtual D6s will generally always work out around 250 (+/- about 20)

I’m going to have to go away and put some thought into how best to resolve this but I wanted to get my thought process so far written down.

1 response to "Remember Limp Bizkit?"

  1. Generate a random number between 0 and 255 then multiply it by its variable ie 70/255 or 160/255 this should give you the variables you are looking for.

    Ogrebane

Leave a Reply