Page 1 of 4

PS4 enemy/drop frequency

PostPosted: Mon Sep 04, 2017 12:53 pm
by etony33
Hello. I am trying to figure out a) the odds that an enemy will drop an item (if applicable), and b) the odds that a particular enemy formation will turn up in any given area.

I'm farming Star Dews in Nurvus right now, so I'm wondering how frequently you will see Greneris enemies, and the odds that they will drop a Star Dew. This also would apply elsewhere (getting Shadow Blades inside Zio's Fort, and Defeat Axe/Moon Slasher in The Edge.

Do any of you have this sort of information?

Re: PS4 enemy/drop frequency

PostPosted: Mon Sep 25, 2017 6:14 pm
by Zucca
I remember seeing some list somewhere...
The rpgclassics.com shrine does not help either. I guess I remember a different game...

Re: PS4 enemy/drop frequency

PostPosted: Mon Sep 25, 2017 6:43 pm
by Zucca
Maybe this will give you a direction:
http://www.wrftpb.com/psiv/txt/ps4-enemy.txt wrote: Encounter data has not been found yet as of this writing. The enemy item drop
rates are not known, and all enemy byte values are now known -- this makes me
believe that item drops are attached to encounters. We'll learn about that
soon enough.

Re: PS4 enemy/drop frequency

PostPosted: Mon Sep 25, 2017 9:57 pm
by etony33
I can confirm that it is not tied to encounters in the sense that the enemy drop is locked in at the start of the battle. If you use a save state and keep beating the same enemy over and over again, you will sometimes get the drop and sometimes not.

Re: PS4 enemy/drop frequency

PostPosted: Mon Sep 25, 2017 10:57 pm
by Zucca
Hm.
Would this then be of any help?

EDIT01: In the raw assembly source I can already see things like Battle_CheckItemDrop-BattleRoutines2...
Too bad I don't know much of 68k or any other assembly.
I could try to learn anyways...
EDIT02:
ps4.asm wrote:; if random number is greater or equal to item drop rate, then we get no item
... let's me believe, that each item has it's own drop rate... :o Interesting...
This will be a nice bedtime reading...

Re: PS4 enemy/drop frequency

PostPosted: Mon Sep 25, 2017 11:41 pm
by etony33
Hmm, it could be that each item has its own drop rate. That would explain why farming Star Dews in Nurvus takes forever, but you generally get Shadowblade relatively quickly.

Re: PS4 enemy/drop frequency

PostPosted: Mon Sep 25, 2017 11:53 pm
by etony33
I suppose I could go through an incredibly tedious process...get into a battle with a Shadowsabr, save state, then go looking for every single 89 and changing it to something else, then going back, loading the state, hoping I don't need too many tries to get an item to drop, and see whether something other than Shadowblade drops.

I'm not doing this tonight though

Re: PS4 enemy/drop frequency

PostPosted: Tue Sep 26, 2017 10:25 am
by Zucca
I started to poke around the source...
The graphics and dialogs seem to be in binary format.
I assume the statistics of every item and moster is also somewhere buried inside of the binaries. However I'm unable to detect the format. I looked few files using hex viewer (xxd), but didn't saw anything of interest. I expected to see some dialogue, as the files I checked were supposed to contain plain text within the binary data.
I did manage to found some of the dialog from PSI disassembly however. But that's a completely different game in that it runs on Z80 rather than on m68k.

(For those who are interested: the asm sources of all the four classic games.)

Re: PS4 enemy/drop frequency

PostPosted: Tue Sep 26, 2017 5:08 pm
by etony33
http://www.wrftpb.com/psiv/

This is a really good place to start. Unfortunately, the item drops seem to be in a different spot from everything else that has to do with the enemy stats.

Re: PS4 enemy/drop frequency

PostPosted: Tue Sep 26, 2017 5:20 pm
by Zucca
Where did you find the list of what each monster may drop exactly?

I think I could use the data available already and some awk scripting to produce a list of item drops.

Re: PS4 enemy/drop frequency

PostPosted: Tue Sep 26, 2017 6:33 pm
by etony33

Re: PS4 enemy/drop frequency

PostPosted: Wed Sep 27, 2017 8:59 am
by Zucca
My skills in asm are now at "peak utilization" and I haven't found much.
:confusion-scratchheadyellow:

ps4.constants.asm wrote:Item_Drop_Rate = ramaddr($FFFF41F2)
... on line 1974.
At least we know where the game pulls the drop rate, but so far I haven't found anything resembling a list.
Also on the p4.asm there is a "function" named Battle_CheckItemDrop, which uses Item_Drop_Rate and random number to decide if the item was dropped.

Re: PS4 enemy/drop frequency

PostPosted: Thu Sep 28, 2017 6:52 pm
by Zucca
etony33: If your emulator supports scripting, and you have the knowledge of creating a simple script, you could create one that reads ram adress FFFF41F2 and then writes it on the screen. Once a sec should be enough. That way you could poll the drop rates of different items.

Re: PS4 enemy/drop frequency

PostPosted: Fri Sep 29, 2017 2:11 am
by etony33
Not sure what you mean exactly. I'd be using Kega Fusion. Could you explain what I should do?

Re: PS4 enemy/drop frequency

PostPosted: Fri Sep 29, 2017 10:55 am
by Zucca
Something like in http://www.wrftpb.com/psiv/lua/ps4partystats.lua
But quite much simpler.
I don't know if Kega supports scripting... There's something about plugins... :think: