Search found 136 matches

by lhybrideur
July 22nd, 2020, 8:56 am
Forum: Lua Labs
Topic: Overloading lua functions
Replies: 4
Views: 528

Re: Overloading lua functions

So, the function is called dynamically at the beginning of another function. local function onshow(unit) local equippable_sorts = loti.util.list_equippable_sorts(unit) . . . end So I am back to trying to overload list_equippable_sorts(unit) I can get loti.util from anywhere but I don't understand ho...
by lhybrideur
July 21st, 2020, 11:18 am
Forum: Lua Labs
Topic: Overloading lua functions
Replies: 4
Views: 528

Re: How to pass a unit as argument to a function called into a Lua tag

It does not crash, but neither does it work. I think I need to find when list_equippable_sorts_loi(unit) is called so as to call my overloading function at the right time.

I will post when I have found.
by lhybrideur
July 21st, 2020, 11:03 am
Forum: Lua Labs
Topic: Overloading lua functions
Replies: 4
Views: 528

Re: Overloading lua functions

Nice. I like it. Thank you very much. I will try that right now.
I only hope unit is not dynamically filled by another function somewhere.

P.S.: I changed the title.
by lhybrideur
July 21st, 2020, 11:00 am
Forum: WML Workshop
Topic: Help for New Abilities and Weapon Specials
Replies: 81
Views: 2834

Re: Help for New Abilities and Weapon Specials

In this formula if "2" is for 50% of HP, then "4" is for 25% of HP? damn mathematics that chases me kkkkk... formula="max_hitpoints / hitpoints > 2" formula="max_hitpoints / hitpoints > 4" yes. You might be able to do it the other way around for it to be clearer, if it accepts doubles. formula="hit...
by lhybrideur
July 20th, 2020, 12:04 pm
Forum: WML Workshop
Topic: Help for New Abilities and Weapon Specials
Replies: 81
Views: 2834

Re: Help for New Abilities and Weapon Specials

Concerning your fighter ability, could you use a formula or something to do value = -15*(unit.level-second_unit.level) or the other way around ?
Only wondering because I have no idea how this works.
by lhybrideur
July 15th, 2020, 1:47 pm
Forum: Lua Labs
Topic: Overloading lua functions
Replies: 4
Views: 528

Overloading lua functions

Hi everyone, I'm currently developing a campaign that an item management system written in lua from another add-on (LotI). I am trying to overload a function to modify which unit can use what. I have already succeeded for function that does not take an input parameter, but I cannot find how to do th...
by lhybrideur
July 13th, 2020, 1:36 pm
Forum: Scenario & Campaign Development
Topic: Legends of Idaamub
Replies: 53
Views: 5429

Re: Legends of Idaamub

I don't really know ATM how many chapters there will be, but I think it will be around 10 chapters long. Considering the first chapter was completed roughly one year ago, I think the third one can be expected in a year, and the whole campaign not quite soon... It is a side project of mine so I don't...
by lhybrideur
July 13th, 2020, 11:47 am
Forum: Scenario & Campaign Development
Topic: Legends of Idaamub
Replies: 53
Views: 5429

Re: Legends of Idaamub

Chapter 2 is now online. If you already played chapter 1, you can continue your adventure by updating the campaign and loading Zei.cfg. Please don't hesitate to write me if you find any bug or typo, or if you have a suggestion. I'm currently trying to implement the new item management interface of L...
by lhybrideur
July 6th, 2020, 12:31 pm
Forum: WML Workshop
Topic: How to force AI with no leader to play defensively
Replies: 3
Views: 205

Re: How to force AI with no leader to play defensively

You can also use ai_special=guardian in the [unit] tag
by lhybrideur
July 3rd, 2020, 12:15 pm
Forum: Users’ Forum
Topic: [Loose Idea] Online campaign creator/maker for wesnoth?
Replies: 2
Views: 236

Re: [Loose Idea] Online campaign creator/maker for wesnoth?

AFAIC I think you can't build a decent campaign without WML as you need it to set up events. So it might make your idea are to set up. There are ways to do that anyway. You could make event black-boxes. Like moveto event with dialogs in them, or unit spawn. But it will only be limited to simple even...
by lhybrideur
June 24th, 2020, 12:46 pm
Forum: WML Workshop
Topic: Create a new Era just to add a few old units?
Replies: 6
Views: 478

Re: Create a new Era just to add a few old units?

You can manually add any unit you want to your scenario. Just copy-paste the .cfg file of the units you want from the various eras in a "units" folder in your add-on folder then link it with

Code: Select all

[+units]
    {~add-ons/name_of_your_scenario/units}
[/units]
in the main.cfg
by lhybrideur
May 15th, 2020, 2:22 pm
Forum: Users’ Forum
Topic: map editor help or tutorial
Replies: 16
Views: 6383

Re: map editor help or tutorial

I would say that you have to modify the cfg file by hand after creation to get variations.
by lhybrideur
May 15th, 2020, 2:15 pm
Forum: Users’ Forum
Topic: Hi one, Favourite and Least Favourite Unit?
Replies: 15
Views: 2515

Re: Hi one, Favourite and Least Favourite Unit?

For me it it the Spectre. Quick thanks to its movement costs and powerful drain melee.
Least favorite is probably the heavyinfantry line. Only a few attacks, slow, high movement cost.
by lhybrideur
May 13th, 2020, 12:06 pm
Forum: WML Workshop
Topic: Leadership style charge ability
Replies: 5
Views: 583

Re: Leadership style charge ability

No it is a develop release.
Stable releases are even releases and develop releases are odd releases.
Latest stable is 1.14.11
by lhybrideur
May 12th, 2020, 1:39 pm
Forum: WML Workshop
Topic: Problem with the creation of an effect
Replies: 7
Views: 656

Re: Problem with the creation of an effect

Yes the easiest way would probably be to have a harm_unit with amount=damage

I think the correct name is "turn refresh"