Jump to content
  • 0

Stats algorithm - Combat Magic


Platonic

Question

Posted

Hi,

I would like to understand the algorithm that is used for stats in the game Combat Magic. Im taking the weapon "heavy cutlass".

So currently this is what i have:

  1. Weight = float, as it is represented on screen. 3.9f

When i try to change the level, which is 15 in game.

Screenshot_2022-11-10-08-42-36-465_com.lb4business.swordsbowsmagic.thumb.jpg.5210eadfe15171848788f6d328210baf.jpg

the value is represented like this:

1,599,062,278D;1,599,062,280D;1B::9

Screenshot_2022-11-10-08-25-48-412_com.android.chrome.thumb.jpg.2b90c0d94f2fb1a153210af0a8d09693.jpg

If i edit the 1 bool to 0, the level will change to 1. I guess its a form of disabling the levels since the player starts at level 1.

If i edit the first byte of that dword value, "06h" to "07h" the level changes to 16.

Screenshot_2022-11-10-08-55-15-115_com.lb4business.swordsbowsmagic.thumb.jpg.ead35565371b784b7999f6a6b83635c3.jpg

  1. 00h = 9
  2. 01h = 10
  3. 02h = 11
  4. 03h = 12
  5. 04h = 13
  6. 05h = 14
  7. 06h = 15 -- current level
  8. 07h = 16
  9. 08h = 1
  10. 09h = 2
  11. 0Ah = 3
  12. 0Bh = 4
  13. 0Ch = 5
  14. 0Dh = 6
  15. 0Eh = 7
  16. 0Fh = 8
  17. 10h = 25 -- suddenly level change
  18. 11h = 26
  19. 12h = 27
  20. 13h = 28
  21. 14h = 29
  22. 15h = 30
  23. 16h = 31
  24. 17h = 32
  25. 18h = 17 -- suddenly level change

...etc

So what is weird already is the jump to 25. If we just count normally from current level 15, 16, 17, 18, 19...etc and pretend like the jump from level 16 to level 1 never happened we would come out to level 25. So why levels whent back to normal sequence at hex 10h ? All i assume is that editing levels should happen in byte or word, Not in dword or other data types.

Help or explenation would be appreciated!

5 answers to this question

Recommended Posts

Posted
17 minutes ago, Platonic said:

Hi,

I would like to understand the algorithm that is used for stats in the game Combat Magic. Im taking the weapon "heavy cutlass".

So currently this is what i have:

  1. Weight = float, as it is represented on screen. 3.9f

When i try to change the level, which is 15 in game.

Screenshot_2022-11-10-08-42-36-465_com.lb4business.swordsbowsmagic.thumb.jpg.5210eadfe15171848788f6d328210baf.jpg

the value is represented like this:

1,599,062,278D;1,599,062,280D;1B::9

Screenshot_2022-11-10-08-25-48-412_com.android.chrome.thumb.jpg.2b90c0d94f2fb1a153210af0a8d09693.jpg

If i edit the 1 bool to 0, the level will change to 1. I guess its a form of disabling the levels since the player starts at level 1.

If i edit the first byte of that dword value, "06h" to "07h" the level changes to 16.

Screenshot_2022-11-10-08-55-15-115_com.lb4business.swordsbowsmagic.thumb.jpg.ead35565371b784b7999f6a6b83635c3.jpg

  1. 00h = 9
  2. 01h = 10
  3. 02h = 11
  4. 03h = 12
  5. 04h = 13
  6. 05h = 14
  7. 06h = 15 -- current level
  8. 07h = 16
  9. 08h = 1
  10. 09h = 2
  11. 0Ah = 3
  12. 0Bh = 4
  13. 0Ch = 5
  14. 0Dh = 6
  15. 0Eh = 7
  16. 0Fh = 8
  17. 10h = 25 -- suddenly level change
  18. 11h = 26
  19. 12h = 27
  20. 13h = 28
  21. 14h = 29
  22. 15h = 30
  23. 16h = 31
  24. 17h = 32
  25. 18h = 17 -- suddenly level change

...etc

So what is weird already is the jump to 25. If we just count normally from current level 15, 16, 17, 18, 19...etc and pretend like the jump from level 16 to level 1 never happened we would come out to level 25. So why levels whent back to normal sequence at hex 10h ? All i assume is that editing levels should happen in byte or word, Not in dword or other data types.

Help or explenation would be appreciated!

this is hex and multiplication by 1.5, floored

encrypt.jpg

Posted
42 minutes ago, under_score said:
1 hour ago, under_score said:

this is hex and multiplication by 1.5, floored

encrypt.jpg

 

Thanks for the info, but i don't think that fully explains the algorithm, Found a pattern here which is perhaps interesting. You think it has any use?

When i subtract the first byte of the first dword with the first byte of the second dword value you keep getting the following sequence: 

 

  1. 2
  2. 2
  3. 6
  4. 6
  5. 10
  6. 10
  7. 14
  8. 14
  9. -14
  10. -14
  11. -10
  12. -10
  13. -6
  14. -6
  15. -2
  16. -2 
  17. 2 -- repeat
  18. 2
  19. 6
  20. 6

As if both values represent positive and negative. This sequence is static and appears contagiously. 

 

image.png

Im putting results in decimal though. I think makes most sense for read. 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.