In what ways may I filter by faction in wesnoth 1.10?
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.
- Col Lightbeam
- Posts: 46
- Joined: November 18th, 2008, 1:01 am
In what ways may I filter by faction in wesnoth 1.10?
I know you can:
Filter by can_recruit
Filter by Race
Filter by level
Filter by location
Filter by Char abilities like movement, hp, attacks, XP...
Filter by gold
Now I saw, XP era (and I like it) and I thought- what if I want to make an XP faction using units of the other factions? I want to be able to try XP versus an army controllable by others and XP versus a controllable unit of a higher level. Now, If i combine XP with Ageless Era, you can see why creating new units specifically for XP faction would be a pain, to put it lightly.
If this is simply done in 1.10 I can think of a few others I would like to try to create Faction Specific menus for:
Raiding Orcs: Orc Movement Menu
Civ Celestial: Civ Prayer Menu
War Celestial: War Prayer Menu
Super Celestial: Super Prayer Menu (Think Civ + War)
Hoarding Dragons: Village Looting
Civ Demons: Civ Demonic Pacts (and negatives not controlled by player like chance of changing sides and losing resources)
War Demons: War Demonic Pacts (and negatives not controlled by player like chance of changing sides)
Civ Dwarves: Mining
Elves: Forest Menus (one of which I will do by specific unit, becuase I know I can and I want it to specific units.)
Undead Army: Corpseraising
Night Vampires: Vampiric Night strikes
Greater Trolls: Troll Growth
Hmmm. Should I do Lycanthrope Moon Powers, Biting?
Any ideas on how to make specific factions able to be identified by show_if?
By the way, If anyone wants a hand at any of these, be my guest. Just let me know please. I would like to see what others come up with.
Filter by can_recruit
Filter by Race
Filter by level
Filter by location
Filter by Char abilities like movement, hp, attacks, XP...
Filter by gold
Now I saw, XP era (and I like it) and I thought- what if I want to make an XP faction using units of the other factions? I want to be able to try XP versus an army controllable by others and XP versus a controllable unit of a higher level. Now, If i combine XP with Ageless Era, you can see why creating new units specifically for XP faction would be a pain, to put it lightly.
If this is simply done in 1.10 I can think of a few others I would like to try to create Faction Specific menus for:
Raiding Orcs: Orc Movement Menu
Civ Celestial: Civ Prayer Menu
War Celestial: War Prayer Menu
Super Celestial: Super Prayer Menu (Think Civ + War)
Hoarding Dragons: Village Looting
Civ Demons: Civ Demonic Pacts (and negatives not controlled by player like chance of changing sides and losing resources)
War Demons: War Demonic Pacts (and negatives not controlled by player like chance of changing sides)
Civ Dwarves: Mining
Elves: Forest Menus (one of which I will do by specific unit, becuase I know I can and I want it to specific units.)
Undead Army: Corpseraising
Night Vampires: Vampiric Night strikes
Greater Trolls: Troll Growth
Hmmm. Should I do Lycanthrope Moon Powers, Biting?
Any ideas on how to make specific factions able to be identified by show_if?
By the way, If anyone wants a hand at any of these, be my guest. Just let me know please. I would like to see what others come up with.
Re: In what ways may I filter by faction in wesnoth 1.10?
If I understand you correctly, you basically want to be able to make an era in which the user has special options from right click menus, depending what faction they got, so there are custom special abilities for the factions.
There is a mainline map called 2p - Hornshark Island (by Doc Paterson) which detects what faction the user has and gives them special units at the start of the game which are different for each faction. Anonymissimus wrote the faction detection routine iirc -- bascially you will just compare the side leader's "recruit" attribute with the possibilities for the different factions. You can then set a WML variable to indicate the faction for each side and use that for "show_if" I think. Anyways have a look at the Hornshark .cfg file, it might help you.
In 1.12 you might be able to generalize this somewhat, because you will be able to load the entire table for the current era into lua. So if the era is nice you can probably figure out exactly which faction was obtained this way, and make your idea into a modification which could be used with any era.
There is a mainline map called 2p - Hornshark Island (by Doc Paterson) which detects what faction the user has and gives them special units at the start of the game which are different for each faction. Anonymissimus wrote the faction detection routine iirc -- bascially you will just compare the side leader's "recruit" attribute with the possibilities for the different factions. You can then set a WML variable to indicate the faction for each side and use that for "show_if" I think. Anyways have a look at the Hornshark .cfg file, it might help you.
In 1.12 you might be able to generalize this somewhat, because you will be able to load the entire table for the current era into lua. So if the era is nice you can probably figure out exactly which faction was obtained this way, and make your idea into a modification which could be used with any era.
- Col Lightbeam
- Posts: 46
- Joined: November 18th, 2008, 1:01 am
Re: In what ways may I filter by faction in wesnoth 1.10?
Thank you for letting me know. So, now I need to practice merging lua and wml, unless anyone will think of a wml way to solve the problem. Don't get me wrong, it IS a solution, and I appreciate it. Thank you.
However, I have run into a problem with Hornshark Island:
Lua file says during gameplay: <eof> expected around end, pointing to an "end" that is the last line of a defined function but just before I have it run that function. I am troubleshooting this, but suggestions would be helpful.
However, I have run into a problem with Hornshark Island:
Lua file says during gameplay: <eof> expected around end, pointing to an "end" that is the last line of a defined function but just before I have it run that function. I am troubleshooting this, but suggestions would be helpful.