Jump to content

Unmet requirements tooltip


Recommended Posts

That tooltip is getting larger and larger :P But in this case I think it's fine since it's such a specific and important thing. I really think we should start to think about eventually implementing a "barebones" GUI version :) But then the problem would be to decide what's the most important/enough for those who already know the details ;)

Link to comment
Share on other sites

One thing I had noticed is that it was hard for me to find the line that tells what resources a unit or building required from the tooltip. It would be nice if that information were made to stand out more in the tooltips.

Not sure it is the same what you mean, but maybe it would be better if there will be small resource icons instead of resource names (not just in this patch, but in general for any resources mentioned in tooltips). I think technically they can be inserted there.

Link to comment
Share on other sites

We could combine the unmet technology and resource requirements under a single heading: "Unsatisfied requirements", but in the current order. That would potentially shave off three extra lines.

That's certaintly possible, though the heading may be a bit on the geeky side?

Here is another option:

gV770.gif

The artist/tech designer can choose to e.g. use a red font for the "x more" part to have it stand out more, as Brynn requested.

techtiphack2.diff

Link to comment
Share on other sites

That's certaintly possible, though the heading may be a bit on the geeky side?

Here is another option:

The artist/tech designer can choose to e.g. use a red font for the "x more" part to have it stand out more, as Brynn requested.

Hmm, the only downside to doing things that way is that it won't teach players the total required number of buildings. Not sure how big an issue that is in reality though as most maps doesn't start out with any other buildings than the starting civ centre.
Link to comment
Share on other sites

Exactly :)

Well, not exactly. He meant (or at least I think he meant ;) ) that it may be understood as there being a total limit for how many Village phase structures you can build at all as opposed to how many you are required to build before you can advance to the next phase :)
Link to comment
Share on other sites

Your patch is a little crufty, you ought to add -x --ignore-eol-style to svn diff.

Style-wise you've got some K&R indenting in GetNeededRequirements, as well as a few tabs that are spaces rather than actual tab characters.

As far as the content goes: I don't really like doing string replacement, because it means requirement tooltips will be inconsistent, much like the unit tooltips are (with some showing attack bonuses, others showing nothing besides a brief description, etc.).

That said, the only way I can think of to avoid string replacement would be to have a look-up table in TechnologyManager, something like this:


var tooltipClases = {
"Village": "Village Phase structures (except Palisades and Farm Fields)"
};

While the function that constructs the tooltip for a class-based numeric requirement would do something like:


// reqs.numberLeft is your patch's reqs.number, my reqs.number is the untouched, absolute requirement.
var tooltip = "Requires " + reqs.numberLeft + " more " + tooltipClasses[reqs.class] + " (Needs " + reqs.number + " in total)";
return tooltip;

However, perhaps your approach is sufficient for now. There aren't very many technologies at present, and they have simplistic requirements.

Link to comment
Share on other sites

Your patch is a little crufty, you ought to add -x --ignore-eol-style to svn diff.

Thanks, I'll try that.

Style-wise you've got some K&R indenting in GetNeededRequirements, as well as a few tabs that are spaces rather than actual tab characters.

I tried to follow the indentation style already used in the respective files, but it's quite possible I botched it.

As far as the content goes: I don't really like doing string replacement, because it means requirement tooltips will be inconsistent, much like the unit tooltips are (with some showing attack bonuses, others showing nothing besides a brief description, etc.).

I see your point, however I assume whoever (quantumstate?) decided to add the "requirementsTooltip" property to technology templates instead of doing something like you suggest did so for a reason? (... Or they were just lazy, that's also a possibility.)

Edited by zoot
Link to comment
Share on other sites

Here's an updated version:

rimWo.gif

(I had to tweak the tooltip to say "6" structures required, because the engine happens to count the Civic Center as a Village Phase structure.)

Note that the format used in the previous version is still possible in this version, at the technology designer's discretion.

I've also tried to rectify the style/formatting blunders in the code.

techtiphack3.diff

Edited by zoot
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...