Wilderlands Style?
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.
- Ryuuzaki52
- Posts: 34
- Joined: November 25th, 2010, 8:24 pm
Wilderlands Style?
So I've been working on a map like Wilderlands...I have NO experience in WML at all. I mean I've tried really hard to get the map stuff, I just can't x.x. Would someone mind helping me out with like, a template? I'm just doing two players that start at a certain position, and I want monsters throughout the island...It'd be cool if someone could tell me how to make the leader switch between them too :\
Re: Wilderlands Style?
What I suggest: Copy the Wilderlands scenario file (from "data/multiplayer/scenarios" in your Wesnoth install directory) - that's your template. Add/remove sides as needed, but keep the monster side as side 5 to make things easy (that means you have to have at least 5 sides, including that one - although you can always stick "allow_player=no" and "no_leader=yes" on sides 3 and 4 if you really want only 2 sides). Then look at all of the lines like this:
All that you need to change there are the two numbers (X and Y coordinates) and the last bit - which is either the undead_variation (for WALKING_CORPSE and SOULLESS) or the type (for UNIT). Make as many lines like that as you like, but keep them in that same section. Note that the ones that you list first will be chosen as leaders before those that you list later.
Finally, go to this line:
Change the two numbers to the X and Y coordinates of the first unit that you listed (the first leader for side 5).
Of course you'll also want to change the id, name, description and map_data lines.
If you want to know more specifics, the part that does the actual work of making the leader switch is the event at the bottom, that starts with:
and ends with:
The event right above it ("prestart") changes side 5 into a monsters-only side, and creates the monsters by triggering that stuff that's above the "[multiplayer]" line.
Code: Select all
{MPWILD_WALKING_CORPSE 20 14 saurian}
{MPWILD_SOULLESS 23 15 saurian}
{MPWILD_UNIT 46 24 (Wolf)}
Finally, go to this line:
Code: Select all
{MODIFY_UNIT x,y=38,36 canrecruit yes}
Of course you'll also want to change the id, name, description and map_data lines.
If you want to know more specifics, the part that does the actual work of making the leader switch is the event at the bottom, that starts with:
Code: Select all
[event]
name=die
Code: Select all
[/event]
You are a Dark Adept: you dimmerse yourself in the dark arts...potentially with great rewards....
-JW's personality quiz
-JW's personality quiz
- Ryuuzaki52
- Posts: 34
- Joined: November 25th, 2010, 8:24 pm
Re: Wilderlands Style?
Problem is, I can't find that folder :< All I have is Add-Ons...Is it because I'm running Mac?
Nevermind! I got it Thank you VERY much! Does it need converted back to .cfg or is .txt fine? If so, how do I convert it back? o.o
Nevermind! I got it Thank you VERY much! Does it need converted back to .cfg or is .txt fine? If so, how do I convert it back? o.o
Re: Wilderlands Style?
If it is really a plain text file (not rtf or something, which some Mac text editors produce if you are not careful), just change the file name to ".cfg" (in the file manager).
(For all who still don't know where to find the files: EditingWesnoth - the Wilderlands original file is in the "game data" directory, the copied (and renamed) one should be in a new directory in your addon-folder.)
(For all who still don't know where to find the files: EditingWesnoth - the Wilderlands original file is in the "game data" directory, the copied (and renamed) one should be in a new directory in your addon-folder.)
- Ryuuzaki52
- Posts: 34
- Joined: November 25th, 2010, 8:24 pm
Re: Wilderlands Style?
Alright, so here's my script:
It keeps giving me an error about "Expecting 5 arguments but only finding 3"...What'd I do wrong?
EDIT: Nevermind! I fixed it! Thank you all very much for you help!
Code: Select all
#textdomain wesnoth-multiplayer
#define MPWILD_UNIT X Y TYPE
[unit]
type={TYPE}
side=5
x={X}
y={Y}
random_traits=no
[/unit]
#enddef
#define MPWILD_WALKING_CORPSE X Y VARIATION_NAME
[unit]
type=Walking Corpse
side=5
x={X}
y={Y}
variation={VARIATION_NAME}
#random_traits=no
[/unit]
#enddef
#define MPWILD_SOULLESS X Y VARIATION_NAME
[unit]
type=Soulless
side=5
x={X}
y={Y}
variation={VARIATION_NAME}
#random_traits=no
[/unit]
#enddef
[multiplayer]
id=multiplayer_The_Journey
name= _ "5p — The Journey"
description= _ "A Journey"
map_data="{~add-ons/The_Journey}"
{DEFAULT_SCHEDULE}
{DEFAULT_MUSIC_PLAYLIST}
[side]
[ai]
villages_per_scout=16
[/ai]
side=1
canrecruit=yes
controller=human
village_gold=2
fog=yes
[/side]
[side]
[ai]
villages_per_scout=16
[/ai]
side=2
canrecruit=yes
controller=human
village_gold=2
fog=yes
[/side]
[side]
[ai]
villages_per_scout=16
[/ai]
side=3
canrecruit=yes
controller=human
village_gold=2
fog=yes
[/side]
[side]
[ai]
villages_per_scout=16
[/ai]
side=4
canrecruit=yes
controller=human
village_gold=2
fog=yes
[/side]
[side]
[ai]
villages_value=0
[/ai]
side=5
canrecruit=yes
controller=human
village_gold=2
fog=yes
[/side]
[event]
name=prestart
[if]
[have_unit]
side=5
[/have_unit]
[then]
[kill]
animate=no
fire_event=no
side=5
[/kill]
{UNIT 41 2 (Yeti)}
{UNIT 42 2 (Yeti)}
{UNIT 39 2 (Yeti)}
{UNIT 40 2 (Yeti)}
{UNIT 38 2 (Yeti)}
{UNIT 39 3 (Yeti)}
{UNIT 41 3 (Yeti)}
{UNIT 42 3 (Yeti)}
{UNIT 43 4 (Yeti)}
{UNIT 41 4 (Yeti)}
{UNIT 42 4 (Yeti)}
[set_recruit]
side=5
recruit=""
[/set_recruit]
{MODIFY_UNIT x,y=38,36 canrecruit yes}
[/then]
[/if]
[/event]
[event]
name=die
first_time_only=no
[filter]
canrecruit=yes
side=5
[/filter]
[store_unit]
[filter]
side=5
canrecruit=no
[/filter]
variable=newleader
kill=no
[/store_unit]
[if]
[variable]
name=newleader.length
greater_than=0
[/variable]
[then]
{VARIABLE newleader.canrecruit yes}
[unstore_unit]
variable=newleader
[/unstore_unit]
[/then]
[/if]
[/event]
[/multiplayer]
#undef MPWILD_UNIT
EDIT: Nevermind! I fixed it! Thank you all very much for you help!
- Ryuuzaki52
- Posts: 34
- Joined: November 25th, 2010, 8:24 pm
Re: Wilderlands Style?
Not sure how to delete this...So since my question is answered, I'll wait on a mod...
Re: Wilderlands Style?
You don't delete it - simply do not add more posts.
This way, others having similar problems can find your's and the solution. By the way, it would be nice if you added your solution, and not only "Oh, I solved it".
This way, others having similar problems can find your's and the solution. By the way, it would be nice if you added your solution, and not only "Oh, I solved it".
- Ryuuzaki52
- Posts: 34
- Joined: November 25th, 2010, 8:24 pm
Re: Wilderlands Style?
Ah, alright. Thanks again!
That'll put a bunch of YETIS in the top right.
Code: Select all
#textdomain wesnoth-multiplayer
#define MPWILD_UNIT X Y TYPE
[unit]
type={TYPE}
side=5
x={X}
y={Y}
random_traits=no
[/unit]
#enddef
[multiplayer]
id=multiplayer_The_Journey
name= _ "5p — The Journey"
description= _ "A Journey"
map_data="{~add-ons/DRPRyuu/maps/The_Journey}"
{DEFAULT_SCHEDULE}
{DEFAULT_MUSIC_PLAYLIST}
[side]
[ai]
villages_per_scout=16
[/ai]
side=1
canrecruit=yes
controller=human
village_gold=2
fog=yes
[/side]
[side]
[ai]
villages_per_scout=16
[/ai]
side=2
canrecruit=yes
controller=human
village_gold=2
fog=yes
[/side]
[side]
[ai]
villages_per_scout=16
[/ai]
side=3
canrecruit=yes
controller=human
village_gold=2
fog=yes
[/side]
[side]
[ai]
villages_per_scout=16
[/ai]
side=4
canrecruit=yes
controller=human
village_gold=2
fog=yes
[/side]
[side]
[ai]
villages_value=0
[/ai]
side=5
canrecruit=yes
controller=human
village_gold=2
fog=yes
[/side]
[event]
name=prestart
[if]
[have_unit]
side=5
[/have_unit]
[then]
[kill]
animate=no
fire_event=no
side=5
[/kill]
{MPWILD_UNIT 41 2 (Yeti)}
{MPWILD_UNIT 42 2 (Yeti)}
{MPWILD_UNIT 39 2 (Yeti)}
{MPWILD_UNIT 40 2 (Yeti)}
{MPWILD_UNIT 38 2 (Yeti)}
{MPWILD_UNIT 39 3 (Yeti)}
{MPWILD_UNIT 41 3 (Yeti)}
{MPWILD_UNIT 42 3 (Yeti)}
{MPWILD_UNIT 43 4 (Yeti)}
{MPWILD_UNIT 41 4 (Yeti)}
{MPWILD_UNIT 42 4 (Yeti)}
[set_recruit]
side=5
recruit=""
[/set_recruit]
{MODIFY_UNIT x,y=42,4 canrecruit yes}
[/then]
[/if]
[/event]
[event]
name=die
first_time_only=no
[filter]
canrecruit=yes
side=5
[/filter]
[store_unit]
[filter]
side=5
canrecruit=no
[/filter]
variable=newleader
kill=no
[/store_unit]
[if]
[variable]
name=newleader.length
greater_than=0
[/variable]
[then]
{VARIABLE newleader.canrecruit yes}
[unstore_unit]
variable=newleader
[/unstore_unit]
[/then]
[/if]
[/event]
[/multiplayer]
#undef MPWILD_UNIT
- Ryuuzaki52
- Posts: 34
- Joined: November 25th, 2010, 8:24 pm
Re: Wilderlands Style?
I once again, looked around and can't seem to find the digit to use for a random x, y...What would it be?
Re: Wilderlands Style?
i think you'll have to work separately with x and y, but may someone correct me if wrong
overall see how the {RANDOM} macro works and apply the output to your x,y corrdinate variables
overall see how the {RANDOM} macro works and apply the output to your x,y corrdinate variables
Code: Select all
[set_variable]
name=<your x or y variable name, or some temporary variable name>
rand=<starting number>..<ending number>
[/set_variable]
Like cats? I've made a whole faction of them to kick ass with!
Don't like cats? I've made a whole faction of them to kick their asses! So everyone's happy :)
Felinian faction is part of the Beyond Southern Hells era
kitties need sprites! art topic here
Don't like cats? I've made a whole faction of them to kick their asses! So everyone's happy :)
Felinian faction is part of the Beyond Southern Hells era
kitties need sprites! art topic here
Re: Wilderlands Style?
More like this (where x_end and y_end are the last co-ordinates on your map... put these in manually because idk the size of your map):
Code: Select all
{RANDOM 1..x_end}
{VARIABLE x_co $random}
{RANDOM 1..y_end}
{VARIABLE y_co $random}
[unit]
x,y=$x_co,$y_co
...
[/unit]
{CLEAR_VARIABLE x_co,y_co,random}
Re: Wilderlands Style?
bigk - that won't work...
{RANDOM 1..x_end}
should be :
{RANDOM 1..$x_end}
but better would be to use :
{RANDOM 1..x_end}
should be :
{RANDOM 1..$x_end}
but better would be to use :
Code: Select all
[store_map_dimensions]
variable=map
[/store_map_dimensions]
[set_variable]
name=random_x
rand="1..$map.width"
[/set_variable]
[set_variable]
name=random_y
rand="1..$map.height"
[/set_variable]
http://www.wesnoth.org/wiki/User:Sapient... "Looks like your skills saved us again. Uh, well at least, they saved Soarin's apple pie."
Re: Wilderlands Style?
See my last post:Sapient wrote:bigk - that won't work...
I asked him to replace x_end and y_end with the numbers of the last co-ordinates of his map... I never meant for it to be placed directly into the random macro...bigkahuna wrote:where x_end and y_end are the last co-ordinates on your map
Yeah I knew there was such a tag out there but didn't remember its usage. Thanks.Sapient wrote:but better would be to use :
Re: Wilderlands Style?
The SCATTER_UNITS macro might also be suitable.
You are a Dark Adept: you dimmerse yourself in the dark arts...potentially with great rewards....
-JW's personality quiz
-JW's personality quiz