PDA

View Full Version : Changed data structure & ruleset compatibility



Mephisto
July 28th, 2021, 14:00
Hi there,
quick question for "best practice".

I have created a initial version of a ruleset based on CoreRPG using "windowlist" objects to track attributes and sub-"windowlist" items to track associated skills. I meanwhile I switched to 5E as the basis for the ruleset and use the data structure of the 5E ruleset for attributes (so, specific DB nodes for attributes and one skill list). I now need to move the Player Character data from the old DB structure to the new one to keep the ruleset compatible for the users.

Has anyone encountered that topic before? Any ideas on how to best accomplish this?

My current thinking is to search the campaign DB of the user for the old data structure and copy over values to the new structure via a lua script.

Trenloe
July 28th, 2021, 14:38
Have a look in the 5E ruleset - scripts\manager_version2.lua - this is a script that is used to upgrade older data to the latest version. You should get some ideas from there as to how to migrate data.

Mephisto
July 28th, 2021, 15:01
Perfect! This will help a lot! :)