Arx-Game / arxcode

A text-based/web game using Evennia.
MIT License
45 stars 42 forks source link

Proprieties Display #99

Open rozzingit opened 5 years ago

rozzingit commented 5 years ago

Is your feature request related to a problem? Please describe. Right now the proprieties list seems to be sorted by the original creation date of the prop mod, which isn't a particularly relevant order to anyone. Additionally, it'd be cool if we could see how many people have a particular mod applied!

Describe the solution you'd like I would suggest maybe sorting the table by modifier amount? So with the +100 Monarch at the top down to the -75 Oathbreaker at the bottom. I think that order would make sense?

OR you could order by this other suggestion I have, which is to add a third column to this output to indicate the # of PCs who currently have a given propriety. Literally entirely just because I'm curious.

It might also neaten things up to add the table formatting that tends to be commonly used on the game. The staff listing is a good offhand example of the formatting I'm talking about:

+--------------------------+---------------------------+---------------------+
| Name                     | Role                      | Idle                |
+~~~~~~~~~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~~~~+
| Apostate (Staff)         | Head of Story             | No                  |
| Puffin (Staff)           | Strongest of Her Race     | Idle-               |
+--------------------------+---------------------------+---------------------+

Which would make the proprieties output something like...

+-------------------------+------------+--------+
| Title                   | Propriety  | # PCs  |
|~~~~~~~~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~+~~~~~~~~+
| Monarch                 |       100  |     1  |
| Godsworn                |        35  |    17  |
| Highlord                |        25  |     4  |
+-------------------------+------------+--------+

Obviously with many more lines! If you sorted by the mod value, I'd suggest a secondary sorting of alphabetical (for when there are multiple mods with the same value). I HAVE NO IDEA HOW PYTHON SORTING WORKS. I know sometimes I've asked for sorting and it's been way more difficult than I thought.

OMG THE CODE TELLS YOU ORGS THAT HAVE THE PROP MOD YOU COULD ADD A FOURTH COLUMN--

Also I'm tagging @Zironic because the proprieties code was his.

rozzingit commented 5 years ago

Additionally, if there are no active characters with a prop mod, but there are characters marked Inactive or Gone, the code returns nothing. You can see this if you try to check Monster, Excommunicated, or Cruel. This should probably return something, so maybe just a line:

No one is currently spoken of with the 'Monster' reputation. Use 'proprieties/all Monster' to see those now gone or deceased who were known for this.

Or even just the first sentence. Think it's confusing to return nothing at all, it makes it seem like the code is broken.

Zironic commented 5 years ago

The code is broken in a sense. It's a good catch to fix.

TehomCD commented 5 years ago

Yeah, makes sense. But it should probably mention it in any case, since you could have the same confusion with any number of matches if you expect rostered characters to show. Sorting by propriety value, name, and annotating with a count of players and orgs is all pretty straightforward too.