Freakler / psp-gta_trophies

Trophies for Liberty & Vice City Stories
16 stars 2 forks source link

Force enable/pass trophies? #6

Closed pmsobrado closed 11 months ago

pmsobrado commented 1 year ago

Hi, I just discovered this plugin and it's really fun! I works well for me, no crashes or incompatibility with other plugins.

I have a problem though. I recently completed LCS at 100%, and some trophies are not passed and now impossible to do. Is there a way to force them to "true"?

Also, how can I view the trophies? Sometimes the real instructions are on the way so there's no way to check them.

Thanks!

Freakler commented 1 year ago

Which trophies exactly? And when do the instructions show up? (Like sometimes in the same game session?) Anyhow; You could edit the "gta_trophies.sav" file manually with a hex editor.

pmsobrado commented 1 year ago

@Freakler Mainly the hidden packages one (because it is a pain in the ass) and also the let it snow one, because I managed to do it but it is impossible now. In any case, I've been looking the source code and, for the hidden packages one, are you checking the total rampages??

Cheers.

EDIT

For the "No escape" trophy, on LCS at least, it can only be done with cheats, right?

EDIT 2

Didn't try VCS, but on LCS, I guess I cannot check original game instructions menu content and trophies at the same time, right?

EDIT 3

Yep, I got all 100 hidden pagackes again on an old save and the trophy did not unlock. Also, I've opened the sav file with a hex editor but I have no idea what to change:

imagen

Freakler commented 1 year ago

Sorry for the late reply. I have to get back to this at some point then.

"No Escape" can be done with a boat. For VCS you sometimes need more speed since the game just slows you down

Exactly the Trophy menu replaces the brief section. A lot of more patching would be needed to create another entry in the menu

You are correct. Hidden packages checks for rampages which obviously is a mistake! How come no one else noticed yet wow..

The Savefile consists of the header and then followed by the trophy id 0x100, 0x101.. etc followed by 0x00 for locked or 0x01 for unlocked. So you'd need to change 0x205 to 0x01 to unlock the hiddenpackages ones

Thank you for all the feedback!

Freakler commented 1 year ago

Please try with this fixed version and I will create a release if it works. It should unlock automatically since you already have 100 Hidden Packages. I'll have to take a look at the snow another time gta_trophies.zip

pmsobrado commented 1 year ago

@Freakler don't worry! Better late than never hehe

I will try that build and post back, thanks.

As for the snow, I passed the trophy by cheating the snowy weather. I guess the plugin looks if snow becomes active while running. Could it be possible, in addition to that check, to look for the max reached level of car salesman on the game stats when the game/plugin loads? If it is 9 or above, the trophy should be unlocked. Or maybe that's the only condition needed, if the stats update when level is reached and the plugin can detect the change or whatever, not only to check current weather. I don't know if max reached car salesman level is in the game stats, but surely it should! I will check it and post here as well.

pmsobrado commented 1 year ago

I checked and now the all packages trophy is unlocked/passed, thanks for that.

As for the snow trophy, I looked into the game stats and there's one, "sold cars". I have 39 so, if there are four cars per level, 39/4 -> 9,75 = level 9 reached. I hope this helps you for that trophy.

Thanks for your work!

pmsobrado commented 1 year ago

I tried the No escape on LCS by boat, and it never triggers, the boat stops on the map end, before the trophy is triggered. I tried it with a Speeder boat, but the game stops me in my tracks even if I am going at a good speed.

Also, I've noticed that the "Crusher!" trophy gets the data from the game stats, but the "Feed the Fishes!" one does not. I have drown more than once on LCS but the trophy does not unlock until I drown in-game with the plugin enabled. I don't know in VCS, but in LCS it could be read from the stats (in addition to current method, I guess). I think that could be an improvement.

EDIT

Yes, the 'drown stat' is present in both games, but with different names. I tried drowning on VCS and the trophy did NOT unlock, so you may want to look at it ;)

As for LCS, other than the already commented stuff, I'm done with testing :) Haven't tried VCS yet.

Freakler commented 1 year ago

So, you were right once again with the "No Escape" one on LCS. Boats get stopped earlier so I've adjusted the coordinates and will push that with the next update as well!

For the snow I may be checking the wrong weather value. (There are three in total) It seems the game doesn't set all of them to the same value. I need more time to test that.. But another check for the stats would not trigger the Trophy for players that never done it and use the CheatDevice. (like I did for testing) Not sure if thats good or bad

For the drowning I initially wanted to check the stats for that but thought this should be something the player should actively do. Not another stats check so to say. But I agree, the way its detected currently is not a good solution!

I'll try to work on all this soon

pmsobrado commented 1 year ago

@Freakler Glad I could help! I agree with everything, just let me remind you that on VCS, the "drown" trophy is NOT passed when player drowns. So you may want to check that.

As for the "snow" trophy, I don't know what you mean when you say you may be checking for the wrong value. I see the point of not being able to cheat with cheatdevice for the trophy, but on the other hand, once the special mission ends, it cannot be triggered again... is it possible to check for the weather OR the stat, with an OR for the condition, and not use the AND operator, as I think you're suggesting? I'm a programmer myself but I'm not familiar with this language and game variables/functions.

Thanks!

Freakler commented 1 year ago

I didn't take into account that you can't re-trigger it playing regular. In that case I agree And I'll take a look at VCS drowning too then!

pmsobrado commented 1 year ago

Great, thanks!

pmsobrado commented 1 year ago

@Freakler soooo I'm still completing VCS and haven't mess with the trophies on this game yet, but I just came across this:

https://gta.fandom.com/wiki/Beach_Patrol

One of the rewards of that is never getting tired on the water and never drowning as a result. I guess you can always start a new game, drown, and complete the trophy. I don't know if that sounds weird to you or whatever. Maybe the "drown" trohpy can be left only for LCS and we can think of a new one for VCS? Like die from an explosion or something like that? I don't know :P

Just letting you know :)

Freakler commented 12 months ago

Okay so:

"No Escape" and "Found them all" are fixed

I removed the "Feed the Fishes" trophy completely for now. The VCS check was a dirty hack and not properly working. We need to figure out the correct check the game does like I already did for LCS. Also drowning in vehicle check is still missing too. So removed for now.

Because of "Let it Snow"; I executed the "01BB: force_weather_now 7" just like the game does when salesman is done and the trophy triggered. I don't know why it wouldn't trigger for you. It really should've!? :/ Also I decided against the additional level check for now. Its a miss-able trophy then.

New release is made with everything you reported here! :) thanks again

pmsobrado commented 11 months ago

"Let it Snow" works for me if the weather is forced with cheats. What it did NOT work for me was to load a savestate where I was already on level 9 (or 10, I don't remember which level triggers it) of car salesman and ALREADY snowing. But I guess this is completely normal, the savestates are not something the game or this plugin is prepared for. I suggested the level check because I completed it in the past and the trophy is currently unreachable but it's OK, it will be the only missable trohpy for the moment :)

I haven't completed VCS yet but all the trophies seems doable, I will report here if I find any bug.

Speaking of which, I don't know if this is intended behaviour but, when a "common" trophy is passed on one game, it appears as passed on the other one. Is that right?

Thanks for the bug fixing!

Freakler commented 11 months ago

Well that explains it of course. When loading a savestate the plugin is not in memory.. And yes, some trophies are meant to be doable on both games while others are exclusive.

pmsobrado commented 11 months ago

I don't mean exactly doable on both games, I get that, I mean, if I pass a shared trophy on Game 1, it also unlocks for Game 2. Is that OK?

Thanks!

Freakler commented 11 months ago

that is intended yes

pmsobrado commented 11 months ago

Great!