Search found 500 matches

by SigurdFireDragon
February 28th, 2011, 3:18 am
Forum: Lua Labs
Topic: loading WML from a file into a table
Replies: 7
Views: 2125

loading WML from a file into a table

for my campaign I decided it would be useful if I could read the faction files in {multiplayer/factions} and put the contents of a [multiplayer_side] tag into a lua table, and then send the contents of some of the keys into wesnoth variables. currently, I tried the following inside a WML [event]: [s...
by SigurdFireDragon
February 24th, 2011, 5:55 am
Forum: WML Workshop
Topic: Counting event difficulties
Replies: 3
Views: 616

Re: Counting event difficulties

Code: Select all

[set_variable]
     name=units_slain
     add=1
[/set_variable]
just a change of 'variable=units_slain' to 'name=units_slain' should do it.
Also you could use the macro VARIABLE_OP as follows instead of the above:
{VARIABLE_OP units_slain add 1}
by SigurdFireDragon
February 10th, 2011, 4:27 pm
Forum: WML Workshop
Topic: [terrain] & [filter_location]
Replies: 5
Views: 583

Re: [terrain] & [filter_location]

Thanks Sapient, that worked. Is there a way to do it under 1.8 without a SLF? What was unclear about my wiki docs btw: This StandardLocationFilter's terrain= key is used for the new terrain, filtering by terrain can be done with a nested StandardLocationFilter: [and]terrain=terrain_string_to_be_filt...
by SigurdFireDragon
February 10th, 2011, 5:09 am
Forum: WML Workshop
Topic: [terrain] & [filter_location]
Replies: 5
Views: 583

[terrain] & [filter_location]

[terrain] Changes the terrain on the map. terrain: the character of the terrain to use. See TerrainCodesWML to see what letter a type of terrain uses. x,y: the position (or range of positions) to change. (Version 1.9 and later only) : [terrain] accepts a StandardLocationFilter. This StandardLocatio...
by SigurdFireDragon
February 8th, 2011, 5:09 pm
Forum: WML Workshop
Topic: Using Insert Tag in Generator
Replies: 12
Views: 1422

Re: Using Insert Tag in Generator

Did you even look at the link I provided to Rhuvaen's work? I did, but judging by the above, I must have missed something, so I looked again. I think I might still be missing it. with regards to using [terrain] & [terrian_mask] it's just not clicking how I could use that to make the maps I want, ea...
by SigurdFireDragon
February 7th, 2011, 4:14 pm
Forum: WML Workshop
Topic: Using Insert Tag in Generator
Replies: 12
Views: 1422

Re: Using Insert Tag in Generator

You may be out of luck for using variables in the generator parameters, but you can still use some WML magic to apply terrain masks after the map is generated. If you want to get really fancy you can do the entire map generation process with WML (or Lua). Thinking about this, for what I'm looking t...
by SigurdFireDragon
February 2nd, 2011, 6:12 am
Forum: WML Workshop
Topic: Using Insert Tag in Generator
Replies: 12
Views: 1422

Re: Using Insert Tag in Generator

If you dig into the code that the macros expand to, you may be able to store the values that you want in variables in the victory event of the previous scenario, and load them using $ notation in the [generator] block. You'd have to create a combo generator block that can switch between the two by ...
by SigurdFireDragon
January 28th, 2011, 9:19 pm
Forum: Scenario & Campaign Development
Topic: Random Campaign 1.3.5 for Wesnoth 1.14
Replies: 37
Views: 15948

Re: Random Campaign 0.6.0b (1.8 & 1.9 SP) Play your faction!

Random Campaign 0.6.0b has been released. Now available for 1.8!! 3 Scenario AOH path available, which starts at map 4 Icons for leader selection menu has been added. The next version will feature more map randomness, as well as have the groundwork for random dialogue & story. If you are one of the ...
by SigurdFireDragon
January 27th, 2011, 2:10 am
Forum: WML Workshop
Topic: Using Insert Tag in Generator
Replies: 12
Views: 1422

Using Insert Tag in Generator

Can [insert_tag] be used inside a [generator] tag to inject a custom macro? & how would that be set up?

I want to be able to set a variable to determine if {RANDOM_MAP_NORMAL 20 20 6 2} or {RANDOM_MAP_DESERT 20 20 6 2} is inserted.
by SigurdFireDragon
January 26th, 2011, 4:13 am
Forum: Scenario & Campaign Development
Topic: Random Campaign 1.3.5 for Wesnoth 1.14
Replies: 37
Views: 15948

Re: Random Campaign 0.5.0a (1.9 SP Campaign)

[scenario] doesn't like switches at the toplevel, so this is how I had to rearrange it for it to work for testing [story] [switch] variable=faction [case] value=loyalist [part] story= _ "Foo" [/part] [/case] [else] [part] story= _ "Bar" [/part] [/else] [/switch] [/story] I do plan on adding story, b...
by SigurdFireDragon
January 25th, 2011, 6:14 pm
Forum: Scenario & Campaign Development
Topic: Random Campaign 1.3.5 for Wesnoth 1.14
Replies: 37
Views: 15948

Re: Random Campaign 0.5.0a (1.9 SP Campaign)

Shoot, missed that. Updated to 0.5.0a. Should now be 6 scenarios.
by SigurdFireDragon
January 25th, 2011, 5:11 pm
Forum: Ideas
Topic: [UMC] Random Campaign generator
Replies: 10
Views: 2475

Re: [UMC] Random Campaign generator

Had this idea on my own a 3-4 weeks back, saw this thread & seen that it hadn't been done, & checked out World Conquest. WC, while interesting, was not quite what I was looking for. Mystery Campaign, I haven't checked out since it was for way back in 1.2; so I went and wrote a campaign. Random Campa...
by SigurdFireDragon
January 25th, 2011, 5:02 pm
Forum: Scenario & Campaign Development
Topic: Random Campaign 1.3.5 for Wesnoth 1.14
Replies: 37
Views: 15948

Random Campaign 1.3.5 for Wesnoth 1.14

This is the thread for my first add-on, Random Campaign. For 1.14, the current version is 1.3.5 for Wesnoth 1.13.12 and up. For 1.12, the current version is 1.2.2 for Wesnoth 1.11/12. Wesnoth 1.11.15 or greater is required. Description for Wesnoth 1.14 Select an era, choose your faction, and lead it...
by SigurdFireDragon
January 20th, 2011, 3:39 am
Forum: WML Workshop
Topic: Listbox menu in a Campaign? (Split & Option)
Replies: 8
Views: 1447

Re: Listbox menu in a Campaign? (Split & Option)

Thanks for posting that Sapient, would have taken forever for me to figure out the nuances in using split, insert_tag & option on my own.
by SigurdFireDragon
January 17th, 2011, 3:15 am
Forum: WML Workshop
Topic: Listbox menu in a Campaign? (Split & Option)
Replies: 8
Views: 1447

Re: Listbox menu in a Campaign?

Thanks everyone, with your help it finally clicked how I can get those 9 pages of 4-8 options each written automatically when needed. Here's the code I went with: [a Switch sets contents of Text_List] [set_variables] name=Text_Array [split] list=$Text_List key=x separator=, remove_empty=no [/split] ...