quick questions regarding scenarios (SOLVED)

The place to post your WML questions and answers.

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.
Post Reply
Rhin
Posts: 29
Joined: January 25th, 2008, 9:28 pm
Location: Buenos Aires, Argentina

quick questions regarding scenarios (SOLVED)

Post by Rhin »

When using the tag:
[remove_shroud]
x, y=<x,y>
side=<side>
___________ <---- what is the key for radius? because "radius" does not work
[/remove_shroud]

Or it should be done tile per tile? (pretty anoying...)

Second question:

How do I transfer data from one stage to another, for example:

I need to know from 10 different units, which survived and which didn't, so I know which of them should appear in the next scenario.

Number 3:
How do I make the player to start with 0 gold, which is the key, tag or the thing between {.....} that dissalows the carryover of the gold to the next scenario (can't find it in the wiki)

Fourth and last:

Can I modify the type and/or experience of the campaign leader during a scenario or at the start of one (in the [event]name=start or prestart; or in the [side] tag)?

Also accepting suggestions to similiar options
Last edited by Rhin on February 14th, 2008, 1:49 am, edited 3 times in total.
User avatar
DDR
Posts: 558
Joined: March 23rd, 2007, 4:56 pm
Location: Vancouver, Canada
Contact:

mostly [clueless]

Post by DDR »

Shroud: Try "x,y=5-10,5-10"
That should give a removal range of five to ten, for both x and y. So, it does have to be done 'per tile'... but it is quick.

[clueless]

Use a variable for data transfer. If you don't clear it, it will stick around forever. [variable], I think. Look for it in the wiki...

I think you can somehow check if you have a unit ready for recall, but I do not know how. :(

Starting with 0 gold uses a [gold], I think. Is a simple command... (Or is that just to reward the player..? I know it is used in replays, too... Hmm... :?)

Modify the leader... You can do that... I do not know how... but it's easy...

[/clueless]
Rhin
Posts: 29
Joined: January 25th, 2008, 9:28 pm
Location: Buenos Aires, Argentina

Post by Rhin »

ooookay, that just leaves me with 3 problems then xD

I don't think variables are kept in memory forever...
I haven't seen the [gold] tag in the wiki
And I know there is a way to modify the leader, but I only got game crashes so far

=/
Rhin
Posts: 29
Joined: January 25th, 2008, 9:28 pm
Location: Buenos Aires, Argentina

Post by Rhin »

Still need help with this!

Anyone?
AI
Developer
Posts: 2396
Joined: January 31st, 2008, 8:38 pm

Post by AI »

[gold] gives gold, as in adds to the total. To change gold, you need to [modify_side] with a gold key.
http://www.wesnoth.org/wiki/DirectActionsWML

for checking the recall list, you can try [have_unit] with locations (-1,-1) (not sure if that will work, but that's where units are placed if you don't give them valid locations)

As for modifying the leader, the easiest way to do that is to store the important things (HP, XP) and then replace him with a new unit that does have the appropriate stats. (just drop a clone with some differences on his head)
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Post by zookeeper »

Check the documentation for [endlevel] and [modify_side]. Then find a place where MODIFY_UNIT is used to see how it can be used to modify something about a unit.
Rhin
Posts: 29
Joined: January 25th, 2008, 9:28 pm
Location: Buenos Aires, Argentina

Post by Rhin »

ok..... it wasn't easy after all...

But still, I need to know how to carry info from one scenario to the next one
User avatar
turin
Lord of the East
Posts: 11662
Joined: January 11th, 2004, 7:17 pm
Location: Texas
Contact:

Post by turin »

Variables are kept in memory forever. Simple as that.
For I am Turin Turambar - Master of Doom, by doom mastered. On permanent Wesbreak. Will not respond to private messages. Sorry!
And I hate stupid people.
The World of Orbivm
User avatar
appleide
Posts: 1003
Joined: November 8th, 2003, 10:03 pm
Location: Sydney,OZ

Post by appleide »

turin wrote:Variables are kept in memory forever. Simple as that.
I thought if [clear_variable]~~~[/clear_variable] is called the variables are gone? or is that not the case?
Why did the fish laugh? Because the sea weed.
User avatar
turin
Lord of the East
Posts: 11662
Joined: January 11th, 2004, 7:17 pm
Location: Texas
Contact:

Post by turin »

appleide wrote:I thought if [clear_variable]~~~[/clear_variable] is called the variables are gone? or is that not the case?
Well, yeah, that's true, but they never go away of their own accord. That was my point.
For I am Turin Turambar - Master of Doom, by doom mastered. On permanent Wesbreak. Will not respond to private messages. Sorry!
And I hate stupid people.
The World of Orbivm
Rhin
Posts: 29
Joined: January 25th, 2008, 9:28 pm
Location: Buenos Aires, Argentina

Post by Rhin »

Ok, then that will work. What would happen if I create 2 variables, on 2 different scenarios which are called the same, but i never cleared them, would the second one just overwrite the other? (it might prove usefull)
Rhuvaen
Inactive Developer
Posts: 1272
Joined: August 27th, 2004, 8:05 am
Location: Berlin, Germany

Post by Rhuvaen »

If you use the same name, it's the same variable. That's the whole point of variables, that you can access their contents again...
Rhin
Posts: 29
Joined: January 25th, 2008, 9:28 pm
Location: Buenos Aires, Argentina

Post by Rhin »

I know that I can modify the same one, but if I create a new with the same name, will it overwrite the content?
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Post by zookeeper »

Rhin wrote:I know that I can modify the same one, but if I create a new with the same name
Modifying a variable to have a new value and creating a new one are the same thing and are done in exactly the same manner. [set_variable] name=variablename value=valueofvariable [/set_variable].
Rhin
Posts: 29
Joined: January 25th, 2008, 9:28 pm
Location: Buenos Aires, Argentina

Post by Rhin »

Ok, that's what I needed to know, only one tag.
Thanks
Post Reply