Changes in compendium are not visible on next combatant load
Submitted by Lucas on Thu, 2010-02-04 19:31
| Project: | Virtual Combat Cards |
| Version: | 1.5.1 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Nebulorum |
| Status: | closed |
Jump to:
Description
I can't edit PC files. Well, I can edit them, but the edits don't appear.
I see the changes in the "Edit Combatant" window -- I save the changes, but they don't show up in the target window.
I even tried deleting the party file and then recreating it and saving it with a different name and still the old version of the stat block appears in the target window (and the new, edited version still appears correct in the "Edit Combatant" window)
#1
This is a known issue. There is a cached version of the information once the combatants are loaded. The changes are not reflected when you save the data. This need to be improved, for sure exiting and reloading will work. I'm not sure clearing the character will work.
Fixing this can be tricky, the easy fix is to make sure clearing the combatants empties the cache. This means you have to reload the character. I believe this can be done without too much fuss. To have things reflect completely requires a lot of changes to the compendium logic.
I think we should focus on the first fix, then move to a more complete fix in a future enhancement request.
#2
I'm moving this to a feature request. The current design it that updates to compendium entries do not reflect on loaded combatants. When we implement #66: Save Combat In Progress we will have to review the way data is loaded and tied to the compendium entries. I'll review that then.
#3
I decided to tackle this in another perspective. VCC currently caches loaded combatant, so even after you change and reload you get the old data. The only way around is to shutdown and start VCC again.
This is particularly bad for character, since you can update the data and not see any change. To tackle this I'll remove the cache. This will not solve the original request completely, but will improve usability.
#4
Changed the implementation of the current Party loading logic to eliminate the a cache that was really not needed anymore. With this done, changes on the Combatant will be picked up on the next load.
Also note that if the combatants have the ID defined, reloading the file will replace the current definition. This is done preserving health information. So for example if characters level up between battles, and all have IDs in the party file, you can edit the compendium entries and reload the party. If they have generated IDs (numbers), reloading the file will result in duplicate entries.
#5
This feature has been included in version 1.5.1.
#6
Automatically closed -- issue fixed for 2 weeks with no activity.