Era-of-InvasionS's ability thread

The place to post your WML questions and answers.

Moderator: Forum Moderators

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
User avatar
Dugi
Posts: 4961
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: Era-of-InvasionS's ability thread

Post by Dugi »

Yeah. When you choose to play Wesnoth multiplayer, all units in multiplayer are loaded. So if you have 20 units with an ability, the event is preprocessed 20 times, so placing in only once per each era is a significant quickening.
User avatar
francophone
Posts: 393
Joined: February 20th, 2010, 2:19 pm

Re: Era-of-InvasionS's ability thread

Post by francophone »

If I put my skills into a folder, they are read if I play a totally different scenario.
And if I put in each era who uses them, they are only read when I choose one of these eras?
Is that it?
User avatar
Dugi
Posts: 4961
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: Era-of-InvasionS's ability thread

Post by Dugi »

Yes. Putting them into the era is highly useful for multiplayer, but in single player, you will have to place the event list macro substitution into every single scenario that might be less effective, but more flexible. Doing so will allow you to add/modify these abilities, to add them in custom advancements, etc. But if you are not interested in doing this, single player will be the priority over the era, and there will be more scenarios than celestial unit types, do it in the old way.
User avatar
francophone
Posts: 393
Joined: February 20th, 2010, 2:19 pm

Re: Era-of-InvasionS's ability thread

Post by francophone »

I plan a campaign (in several parts) that is used primarily to present the factions.
In this case, what to do?
User avatar
8680
Moderator Emeritus
Posts: 742
Joined: March 20th, 2011, 11:45 pm
Location: The past

Re: Era-of-InvasionS's ability thread

Post by 8680 »

francophone wrote:I plan a campaign (in several parts) that is used primarily to present the factions. In this case, what to do?
Put the event macros in the campaign's _main.cfg?
User avatar
Dugi
Posts: 4961
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: Era-of-InvasionS's ability thread

Post by Dugi »

8680 wrote:
francophone wrote:I plan a campaign (in several parts) that is used primarily to present the factions. In this case, what to do?
Put the event macros in the campaign's _main.cfg?
The wiki says that it works in era, campaign and unit_type tags. So I suppose that it does not work in the main tag.
And I don't think that putting the macro substitution definitions into the main file is the best idea, it is better to keep it in a separate file (I like to name it global_events.cfg).
User avatar
8680
Moderator Emeritus
Posts: 742
Joined: March 20th, 2011, 11:45 pm
Location: The past

Re: Era-of-InvasionS's ability thread

Post by 8680 »

To disambiguate, I meant calling the macros, and thus defining the events, in the campaign #ifdef.
User avatar
Dugi
Posts: 4961
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: Era-of-InvasionS's ability thread

Post by Dugi »

This is used in so many add-ons, that I considered it absolutely obvious (I am pretty sure that francophone uses this as well) and I thought you were speaking about something different.
User avatar
francophone
Posts: 393
Joined: February 20th, 2010, 2:19 pm

Re: Era-of-InvasionS's ability thread

Post by francophone »

Upon reflection, I suppose the macros of a campaign is not read until the campaign is read. And even if it is read when opening the campaign interface, it is not dramatic: It does not open it often, unlike the multiplayer interface.
In my case, if I have to put the abilities and special attacks with event in era tag for multiplayer, I can copy the block in the campaign tag.



________________________




I do not need right away but to understand the principles, I would like to know if it is possible and how to establish status. I am considering including other forms of slow, poison and petrification. For example a petrification of a turn, or a spell (ice or roots) that block on the ground not flying units without changing their attacks. And I think that the status would be a good way to manage effects with limited but longer than an attack.



_______________




Edit: I displaced abilities and special attacks, but it does not work with final flourish. I have a message that tells me that can not find the macro "DAMAGE".
Other displaced macros pose no problems.

The code as it runs:
Red = that disappears if I try displaced the event. Green = what I put in the era tag. Black = not changed.
Spoiler:
Post Reply