Friday, April 29, 2011

Explorer - Tutorial - Dungeon

Another update to the dungeon using the new FTP set up by Tyrranus:

Explorer Update

Everything in the explorer uses a Dungeon->Map->Square format when building and the reverse when actually checking for events. What this means is that if you set an item at the Dungeon level, you don't have to set it again, unless you want to. Examples include Width, Height, Enemy's, Treasure. So were going to talk about the dungeon today and go over each variable.

But first we should talk about xml. Except I am not an expert at the tags and a lot of the greater then and lesser then get eaten by the html of the blog. But here is what you need to know. So if you see ! its actually a < or a >.

!root!

!/root!

Don't mess with the root commands and were done.

now were at the dungeon level

!dungeon
name = "blank dungeon"
startlv = "0"
background = "greenBackground.jpg"
!


So were talking about the top level dungeon... For updated versions of all the variables head over to /trunk/otherworld/libs/otherlib/explorer/Dungeon.as (just pull off the dungeon and all lower case. Or check the parser).

I'm sure I'm going to add stuff as we go a long but this is a current list.

name - identifying tag. Shows up at the top of the dungeon. Is also used to find the dungeon called for SO MUST BE UNIQUE!
startlv - The map the player starts on.
enemysafe - How many safe steps before possible encounter default 2
enemyrandom - Odds of a random enemy encounter 1 out of random default 4 or (25%)
scale - scale of the dungeon this width and height of the tiles default 38 pixels
width - the number of tiles that is right left NO DEFAULT
height - the number of tiles that is up down NO DEFAULT
background - the background image behind the dungeon MUST BE IN /background/ folder

The following can be in declared multiple times. For each time though they have to follow the xml pattern in the file.

map - the floors we'll talk about this tomorrow
loot - loot list this is the default loot for the entire dungeon. You can add as many as you want by either name or number. More variables may be added later on.

!loot type = "Simple"/! - Loot by name
!loot number = "1001"/! - Loot by number

enemy - list of enemy's for the entire dungeon. You can add as many as you want as well. Also more variables may be added later to do strength of enemies.

!enemy name = "Mugi Zombie"/!
!enemy name = "Green Skin"/!

And at the end of all this stuff we have to close the tag with a

!/dungeon!

I'm sure I will add to stuff and change it as we go along but pretty simple. Maps tomorrow.

Daisy

1 comment:

  1. You can use '&_lt;' and '&_gt;' instead (without the '_', since this is also parsed as HTML otherwise.

    It is called character escaping btw.

    ReplyDelete