[Game Version: 0.9.001-PUBLIC#2064] [Crash] Any item with hasDynamicProperties = true crashes menus

Status
Not open for further replies.

OrangeBurner

Well-Known Member
Mar 13, 2022
305
72
If you've got any items with .hasDynamicProperties = true the game crashs upon opening most item menus.
So, this pretty much effects anyone with the Gray Goo armor in the inventory the game doesn't crash if you open these menus while wearing the armor.

Menus which crash the game:
  • Storage menu.
  • Shop menu.
  • Drop items menu.
Version: 0.9.001-PUBLIC#2064 Message: GooArmor requires it's canMergeWith call to be overridden if it has dynamic properties. Stack:
a@https://www.fenoxo.com/play/TiTS/release/vendors.2127ea8a.js:1:565895
i@https://www.fenoxo.com/play/TiTS/release/vendors.2127ea8a.js:1:566258
u/<@https://www.fenoxo.com/play/TiTS/release/main.6418a098.js:1:10049378
o@https://www.fenoxo.com/play/TiTS/release/main.6418a098.js:1:10049622
r@https://www.fenoxo.com/play/TiTS/release/main.6418a098.js:1:9544285
value@https://www.fenoxo.com/play/TiTS/release/main.6418a098.js:1:5586134
value/
value/<@https://www.fenoxo.com/play/TiTS/release/main.6418a098.js:1:12224535
value@https://www.fenoxo.com/play/TiTS/release/main.6418a098.js:1:12224385
value@https://www.fenoxo.com/play/TiTS/release/main.6418a098.js:1:12223665
hu@https://www.fenoxo.com/play/TiTS/release/vendors.2127ea8a.js:1:464274
Ts@https://www.fenoxo.com/play/TiTS/release/vendors.2127ea8a.js:1:481135

Attached Save:
Grey goo armor in the inventory about to open ship's storage.

And, admittedly on the attached save, I've used the console to create some items on my save which use .hasDynamicProperties = true and they also crash with the same error. (The actual crash report is for the Goo armor and all other legit items that use hasDynamicProperies = true)
I've also changed the stats on the Gray Goo armor but I've tested the Gray Goo armor normally and it still crashes with the same message.

This is gonna be pretty sad for me if the solution turns out to be overriding canMergeWith in each class where hasDynamicProperies = true because that's gonna mean I can't create my own items anymore.
Because I've tried overriding the canMergeWith call of the items that I've changed in the console but that doesn't work because it still crashes with the error above anyway, So I think it calls the class's canMergeWith instead of the actual object in the inventory. (And it doesn't matter much anyway because it undoes the override on loading a save).

I'm kinda confused why the inventory completely works with canMergeWith correctly but it's just the storage, drop and shop menus that crash the game.
 

Attachments

  • Has Dynamic Properties - Crash.json
    779.1 KB · Views: 3
Last edited:

Gedan

BUTTS BUTTS BUTTS
Staff member
Aug 26, 2015
8,008,896
8,008,326
I cobbled this idea together pretty quickly last night and focued on getting it to work for one main item, the milkbags and completely underestimated how many other items need an implementation to handle the forced crashes. There's like 500+ instances of hasDynamicProperties that I'm going to have to sift through now to find them all and deal with them appropriately.

What I might end up doing is shoving in an array of property names in the base item that the default implementation can check against rather than just throwing a hard error, which should, then, in theory, be something you could fiddle to make it kinda still work no matter what you do without injecting code, you'd just have to inject the property names into that list as well, and it then should save with those property names as part of the item.
 

GeyserGod

New Member
May 3, 2020
4
0
34
explains why I get the same error loading the shop for the nursoid on First 14 with the same error. It pops up for the HL Tent.

 

Gedan

BUTTS BUTTS BUTTS
Staff member
Aug 26, 2015
8,008,896
8,008,326
I've fixed the expected items, and there should now be a system for you to fiddle with shit a bit and make it not crash - any item you mess with, set an array of properties you've fiddled, something like:

Code:
let a = new FrostscalePlate();
a.hasDynamicProperties = true;
a.resolve = 10;
a.dynamicProperties = ["resolve"];
quickLoot(a);

This will be problematic for items that we already consider dynamic properties because they'll be using a specific override of canMergeWith() that won't account for your additional fiddled properties if you happen to end up with two instances of the same item with different values.
 
  • Like
Reactions: OrangeBurner
Status
Not open for further replies.