weapons special_id

Discussion of Lua and LuaWML support, development, and ideas.

Moderator: Forum Moderators

Post Reply
User avatar
hermestrismi
Posts: 730
Joined: February 6th, 2016, 11:28 pm
Location: Tunisia
Contact:

weapons special_id

Post by hermestrismi »

I have a list of weapons_specials on wml and I want to call them to a unit:add_modification using

Code: Select all

wml.tag.advancement -- ...
{ wml_tag.set_specials
 { mode = "append", 
special_id = "multiple_hits" } 
} 
is 'special_id sufficient in such case or I need to recreate all tags inside [abilities]?
User avatar
hermestrismi
Posts: 730
Joined: February 6th, 2016, 11:28 pm
Location: Tunisia
Contact:

Re: weapons special_id

Post by hermestrismi »

never mind.
the answer is no.
I need either use

Code: Select all

[arg][/arg]
or recreating all the tags and keys of

Code: Select all

[abilities][/abilities]
manually.
solved
User avatar
Ravana
Forum Moderator
Posts: 3313
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: weapons special_id

Post by Ravana »

You can create map or function from id to config. https://github.com/ProditorMagnus/Oroci ... s.lua#L272
User avatar
Celtic_Minstrel
Developer
Posts: 2371
Joined: August 3rd, 2012, 11:26 pm
Location: Canada
Contact:

Re: weapons special_id

Post by Celtic_Minstrel »

You don't need to recreate the tags in Lua form. You can use the WML preprocessor to forward the official definitions directly to the script.
Author of The Black Cross of Aleron campaign and Default++ era.
Former maintainer of Steelhive.
Post Reply