Search found 3064 matches
- Yesterday, 9:35 pm
- Forum: WML Workshop
- Topic: new campaign's questions and ideas
- Replies: 31
- Views: 1163
Re: new campaign's questions and ideas
No idea what you are trying to do now. I provided events and I expect you know basics of events to put them somewhere. No dofile or lua file is involved.
- May 22nd, 2024, 8:39 pm
- Forum: WML Workshop
- Topic: new campaign's questions and ideas
- Replies: 31
- Views: 1163
Re: new campaign's questions and ideas
Just for timing. You're using attack end, I wonder if that happens before or after the unit is granted experience. If it's before, he'll have nothing to give on the first attack (or the third, fifth...). yes! thats whats happening, how could i fix that? I did not personally test that attack_end happ...
- May 22nd, 2024, 10:44 am
- Forum: WML Workshop
- Topic: new campaign's questions and ideas
- Replies: 31
- Views: 1163
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 ...
- May 21st, 2024, 2:26 pm
- Forum: Faction & Era Development
- Topic: The Reign of the Lords
- Replies: 548
- Views: 265820
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: 31
- Views: 1163
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: 31
- Views: 1163
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: 31
- Views: 1163
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: 431
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: 431
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: 151
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: 349
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: 31
- Views: 1163
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: 31
- Views: 1163
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: 31
- Views: 1163
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: 31
- Views: 1163
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.