Ecks
March 30th, 2021, 03:03
I've seen an issue where after importing a character directly from another campaign (using Characters > Import Character button, not via XML) the token for that character is incorrect - either empty or using the token from another character in the campaign.
It looks like the issue is that the db.xml of the imported character uses the original value for token, e.g.:
<token type="token">portrait_id-00005_token</token>
Here, the ID is not updated from the original value, but the portrait saved in campaigns/campaign/portrait is now named id-00001. Interestingly, the portrait is correct but the token is not.
Here is how to recreate:
Create a new 5e campaign and create 5 characters, assigning each a portrait. Leave the token unchanged (default portrait): Created Characters (https://www.fantasygrounds.com/forums/attachment.php?attachmentid=45278)
Note the portraits in campaign/portraits have ID 1 to 5
Delete characters 2 and 4
Note the portraits in campaign/portraits have ID 1 to 5 (unchanged)
Close campaign
Note the portraits in campaign/portraits have ID 1, 3, 5 (2, 4 now removed)
Create a new 5e campaign
Import Character 1, 3, and 5 from previous campaign. Character 1 has correct token art, Character 3 has Character 5 token art, and Character 5 has no token art: Imported Characters (https://www.fantasygrounds.com/forums/attachment.php?attachmentid=45279)
Save campaign
Inspect db.xml. You should see the imported character tokens are using same ID as previous campaign (i.e. 1, 3, 5).
Note that the portraits in campaign/portraits have ID 1, 2, 3
Deleting characters 2 & 4 in original campaign probably didn't matter, more important is that the characters imported into the new campaign don't match the portrait numbering from original campaign. For example, in another new campaign, import characters again from the original campaign but in the order 5, 3, 1: Reverse Imported Characters (https://www.fantasygrounds.com/forums/attachment.php?attachmentid=45280)
Ruleset: 5e v2021-03-03
FGU: v4.0.10 2021-02-04
No extensions, no themes
Windows 10
It looks like the issue is that the db.xml of the imported character uses the original value for token, e.g.:
<token type="token">portrait_id-00005_token</token>
Here, the ID is not updated from the original value, but the portrait saved in campaigns/campaign/portrait is now named id-00001. Interestingly, the portrait is correct but the token is not.
Here is how to recreate:
Create a new 5e campaign and create 5 characters, assigning each a portrait. Leave the token unchanged (default portrait): Created Characters (https://www.fantasygrounds.com/forums/attachment.php?attachmentid=45278)
Note the portraits in campaign/portraits have ID 1 to 5
Delete characters 2 and 4
Note the portraits in campaign/portraits have ID 1 to 5 (unchanged)
Close campaign
Note the portraits in campaign/portraits have ID 1, 3, 5 (2, 4 now removed)
Create a new 5e campaign
Import Character 1, 3, and 5 from previous campaign. Character 1 has correct token art, Character 3 has Character 5 token art, and Character 5 has no token art: Imported Characters (https://www.fantasygrounds.com/forums/attachment.php?attachmentid=45279)
Save campaign
Inspect db.xml. You should see the imported character tokens are using same ID as previous campaign (i.e. 1, 3, 5).
Note that the portraits in campaign/portraits have ID 1, 2, 3
Deleting characters 2 & 4 in original campaign probably didn't matter, more important is that the characters imported into the new campaign don't match the portrait numbering from original campaign. For example, in another new campaign, import characters again from the original campaign but in the order 5, 3, 1: Reverse Imported Characters (https://www.fantasygrounds.com/forums/attachment.php?attachmentid=45280)
Ruleset: 5e v2021-03-03
FGU: v4.0.10 2021-02-04
No extensions, no themes
Windows 10