Rolisteam / RCharacterSheet

submodule for Rolisteam and Rcse about CharacterSheet, sharing code.
6 stars 5 forks source link

BUG: RCS can't save after players and GM write to it #6

Closed osfrance closed 4 years ago

osfrance commented 4 years ago
  1. I launch a new game with GM and One Player
  2. GM share a CaracterSheet to player
  3. GM modify CaracterSheet fields
  4. Player modify CaracterSheet fields
  5. GM save the CharacterSheet
  6. Close Rolisteam, relaunch, load CaracterSheet, Modification don"t appear (If in 5. I try "sauvegarder sous" , it's save a rcs file with 0 byte)

It's a big problem because we loose all the modifications of CharacterSheet !

Thanks, for all you'r support !

obiwankennedy commented 4 years ago

Did you save the charactersheet inside a scenario ? or at a separate file ?

osfrance commented 4 years ago

I've save it inside the scenario, bot I try to save madia to another file and the size was 0 byte

obiwankennedy commented 4 years ago

I did a test and it worked. I load a scenario, share the sheet, change value and then save and load the scenario again an the change was there.

Are you sure the change worked ? Did you check the data tab ?

osfrance commented 4 years ago

Hi ! I test with a new rcs File, I confirm it's don"t work ... Yes, the change worked on server and client, and I have data in data tab. I use this file: scenario.zip

  1. I create a new game session in rolisteam 1.9.2 (Win7)
  2. I load test.rcs
  3. I save scenario to test.sce
  4. New player arrive
  5. GM share caracterSheet and modify charactersheet test.rcs
  6. player modify charactersheet test.rcs too
  7. GM save media charactersheet to test2.rcs (file size is null)
  8. GM save scenario to test2.sce
  9. GM close and restart rolisteam
  10. GM load test2.sce (data tab and sheet are empty)

Thanks for Help ! (After this issue, I'll send other issues in KDE Gitlab ;-))

obiwankennedy commented 4 years ago

Oh, you put sheet in your scenario as linked, It may be the diffirence between you and me.

osfrance commented 4 years ago

Hi ! Today I just try to load test.rcs, edit them and "save media as" ... and I had the same problem, file size is null. I don't create a scenario, player don't join and edit the RCS ...

osfrance commented 4 years ago

Hi ! I try a new TEST :

  1. Load RCS file
  2. save scenario
  3. modify fields
  4. save scenario
  5. quit rolisteam
  6. reload RCS file in rolisteam It's Work !!! I don"t know why this test don't destroy my RCS file, if this test can help you ...
obiwankennedy commented 4 years ago

Ok, I understood what is happening.

First, there is two ways to save media: inside the scenario or as a stand alone file.

Menu_en_007

If you load the scenario, change some stuff and press Ctrl+S (or click on Save Scenario) it will works. The charactersheet will be saved. The save current media Alt+S will work as well.


But when you try to save the charactersheet into another file, it will fail.

The reason behind that is that rolisteam does not load from RCS file everything as it does not need data for edition the sheet itself, It takes data about characters and about the final view. So, in order to save properly a RCS file, rolisteam reads those information, add its new information, and save all into the file.

But in the case, where you try to save to a non existing file, the first step fails as it can't find data inside the RCS, so the whole process fails. In order to save the sheet into another file, you have to copy the origin file to the new name, and save as on rolisteam. It is not perfect but it will work. I will try to fix that. To read data from the previous file and save the whole new data into the new file.

osfrance commented 4 years ago

Ok, thanks a lot for help !