Sync

Sync

12M Downloads

Ars Magica unlocks still do not persist to clones

psychofad opened this issue ยท 9 comments

commented

Not sure if this is intended but Ars Magica levels and spell parts do not transfer to clones. Example..Unlock Ars Magica and get to level 16 unlocking various spell parts as you go...create a clone...clone does not have Ars Magica gui unlocked at all and has no spell parts unlocked.

Would be great if I could transfer my Arcane knowledge to my clones!

This does however open up possibilities as well...have clone A unlock all offensive spell parts...clone B defensive....and clone C utility...since you can switch clones midway through creating a spell and drag in the parts of the spell that the particular clone has unlocked and then switch to the next to drag in other parts you could bypass the need to fight any of the Ars Magica bosses to obtain skill points to unlock everything but then you run the risk of losing that clone and it's knowledge upon its death and...well....its kinda cheaty.

Would rather just have the total knowledge be shared between the clones if this is possible. Would really hate to die with a level 50 clone and have to start all the way over at level 1 since you normally keep your levels on death otherwise.

commented

Bleh I checked the NBT data for the player on this, not our fault. AM2 doesn't store it's NBT data in the proper place (ForgeData -> PlayerPersistant) so it's not marked as to survive death (which is the only data we transfer over between shells as well it's supposed to survive death. Syncing is kinda like death. As well as ender chest). This isn't so much a bug with us but more how AM2 saves it's data but I'll mark is as a bug for now. Will have to add custom support for this.

commented

So as this is not a bug with Sync, you will need to poke the AM2 author to use player persistent data instead of his current method

commented

I will see if he has a github to post an issue but i don't think he does...Wow...just looked at my player.dat and his stuff is all over the place in there... Now I see why you want him to take a look at it...don't much blame you on that one...but if you add custom support before he can get to it...i won't be mad at all :D

commented

Ok..So I posted an issue and linked it above...Mithion had this to say:

"

This is not something I have to fix on my end.

I am using Extended Properties instead of persisted player data, which is a core component of forge, and perfectly valid as a storage mechanism. The sync mod should copy these things over too, as other mods will make use of this functionality.

it's a hashmap on the Entity class called extendedProperties. They will need to have these classes save to NBT, then load the NBTs on the new entity. A direct copy will not work, as these classes maintain an entity reference and will result in crashes. The extended properties are initialized when the entity is constructed, so they should be available. Each extended properties has an identifier in the hashmap as well (as the key), so it should be no issue to figure out which NBT to load where."

So is this something that can be implemented in Sync so we can keep our Ars Magica unlocks synced?

commented

Marking this as wontfix for now.

Extended Properties aren't supposed to persist over death, that's what Player Persisted data is for. Nothing in Forge copies over these extended properties on death/respawn so it's up to each individual mod to copy them over. We treat Syncing as basically "death" so inventory, health, position, XP etc aren't carried over but persistent stuff like ender chest, the special NBT data etc ARE transferred.

I will look into adding in special methods that mods can add so they can mark their extended properties as a need to Sync but if they want data to persist over death, they really should be using Player Persisted.

commented

Mithion commented 2 days ago

If they treat it as a death, then the properties should synchronize to the clone as long as the forge onEntityDeath event is thrown when the player dies, then an onEntityRespawn when the clone is switched to. If they do that, AM2 will take care of the sync using its internal handlers.

Technically, treating it as a full and proper death should throw these events so that other mods can handle it.

Is it possible that one of these isn't happening?

commented

Hmm.. true, the death event is indeed thrown but not the respawn event. But then again, why resync it when there's a PlayerPersistent data for exactly that?

commented

Mithion commented 16 hours ago

Even if I did write the data to PlayerPersisted, I would need an event to know when to read it back. Doing a check each tick to see if there's data that needs to be read is just inefficient.

commented

I will admit...I am out of my element now. Would be nice if you guys could just talk to each other and work out a way for this to work but I understand that you may be too busy to do this. Maybe someone will be skilled enough to write a small add-on mod that will copy ars magica stuff to clones if sync is installed as well. IDK. For now...I give up...I tried...Can't say no one has ever brought up the issue....but for now, since no one seems to care enough to make it work...I'm closing this issue and moving on to playing mods in 1.7.2...hope to see yours there soon! Have a nice day!