I wouldn't be entirely surprised if there's something funky with the RNG somewhere obscure (assuming the battle RNG is the same as the Random() command). When we were working on Transylvania Girls (which mostly uses random() a lot to decide whether events trigger) we noticed a lot of weird patterns in it that would crop up from time to time. When I ported the game to Flash using the same numbers the RNG has been a lot closer to where I would have expected it in my testing.Harlock Hero wrote:Fenrir: You're not the only person to complain about the RNG! A few other people also noted that at times, the enemy attacks seem to disproportionately gravitate to one character out of the four. I had asked James and TMC about this, but neither one of them reported anything strange in the code. I really don't know what to make of it ;_;
Stuck in SPELLSHARD? READ THIS!
Moderators: Bob the Hamster, marionline, SDHawk
- Bob the Hamster
- Lord of the Slimes
- Posts: 7658
- Joined: Tue Oct 16, 2007 2:34 pm
- Location: Hamster Republic (Ontario Enclave)
- Contact:
Interesting. The OHRRPGCE uses FreeBasic's implementation of the <a href="https://en.wikipedia.org/wiki/Mersenne_ ... ">Mersenne Twister</a> which is supposed to be a very good pseudorandom algorithm
Randomness is a fascinating subject, but it can be mercilessly difficult to debug random stuff, since human ability to detect randomness is subjective by definition, and it is impossible to remove <a href="https://en.wikipedia.org/wiki/Confirmat ... nfirmation bias</a> from any human test. You can have good randomness from a mathematical point of view, and get results that resemble a pattern, and it is impossible to tweak an algorithm to remove the appearance of patterns without-- yep, adding patterns!
That is not to say there can't be bugs in how a random number is used that create real patterns... but I haven't been able to spot any such bugs, and the targetting code is pretty simple, especially in the case where one enemy is picking a single target from 4 heroes.
Randomness is a fascinating subject, but it can be mercilessly difficult to debug random stuff, since human ability to detect randomness is subjective by definition, and it is impossible to remove <a href="https://en.wikipedia.org/wiki/Confirmat ... nfirmation bias</a> from any human test. You can have good randomness from a mathematical point of view, and get results that resemble a pattern, and it is impossible to tweak an algorithm to remove the appearance of patterns without-- yep, adding patterns!
That is not to say there can't be bugs in how a random number is used that create real patterns... but I haven't been able to spot any such bugs, and the targetting code is pretty simple, especially in the case where one enemy is picking a single target from 4 heroes.
Code: Select all
FUNCTION randomfoe (byval who as integer) as integer
IF is_enemy(who) THEN
RETURN INT(RND * 4)
ELSE
RETURN 4 + INT(RND * 8)
END IF
END FUNCTION
Actually James, the randomfoe function isn't used anywhere. The actual random target picking is in find_preferred_target, and it's quite correct.
There probably are bugs in the use of randomness in places in the engine; for example picking a random formation from a formation set is purposefully not random (in an attempt to increase variety), but I messed that up, so it might have less variety than random in some cases. However I've just audited the whole battle system and found no problems there.
There probably are bugs in the use of randomness in places in the engine; for example picking a random formation from a formation set is purposefully not random (in an attempt to increase variety), but I messed that up, so it might have less variety than random in some cases. However I've just audited the whole battle system and found no problems there.
- Bob the Hamster
- Lord of the Slimes
- Posts: 7658
- Joined: Tue Oct 16, 2007 2:34 pm
- Location: Hamster Republic (Ontario Enclave)
- Contact:
Haha! You are right. I need to remove randomfoe and randomally, since they are dead code.
Here is the real code from find_preferred_target
EDIT: oops, tried to fix it, but html & entitiy codes don't seem to work inside code tags :P
Here is the real code from find_preferred_target
Code: Select all
CASE 4 '--Random
search = 0
DO
found = INT(RND * 12)
IF tmask(found) <> 0 THEN RETURN found
search = search + 1
LOOP UNTIL search > 999 ' safety
Last edited by Bob the Hamster on Wed Apr 11, 2012 2:29 pm, edited 3 times in total.
- Nathan Karr
- Liquid Metal Slime
- Posts: 1215
- Joined: Fri Jan 25, 2008 3:51 am
- Contact:
Personally I've always had a problem with Random Spell lists choosing later options over earlier ones. Don't know why or how, but it seems to do this to me persistently.
Which is why I was glad that this updated release removed the Thief's second STEAL! command effect (aside from its easy money breaking balance more than anything else and its preventing me from getting most stealable items).
Still in the desert chapter, personally. Can't get through that danged desert.
Which is why I was glad that this updated release removed the Thief's second STEAL! command effect (aside from its easy money breaking balance more than anything else and its preventing me from getting most stealable items).
Still in the desert chapter, personally. Can't get through that danged desert.
Remeber: God made you special and he loves you very much. Bye!
- Bob the Hamster
- Lord of the Slimes
- Posts: 7658
- Joined: Tue Oct 16, 2007 2:34 pm
- Location: Hamster Republic (Ontario Enclave)
- Contact:
TMC wrote:The angle brackets bug strikes again!
Code: Select all
IF tmask(found) <0> 999 ' safety
- KF Harlock
- Slime Knight
- Posts: 194
- Joined: Wed Oct 22, 2008 10:45 am
- Location: East Coast USA
- Contact:
Thanks, beau_rl!
The Abjurer does have a trick to him that you can exploit for the win.
If you experiment a bit, you'll notice that his FORCE WAVE attack does as much damage to you as you've caused to him over the course of the fight. So if you hit him a lot, it'll kill you outright. If you don't hit him at all, it'll cause you 0 damage though!
So, the way to beat him is to not attack him at all, while he goes through his power-up and FORCE WAVE cycle 3-4 times. Spend this time buffing up your own party instead. Once the Abjurer runs out of energy (the game will tell you), quickly hammer him with everything you've got; he won't be able to counterattack at this point.
The Abjurer does have a trick to him that you can exploit for the win.
If you experiment a bit, you'll notice that his FORCE WAVE attack does as much damage to you as you've caused to him over the course of the fight. So if you hit him a lot, it'll kill you outright. If you don't hit him at all, it'll cause you 0 damage though!
So, the way to beat him is to not attack him at all, while he goes through his power-up and FORCE WAVE cycle 3-4 times. Spend this time buffing up your own party instead. Once the Abjurer runs out of energy (the game will tell you), quickly hammer him with everything you've got; he won't be able to counterattack at this point.
SPELLSHARD: THE BLACK CROWN OF HORGOTH now COMPLETE! <a href="http://www.slimesalad.com/forum/viewgam ... 4363">Grab it today!</a>
- KF Harlock
- Slime Knight
- Posts: 194
- Joined: Wed Oct 22, 2008 10:45 am
- Location: East Coast USA
- Contact:
BLAGGENTHORG
Blaggenthorg's main thing is that if any of the parts other than the core die, he'll transmute the party into slime to rebuild himself. So, you should basically never attack any part but the core.
HOWEVER -- if you take too long in the battle, Blaggenthorg's own attacks will eventually do enough damage to his extra parts that one of them may die. If it seems like this is getting close to happening, it can be advantageous to hit one of the outer parts with one of your weakest attacks, to trigger his heal-all technique (anything that hits for less than he heals will be fine). If you're quick enough in damaging his core, however, it may not come to this.
If he's causing you too much damage, I believe you can use EGO-WHIP on him; it's pretty effective at reducing his physical attack power.
Blaggenthorg's main thing is that if any of the parts other than the core die, he'll transmute the party into slime to rebuild himself. So, you should basically never attack any part but the core.
HOWEVER -- if you take too long in the battle, Blaggenthorg's own attacks will eventually do enough damage to his extra parts that one of them may die. If it seems like this is getting close to happening, it can be advantageous to hit one of the outer parts with one of your weakest attacks, to trigger his heal-all technique (anything that hits for less than he heals will be fine). If you're quick enough in damaging his core, however, it may not come to this.
If he's causing you too much damage, I believe you can use EGO-WHIP on him; it's pretty effective at reducing his physical attack power.
SPELLSHARD: THE BLACK CROWN OF HORGOTH now COMPLETE! <a href="http://www.slimesalad.com/forum/viewgam ... 4363">Grab it today!</a>
- Feenicks
- Metal Slime
- Posts: 696
- Joined: Tue Aug 10, 2010 9:23 pm
- Location: ON THE AIR IN THE AIR
- Contact:
I've been stuck in the sewers for a while now. Don't think I actually have enough money to rest up, which makes things annoying (really, did the costs really have to scale up that much?), and I keep dying to the Giant Piranha simply through the stacking up of the six piranhas all attacking at once.
I'm not really seeing a good way to get through this battle.
I'm not really seeing a good way to get through this battle.
- KF Harlock
- Slime Knight
- Posts: 194
- Joined: Wed Oct 22, 2008 10:45 am
- Location: East Coast USA
- Contact:
Sorry you're having trouble with... THE PIRAHNA:
There's not a lot of strategy with this one, but he's extremely weak to lightning, so smacking him with lightning-based stuff ought to help. The spell SHOCKING GRASP is particularly effective.
By the way, if you're having trouble with money, I would suggest selling some of your consumables; you definitely need to be able to rest and such. However, there is one secret in this chapter that you can use to dramatically increase your money-earning:
In the top-right corner of the town part of the Midh map (not the palace), there's a merchant who will offer to sell you a sword at an extremely high price. Refuse him and he'll lower the rate. Keep refusing him and he'll keep lowering the rate (I *THINK* a total of five times, but not 100% sure, save beforehand). Eventually, you can buy the GOLDEN SWORD for just a couple thousand gold. When you equip this on a character, every time you swing it in battle, you gain around 50 gold!
There's not a lot of strategy with this one, but he's extremely weak to lightning, so smacking him with lightning-based stuff ought to help. The spell SHOCKING GRASP is particularly effective.
By the way, if you're having trouble with money, I would suggest selling some of your consumables; you definitely need to be able to rest and such. However, there is one secret in this chapter that you can use to dramatically increase your money-earning:
In the top-right corner of the town part of the Midh map (not the palace), there's a merchant who will offer to sell you a sword at an extremely high price. Refuse him and he'll lower the rate. Keep refusing him and he'll keep lowering the rate (I *THINK* a total of five times, but not 100% sure, save beforehand). Eventually, you can buy the GOLDEN SWORD for just a couple thousand gold. When you equip this on a character, every time you swing it in battle, you gain around 50 gold!
SPELLSHARD: THE BLACK CROWN OF HORGOTH now COMPLETE! <a href="http://www.slimesalad.com/forum/viewgam ... 4363">Grab it today!</a>