[remove_shroud] and [terrain] question
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: Firing event all x turns
To make it fire every 2 turns do this (it is analogous for other periods):
Name the event 'even turn start' (or something similar, but think of the changes it would require in the code I am adding), use first_time_only=no, and put this event into the scenario:
You can place your code that should execute every second turn into the contents of the [then] tag as well if you want.
Name the event 'even turn start' (or something similar, but think of the changes it would require in the code I am adding), use first_time_only=no, and put this event into the scenario:
Code: Select all
[event]
name=new turn
first_time_only=no
{VARIABLE remain $turn_number}
{VARIABLE_OP remain modulo 2} #you can change the number 2 to something else to change frequency
[if]
[variable]
name=remain
equals=0
[/variable]
[then]
[fire_event]
name=even turn start #change this if you're naming your event differently!
[/fire_event]
[/then]
[/if]
{CLEAR_VARIABLE remain}
[/event]
- Paulomat4
- Moderator Emeritus
- Posts: 730
- Joined: October 16th, 2012, 3:32 pm
- Location: Wesmere library, probably summoning Zhangor
Re: Firing event all x turns
thx, that works
what does this macro mean?
what does this macro
Code: Select all
{VARIABLE_OP remain modulo 2}
Creator of Dawn of Thunder and Global Unitmarkers
"I thought Naga's used semi-automatic crossbows with incendiary thermite arrows . . . my beliefs that this race is awesome are now shattered." - Evil Earl
"I thought Naga's used semi-automatic crossbows with incendiary thermite arrows . . . my beliefs that this race is awesome are now shattered." - Evil Earl
Re: Firing event all x turns
It's a shortcut for:
It just returns the remain of division by 2, so the result is 1 if the number is odd and 0 if it is even.
Code: Select all
[set_variable]
name=remain
modulo=2
[/set_variable]
- Paulomat4
- Moderator Emeritus
- Posts: 730
- Joined: October 16th, 2012, 3:32 pm
- Location: Wesmere library, probably summoning Zhangor
Forcing an advancement
I'm back at working on my campaign. This time i'd like to force an elvish fighter to advance to an elvish hero. How would I do this?
Creator of Dawn of Thunder and Global Unitmarkers
"I thought Naga's used semi-automatic crossbows with incendiary thermite arrows . . . my beliefs that this race is awesome are now shattered." - Evil Earl
"I thought Naga's used semi-automatic crossbows with incendiary thermite arrows . . . my beliefs that this race is awesome are now shattered." - Evil Earl
- James_The_Invisible
- Posts: 534
- Joined: October 28th, 2012, 1:58 pm
- Location: Somewhere in the Northlands, fighting dark forces
- Contact:
Re: Forcing an advancement
Some time ago, I wanted to do exactly this thing. I have found one solution in WML. I stored the unit into a variable, set its attribut advances_to to Elvish Hero and then unstored the unit. An example:
Code: Select all
[store_unit]
[filter]
id=elf1
[/filter]
variable=temp_store
[/store_unit]
{VARIABLE temp_store.advances_to (Elvish Hero)}
[unstore_unit]
variable=temp_store
find_vacant=no
[/unstore_unit]
{CLEAR_VARIABLE temp_store}
My content: For Power series
Ports: Danse Macabre Story of the Wose
Guides: How to translate your UMC
Ports: Danse Macabre Story of the Wose
Guides: How to translate your UMC
- Paulomat4
- Moderator Emeritus
- Posts: 730
- Joined: October 16th, 2012, 3:32 pm
- Location: Wesmere library, probably summoning Zhangor
Re: Forcing an advancement
Thanks. that worked. The example code was not needed, i found it out myself.
Creator of Dawn of Thunder and Global Unitmarkers
"I thought Naga's used semi-automatic crossbows with incendiary thermite arrows . . . my beliefs that this race is awesome are now shattered." - Evil Earl
"I thought Naga's used semi-automatic crossbows with incendiary thermite arrows . . . my beliefs that this race is awesome are now shattered." - Evil Earl
- James_The_Invisible
- Posts: 534
- Joined: October 28th, 2012, 1:58 pm
- Location: Somewhere in the Northlands, fighting dark forces
- Contact:
Re: Forcing an advancement
I expected you to know it. It was rather meant for people who could have the same problem in the future and was not sure how to write it in WML.
My content: For Power series
Ports: Danse Macabre Story of the Wose
Guides: How to translate your UMC
Ports: Danse Macabre Story of the Wose
Guides: How to translate your UMC
- Paulomat4
- Moderator Emeritus
- Posts: 730
- Joined: October 16th, 2012, 3:32 pm
- Location: Wesmere library, probably summoning Zhangor
wesnoth closing itself during loading
Hey, while testing my add-on wesnoth suddenly closed itself during loading of a save, without giving an error message. the stderr.txt file says the following:
I have removed everything I newly added, but can not locate the error. Even excluding the entire scenario I was working on did not help.
preinstalleed campaigns as httt work fine.
Any ideas?
Code: Select all
Ran out of memory. Aborted.
preinstalleed campaigns as httt work fine.
Any ideas?
Creator of Dawn of Thunder and Global Unitmarkers
"I thought Naga's used semi-automatic crossbows with incendiary thermite arrows . . . my beliefs that this race is awesome are now shattered." - Evil Earl
"I thought Naga's used semi-automatic crossbows with incendiary thermite arrows . . . my beliefs that this race is awesome are now shattered." - Evil Earl
Re: wesnoth closing itself during loading
Did you try restarting your system / closing all other programs that are open?
That message is only given one place in the code, right here: https://github.com/wesnoth/wesnoth/blob ... e.cpp#L732
It can only happen when wesnoth asks your operating system for memory and it won't give it: http://www.cplusplus.com/reference/new/bad_alloc/
If you think that it must be the wesnoth engine doing something inefficient and taking all the memory, then you can provide us a backtrace and we can take a look. http://forums.wesnoth.org/viewtopic.php?f=4&t=16163
Edit: You might be able to do something with command line flags to control how much memory wesnoth gets, as a workaround? I don't remember off hand.
That message is only given one place in the code, right here: https://github.com/wesnoth/wesnoth/blob ... e.cpp#L732
It can only happen when wesnoth asks your operating system for memory and it won't give it: http://www.cplusplus.com/reference/new/bad_alloc/
If you think that it must be the wesnoth engine doing something inefficient and taking all the memory, then you can provide us a backtrace and we can take a look. http://forums.wesnoth.org/viewtopic.php?f=4&t=16163
Edit: You might be able to do something with command line flags to control how much memory wesnoth gets, as a workaround? I don't remember off hand.
- Paulomat4
- Moderator Emeritus
- Posts: 730
- Joined: October 16th, 2012, 3:32 pm
- Location: Wesmere library, probably summoning Zhangor
Re: wesnoth closing itself during loading
Yes, both didn't helped. Also I mostly only have my browser opened and notepad++Did you try restarting your system / closing all other programs that are open?
Unfortunately I'm running windows on the standard build.If you think that it must be the wesnoth engine doing something inefficient and taking all the memory, then you can provide us a backtrace and we can take a look. viewtopic.php?f=4&t=16163
I have no idea how to do thisEdit: You might be able to do something with command line flags to control how much memory wesnoth gets, as a workaround? I don't remember off hand.
Creator of Dawn of Thunder and Global Unitmarkers
"I thought Naga's used semi-automatic crossbows with incendiary thermite arrows . . . my beliefs that this race is awesome are now shattered." - Evil Earl
"I thought Naga's used semi-automatic crossbows with incendiary thermite arrows . . . my beliefs that this race is awesome are now shattered." - Evil Earl
Re: wesnoth closing itself during loading
Hmm I looked at the command line flags, (wesnoth --help), but I didn't see anything about memory so I must be confused with another game or program.
Do you know about this bug? https://gna.org/bugs/?20126
Are you accidentally doing infinitely recursive macros somehow?
Idk what other help I can offer, sorry. Maybe someone else knows other things to watch out for.
Do you know about this bug? https://gna.org/bugs/?20126
Are you accidentally doing infinitely recursive macros somehow?
Idk what other help I can offer, sorry. Maybe someone else knows other things to watch out for.
- Paulomat4
- Moderator Emeritus
- Posts: 730
- Joined: October 16th, 2012, 3:32 pm
- Location: Wesmere library, probably summoning Zhangor
Re: wesnoth closing itself during loading
I don't have a gna account right now, and unfortunaly don't have time to create one right now, but i'll look at this as soon as possible.Do you know about this bug? https://gna.org/bugs/?20126
What would that be for macros? The part I was currently writing used a lot of macros (though easy ones as variable changing).Are you accidentally doing infinitely recursive macros somehow?
But i removed that part again, and it's still not working.
today I retried again, and this is the current output in the stderr.txt:
20140415 13:01:37 error general: Unbekanntes Szenario: '01_the_outpost'
Which of course doesn't tell us much.
EDIT: well, I can't even create agna account, since I have no idea what the answer to this question is supposed to be.
"What VCS has its name inspired from a British slang/insult?"
I'm neither british, nor do I know anything about VCS (and googling it didn't helped)
So, non-british people are considered Spam now ?
Creator of Dawn of Thunder and Global Unitmarkers
"I thought Naga's used semi-automatic crossbows with incendiary thermite arrows . . . my beliefs that this race is awesome are now shattered." - Evil Earl
"I thought Naga's used semi-automatic crossbows with incendiary thermite arrows . . . my beliefs that this race is awesome are now shattered." - Evil Earl
Re: wesnoth closing itself during loading
The answer to the question is "git", tbh I had no idea even though I should have and had to make a few guesses
You shouldn't need to register for gna to just look at the list of bugs, its only to report bugs.
Anyways I guess we are hoping to move to a better bug tracker like redmine... Idk what the status is on that project though.
http://wiki.wesnoth.org/WesnothGIT#Bug_tracker
You shouldn't need to register for gna to just look at the list of bugs, its only to report bugs.
Anyways I guess we are hoping to move to a better bug tracker like redmine... Idk what the status is on that project though.
http://wiki.wesnoth.org/WesnothGIT#Bug_tracker
Re: wesnoth closing itself during loading
can you attach the save game?
increasing the debug output might help to get an idea what's going on:
http://forums.wesnoth.org/viewtopic.php ... 26#p564352
increasing the debug output might help to get an idea what's going on:
http://forums.wesnoth.org/viewtopic.php ... 26#p564352
- Paulomat4
- Moderator Emeritus
- Posts: 730
- Joined: October 16th, 2012, 3:32 pm
- Location: Wesmere library, probably summoning Zhangor
Re: wesnoth closing itself during loading
this bug is independent from savegames. It also happens if you start the campaign from the mmapaign dialogue.can you attach the save game?
I reinstalled wesnoth, to see if something was wrong with it. But, as said, the bug also happens if you start the campaign from the beginning. So, i'm attaching my add-on (with images removed). Just starting it from the beginning should produce the bug;
I didn't get that to work. my path to wesnoth in the shortcut is:increasing the debug output might help to get an idea what's going on:
viewtopic.php?f=4&t=39726#p564352
Code: Select all
"C:\Users\Raymond\Documents\My Games\wesnoth 1.11.12\wesnoth.exe"
Got an account, but "the item is private". I still can't see it.The answer to the question is "git", tbh I had no idea even though I should have and had to make a few guesses
Anyways I guess we are hoping to move to a better bug tracker like redmine... Idk what the status is on that project though.
http://wiki.wesnoth.org/WesnothGIT#Bug_tracker
Creator of Dawn of Thunder and Global Unitmarkers
"I thought Naga's used semi-automatic crossbows with incendiary thermite arrows . . . my beliefs that this race is awesome are now shattered." - Evil Earl
"I thought Naga's used semi-automatic crossbows with incendiary thermite arrows . . . my beliefs that this race is awesome are now shattered." - Evil Earl