Skip to content

Item/location description in the client - #219

Draft
nicopop wants to merge 23 commits into
mainfrom
Item-or-location-description-in-client
Draft

Item/location description in the client#219
nicopop wants to merge 23 commits into
mainfrom
Item-or-location-description-in-client

Conversation

@nicopop

@nicopop nicopop commented May 30, 2026

Copy link
Copy Markdown
Contributor

Used to be part of #214 now standalone and with a real implementation with it
it will require #214 to be merged before this one since this branch is based on it

Added for both items.json and locations.json:

  • A new optionnal string property: description
    • anything written in it will be displayed on the client next to the object name (see pictures below)
    • its done in such a way that location description also get added in the Tracker tab (location_id_to_alias in init.py)
    • A more dynamic description can also be added by hooks via slotdata for both location_name_to_description and item_name_to_description

Someone that knows more about kivy could potentially move the description below the item/location name but thats not something I know how to do other than maybe adding a \n

The following example pictures shows my Old OuterWilds manual using those aliases to protect against spoilers
image

@nicopop nicopop self-assigned this May 30, 2026
@silasary

silasary commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

These fields should populate webworld.location_descriptions and webworld.item_descriptions respectively.

@nicopop

nicopop commented Jun 6, 2026

Copy link
Copy Markdown
Contributor Author

These fields should populate webworld.location_descriptions and webworld.item_descriptions respectively.

@silasary
I didnt know those were a thing... I guess I can either make the switch from world... to webworld or do like the UT alias support and just add those pointers

@nicopop

nicopop commented Jun 6, 2026

Copy link
Copy Markdown
Contributor Author

webworld.location/item_descriptions are dict[str (name), str(desc)]
while UT (and my current implementation) is dict[int (id), str (desc)]
I was using id so it would be less data used to store thing and less text that get displayed in client for the slotdata version but I guess I can convert it all to [name, desc] and add a converstion to [id, desc] for UT

@nicopop

nicopop commented Jun 7, 2026

Copy link
Copy Markdown
Contributor Author

Someone that knows more about kivy could potentially move the description below the item/location name but thats not something I know how to do other than maybe adding a \n

I tried just adding a \n and locations ends up looking like the following image even when I make it change height so ill leave this to a better kivy dev
(items look fine though somehow)
image

                        extra = f'\n({description})' if (description := self.ctx.get_location_description_by_name(location_name)) is not None else ''
                        text = f"{location_name}{extra}"
                        location_button = TreeViewButton(text=text,
                                                         halign="center",
                                                         size_hint=(.75 if has_hint else 1, None),
                                                         height=dp(200) if extra else dp(30))

this height param doesnt seem to change much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants