[ Login | Register ]

The Shining Source

« previous next »
Pages: [1] Print
BABS - What files do what?   (Read 29392 times)
Old Post June 20, 2009, 11:25:44 pm
#1
Ty
Administrator
Shining Sideburns *

Posts: 836

Logged
BABS - What files do what?
I'm trying to figure out which BABS files do what, and I think I've got it figured out. Just thought I'd check with the experts first Wink

Global data files
  • gamefiles/* -- These files change the whole game, so class modifications and your lineup go in here. Same for monsters and stuff.
  • interface/* -- Anything that changes how the game looks, like menu buttons
  • items/* -- Images for items in the game. From what I can see in "gamefiles/itemfile", the images can be in any folder, they're just in "items" to make it easier to read.
  • sprites, portraits etc -- Same as above. Only in this directory for ease of use, and could feasibly in "shiny-sword/sprites" etc Smiley

Story files
  • maps/intro.framefile -- This shows everything before the game starts
  • maps/start.scriptfile -- The first script run by the game? Defines the map, starting position and music.


Everything after this is defined in framefile and scriptfile entries, if I'm right? So someone looking to change the campaign would definitely need to edit these two files, and the rest could be set by them.

I'll add more as I think of it. Let me know if I'm on the right/wrong track and I'll fix the list. My aim is to turn this knowledge into a tutorial for BABS, and possibly integrate them into my own development tools. Also, what's the map format for SMEE? I don't have the source, but if I recall it stores the tile images in the map file. Is collision stored per tile in the tileset, or per map square?

Cheers for the help Wink


Old Post June 21, 2009, 02:28:52 am
#2
Administrator Shining Spammer *

Posts: 1,129

Logged
Re: BABS - What files do what?
config
settings: this file is really for the player to set up to change basic graphics/music settings but could be optimised for your release.

gamefiles
classfile: store one of each type of character(ie: even though you have 2 swordsmen in your team, store one of them here) enemies shouldn't be put here.  (IMO: this split of enemy and player classes is bad, but it's how it is)
itemfile: here you list all the items for the entire game, even the ones monsters have.
monsterfile: one of each type of monster in the game.  these monsters are set at STATIC levels, hp's, damages etc and do not scale up with player level, so you must game balance carefully.
partyfile: this file is read at the beginning of the game, gold, party members at the start etc.
shopfile: each shop requires a list of which items from itemfile it carries. the price is set in itemfile though, so all shops have the same price for the items.

images
all attack images
battle background images
images for use in intro and credits(titleX.gif and creditsX.gif)
spells: spell effect images

interface
The menu system graphics, and other miscellaneous user interface graphics

items
item pictures

maps
*.tiles: your tile files, these must be in here for the maps to use.
*.smf: the map files you have made
*.scriptfile: set the music for the map, the starting position on the map, whether it is a battle or walkabout map, set exit points as zones(which are set in map editor) and what map you should be sent to on entering those zones.
*.entityfile: list NPC's or enemies for the map, has a fairly good commentary and the lycadell campaign has good examples of IF ELSE usage for speech to do with your quest
*.framefile lists the images (from images dir) you want to show in cutscenes

music
store midi music to be called for the game

portraits
portraits which show up in the stats page.  can't remember if they show when talking, I don't think so.

sprites
sprites. . .the little things that walk around on screen

MAIN DIRECTORY
Shiny_Sword.bat can be edited and renamed to your game name, the rest of the files could be left alone unless you want to do some real programming.


~Elvenfyre


Old Post June 21, 2009, 02:38:10 am
#3
Administrator Shining Spammer *

Posts: 1,129

Logged
Re: BABS - What files do what?
the start of a never finished guide to smee and babs
at least it explains some important map building points

================================================

  SMEE and BABS
  SMEE: Tile Editor and Map Creator
  BABS: Battle system, Shining Force Style.
   
  Fully created by Derek Groen (Devlyn)
 
  Project home http://www.shiningsource.org/
 
================================================


Hi, I'm Elvenfyre and I'll show you through making your first map in SMEE, and tips that I found helpful.

Firstly, you need Java Runtime Environment 1.5.0 or higher, you can download it at http://java.sun.com/ once you have this installed on your computer, simply unzip the BABS/SMEE file into the directory you want it.

To get an idea of what you're making, run Shiny_Sword.bat and you'll be able to play the demonstration scenario that comes with it.

Game Controls:
A & D are Select,  S is Cancel, use the Arrow Keys to move around.
F5 is also a handy key, for refreshing the screen when something doesn't look right.

You'll see as you're playing that not only is the game window open but also a black DOS Command box, which displays certain text - this is for debugging and it will tell you if there are any errors in the map or game.

When you've finished playing with it hopefully you'll be full of enthusiasm for designing your own map and battle scenario.

++SMEE++
Small Map Editing Environment.

When you first open SMEE it loads a default map and tileset.

The map area is the large rectangle, which the numbers to the left of it, you can move around inside this map area with the arrow keys, and speed that movement up by holding shift and pressing the arrow keys.  Those numbers down the side of the map area are the Layers, but I'll talk about that later, currently it should be on Layer 1.

To the right of the map area are a bunch of little squares with different pictures, these being tiles.  Try clicking on one of those tiles and then clicking on the map - you'll see how it works.  The tile area has a scroll bar, the only way to currently navigate the scroll bar is with the arrows at the top and bottom since dragging the scroll bar itself does not work yet.

Lastly down the bottom of the window is a menu bar with icons on it, as you hover over these you will see what they do by the text that shows up.

Let's make a new map!
Click the New Map icon, which looks like a page of text with a folded corner.

Oh no, everything in the map area and tile area has gone black D:
That's ok.

Now lets make a grass tile, since that seems to be the most common "ground" people like to make the first time.  Click on the Tile Editor icon - it looks like a pencil drawing on 5 tiles in the shape of an L.

A new window will open called Tile Properties.

One important thing I've found is to first look at the words Current Tile.
This will have = 0 or = 1 or similar beside it.  It tells you what number tile it is and where it will be on the tile area later on.  The previous and next buttons up the top cycle through the tiles - at the moment they are all a dark grey colour.  So that you know, this dark grey colour is the colour for invisible - and in the range of colours is the very first colour which is actually to the left of the black square at the start of the pallette.
Since we're making a ground square, we don't want any of it to be see through, do we?  So lets choose a green from the pallette and draw all over the tile.

For a full explanation of the tile editor I'll now tell you what the other buttons do. 
The P button down below tells you you are in Painbrush mode.  Pressing it will change you to F (Fill) mode - which will let you choose a colour and click anywhere within a monocoloured section changing that section to that one new colour.
The Next Frame box allows you to create tiles that are animated- you might want your grass to move slightly as if there were wind, and to do that you would slightly change the tile over several frames.
Land Type changes how the Battle System sees your tile - is it a mountain, plain(grass), or perhaps a solid - a solid being a square you cannot move onto whatsoever in battle.
Tile sets come with an initial 50 tiles loaded with that transparent colour, to add more, you need to click Add Tile.

New Set From Image - what I consider the most valuable button in the tile editor.  This allows you to have created your tiles in photoshop, saved them as a PNG, and import them into your tileset.  Later on I'll get into my own favourite way of making these sets as I've noted here.

Import from image does the same thing but it doesn't replace your existing tileset, it simply adds the new tiles to the bottom of your current tileset.

One thing to remember when importing tiles from images- you have to go through each tile and define what land type they are(especially if they are solids).

Anyway, for now let's just use your newly made grass tile on the map - so close the Tile Editor and go back to the main SMEE window.  Your new tile should be in the Tile Area on the right- click it and then click on the map area, you will see the grass appear on the map.
Try making several more tiles, for tile 2, 3 and 4, and stamping them throughout the grass as well.  You should quickly get the idea of how repetitive tiling works.



LAYERS

Now lets talk about the 1, 2, 3, O and Z down the left hand side of the map area.  These are layers.  For layer 1, 2 and 3 you can think of it like drawing a background on a sheet of paper on layer 1, then putting a sheet of plastic on top if it which you can draw on = layer 2.  Our characters will then walk around on top of this - and finally another sheet of plastic will go over the top of everything which you can draw things that may cover the characters if they walk underneath it, layer 3.

currently clicking on the labels doesn't work so:
TO CHANGE LAYERS USE THE KEYS 1, 2, 3, 4 AND 5

(1)Layer 1: Background "ground" layer.  These should contain no transparent pixels.

(2)Layer 2: A barrel that can be placed on sand or grass or wood or stone would be placed on layer 2, and would have some transparent pixels in the tile makeup.

(3)Layer 3: Overlay layer.  The top tiles of trees, roofs, etc that are rendered over the top of the character.  These may have transparent pixels.

(4)Layer O: Obstruction Layer.  When in this layer clicking on a tile puts an orange and black outline around the tile - right clicking will take the outline away.  This outline means that when in a walkabout map the character cannot walk on that square.  ("solid" types do not work in walkabout mode, and obstructions do not work in battle mode.)

(5)Layer Z: Zone Layer.  Choosing a tile here simply allows you to number your zones.  You'll see CurTile will display a number rather than a picture of the tile.  This means if you choose Tile 1, and click several spaces on the map, you will get white/blue X's showing on those tiles, and these spaces are called ZONE 1 (because you were using tile 1).  If you use Tile 2 to create other zone squares, they will activate whatever ZONE 2 activates when the character walks on one of those squares. 
Zones are how we move characters from one map to another - and later on will hopefully allow us to trigger storyline events and so on.
(I will get to how to link these zones up to the events you want to create later, in the BABS scripting discussion)


For our first map, make a bush tile with some transparent pixels in it, and place it inside Layer 2 somewhere a couple times, and give it a

~Elvenfyre


Old Post June 21, 2009, 04:46:06 am
#4
Ty
Administrator
Shining Sideburns *

Posts: 836

Logged
Re: BABS - What files do what?
Thanks Elv, that's a big help. I'll try and write the file notes up for a BABS tutorial. Any chance I could grab the source code for SMEE/BABS to look at the map and tileset file formats? I think I remember how it's stored, but I'm not 100% sure so a closer look might help Smiley


Old Post June 21, 2009, 05:23:10 am
#5
Administrator Shining Spammer *

Posts: 1,129

Logged
Re: BABS - What files do what?
I thought the source code was accessible already?  I'll send it to you I guess(milon). 

~Elvenfyre


Old Post June 21, 2009, 03:11:20 pm
#6
Ty
Administrator
Shining Sideburns *

Posts: 836

Logged
Re: BABS - What files do what?
Cheers Elv - the only source I had was from waaaay back in the day, and the newest release only had .class files in it. Been a long time since I did any Java work, so I apologise in advance if I have to ask any dumb questions Wink


Old Post June 22, 2009, 07:24:37 pm
#7
Ty
Administrator
Shining Sideburns *

Posts: 836

Logged
Re: BABS - What files do what?
Already at my first hurdle, which is the .smf map format. From the looks of things, it uses the built in Java serialization layer. I'm trying to work around it, but I have a feeling it'll take a while. Damn Sad

If I'm reading things right, every level is made of three files:
* name.smf -- Map data
* name.scriptfile -- Basic data
* name.entityfile -- People

Also, the first level is called "intro" which has no map or entities. After that, you can set your own progression. I think I'm getting it Wink


Old Post June 23, 2009, 04:10:50 am
#8
Administrator Shining Spammer *

Posts: 1,129

Logged
Re: BABS - What files do what?
yeah
the files should have comments which tell you what they do, or else I said so up top in my first post.

~Elvenfyre


Old Post June 23, 2009, 06:44:33 am
#9
Administrator
Shining Spammer *

Posts: 1,208

Logged
Re: BABS - What files do what?
Hi Ty,

Regarding the SMF format, it indeed uses serialized objects, which is horrible in retrospect Tongue.
It may be best to hack BABS a bit and provide it with some kind of save to binary or save to XML format, for example Smiley.

Devlyn

Great news for Shining fangame developers! Wink

Correcting your non-working <img> tags since 1982 Wink


Old Post June 23, 2009, 12:18:51 pm
#10
Ty
Administrator
Shining Sideburns *

Posts: 836

Logged
Re: BABS - What files do what?
That would be the smart option, but doesn't writing something to decode this protocol look like fun to you? Wink

Cheers for confirming Elv, trying to get it straight in my head before I start hacking away at things Smiley


New Post June 25, 2009, 07:46:54 am
#11
Administrator
Shining Spammer *

Posts: 1,208

Logged
Re: BABS - What files do what?
Frankly, only inexperienced fools like me 6 years ago would use a protocol like that Tongue. Nowadays I'm just a more experienced fool Tongue.

Then again, the best way to decode that protocol is just to load the file into Java Wink. Once there, you should have a relatively comprehensive object with fields that you can write out to a more cool format.

I could try and see if I can write a routine for this, but it will take me a while to restore the code base, and in addition I'm still nicely entangled in PhDeadlines. That doesn't mean I won't do it, but I'm just not sure if I can find a good time window opportunity for it. Smiley


Devlyn

Great news for Shining fangame developers! Wink

Correcting your non-working <img> tags since 1982 Wink


New Post June 26, 2009, 09:07:04 pm
#12
Ty
Administrator
Shining Sideburns *

Posts: 836

Logged
Re: BABS - What files do what?
Yeah, I managed to load some basic info from the file, but it gets more complicated as you go so Java would probably be the smart option.

Of course, we all know I'm not that smart Wink


Pages: [1] Print 
« previous next »
Jump to:  

Powered by SMF 1.1.21 | SMF © 2013, Simple Machines