Adding a feature for [alternate_profile]

Brainstorm ideas of possible additions to the game. Read this before posting!

Moderator: Forum Moderators

Forum rules
Before posting a new idea, you must read the following:
Post Reply
User avatar
hermestrismi
Posts: 626
Joined: February 6th, 2016, 11:28 pm
Location: Tunisia
Contact:

Adding a feature for [alternate_profile]

Post by hermestrismi »

When a developer have multiple profiles for the same character, I think it will be a good idea to add an 'option' to change the profile if some conditions are met (like a filter for time of day or any other usual unit or side filter ) instead (or with the option) of adding them manually to the message tag.
Like:

Code: Select all

[alternative_portrait]
[filter_condition]
[variable]
name=lisar_encounter
equals=done
[/variable]
[/filter_condition]
profile=...
duration=turn
[/alternative_portrait]
User avatar
Ravana
Forum Moderator
Posts: 3016
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Adding a feature for [alternate_profile]

Post by Ravana »

You can redefine wesnoth.wml_actions.message to check for [alternative_portrait] from unit variables for example.
User avatar
hermestrismi
Posts: 626
Joined: February 6th, 2016, 11:28 pm
Location: Tunisia
Contact:

Re: Adding a feature for [alternate_profile]

Post by hermestrismi »

Ravana wrote: December 14th, 2023, 8:02 pm You can redefine wesnoth.wml_actions.message to check for [alternative_portrait] from unit variables for example.
I didn't know that was possible by Lua functions.
Although, I tried to make a time to learn Lua coding, I m still a beginner at it and I imagine that if there is a pre-defined tag for such option, many addons' developers will found it quite useful.
Post Reply