Original Post — Direct link

Sigh. This is a modding related rant, as a modder. Yes yes, it's niche, nobody will care, but I care goddamnit and it's the bloody hill I'm very well going to die on. Hediffs, or 'health differences' are the entries in the Health tab and are used from everything such as Scars, Prosthetics, Bionics, Diseases and more. Almost every mod uses them.

I'm hoping a certain someone will see this and take pity on me, but who knows. And if you do read this, Ty, my fine boi, don't take it personally.

Here's a list of why the new hediff description system is painful to both modders and users.

On the outset, it may seem like a cool thing to have hediffs with descriptions, and you're damn right, it is! However! There are some major, glaring issues with the design, UI and code that I believe is not executed nearly as thoughtfully for modders as could be hoped from an otherwise mod-friendly game. This is exceedingly important for mods such as Radiology, Pawnmorpher, Genetic Rim, Alpha Animals, Cybernetic Expansion and every mod that needs to add descriptions for all the many, many hediffs they use. Two of those, Radiology and Pawnmorpher (though, I don't believe the former is any longer in active development) had their own system for doing hediff descriptions. It grinds my gears because we worked on our own system for Pawnmorpher that no longer works at all and is delaying our update to 1.1. More on that later.

TL;DR: They're not optional, flawed from a UX perspective (click instead of hover tooltip), break other working systems, are much more difficult to patch, and would take minimal amounts of core code to fix all these issues.

Let's get into why I really, really don't like the new system, and why you probably won't either.

1. It's not optional.

If you are a modder, you now have to add descriptions for every single hediff you add to the game whether it actually needs one or not, or you get ugly config errors in your log telling everyone you've been a very naughty modder for being lazy and not writing them. Sure, this may bar low-quality mods which don't bother, but not all hediffs need descriptions!

2. It's a click box, not a hover tooltip.

This is bad from a UI and UX perspective. You have to click to open it, but it only displays information that's already available in the tooltip...so, put the description in a tooltip, please. Please. That 'i' can still be there (hell, we used the same thing in Pawnmorpher)

3. It does not support [PAWN_nameDef] or any variants. You cannot personalise them in any way.

So, if you're like Pawnmorpher and like to style things up a little bit with some 'he/she' 'his/her' 'Bob/Mary' personalisation like exists for traits, backstories and pretty much everything else, you can't do that with this system. It just shows as an ugly [PAWN_nameDef].

4. The code is terribly convoluted and the old patches no longer work.

We can't even use our old way out of pure stubbornness. The patches we used no longer function, so we have to migrate to this new system (until we eventually figure out how to not do that, and then we're the weird ones for standing out and putting it in a different place instead of conforming). Why, lord randy in heaven, why are there so many delegates in the code that just shows a description? Why is it that complex?!

5. Related, you can't patch it to override the descriptions.

In the previous system we had made, we were able to change the descriptions of the hediff by stage. So when a mutation, for instance, developed from one tier to the next via stages, the description would update. And it was awesome, since you could watch and read the progression. Now, it only lets you read from the main hediff itself and includes no functionality for reading from stages, as well as breaking the system that let us do it. In trying to improve the amount of flavour text in core and mods, it seriously shafted our own system for adding even more flavour than what is currently possible.

To conclude. It breaks old systems, forces descriptions upon you, doesn't allow itself to be easily overriden or modified, isn't able to be personalised in any way, shape or form, and is displayed in a click-window that's sole function is to display the description and only the description.

We have had our working system utterly broken and given a new system that is, entirely frankly, inferior in every way -- except that it's vanilla. We did raise these concerns multiple times on the discord during the beta phase (which Tynan did reply to one of my requests, but so far it has not been implemented), I now realise that we should have gone to the forums.

Ach. The update is great so far and we're slowly figuring out what's broken and picking up the pieces, I just wish the modding community was given more time to adapt to the changes. Rather than an executive few getting an early heads-up. Ty, if you'd like, I give you full permission to steal the code from Pawnmorpher 1.0's hediff description method and use it instead. You simply hover over the 'i', it displays a personalised description which can be changed via stages, and even allows the label of the hediff to be overriden (which, however, I believe is still patchable, thank god).

Anyhow, that's about it. Bless.

/rant

External link →
over 4 years ago - /u/TynanSylvester - Direct link

I'm actively seeking modder requests around these kinds of things. We've got a Google Doc where we're collating them (you'll need to request access) with some modders adding requests already[ edit removed after access given ]

So let's talk about it, nothing's set in stone. Especially if there are easy wins to deliver, I'm all for it.

Regarding the points specifically.

  1. I'm not sure it could be optional, otherwise the info card would show nothing at all on the description. Players expect to see something here.
  2. Putting descriptions in the tooltip makes sense if they're short enough, if they're longer it would be a problem. This is something I'd have to review. But probably I'd set an optional to override if it's defined. I don't want to overload the tooltip either though. Needs to be designed carefully.
  3. Grammar symbols like this wouldn't work in the info card since it's often used without reference to any specific pawn (e.g. when you link to it from a body part item).
  4. Code's not terribly convoluted on our end, though I can't speak to what nightmarish things the compiler may have done with it.
  5. You should be able to override the description like anything else in XML. Doing it different for specific stages is a different thing though.

It sounds like you had a feature which was similar but different and now you're kind of stuck with something that's too close to 1.1 to keep but too far to port over easily. Which does suck. Anyway, feel free to reply here or add some specific requests on that doc above.

over 4 years ago - /u/TynanSylvester - Direct link

Originally posted by RuneLFox

Thank you for the response Tynan, I wasn't expecting a reply so soon, was fully prepared to go sleep upset but now that no longer needs to be the case! Apologies if I sounded somewhat harsh, just was a bit miffed.

I've requested access to that doc, by the way. Cheers.

But now I have your attention, muahahaha. I do have some ideas on how to solve these:

  1. If possible, don't render the 'i' if there's no description set. Sure there might be some hediffs without an 'i' which could be visually jarring, though it's not at all too different from what we had, currently because everyone's been scrambling to write new descriptions! 😉

  2. That's fair. If possible, have the descriptionHover / description show if it's short enough, if it's too long, could truncate it and allow the user to click it for more info. Full disclosure, my original point wrongly assumed that the info box didn't show any hediff stats and was just for the description. Then I checked one which actually had stats and was not go-juice addiction and removed that. However! Adding a hover tooltip on either that 'i' or putting the truncated one in the hediff tooltip itself could be a workaround.

  3. That's unfortunate. I see the context of where it wouldn't work, now you mention it. Didn't think of it because it didn't apply to mutations gained without specific items. Fair point, if it's a casualty of war then we'll make do with "This pawn" or "This part" etc etc.

  4. Honestly I'm just going by what our lead dev has to say on it, he's mentioned it'll take him a weekend to pick through it and see how it works so we can try and patch it. Lots of delegate functions but I haven't dived too deep into the code for a bit, so I'm basing my answer off his thoughts.

  5. Yeah, doing the actual description is fine, my main gripe is with the stage system we were using. I'll shoot an example here: https://hastebin.com/ewiquzoxoy.xml

<labelOverride> is to change the actual label of the hediff rather than having it be in brackets. So 'hoof-fingers' rather than 'trotter (hoof-fingers)'. Each stage has a different <description> to describe that specific stage. Without that functionality (and perhaps you could point us to a patch or some means of re-achieving this) it just uses the main hediffDef's description, which in the case of progressive mutations such as this, is not exactly ideal.

I'd be all for having this new system if these points were addressed. It means it's another thing we don't have to keep updating if it's natively supported. I just wish there was more we could do with it easily. I don't mind it being too close to 1.1 -- again I'm more than happy for this to be a vanilla feature for the reasons above. :)

Again thanks for the prompt response and putting up with my rant, I'm glad you were able to find time to address this and I hope some of these suggestions can be taken on-board. Once I get access to the doc I'll write them out neatly there.

Let me know if you have follow up thoughts.

1,2,3 - kind of the same factor comes into play, which is that we can't really just not allow accessing the info card since so many places depend on it and will link it going forward. And the description can't be empty or malformed in these cases.

For the grammar thing honestly I'd just write it differently rather than trying to come up with a special case grammar replacement. As in that's the kind of solution I go for with our designs.

I think it might be best if the hover text is separate from the info card description in any case, which alleviates these issues. Hover text can use grammar symbols.

Anyway I took some notes into the doc. Cheers.