Vanguard3000
Newcomer
Hi, all,
I'm looking at upgrading my Context-Sensitive Gift Cursor mod, and keep running into this odd quirk where the player's active object (Game1.player.ActiveObject) doesn't have an object id value. I can get its name by calling Game1.player.ActiveObject.Name, but that doesn't help when I'm comparing against a delivery quest's item, which doesn't seem to have a name, but an id instead (i.e., ((ItemDeliveryQuest)q).item.Value).
Basically, when you hover the cursor over an npc, the mod will check all active item delivery quests and see if the selected inventory object (Game1.player.ActiveObject) matches the quest's required item ((ItemDeliveryQuest)q).item), but there seems to be no way to get an id from the ActiveObject, or a name from the delivery item.
Does anyone know of a way to successfully compare the two, preferably by id? I'm thinking there must be an object list in Game1 somewhere that I can get an object from by id or name, but I haven't found it yet. I keep ending up at This page in the Wiki but that seems to concentrate more on adding custom items to the game. It does show the information I can use but it doesn't seem clear how to get all that info.
Anyway, thanks in advance for the help!
I'm looking at upgrading my Context-Sensitive Gift Cursor mod, and keep running into this odd quirk where the player's active object (Game1.player.ActiveObject) doesn't have an object id value. I can get its name by calling Game1.player.ActiveObject.Name, but that doesn't help when I'm comparing against a delivery quest's item, which doesn't seem to have a name, but an id instead (i.e., ((ItemDeliveryQuest)q).item.Value).
Basically, when you hover the cursor over an npc, the mod will check all active item delivery quests and see if the selected inventory object (Game1.player.ActiveObject) matches the quest's required item ((ItemDeliveryQuest)q).item), but there seems to be no way to get an id from the ActiveObject, or a name from the delivery item.
Does anyone know of a way to successfully compare the two, preferably by id? I'm thinking there must be an object list in Game1 somewhere that I can get an object from by id or name, but I haven't found it yet. I keep ending up at This page in the Wiki but that seems to concentrate more on adding custom items to the game. It does show the information I can use but it doesn't seem clear how to get all that info.
Anyway, thanks in advance for the help!