Search found 3062 matches
- Today, 10:44 am
- Forum: WML Workshop
- Topic: new campaign's questions and ideas
- Replies: 26
- Views: 864
Re: new campaign's questions and ideas
Default xp generation is disabled with wesnoth.game_config.kill_experience = 0 wesnoth.game_config.combat_experience = 0. That is why all xp of all units is given by attack_end event. wesnoth.game_config changes persist within one session, that is why they need to be in preload event to apply after ...
- Yesterday, 2:26 pm
- Forum: Faction & Era Development
- Topic: The Reign of the Lords
- Replies: 548
- Views: 264368
Re: The Reign of the Lords
Depending on how you have implemented this addon, changing OBJ_SWORD_FIRE to type_adv_tree might solve your issue.
- May 20th, 2024, 2:59 pm
- Forum: WML Workshop
- Topic: new campaign's questions and ideas
- Replies: 26
- Views: 864
Re: new campaign's questions and ideas
As I promised [event] name=preload first_time_only=no [lua] code=<< local kill_experience = wesnoth.game_config.kill_experience local combat_experience = wesnoth.game_config.combat_experience local leader_id = "adventuring_Mage" -- very similar to AE_give_fight_xp, except that freezing gam...
- May 19th, 2024, 11:40 pm
- Forum: WML Workshop
- Topic: new campaign's questions and ideas
- Replies: 26
- Views: 864
Re: new campaign's questions and ideas
Use
You wanted to use old xp in calculation not just set xp to negative. It is good progress, I will do the Lua part tomorrow.
[code]
.You wanted to use old xp in calculation not just set xp to negative. It is good progress, I will do the Lua part tomorrow.
- May 18th, 2024, 11:21 pm
- Forum: WML Workshop
- Topic: new campaign's questions and ideas
- Replies: 26
- Views: 864
Re: new campaign's questions and ideas
There is no way it will work. line 5, 9, 11: unit id is generated during recruitment, the unit recruited will never be adventuring_Mage. Generated id format looks like unit_type-number. It does not make any sense for filter for recruit event unit id. 19: changes variable which is never used afterwar...
- May 17th, 2024, 3:16 pm
- Forum: Lua Labs
- Topic: [solved] units on the recall list
- Replies: 12
- Views: 420
Re: units on the recall list
Not all of them then. Generally where documentation says config you need to give wml table not unit, but seems documentation is not fully consistent on that.
- May 17th, 2024, 2:42 pm
- Forum: Lua Labs
- Topic: [solved] units on the recall list
- Replies: 12
- Views: 420
Re: units on the recall list
None of https://wiki.wesnoth.org/LuaAPI/wml work on userdata (unit).
- May 16th, 2024, 3:05 pm
- Forum: WML Workshop
- Topic: multiple objects, overlapping effects
- Replies: 2
- Views: 142
Re: multiple objects, overlapping effects
Objects are stored as wml, so all tags are ordered. Whatever it currently does is what it will always do with same version of game.
- May 16th, 2024, 8:18 am
- Forum: Lua Labs
- Topic: [unsolvable] Access event content
- Replies: 9
- Views: 339
Re: [unsolvable] Access event content
It probably does not catch everything, but you can overwrite wesnoth.wml_actions.event to save what is given to it.
- May 16th, 2024, 12:24 am
- Forum: WML Workshop
- Topic: new campaign's questions and ideas
- Replies: 26
- Views: 864
Re: new campaign's questions and ideas
You do not need to do 3. If you do "Reducing xp after recruit" I will do 1-4 for you.
- May 15th, 2024, 10:55 pm
- Forum: WML Workshop
- Topic: new campaign's questions and ideas
- Replies: 26
- Views: 864
Re: new campaign's questions and ideas
Reducing xp after recruit is easier. Once you have that working I can help with Lua to
1) disable kill xp
2) disable fight xp
3) manually give kill and fight xp at attack end
4) update gold at attack end.
1) disable kill xp
2) disable fight xp
3) manually give kill and fight xp at attack end
4) update gold at attack end.
- May 15th, 2024, 9:16 pm
- Forum: WML Workshop
- Topic: new campaign's questions and ideas
- Replies: 26
- Views: 864
Re: new campaign's questions and ideas
Macro is easy dirty way, but unless you have performance issues there is no need to optimize code with fire_event.
{CLEAR_VARIABLE xp_transfer} is part of code quality improvement, but does not affect what your code does. Both events start by resetting it anyways.
{CLEAR_VARIABLE xp_transfer} is part of code quality improvement, but does not affect what your code does. Both events start by resetting it anyways.
- May 15th, 2024, 7:46 pm
- Forum: WML Workshop
- Topic: new campaign's questions and ideas
- Replies: 26
- Views: 864
Re: new campaign's questions and ideas
You could update gold to be equal to xp. If you recruit, reduce xp. If you fight, increase gold.
- May 15th, 2024, 7:44 am
- Forum: WML Workshop
- Topic: WFL conditionals and variable substitution
- Replies: 9
- Views: 318
Re: WFL conditionals and variable substitution
(Celtic_Minstrel can correct if my understanding is wrong)
WML variables are expanded in increase_damage attribute as string. Only after expansion has been done, increase_damage is parsed as formula. Undefined WML variable expands to empty string, not formula-null.
WML variables are expanded in increase_damage attribute as string. Only after expansion has been done, increase_damage is parsed as formula. Undefined WML variable expands to empty string, not formula-null.
- May 14th, 2024, 3:36 pm
- Forum: WML Workshop
- Topic: WFL conditionals and variable substitution
- Replies: 9
- Views: 318
Re: WFL conditionals and variable substitution
You dont need any = in formula. You only started using = as another workaround idea.