cppisking / ffrk-inspector

Issues tracker for FFRK Inspector
10 stars 8 forks source link

Record every get_battle_ini_data using Ff-Chk #16

Closed Rodze closed 9 years ago

Rodze commented 9 years ago

I read in other issues you're only recording drop rate if a dungeon is finished with a win (?). This is very problematic for drop rates, especially for boss farming, where someone will attempt that dungeon multiple times and only finish it if the drop appears. That way ffrk inspector will always show 100% drop rate for that item.

To fix this, I suggest you check the Ff-Chk parameter in the get_battle_ini_data response because (I think) it is unique to every battle. Comparing that, if someone keeps save/loading the same battle over and over, you do not run the risk of writing the same data repeatedly.

cppisking commented 9 years ago

I also record on fail and escape, so this should still be fine. I'll check out that parameter though to see if it would make the code cleaner On Sun, May 17, 2015 at 6:47 AM Rodze notifications@github.com wrote:

I read in other issues you're only recording drop rate if a dungeon is finished with a win (?). This is very problematic for drop rates, especially for boss farming, where someone will attempt that dungeon multiple times and only finish it if the drop appears. That way ffrk inspector will always show 100% drop rate for that item.

To fix this, I suggest you check the Ff-Chk parameter in the get_battle_ini_data response because (I think) it is unique to every battle. Comparing that, if someone keeps save/loading the same battle over and over, you do not run the risk of writing the same data repeatedly.

— Reply to this email directly or view it on GitHub https://github.com/cppisking/ffrk-inspector/issues/16.

Rodze commented 9 years ago

I just fled from a battle with Phantom Train and the Ninja Gear VI (which by the way is not recognized, it appears as 22053006) it was going to drop was not recorded.

But I don't know if the reason it was not recorded was because I fled or because it's not in the database. It appeared in the "all items dropped in this dungeon" for a moment then it disappeared.

cppisking commented 9 years ago

I think it's because it's not recognized. I've been meaning to add some logic to insert items it doesn't recognize, but haven't gotten around to it yet. I already do the same thing for battles, dungeons, and worlds. I'll try to do that today On Sun, May 17, 2015 at 12:20 PM Rodze notifications@github.com wrote:

I just fled from a battle with Phantom Train and the Ninja Gear VI (which by the way is not recognized, it appears as 22053006) it was going to drop was not recorded.

But I don't know if the reason it was not recorded was because I fled or because it's not in the database. It appeared in the "all items dropped in this dungeon" for a moment then it disappeared.

— Reply to this email directly or view it on GitHub https://github.com/cppisking/ffrk-inspector/issues/16#issuecomment-102837776 .

cppisking commented 9 years ago

Btw you can check bt looking at Fiddler's log tab. You'll probably see an error message saying something about a foreign key constraint On Sun, May 17, 2015 at 12:36 PM cpp king cppisking@gmail.com wrote:

I think it's because it's not recognized. I've been meaning to add some logic to insert items it doesn't recognize, but haven't gotten around to it yet. I already do the same thing for battles, dungeons, and worlds. I'll try to do that today On Sun, May 17, 2015 at 12:20 PM Rodze notifications@github.com wrote:

I just fled from a battle with Phantom Train and the Ninja Gear VI (which by the way is not recognized, it appears as 22053006) it was going to drop was not recorded.

But I don't know if the reason it was not recorded was because I fled or because it's not in the database. It appeared in the "all items dropped in this dungeon" for a moment then it disappeared.

— Reply to this email directly or view it on GitHub https://github.com/cppisking/ffrk-inspector/issues/16#issuecomment-102837776 .

Rodze commented 9 years ago

I only see this (removed logs from Fiddler):

16:09:59:7610 FFRKInspector: /dff/battle/begin_session 16:10:00:2460 FFRKInspector: /dff/battle/begin_battle 16:10:01:6431 FFRKInspector: /dff/battle/?timestamp=1431889805&battle_id=506041 16:10:04:8443 FFRKInspector: /dff/battle/get_battle_init_data 16:10:54:9841 FFRKInspector: /dff/static/lang/image/equipment/22053006/22053006_07_220.png 16:12:43:7643 FFRKInspector: /dff/battle/escape 16:12:43:7653 FFRKInspector: Database exceuting operation DbOpRecordBattleEncounter 16:12:44:6934 FFRKInspector: Committed drop information for battle #506041. 0/2 items failed. 16:12:44:8844 FFRKInspector: Database thread waiting for request 16:12:45:0444 FFRKInspector: /dff/?timestamp=1431889968 16:12:48:7296 FFRKInspector: /dff/update_user_session 16:12:49:0386 FFRKInspector: /dff/world/battles 16:12:49:0406 FFRKInspector: Database exceuting operation DbOpRecordBattleList 16:12:50:8978 FFRKInspector: Database thread waiting for request 16:12:50:8988 FFRKInspector: Database exceuting operation DbOpRequestDropsForDungeon 16:12:51:0908 FFRKInspector: Database thread waiting for request

cppisking commented 9 years ago

Hmm, weird. Are you sure that corresponds to the time when the Ninja Gear went in? Anyway I think I can reproduce it by getting the item id for Ninja Gear from the gacha, then manually simulating a drop with the same item id. I'll report back

On Sun, May 17, 2015 at 12:58 PM, Rodze notifications@github.com wrote:

I only see this (removed logs from Fiddler):

16:09:59:7610 FFRKInspector: /dff/battle/begin_session 16:10:00:2460 FFRKInspector: /dff/battle/begin_battle 16:10:01:6431 FFRKInspector: /dff/battle/?timestamp=1431889805&battle_id=506041 16:10:04:8443 FFRKInspector: /dff/battle/get_battle_init_data 16:10:54:9841 FFRKInspector: /dff/static/lang/image/equipment/22053006/22053006_07_220.png 16:12:43:7643 FFRKInspector: /dff/battle/escape 16:12:43:7653 FFRKInspector: Database exceuting operation DbOpRecordBattleEncounter 16:12:44:6934 FFRKInspector: Committed drop information for battle

506041. 0/2 items failed.

16:12:44:8844 FFRKInspector: Database thread waiting for request 16:12:45:0444 FFRKInspector: /dff/?timestamp=1431889968 16:12:48:7296 FFRKInspector: /dff/update_user_session 16:12:49:0386 FFRKInspector: /dff/world/battles 16:12:49:0406 FFRKInspector: Database exceuting operation DbOpRecordBattleList 16:12:50:8978 FFRKInspector: Database thread waiting for request 16:12:50:8988 FFRKInspector: Database exceuting operation DbOpRequestDropsForDungeon 16:12:51:0908 FFRKInspector: Database thread waiting for request

— Reply to this email directly or view it on GitHub https://github.com/cppisking/ffrk-inspector/issues/16#issuecomment-102844328 .

cppisking commented 9 years ago

Ok I think I figured out the problem. It actually recorded the fact that Ninja Gear dropped to the database, but the table that stores drop information only contains an item id which references another table that has more information about the item like its name, rarity, etc. That other table doesn't know about Ninja Gear. It's a little tricky because get_battle_init_data only contains the item id, and not enough other information to insert the item to the other table. So I think what I have to do is use /dff/party/list which you (sometimes) get when you view your party UI from the main doors screen. Then use that to insert unknown items. In practice this shouldnt' be an issue because the item list is fairly static, so only rarely will we ever have to insert new entries. But in rare circumstances you may still see what you just saw, where it looks like it didn't record the item, but then later (after you or someone else views their party list) it will magically appear in the drop results.

On Sun, May 17, 2015 at 1:12 PM, cpp king cppisking@gmail.com wrote:

Hmm, weird. Are you sure that corresponds to the time when the Ninja Gear went in? Anyway I think I can reproduce it by getting the item id for Ninja Gear from the gacha, then manually simulating a drop with the same item id. I'll report back

On Sun, May 17, 2015 at 12:58 PM, Rodze notifications@github.com wrote:

I only see this (removed logs from Fiddler):

16:09:59:7610 FFRKInspector: /dff/battle/begin_session 16:10:00:2460 FFRKInspector: /dff/battle/begin_battle 16:10:01:6431 FFRKInspector: /dff/battle/?timestamp=1431889805&battle_id=506041 16:10:04:8443 FFRKInspector: /dff/battle/get_battle_init_data 16:10:54:9841 FFRKInspector: /dff/static/lang/image/equipment/22053006/22053006_07_220.png 16:12:43:7643 FFRKInspector: /dff/battle/escape 16:12:43:7653 FFRKInspector: Database exceuting operation DbOpRecordBattleEncounter 16:12:44:6934 FFRKInspector: Committed drop information for battle

506041. 0/2 items failed.

16:12:44:8844 FFRKInspector: Database thread waiting for request 16:12:45:0444 FFRKInspector: /dff/?timestamp=1431889968 16:12:48:7296 FFRKInspector: /dff/update_user_session 16:12:49:0386 FFRKInspector: /dff/world/battles 16:12:49:0406 FFRKInspector: Database exceuting operation DbOpRecordBattleList 16:12:50:8978 FFRKInspector: Database thread waiting for request 16:12:50:8988 FFRKInspector: Database exceuting operation DbOpRequestDropsForDungeon 16:12:51:0908 FFRKInspector: Database thread waiting for request

— Reply to this email directly or view it on GitHub https://github.com/cppisking/ffrk-inspector/issues/16#issuecomment-102844328 .

cppisking commented 9 years ago

I fixed this, I will update the release later after I work on a few more things, but closing this issue for now. Expect this fix to be in the next release.