[FIXED] - Crayta crashes when calling "Clone" method

Describe the bug:

I am calling method Clone on an entity, which is NPC, it has a template and itself is a part of another template. For some reason when trying to do that, Crayta always shows “Server missing” message and after a bit editor is reconnected, but preview never works.

How do you cause this bug?
I was unable to make minimal reproducing example. However, this is very reliably reproduces on a copy of game, which I have created for this purpose. The game is called “Four Towers crashing”.
I am going to keep that backup untouched so that you can reproduce this.
In that game it is enough to run preview to get the problem.
To fix the problem, you could try to open script “TowerSpawn” and comment line 43 where clone is called.
Another way is to open template “SandTower”, go to script folder “hunters/archers” and replace in the property “entities” (which is a list), first entity from “archer1” to “archer2”. The difference between “archer1” and “archer2” is that in second one I have broken link to its template. For unknown reason that action fixed the problem as well. You could try copy-paste “archer1” once more and try with that copy, then try to break link to the template on that copy, it would have the same effect (crash when template link is present, no problem otherwise).

Screenshots / video of bug:

Which platform: PC

Which input: keyboard + mouse

Your Crayta username: strowk

Game seen in (including “Hub” or “Editor for XYZ”): Editor of “Four Towers crashing”

How regularly do you see this? (E.g. 2/3 times - please try 3 times if possible): always

Time + date seen: 30.05.2022

Version number (found in Help tab in Settings): 0.f3.5.122296

FYI, the reason I need Clone is that “customization preset” is not accessible via scripts and I needed to make a several “prototypes” of my NPC template, so I could copy them via Clone rather than making a separate template for each different “look” NPC should have. There should be no other differences on prototypes from their ground template other than that customization preset, but I’d prefer to keep the link to their template, because I do not want to recreate prototypes each time I change something in that template.

Hey there @str ! :star2:

Thanks for bringing this to our attention. I have opened up a ticket so that our internal team can further investigate this issue.

1 Like

Hey. This has been resolved as of the update yesterday (Patch Notes: Cybotanica Battle Pass!).

Please re-open if you believe the issue is still present and we can inventigate futher.