Jump to content

Resource tooltips


Recommended Posts

Hi guy. I add text to the resources name, so that the player can get a little tooltip when hover over the icons in the top left. Can someone extend the resource code to allow the resource jsons to have a tooltip line like the technologies have? The reason for this extension is so that the gui at the bottom does not get screwed up. See, the editing I did made it work for the top ribbon, but screw up the bottom gui.

 

Current modded json:

 

{
	"code": "food",
	"name": "Food - Harvest from Animals, Berry Bushes, Fish, or Farms",
	"order": 1,
	"subtypes": {
		"fish": "Fish",
		"fruit": "Fruit",
		"grain": "Grain",
		"meat": "Meat"
	},
	"truePrice": 100,
	"aiAnalysisInfluenceGroup": "ignore"
}

 

Desired json possibility:

 

{
	"code": "food",
	"name": "Food",
	"order": 1,
	"subtypes": {
		"fish": "Fish",
		"fruit": "Fruit",
		"grain": "Grain",
		"meat": "Meat"
	},
	"tooltip": "Harvest from Animals, Berry Bushes, Fish, or Farms.",
	"truePrice": 100,
	"aiAnalysisInfluenceGroup": "ignore"
}

 

pyrogenesis_2017-03-06_00-04-27-22.png

pyrogenesis_2017-03-06_00-05-07-90.png

  • Like 2
Link to comment
Share on other sites

5 hours ago, wowgetoffyourcellphone said:

Hi guy.

I hope your missing an s there :D

5 hours ago, wowgetoffyourcellphone said:

Can someone extend the resource code to allow the resource jsons to have a tooltip line like the technologies have?

That should require about 2 or 3 lines of code changed, maybe you want to look into it?

Should this tooltip also be shown in other places?

  • Maybe in the captions of the resources tab in the summary screen?
  • In the tooltip of the resource count caption of the selection details?
  • The carrying resources tooltip can't show it as we can't conceptually show tooltips of tooltips (because moving the mouse cursor hides the tooltip).
  • Sometime we should be able to select starting resoures for each type individually, we could show it there then too.

If the answer to the above question is no, then I can still conditionally accept your request. The condition being that you create a JustusAvramenko or wowgetoffyourcellphone account on http://code.wildfiregames.com, test the proposed fix to your request with vanilla 0ad and delenda est for functionality, try to look at the code whether it remotely makes sense and doesn't look ugly and click on accept. We have the review requirement so it needs the attention of two people: one team- or non-team member confirming that the patch is sensible and one team-member taking the full responsability of the diff by committing it.

  • Like 2
Link to comment
Share on other sites

1 hour ago, wowgetoffyourcellphone said:

Food: Harvest from Animals, Berry Bushes, Fish, or Farms

Wood: Lumber from Trees

Stone: Mine from Rocks or Stone quarries

Metal: Mine from Metal Mines

Not sure if they will be accepted, they seem a bit trivial. Also belive common nouns are more intuitive than proper nouns here. @Hannibal_Barca is into strings, other than that I don't know whom to ask who might has ability, interest and slighty more than zero time to spend.

The code should support descriptions anyway though as mods might benefit from descriptions, so created a revision proposal on https://code.wildfiregames.com/D199. The offer above still stands.

Link to comment
Share on other sites

  • 2 weeks later...

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...