Knyghtmare's WML problems
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.
Re: Weapon Special: Charm (Remaking the original)
You don't need to store the unit. Primary and secondary units are automatically stored in $unit and $second_unit, both of which you're already using to retrieve the unit id.
Re: Weapon Special: Charm (Remaking the original)
[filter]race=
accepts a list, e.g. race="human,elf,dwarf,elf of a different color"
.I wrote a charm weapon special for Battlestar’s Scarlet Sea that does what you want, minus the ToD-awareness.
Having the special active only at night could be implemented by adding some filters:
Code: Select all
[dummy]
...
[filter_self]
[filter_location]
time_of_day=chaotic
[/filter_location]
[/filter_self]
...
[/dummy]
[event]
name=attacker_hits
...
[filter]
[filter_location]
time_of_day=chaotic
[/filter_location]
[/filter]
...
[/event]
[event]
name=defender_hits
...
[filter_second]
[filter_location]
time_of_day=chaotic
[/filter_location]
[/filter_second]
...
[/event]
- Lord-Knightmare
- Discord Moderator
- Posts: 2359
- Joined: May 24th, 2010, 5:26 pm
- Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
- Contact:
Re: Weapon Special: Charm (Remaking the original)
You don't need to store the unit. Primary and secondary units are automatically stored in $unit and $second_unit, both of which you're already using to retrieve the unit id.
[filter]race= accepts a list, e.g. race="human,elf,dwarf,elf of a different color".
Okay and acknowledged.Having the special active only at night could be implemented by adding some filters:
I read that. But, I don't understand Lua, so I'm trying to achieve this using only WML.I wrote a charm weapon special for Battlestar’s Scarlet Sea that does what you want, minus the ToD-awareness.
I have used both of your tips and suggestions and made this. Still haven't tested this though...
Demo
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
- Lord-Knightmare
- Discord Moderator
- Posts: 2359
- Joined: May 24th, 2010, 5:26 pm
- Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
- Contact:
Re: Weapon Special: Charm (Remaking the original)
Result: Ability no work
I also tried the one in Scarlet Sea, but that gave a Lua error.
I also tried the one in Scarlet Sea, but that gave a Lua error.
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Re: Weapon Special: Charm (Remaking the original)
Hm, I created a becharm special for strange legacy. But it works without a secondary filter. Maybe you should first try to make it work and than place special filters.
I'm not quite sure if time_of_day=chaotic works. I never filtered with chaotic (which seems to be the "alignment" of a unit not the time of day), but I always had problems with filtering and saving time_of_day for my encounters. Try to replace that.
You might also need to build a small testing campaign with one scenario, where you are able to recruit units with that special. That works fine for testing and saves time.
I'm not quite sure if time_of_day=chaotic works. I never filtered with chaotic (which seems to be the "alignment" of a unit not the time of day), but I always had problems with filtering and saving time_of_day for my encounters. Try to replace that.
You might also need to build a small testing campaign with one scenario, where you are able to recruit units with that special. That works fine for testing and saves time.
The future belongs to those, who believe in the beauty of their dreams.
Developer of: Trapped, Five Fates, Strange Legacy, Epical, UR Epic Era
Dungeonmasters of Wesnoth, Wild Peasants vs Devouring Corpses, Dwarf Dwarfson Dwarvenminer
Developer of: Trapped, Five Fates, Strange Legacy, Epical, UR Epic Era
Dungeonmasters of Wesnoth, Wild Peasants vs Devouring Corpses, Dwarf Dwarfson Dwarvenminer
Re: Weapon Special: Charm (Remaking the original)
You'd need to include this file in your main.cfg.Lord-Knightmare wrote:I also tried the one in Scarlet Sea, but that gave a Lua error.
Heindal wrote:I'm not quite sure if time_of_day=chaotic works. I never filtered with chaotic (which seems to be the "alignment" of a unit not the time of day), [...]
StandardLocationFilter wiki page wrote:time_of_day: filter matches only on a given time of day (one of lawful, chaotic, neutral or liminal). Note: chaotic, lawful, neutral and liminal; these are not times of day, these are alignments. To match against 'dawn', 'dusk', 'first watch' etc., use the time_of_day_id key described below.
Re: Weapon Special: Charm (Remaking the original)
Thanks 8680, maybe one should replace the link in the wiki, when clicking on "time_of_day". One will just land on that page:
http://wiki.wesnoth.org/ThemeWML#.5Bstatus.5D
http://wiki.wesnoth.org/ThemeWML#.5Bstatus.5D
The future belongs to those, who believe in the beauty of their dreams.
Developer of: Trapped, Five Fates, Strange Legacy, Epical, UR Epic Era
Dungeonmasters of Wesnoth, Wild Peasants vs Devouring Corpses, Dwarf Dwarfson Dwarvenminer
Developer of: Trapped, Five Fates, Strange Legacy, Epical, UR Epic Era
Dungeonmasters of Wesnoth, Wild Peasants vs Devouring Corpses, Dwarf Dwarfson Dwarvenminer
Re: Weapon Special: Charm (Remaking the original)
The sidebar is only for tags, as it says at the top. Attributes are documented under their tags, in this caseHeindal wrote:Thanks 8680, maybe one should replace the link in the wiki, when clicking on "time_of_day".
[filter_location]
.- Lord-Knightmare
- Discord Moderator
- Posts: 2359
- Joined: May 24th, 2010, 5:26 pm
- Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
- Contact:
Scenarios won't load.
I have recently tried to separate the episodes of my campaigns. I made sub-folders in the 'scenarios' folder and separated them. I have done the same for maps as well and edited my _main.cfg file to suit the new location. But, I have ran into a problem. The scenarios won't load. I looked at how the scenarios were separated in Legend Of Wesmere, and cloned that method, but still, no avail.
So, I'm attaching some screenshots:
1. What I first did: 2. After I saw how the scenarios in Legend of Wesmere were organized: I can always convert to the old method, but I want to organize my scenarios more...
So, I'm attaching some screenshots:
1. What I first did: 2. After I saw how the scenarios in Legend of Wesmere were organized: I can always convert to the old method, but I want to organize my scenarios more...
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Re: Scenarios won't load.
Not knowing how those two add-ons are supposed to interact, I'll make a wild guess that the symbol CAMPAIGN_TLB isn't set anywhere.
- Lord-Knightmare
- Discord Moderator
- Posts: 2359
- Joined: May 24th, 2010, 5:26 pm
- Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
- Contact:
Re: Scenarios won't load.
The add-ons mix together flawlessly.zookeeper wrote:Not knowing how those two add-ons are supposed to interact, I'll make a wild guess that the symbol CAMPAIGN_TLB isn't set anywhere.
Nope, I attached that in each campaign tag...
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Re: Scenarios won't load.
Firstly, don’t include images. Secondly, include scenarios after macros. I don’t know if fixing these will solve your problem, but they need fixing anyway.
- Lord-Knightmare
- Discord Moderator
- Posts: 2359
- Joined: May 24th, 2010, 5:26 pm
- Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
- Contact:
Re: Scenarios won't load.
Okay, having loaded the macros folder before the scenarios folder seems to have solved the problem. Thanks guys. I still can't figure out why I shouldn't load images. Campaign loads just fine with'em.8680 wrote:Firstly, don’t include images. Secondly, include scenarios after macros. I don’t know if fixing these will solve your problem, but they need fixing anyway.
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
- Lord-Knightmare
- Discord Moderator
- Posts: 2359
- Joined: May 24th, 2010, 5:26 pm
- Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
- Contact:
Help with Terrain Transitions (Again)
Okay, this is third time I have posted about terrain transitions.
I have copied/edited castle and keep terrains for use in my campaign, but I'm facing issues with transitions (especially adjacent mountains)
This what they appear like:
Terrain Types & Codes:
Can someone help me out here?
I have copied/edited castle and keep terrains for use in my campaign, but I'm facing issues with transitions (especially adjacent mountains)
This what they appear like:
Terrain Types & Codes:
Spoiler:
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Re: Help with Terrain Transitions (Again)
Have you tried increasing the layer?
Also, it is preferred that each member uses a single WML Workshop thread, rather than one thread per question, so I am merging this with your previous threads.
Also, it is preferred that each member uses a single WML Workshop thread, rather than one thread per question, so I am merging this with your previous threads.