Make it work with 3.0

Issue #3 resolved
Daniele Dellafiore created an issue

Hi. 3.0 is going to be official on Feb 16th, 2016 and the app does not support 3.0 save format.

I've forked the repo and can commit some code. Please let me know if you are available to provide support on this task.

Thanks.

Comments (22)

  1. Kim Mantas repo owner

    Yeah I'll be getting back into the project fairly soon, I'm just waiting on a new laptop as my current one is no longer fit for development. I always welcome contributions to the project. I can provide some limited support by answering questions if I have time.

  2. Daniele Dellafiore reporter

    Would be great. I've pushed a test for a 2.0 and 3.0 files and a refactored DeserializerTest to test all 3 save files, I thought it would be the best place to start.

  3. Daniele Dellafiore reporter

    I guess that:

    assertEquals(17, count);

    is dependant on specific file so should be a parameter for the test.

  4. Kim Mantas repo owner

    No need for separate 2.x and 3.x tests and saves, just update the current save to 3.0. The editor doesn't need to support older format saved games.

  5. Daniele Dellafiore reporter

    done, there are also some slight changes for the difference between my save and yours (player name, timestamp etc...). Now there are 3 tests broken on my fork. Should I make a pull request from here?

  6. Kim Mantas repo owner

    I won't accept pull requests with broken tests. The test you're modifying is really just a smoke test to make sure the very basic deserialisation process works. I would suggest trying to keep the save file as simple as possible, i.e. start a new 3.0 game and then immediately save it and use that.

  7. Daniele Dellafiore reporter

    I am diggint inside the serialization. I have added a few fields on StatusEffect and StatusEffectParam to make the test green. Now I have a series of errors like:

    SharpSerializer 257 ERROR Unable to set field 'AbilitiesGrantedToTarget' of class 'StatusEffect' and value 'Property [name=, type=null, parent=null, obj=null]': Can not set boolean field uk.me.mantas.eternity.game.StatusEffect.AbilitiesGrantedToTarget to null value

    Do not really have a strategy with this kind of error, maybe you have some tip.

    If you want you can check the code in my fork, please note I've re-factored it a little to remove some nested duplication and make the createObject flow more explicit.

  8. Kim Mantas repo owner

    I don't really have time to do an in-depth code review right now but that error suggests that boolean is not the correct type for the AbilitiesGrantedToTarget field. I usually have to decompile the game's source code to find the correct types for these.

  9. Daniele Dellafiore reporter

    Getting closer. Just one red test: SerializerTest:

    java.lang.AssertionError: array lengths differed, expected.length=2332971 actual.length=2332967

    Also I get this logged error Deserializer 496 ERROR Tried to get enum value index #266 that didn't exist for enum ModifiedStat.

  10. Kim Mantas repo owner

    Well the serializer test will be specific to your save file like the deserializer test was. That deserializer warning suggests that some extra enum values have been added to the ModifiedStat enum. Will need to check the game source for that again.

  11. Daniele Dellafiore reporter

    mmmm, that goes beyond my abilities now :)

    If you are willing to receive more help, I am available but I'll need some clarification when you will have time.

  12. Karl Malm

    I'm also hopeful for more updates. Beat the game already on PoTD, would love to just play around with creating new and interesting saves. I'd help, but I'm an entrylevel C++ programmer, so..

  13. Kim Mantas repo owner

    My laptop arrived yesterday so I am actively working on the update now. You can expect it to drop soon.

  14. Karl Malm

    Glad to see the updates! Are these automatically updated on the main page? I can't seem to get the downloaded source code working on my own.

  15. Kim Mantas repo owner

    Any changes to the repository here are just development work. If you're able to build the source then it should work with PoE version 3.0 saves now. Otherwise you'll need to wait a little while for me to do a proper release. The main limiting factor for releases is just my upload speed...

  16. Log in to comment