[closed] How to change golds description in upper gold counter?
Moderator: Forum Moderators
- ZombieKnight
- Posts: 250
- Joined: June 27th, 2022, 2:26 pm
- Location: Czech Republic
[closed] How to change golds description in upper gold counter?
Hi,
I've got a silly idea, how to change golds description in counter (now it says "Gold the amount of gold currently avaible to recruit and maintain your army" and I'd like to change it to something funny(idk what exactly)...)
Any ideas how to do so?
I've got a silly idea, how to change golds description in counter (now it says "Gold the amount of gold currently avaible to recruit and maintain your army" and I'd like to change it to something funny(idk what exactly)...)
Any ideas how to do so?
Last edited by ZombieKnight on March 31st, 2024, 12:29 pm, edited 1 time in total.
I had saurian in profile before, but I've merged my discord profile with forum one...
Working on campaign Bandits from Brown Hills
Working on campaign Bandits from Brown Hills
- Celtic_Minstrel
- Developer
- Posts: 2274
- Joined: August 3rd, 2012, 11:26 pm
- Location: Canada
- Contact:
Re: How to change golds description in upper gold counter?
I think you're looking for wesnoth.interface.game_display.gold.
- ZombieKnight
- Posts: 250
- Joined: June 27th, 2022, 2:26 pm
- Location: Czech Republic
Re: How to change golds description in upper gold counter?
Hi (sorry for delay, I've got many problems)
This code changes the text and tooltip...
I call it using this:
It works like it should... except the Numbers tooltip doesn't change (only the texts tooltip changes viz. screenshots)
Aaand it disaperares, when saved and re-loaded.
If you know what I'm doing wrong, please tell me.
Any ideas?
This code changes the text and tooltip...
Code: Select all
local old_label = wesnoth.interface.game_display.gold
function wesnoth.interface.game_display.gold()
--local _ = wesnoth.textdomain "mydomain"
local s = old_label()
table.insert(s, wml.tag.element {
tooltip ="Tooltip",
text = "Text"
})
return s
end
wesnoth.interface.game_display.gold()
Code: Select all
[lua]
code="wesnoth.dofile '~add-ons/Bandits_from_Brown_Hills/lua/change_labels_tooltip.lua'"
[/lua]
Aaand it disaperares, when saved and re-loaded.
If you know what I'm doing wrong, please tell me.
Any ideas?
I had saurian in profile before, but I've merged my discord profile with forum one...
Working on campaign Bandits from Brown Hills
Working on campaign Bandits from Brown Hills
- ZombieKnight
- Posts: 250
- Joined: June 27th, 2022, 2:26 pm
- Location: Czech Republic
Re: How to change golds description in upper gold counter?
Oh idk how to upload the screenshots...
I had saurian in profile before, but I've merged my discord profile with forum one...
Working on campaign Bandits from Brown Hills
Working on campaign Bandits from Brown Hills
- Pentarctagon
- Project Manager
- Posts: 5592
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: How to change golds description in upper gold counter?
Below the text area, there's an "attachments" tab.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
take one down, patch it around
-2,147,483,648 little bugs in the code
- ZombieKnight
- Posts: 250
- Joined: June 27th, 2022, 2:26 pm
- Location: Czech Republic
Re: How to change golds description in upper gold counter?
What do yoy mean?
Why does it dissapear, when I load the game?
Why does it dissapear, when I load the game?
I had saurian in profile before, but I've merged my discord profile with forum one...
Working on campaign Bandits from Brown Hills
Working on campaign Bandits from Brown Hills
Re: How to change golds description in upper gold counter?
You need first_time_only=no for your preload event.
- ZombieKnight
- Posts: 250
- Joined: June 27th, 2022, 2:26 pm
- Location: Czech Republic
Re: How to change golds description in upper gold counter?
Ok, thats weird, like it stay, when I set units description to "This".
Ill do so... which attachments index is description stored?
Or is is it stored in variable sonewhere? That should be easy to modify.
Ill do so... which attachments index is description stored?
Or is is it stored in variable sonewhere? That should be easy to modify.
I had saurian in profile before, but I've merged my discord profile with forum one...
Working on campaign Bandits from Brown Hills
Working on campaign Bandits from Brown Hills
- ZombieKnight
- Posts: 250
- Joined: June 27th, 2022, 2:26 pm
- Location: Czech Republic
Re: How to change golds description in upper gold counter?
Oh, got it.
Works now...
Thanks!!!
Works now...
Thanks!!!
I had saurian in profile before, but I've merged my discord profile with forum one...
Working on campaign Bandits from Brown Hills
Working on campaign Bandits from Brown Hills
- ZombieKnight
- Posts: 250
- Joined: June 27th, 2022, 2:26 pm
- Location: Czech Republic
Re: How to change golds description in upper gold counter?
How to acces the variable, containing number of villages side sees? (to set the village text to default one, while modifying the tooltip)
I had saurian in profile before, but I've merged my discord profile with forum one...
Working on campaign Bandits from Brown Hills
Working on campaign Bandits from Brown Hills
- ZombieKnight
- Posts: 250
- Joined: June 27th, 2022, 2:26 pm
- Location: Czech Republic
Re: How to change golds description in upper gold counter?
Hell, I'm trying to reproduce the INCOME counters normal behavior...
How to define it same as its normally? (so I can modify the code)
doesn't work as negative values aren't red, like normally
How to define it same as its normally? (so I can modify the code)
Code: Select all
function wesnoth.interface.game_display.income()
return { { 'element', {
text = wesnoth.sides[wesnoth.interface.get_viewing_side()].net_income,
tooltip = wml.variables["income_tooltip"]} } }
end
I had saurian in profile before, but I've merged my discord profile with forum one...
Working on campaign Bandits from Brown Hills
Working on campaign Bandits from Brown Hills
- ZombieKnight
- Posts: 250
- Joined: June 27th, 2022, 2:26 pm
- Location: Czech Republic
Re: How to change golds description in upper gold counter?
Solved
I had saurian in profile before, but I've merged my discord profile with forum one...
Working on campaign Bandits from Brown Hills
Working on campaign Bandits from Brown Hills