Option limit?
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: Option limit?
Ageless changelog viewing is implemented mostly in Lua - https://github.com/ProditorMagnus/Agele ... gelogs.lua - options are all changelog versions there. In this case I hardcoded list of options, but you can also dynamically generate it with table.insert.
Using Lua in that way requires at least some understanding of WML stored in Lua - https://wiki.wesnoth.org/LuaWML#Encodin ... Lua_tables
But the options action can be just T.fire_event - which lets you switch back to event implemented in WML.
Using Lua in that way requires at least some understanding of WML stored in Lua - https://wiki.wesnoth.org/LuaWML#Encodin ... Lua_tables
But the options action can be just T.fire_event - which lets you switch back to event implemented in WML.
- lhybrideur
- Posts: 369
- Joined: July 9th, 2019, 1:46 pm
Re: Option limit?
The latterLordAwsomeness wrote: ↑March 4th, 2020, 1:43 pmThank you for the suggestion. I'll definitely download it and see what I think after I get off of work today. Are you suggesting it because you have seen my current inventory system or just because you see that I have an inventory and weapon swapping system?lhybrideur wrote: ↑March 4th, 2020, 12:30 pm BTW, you should take a look at LotI item management system.
I modified it for my add-on (Legens of Idaamub), so maybe you can modify it too for your purpose.
-
- Double Style Tourney #1 Champ
- Posts: 121
- Joined: November 26th, 2009, 5:46 am
- Location: Egypt
Re: Option limit?
Hello, Can you clarify what's Lotl, and where to find it?lhybrideur wrote: ↑March 4th, 2020, 12:30 pm BTW, you should take a look at LotI item management system.
I modified it for my add-on (Legens of Idaamub), so maybe you can modify it too for your purpose.
Edit: found it, legend of the Invincibles.
Ports: Velensk's tower defense, dov's deep shrine, Scrolling survival, Scrolling survival Co-op, Temples of the nagas.
Addons: Tower defense maps , some ANL scenarios like: ANL 3p "A New Land" survival type, and ANL Co-operative map for 2p
Addons: Tower defense maps , some ANL scenarios like: ANL 3p "A New Land" survival type, and ANL Co-operative map for 2p
-
- Double Style Tourney #1 Champ
- Posts: 121
- Joined: November 26th, 2009, 5:46 am
- Location: Egypt
Re: Option limit?
After seeing equip_macros.txt,
Can u reduce number of macros by using [case] switch for every group of weapons?
Can u reduce number of macros by using [case] switch for every group of weapons?
Ports: Velensk's tower defense, dov's deep shrine, Scrolling survival, Scrolling survival Co-op, Temples of the nagas.
Addons: Tower defense maps , some ANL scenarios like: ANL 3p "A New Land" survival type, and ANL Co-operative map for 2p
Addons: Tower defense maps , some ANL scenarios like: ANL 3p "A New Land" survival type, and ANL Co-operative map for 2p
- LordAwsomeness
- Posts: 203
- Joined: August 12th, 2013, 2:20 pm
- Location: U.S.A.
Re: Option limit?
probably, however ive never tried [case] and switch so I would have to figure that out.
EDIT:
I would like to use [case] and [switch] for equip_macros.cfg however I dont think it's possibly since it doesn't accept Boolean variables. Boolean variables is a huge part of how I have coded the weapon switching to work :/
- Been playing Wesnoth since 2004 and the 1.0.x versions.
- Creator of Undead Invasion MP Scenario Pack.
- Creator of Valeria MP Adventure
- Creator of LA_RPG ERA
- Creator of Undead Invasion MP Scenario Pack.
- Creator of Valeria MP Adventure
- Creator of LA_RPG ERA
Re: Option limit?
I changed yes/no to ORM_bool_true as workaround for that some years ago.
- lhybrideur
- Posts: 369
- Joined: July 9th, 2019, 1:46 pm
Re: Option limit?
I personally directly use 0 as false and 1 as true most of the time.