Issues with saving an Array of Items

Godot Version

4.2.1

Question

I have an autoloaded singleton called “Inventory” that extends Node, which is used by the Player node to load stats from items.
Inventory has an exported variable called “items” that is an Array of “Item” objects.
I also have a “SaveData” object that extends “Resource”, which has an “eq” exported variable that is an Array of “Item”.
All variables in the “Item” object are set to @export. “Item” extends “Resource”
In a “SaveManager” singleton I append 2 items to the Inventory array like this:

func _ready():
	Inventory.items.append(AssasinArmor.new(2))
	Inventory.items.append(SuperDagger.new(3))

The 2 and 3 represent the grade of the weapons (bigger grade = bigger stats).
After that, I create a new SaveData object and set it’s “eq” variable to the “Inventory.items”, after which I save the file as “save.tres”, then load it into another variable to compare the print outputs:

var save_game = SaveData.new()
save_game.eq = Inventory.items
print("SAVED: ",save_game.eq)
ResourceSaver.save(save_game, SAVE)
var test : SaveData = ResourceLoader.load(SAVE)
print("LOADED:" ,test.eq)

The console output looks like this:

SAVED: [<Resource#-9223372009843456809>, <Resource#-9223372009826679592>]
LOADED:[]

And if i remove “.eq” from both prints:

SAVED: <Resource#-9223372009809902373>
LOADED:<Resource#-9223372009541466908>

The contents of the “save.tres” file:

[gd_resource type="Resource" script_class="SaveData" load_steps=6 format=3]

[ext_resource type="Script" path="res://Items/Torso/AssasinArmor.gd" id="1_gk8hu"]
[ext_resource type="Script" path="res://Items/Weapons/SuperDagger.gd" id="2_d4qle"]
[ext_resource type="Script" path="res://Scripts/SaveData.gd" id="3_8b00e"]

[sub_resource type="Resource" id="Resource_yd4bj"]
script = ExtResource("1_gk8hu")
itemName = "Assasin Armor"
itemDescription = "ATK +12
SPD +10
DEF +3
+3% szansy na kontre
+3% szans na unik podczas unikania"
itemSet = "Assasin"
sellValue = 8
itemType = "Torso"
itemSubtype = "RogueArmor"
grade = 2
maxGrade = 5
gradeCost = 24
stats = [["ATK", 12], ["SPD", 10], ["DEF", 3], ["CritCH", 7]]
passives = [["Countering", ["RawDodge", 3]], ["Dodging", ["RawDodge", 3]]]

[sub_resource type="Resource" id="Resource_20ut2"]
script = ExtResource("2_d4qle")
itemName = "Super Dagger"
itemDescription = "+20 ATK
 +15% szansy na kryta
 +15% do obrażeń zadawanych przez kryty
 zwiększa atak o 15%
 +15% do obrażeń krytycznych podczas wykonywania ataku alternatywnego"
itemSet = "Assasin"
sellValue = 15
itemType = "Weapon"
itemSubtype = "Dagger"
grade = 3
maxGrade = 5
gradeCost = 36
stats = [["ATK", 24], ["critCH", 15], ["critMul", 0.15], ["ATKP", 0.15]]
passives = [["AltAttack", ["critMul", 0.15]]]

[resource]
script = ExtResource("3_8b00e")
eq = Array[Resource("res://Scripts/Item.gd")]([SubResource("Resource_yd4bj"), SubResource("Resource_20ut2")])

Am I doing something wrong when saving or loading the file? Is my approach as a whole incorrect?
What could I do to load this Array of items and then replace the Inventory array with the loaded array?

Don’t use required parameters in Object._init() or it will fail when de-serializing the objects from disk as explained in the documentation.