Changes in compendium are not visible on next combatant load

Project:Virtual Combat Cards
Version:1.5.1
Component:Code
Category:feature request
Priority:normal
Assigned:Nebulorum
Status:closed
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

Title:Problem with editing PCs» Changes in compendium does not change loaded combatant
Category:bug report» feature request
Status:active» postponed

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

Title:Changes in compendium does not change loaded combatant» Changes in compendium are not visible on next combatant load
Version:1.1.1» 1.8.x-dev
Component:Miscellaneous» Code
Assigned to:Anonymous» Nebulorum
Status:postponed» active

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

Status:active» patch (ready to commit)

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

Version:1.8.x-dev» 1.5.1
Status:patch (ready to commit)» fixed

This feature has been included in version 1.5.1.

#6

Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.