I've been trying to figure out the flaw in this for days and I'm not seeing the problem. Put plainly, the code I pasted is supposed to grab all the "items" in the room I've entered (other functions add/remove it as well, as needed), which includes inanimate objects, mobs loyal to other players, mobs I want to hunt, etc, and sorts them into tables using the values of the fields. The table "prey" is the one I'm trying to show in the miniwindow, which works, perfectly. What -isn't- working is trying to get my current target, which I match using its id, to use the font that makes it red and italic on that list.
https://paste.ofcode.org/zxkrm75kAA9RQAbSbXdnCJ
I had considered that the id is becoming a number in json.decode but I ruled that out by printing the type. It's always a string type.
Eventually I plan to have a table whose keys are the short_desc of each mob in an area, which are themselves tables with things like their priority in relation to other mobs in the room so I could, for example, make sure the boss is at the top of the list, strength rating, their targeting name to generically target similar enemies as you see them, ex.
This is all assuming I can get my current problem out of the way.
Any insight would be appreciated.
https://paste.ofcode.org/zxkrm75kAA9RQAbSbXdnCJ
I had considered that the id is becoming a number in json.decode but I ruled that out by printing the type. It's always a string type.
Eventually I plan to have a table whose keys are the short_desc of each mob in an area, which are themselves tables with things like their priority in relation to other mobs in the room so I could, for example, make sure the boss is at the top of the list, strength rating, their targeting name to generically target similar enemies as you see them, ex.
tname = {"a young rat" = "rat", "a goblin miner" = "goblin"}This is all assuming I can get my current problem out of the way.
Any insight would be appreciated.