Rotate Area WML not working on 1.14.x
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.
- Lord-Knightmare
- Discord Moderator
- Posts: 2364
- Joined: May 24th, 2010, 5:26 pm
- Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
- Contact:
Rotate Area WML not working on 1.14.x
This has been bugging me since I was working on HoI1 back when Wesnoth 1.12 was the latest (stable) release. I was fascinated by the Rotating Area LUA introduced in The Devil's Flute and wanted to include it in my campaign but it doesn't work as intended in Wesnoth 1.14.x
Results of applying the macro:
1. Intended effect is achieved but,
2. Map becomes Invalid, and
3. All save files (autosaves, manual saves, etc) are shown as corrupted after the area rotates.
I have tried to fix this myself several times, but the only results I got was headaches
Hence, my posting the entire codes here, hoping that someone could shed some light as to why this is going wrong.
Results of applying the macro:
1. Intended effect is achieved but,
2. Map becomes Invalid, and
3. All save files (autosaves, manual saves, etc) are shown as corrupted after the area rotates.
I have tried to fix this myself several times, but the only results I got was headaches
Hence, my posting the entire codes here, hoping that someone could shed some light as to why this is going wrong.
rotate-area.lua file:
#defines for this to work:
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: Rotate Area WML not working on 1.14.x
[scenario][lua] is not documented at least. Normally you would include it in preload.
> move_units=true
Better to write "yes", then Lua receives it as boolean instead of string. I think 1.8 is last wesnoth version where using true/false in WML was supported.
> move_units=true
Better to write "yes", then Lua receives it as boolean instead of string. I think 1.8 is last wesnoth version where using true/false in WML was supported.
- Lord-Knightmare
- Discord Moderator
- Posts: 2364
- 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: Rotate Area WML not working on 1.14.x
Can you please elaborate on this? Perhaps with an example code segment of sorts? Is there a[scenario][lua] is not documented at least. Normally you would include it in preload.
[preload][/preload]
WML tag that I am not aware of?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
- Pentarctagon
- Project Manager
- Posts: 5564
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: Rotate Area WML not working on 1.14.x
It's an event: https://wiki.wesnoth.org/EventWML#preload
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
take one down, patch it around
-2,147,483,648 little bugs in the code
Re: Rotate Area WML not working on 1.14.x
[scenario][lua] is documented at the luawml wiki page and it is actually reccomened _not_ to use preload events to load Lua because some things like defining custom effects, only work properly from [Lua] in scenario and not when loading Lua in preload.
For the actual issue, I think you asked this already, and I told you already there is at least one bug not in your Lua code but the the wml macro that uses it.
For the actual issue, I think you asked this already, and I told you already there is at least one bug not in your Lua code but the the wml macro that uses it.
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
Re: Rotate Area WML not working on 1.14.x
I mean that [lua] is not supported in [scenario] https://wiki.wesnoth.org/ScenarioWML
Re: Rotate Area WML not working on 1.14.x
But it is, the second sentence in https://wiki.wesnoth.org/LuaWML says that. if the scenariowml page does not mention it then, it's just missing there.
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
- Lord-Knightmare
- Discord Moderator
- Posts: 2364
- 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: Rotate Area WML not working on 1.14.x
I did this rectification in the code and this was the result: Am I missing some other correction that I am supposed to make?> move_units=true
Better to write "yes", then Lua receives it as boolean instead of string. I think 1.8 is last wesnoth version where using true/false in WML was supported.
Off-Topic:
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: Rotate Area WML not working on 1.14.x
which wesnoth version are you using for testing ?
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
- Lord-Knightmare
- Discord Moderator
- Posts: 2364
- 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: Rotate Area WML not working on 1.14.x
1.14.5
Edit: Not possible to generate save files anymore. Keeps spamming that error message.
Edit: Not possible to generate save files anymore. Keeps spamming that error message.
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: Rotate Area WML not working on 1.14.x
ok what i said lat time viewtopic.php?f=8&t=43290&start=15#p591503 still holds.
Furthermore it seems like tagnames do no longer allow underscrores as first caracter (__RA_stored_units in your lua code)
Furthermore it seems like tagnames do no longer allow underscrores as first caracter (__RA_stored_units in your lua code)
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
- Lord-Knightmare
- Discord Moderator
- Posts: 2364
- 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: Rotate Area WML not working on 1.14.x
So, I edit all of those variable names with underscores into something else?Furthermore it seems like tagnames do no longer allow underscrores as first caracter (__RA_stored_units in your lua code)
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: Rotate Area WML not working on 1.14.x
yes
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.