Welcome to the Builder Academy

Question BUG empty container writes garbage to obj keywords

More
13 May 2025 22:06 #10701 by thomas
I think we need to look at the use case here.

Given I carry two bottles. one with water and one with ale, they'll show up in my inventory as

You are carrying:
a bottle of water
a bottle of ale

I can now, currently, type "drink ale" to drink of the second bottle, instead of first verifying which bottle is first and then typing "drink 2.bottle".
If the name of the liquid isn't part of the keywords, I would instead be forced to always pay attention to which bottle is on top of the list. The other alternative would be to make keyword lookup check if the item is a drink container, and if so, look up the name based on the value in the drink_types table. This seems somewhat strange to me.

Please Log in or Create an account to join the conversation.

More
13 May 2025 23:15 #10702 by cunning
actually i didn't, i am trying it now.

Please Log in or Create an account to join the conversation.

More
16 May 2025 12:33 - 16 May 2025 17:54 #10703 by zi
And yes, Thomas fixed it immediately! TY!!! 

And then I kept reading...

Is that use case what happens in game? EDIT IT DOES NOT B
I poured out my barrel of water, then poured "red liquid" into the barrel, then look barrel:

It's less than half full of a red liquid.

and in the inventory see:

   


[INVENTORY]
[160] an adventurer barrel


not "an adventurer barrel filled with red liquid" or "half filled with red liquid"...

No indication of the drink container's contents from *drinks or *drinknames in constants.c or how much of the contents.

it seems like we're looking to have a dynamic keyword and addition to a short desc that would change based on the drink container contents? that's not a thing, so name_from and name_to do this work? going to check vanilla TBA to see if the use case really works this way.

edit: it doesn't work this way in vanilla


What if the jar isn't clear? What if it's a barrel or a tupperware container? Now I'm thinking a clear true/false bit for the drinkcon and then changing list_obj_to_char for the "inventory" command handling drink contrainers to show a shop-list-style return: shortdesc "of %s", drinks[GET_OBJ_VAL(obj, 2)]
Last edit: 16 May 2025 17:54 by zi.

Please Log in or Create an account to join the conversation.

Time to create page: 0.208 seconds