Mirage Source

Free ORPG making software.
It is currently Sat Apr 20, 2024 9:18 am

All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Fri Jun 22, 2007 4:48 pm 
Offline
Knowledgeable
User avatar

Joined: Mon May 29, 2006 6:23 pm
Posts: 128
Figured I should post thing now for you guys to correct any mistakes I made. xD
Remember, this is ONLY 3.0.3 and is still a work in progress. Doesn't have anything to do with 3.0.7 or MSE1/2.

Mirage Source 3.0.3 :: Getting Started
    Author: Cruzn.
    MS Build: 3.0.3 (download)
    Guide Release: June 22nd, 2007
    Last Update: ---
    Guide Notes: A simple crash-course guide into Mirage Source 3.0.3. Explains the basics that every newcomer needs to know.
    Abbreviations:
      MS = Mirage Source,
      Root = The path to your mirage source installation. Example: C://Documents and Settings/YourComputer/Desktop/MS3.0.3/

*** Mirage Source REQUIRES Visual Basic 6.0. If you don't have this, you cannot edit the project. ONLY Visual Basic 6.0. VB.NET, or any other version, will not work. Sorry. Discussion of illegal distributions is strictly prohibited. Please do not ask for a copy on this thread or any other thread. ***

To begin, please download and extract a fresh copy of Mirage Source 3.0.3. This is what we will be basing the guide after. Once you have it downloaded, open the folder up. You should see a folder named miragesrc, open it. Inside you will see the folders client and server. Open up the server folder. We'll get acquainted with the folders and files for the server.

Server Side Files:
    (dir) Accounts: This is where all the accounts and account data is stored. You edit the users by selecting their configuration file, each file is named for the account in which the characters are located, (.ini) and replacing current values with new ones. The first one you'll need to edit is ACCESS, which we'll get to later on.
      charlist.txt: In this file, you will see a list of character names that are taken. The server uses this to double check against any double naming (two players with the same name).
      <account_name>.ini: For every account created, a file will be created with their account name. It will contain their character's stats (level, strength, defense, etc), items, and other various information required for play. In a default installtion, there were won't be any files such as this. You'll have to create a account before this file pops up.
    (dir) Maps: These are the server side maps. They are the maps that get saved and transferred to the client's computer and stored in their map folder. If changed the client side maps will get overwritten and replaced with the most current update of that map.
      map<map_number>.dat: Every map is given a unique ID to seperate it from every other map. The maps are saved in binary so you cannot simply open it up with a text editor and change the values, however, there is a handy map editor for you to use in the client. More on this later.
    admin.txt: This is the log file where all administrative actions are saved.
    banlist.txt: This file holds the data for banned users and IPs.
    classes.ini: The class configuration file defines the names of every class in your game. Details on how to add, change, and remove classes will follow. Please continue reading. =)
    items.ini: Place items here! This holds the data for your items. Again, more information on how to modify this will be later in the guide.
    motd.ini: This is your Message Of The Day file. It is displayed to all users every time they join the game.
    npcs.ini: If you don't have this file, your players won't have any mobs (monsters) to fight. Oh noez!
    player.txt: This is the player chat log.
    shops.ini: I'll give you 5 gold pieces for that yellow top! Here is where you determine what your shopkeeps will be selling to your players. You can't just let your druglords run wild.
    spells.ini: Cruzn heals you for 5 hit points. You live to see another day! ;-)
You will also notice some Visual Basic files (modules, forms, and a project). Select the server project.Image This guide will assume that you can program in VB6, in only just a little bit. In your project explorer window you should see the following forms and modules: view image
    frmLoad: The only thing this form does is tell you what is loading/saving and what number it is on. Not entirely useful, but oh well. view image
    frmServer: This is your interface for your server. It's a GUI for you to see what is going on if you can't log in and join the fun. view image
    modDatabase:
    modGameLogic:
    modGeneral:
    modServerTCP:
    modSysTray:
    modText:
    modTypes:
Now, we know the overall arrangement of the server. Let's figure out the client now.

Client Side Files:
    (dir) Maps: Once downloaded, the maps are saved here. They are only downloaded as the user enters a new map, or if their map does not match the server's information.
      map<map_number>.dat
    Items.bmp: These are the icons for your items that you will see on the ground when dropped by a player or monster.
    Sprites.bmp: This file holds the graphics for your NPCs and player sprites. It's how your female priestess is differentiated from your male warrior. Each "line" (every 32 pixels vertically) is a new sprite.
    Tiles.bmp: Trees! Water! Mountains! The wonders of what you and your fellow players are walking on.
    music1.mid, music2.mid, etc: Every game needs some noise to drone out the buzzings of real life. =)

Simple. Not too much going on over here. Select the client project icon and open up the project. We're going to look at the inner-workings of our client. view image
    frmChars: Every account can have three (3) characters by default. After they have successfully logged in, this form is displayed for them to select, create, or delete a character. view image
    frmCredit: If you want people to know who created aspects of your game this is where you would place them. view image
    frmDebug: (Admin) When something goes wrong you probably want to be able to figure out what caused it. This form may end up being your best friend. view image
    frmDeleteAccount: Pesky account of mine. I don't want it! *click* ACCOUNT DELETED! view image
    frmDropItem: Oh man, these coins are a burden on my pack. I'll just drop them here. view image
    frmFixItem: *clink* Err. . . My +1 Mace is broken! I need to find a weaponsmith. view image
    frmIndex: (Admin) This is the form that displays the list of spells, NPCs, items, and shops that you can edit. view image, view image, view image, view image
    frmItemEditor: (Admin) The actual details for editting an item are here. view image
    frmKeyOpen: (Admin) Details of setting a door. view image
    frmLogin: Username: Cruzn // Password: test :: Success! Self explanatory. =) view image
    frmMainMenu: So many options. . . Should I make a new account? Or maybe login. . . Nah, I wanna see who made this game. *click* view image
    frmMapItem: (Admin) Spawn some items on a map for your users to take! They'll love it. view image
    frmMapKey: (Admin) You must be THIS tall to enter this door. . . oh, and you have to have a key. ;-) view image
    frmMapProperties: (Admin) It would be nice to put some NPCs on a map. This is the place to do it. view image
    frmMapWarp: (Admin) Go go gadget warp tile! This is where you can set some warping action so that you can start in one spot and arrive in another. Works differently from the map warping in frmMapProperties. view image
    frmMirage: This is where your game will go down. =) view image
    frmNewAccount: Everyone has to start here. view image
    frmNewChar: After they have made an account they need to make a character. Each account can have three (3) characters by default. view image
    frmNpcEditor: (Admin) If you're thinking that single Bee just isn't cutting it, you can add and edit NPCs here. view image
    frmSendGetData: This is the form you see that pops up with "Connecting to Server" or "Sending New Account Information." It doesn't do much else. xD
    frmShopEditor: (Admin) Shopkeep: 30 gold pieces for a Robe! Player: Is that all? Shopkeep: It is until a get a new shipment. -- This is where you can add and edit shops. =P view image
    frmSpellEditor: (Admin) By level 30, that level 3 healing spell probably won't cut it. Be fair and create a higher level spell for your well trained players. view image
    frmTrade: This is where players do their trading with the shopkeeps. It lists what the shopkeep has for sale and what its price is. view image
    frmTraining: After each level, players will acquire points. They spend those here. view image
    modClientTCP:
    modDatabase:
    modDirectX:
    modGameLogic:
    modSound:
    modText:
    modTypes:

Configuring Your Server:
Requirements:
    1. A static IP or an automatically updating DNS. Try Dynamic DNS.
    2. Port forwarding capabilities.
If you meet those simple requirements, or you can attain them at some point, you should continue. If you are not sure what I am talking about, you should search around the forums for more information.

Open up the server project run it just as it is. Go back over to the client project and fine this code: (ctrl+F)
Code:
frmMirage.Socket.RemoteHost = "65.33.125.77"
Now, you can do one of two things. If you have a static IP, you could go ahead and put in the IP from http://www.ipchicken.com for this next part. If you don't know whether or not you have a static IP, just go ahead and replace 65.33.125.77 with 127.0.0.1. Save the project at this point.

Administrating Your Server:
    1. Run the project in VB6.
    2. Create a new account.
    3. Log in with it.
    4. Create a character. Right now, your account is just a regular player. We need to set your access so that you can access the admin-only areas.
    5. Head over to the server folder and then open up the accounts folder.
    6. Search for the .ini with the name of the account you just created. Example: If you created the account named Cruzn, search for Cruzn.ini (At this point, it should be the only .ini file in there). Look 7. for the header called CHAR1. A header looks like: [TITLE].
    8. Under that header, look for the variable access and change it to 4. view image.
    9. Save and exit.
Go back to your Mirage project. It should still be running so go ahead and log back in and select the character you just edited.

Player Commands: (requires 0 or more access)
    ': Sends a broadcast message, which everybody will see. Usage: 'message
    -: Emote message. Usage: -message
    !: Sends a private message to a player. Usage: !playername message
    /help: Displays a list of commands available to normal players. Usage: /help
    /info: Displays the information of the selected player. Usage: /info (optional|playername)
    /who: Dislays a list of who is online in the chatbox. Usage: /who
    /fps: Displays the current FPS in the chatbox. Usage: /fps
    /inv: Shows the inventory. Usage: /inv
    /stats: Shows the players own stats. Usage: /stats
    /train: Shows the training form. Usage: /train
    /trade: Sends a trade request to a shop. Usage: /trade
    /party: Sends a party request to a player. Usage: /party playername
    /join: Accepts a party request. Usage: /join
    /leave: Leave a party. Usage: /leave

Moderator Commands: (requires 1 or more access)
    ": Sends a global message, which everybody will see. This uses a color different from a broadcast message. Usage: "message
    =: Sends an admin message, which only the admins will see. Usage: =message
    /kick: Kicks a player from the game. Usage: /kick playername

Advanced Moderator Commands: (requires 2 or more access)
    /ban: Banishes a player from your game, permanently. Usage: /ban playername
    /banlist: Displays the banlist in the chat. Usage: /banlist
    /loc: Displays your Map, X, and Y coordinates in the chat. Usage: /loc
    /mapeditor: Remember those map .dat files from earlier? This is the part of the client where you can edit those. Simply go onto the map # you want to edit (/warpto # to get to a map) and type /mapeditor. Usage: /mapeditor
    /mapreport: Gives you a list of unused maps. Usage: /mapreport
    /motd: Changes the MOTD. Usage: /motd string
    /respawn: Respawns the map you are on. Usage: /respawn
    /setsprite: Sets your sprite to the specified number. Usage: /setsprite #
    /warpmeto: Warps you to a player's Map, X, and Y coordinates. Usage: /warpmeto playername
    /warpto: Warps you to the same X,Y coordinates on another map. Usage: /warpto #
    /warptome: Warps a player to your Map, X, and Y coordinates. Usage: /warptome playername

Development Commands: (requires 3 or more access)
    /edititem: This should be self explanatory, however, unlike the mapeditor, the items are not map-orientated. You can be on any map and edit any item. Usage: /edititem
    /editnpc: refer to /edititem Usage: /editnpc
    /editshop: refer to /edititem Usage: /editshop
    /editspell: refer to /edititem Usage: /editspell

Owner Commands: (requires 4 or more access)
    /destroybanlist: Destroys the ban list. Usage: /destroybanlist
    /setaccess: Sets a player's access. Usage: /setaccess # playername

.ini Configuration Files:
Mirage Source 3.0.3 likes to use .ini files for most of it's data storing. They're easy to use and can be edited by hand. An .ini file is setup like this:
Code:
[HEADER1]
Variable1=Test1
Variable2=Test2
Variable3=Test3
[HEADER2]
Variable4=Test4
Variable5=Test5
Variable6=Test6
If you're new to this, these files work similar (but very different from) arrays. You have to specify the correct header of a variable to get a result. If I am looking under HEADER1 for Variable5, I won't get a result simply because it doesn't exist. HEADER2 and Variable5, on the other hand, would return "Test5." Fairly simple. Now, you wouldn't want to make more work for yourself by editing a file by hand if you had an editor, but in the unlikely chance that you have to, here is a demonstration on editing the class file. (There is no class editor built in, so this is learning how to edit classes, too. =))
Code:
[INIT]
MaxClasses = 1

[CLASS0]
Name=Knight
Sprite= 0
STR= 8
DEF= 7
SPEED= 5
MAGI= 0

...

[CLASS22]
Name=Druid (Wolf Form)
Sprite= 13
STR= 5
DEF= 0
SPEED= 5
MAGI= 10

This is our base class.ini file. We're going to work towards adding a new class called White Mage. For starters, copy and paste the Druid class in the same file.
    1. Change CLASS22 to CLASS23.
    2. I am going to create a "Ninjassassin," but you can create whatever you want.
    3. You can use any number for the sprite here, but I will use 2 for this example.
    4. STR, DEF, SPEED, and MAGI are all the starting stats for the class. STR is strength, DEF is defense, SPEED is speed, and MAGI is magi. =P Simple. Set these to values you think they should be.
    5. You need to make sure MaxClasses, under INIT, is the same number as the last class you added. In this case, it's 23.
Code:
[CLASS23]
Name=Ninjassassin
Sprite= 2
STR= 6
DEF= 3
SPEED= 7
MAGI= 4

If users create a new ninjassassin, they will be set with the default stats of: Sprite #2, 6 strength, 3 defense, 7 speed, and 4 magi. Everything all set?

Stats:
    Strength: Enables the use of stronger weapons and adds to your base damage.
    Defense: Enables the use of stronger armor and contributes to blocking chance against enemy attacks.
    Speed: Enables the use of stronger helmets and adds more SP. In MS3.0.3, SP does not do anything.
    Magi: Adds more MP for casting spells.
    Critcal Hit: int(Strength / 2) + int(Level / 2)
    Block: int(Defense / 2) + int(Level / 2)
    Next Level: int((Level + 1) * (Strength + Defense + Speed + Magi + Points) * 25)

The Editors:
    Item Editor:
    The item editor is pretty simple. You input the item's name and the item type. Depending on what the item will be used for, you will choose between these types:
      Item Types:
        None: Nothing. Just nothing. xD
        Weapon: Weapons! The strength requirement is how much strength is required to equip it and how much strength it adds.
        Armor: Armor. Adds to defense. The "strength" requirement is how much defense is required to equip it and how much defense it adds.
        Helmet: A helmet. Adds to speed. The "strength" requirement is how much speed is required to equip it and how much speed it adds.
        Shield: A shield. Adds to defense. The "strength" requirement is how much defense this shield adds.
        Potion Add HP: A potion that heals the user's HP by the VitalMod scrollbar value. One time use.
        Potion Add MP: A potion that heals the user's MP by the VitalMod scrollbar value. One time use.
        Potion Add SP: A potion that heals the user's SP by the VitalMod scrollbar value. One time use.
        Potion Sub HP: A potion that subtracts the user's HP by the VitalMod scrollbar value. One time use.
        Potion Sub MP: A potion that subtracts the user's MP by the VitalMod scrollbar value. One time use.
        Potion Sub SP: A potion that subtracts the user's SP by the VitalMod scrollbar value. One time use.
        Key: Doors use these. If you use the "Key" tile in the map editor, you'll need to set an item to key in order to open it.
        Currency: This setting is pretty much just like "None." It doesn't serve a big purpose.
        Spell: If you want your users to learn spells by an item, this is the item type you would select. These items are one time use and grant the user the ability to use a spell, if they meet the requirements.
    For weapon, armor, helmet, and shield types, you will get the options of choosing their durability and strength. Durability is how many points the item can take before it is required for the user to take it to the shop for repairs. Strength is the number of points in an attribute (depends on type, read above) required to weild it and also the bonus it gives to that attribute.
    For potion types, the vital mod is how much HP, MP, or SP the potion will heal or damage, depending on the type.

    NPC Editor:
    Again, the editor is pretty straight forward. The NPC's say is what the NPC will yell at the user when they press ctrl (attack) towards them.
    Range is how many tiles away the NPC can gain aggro to a player.
    STR is the NPC's strength.
    DEF is the NPC's defense.
    SPEED and MAGI play no role at this time.
    The behavior types need a little more explaining:
      NPC Behavior Types:
        Attack On Sight: If the NPC sees you within his sight range, he will chase you. =)
        Attack When Attacked: These NPCs are defensive only. They only attack when they are attacked.
        Friendly: Your local townsfolk. They can't be attacked and don't do any attacking.
        Shopkeeper: A special NPC. Cannot be attacked and cannot attack.
        Guard: These NPCs will gang up on you if you attack one of their kind. They will continue to attack until they have killed you. (Each NPC has to kill you for them to stop, be careful!)
    NPC HP is calculated as STRENGTH * DEFENSE.
    NPC EXP is calculated as STRENGTH * DEFENSE * 2.

    Shop Editor:
    The shop editor is just a little bit more complicated. First of all, to set a shop, you open up the mapeditor and go to properties. There will be a droplist with names of shops. Select the shop you want to set the map for and submit. =)
    At the top you see shop name; that is the name of the NPC Shopkeeper.
    Join say is the text that is displayed when the user joins the map.
    Leave say is the text that is displayed when the user leaves the map.
    If you want users to be able to repair their equipment in this shop, select "Fixes Items" otherwise, leave unchecked.
    For the Item Get and Item Give, well, those are the items the shopkeep will trade for and what they want in return. Example: I select a blank entry in the listbox at the bottom of the form. In Item Give, I'll select Gold and put value to 50. For Item Give, i'll put Tarnished Dagger and value 1. This means the user can trade 50 of their gold for the shopkeep's Tarnished Dagger. ;-)

    Spell Editor:
    It should all be coming together now. You probably don't need much help other than the spell types:
      Spell Types:
        ADDHP: Recovers some of the target's HP.
        ADDMP: Recovers some of the target's MP.
        ADDSP: Recovers some of the target's SP.
        SUBHP: Subtracts some HP on the target.
        SUBMP: Subtracts some MP on the target.
        SUBSP: Subtracts some SP on the target.
        Give Item: Gives the selected user an item when the spell is cast.
    The VitalMod scroll bar is what determines how much HP, MP, or SP to add or substract. If the scrollbar value is 5, then it will heal or subtract 5. Simple.
    The GiveItem data works by selecting the item number and the amount it creates.
    The MP formula is as follows: int(Spell Level + VitalMod) or, if the item type is "Give_Item," it's: int(Spell Level + Item Number + Item Amount).


    Map Editor:
    The map editor may seem confusing at first, but it is all really simple.
      Layer Types:
        Ground: This layer is the absolute bottom of the layers. You can't get any lower.
        Mask: This layer is bltted (displayed) above the ground layer, but still below the players and NPCs.
        Animation: This layer will be blinking on and off. You can play it in conjunction with a mask layer to make things like water appear to be moving.
        Fringe: This layer will be blitted (displayed) ABOVE the players and NPCs. This is the layer you should use for trees, buildings, and anything tall. This layer is blitted (displayed) above all the other layers.

      Attribute Types:
        Blocked: This tile prevents all NPCs and players from passing through the tile. This is useful for house walls and tree stumps.
        Warp: When a user steps on this tile, they are warped to the map X, y coordinates that were set when the tile was placed.
        Item: This is an item spawn tile. When placed, the map will spawn this item on the map where the attribute was placed. Each respawn will cause this item to respawn as well.
        NPC Avoid: This is like the block tile, but for NPCs only. NPCs cannot pass through this tile, but players can.
        Key: Set this tile if you want users to have to have a key to enter a certain area. They must walk up to the tile and use (via the inventory) the key while facing the tile.
        Key Open: Use this tile if you want users to simply have to step on a tile to open a door. It's a switch, basically.

      Map Properties:
        Name: This is the map's name. It appears at the top of the screen.
        Up, Down, Left, and Right: When a user walks to the sides of the screen, they will be teleported to this map on the opposite coordinate (Y is flipped for up and down, X is flipped for left and right). For a more details test it out. Map 2 maps and link them together. See where you end up. =)
        Moral: If safe zone is selected, players cannot PK on the map. If none is selected, players can PK on the map.
        Shop: This is where you place your shopkeeps. Select which shop you want users to access on this map. ;-)
        Music: Ah, sweet, sweet sound. Serenade the señoritas aqui. ;-)
        NPCs: Here you can decide whether or not you want your precious inn crawling with cockroaches and mice. . . Let's hope not.
        Boot Map, Boot X, and Boot Y: If a user logs out on this map, these are the coordinates to place them at. Set to 0/0/0 to disable.


Top
 Profile  
 
PostPosted: Fri Jun 22, 2007 6:46 pm 
Offline
Newbie
User avatar

Joined: Sat May 19, 2007 4:48 am
Posts: 24
Pretty good guide. Very user friendly and explained well :)


Top
 Profile  
 
PostPosted: Fri Sep 21, 2007 8:12 am 
Offline
Community Leader
User avatar

Joined: Mon May 29, 2006 1:00 pm
Posts: 2538
Location: Sweden
Google Talk: johansson_tk@hotmail.com
It's a awesome guide.

_________________
I'm on Facebook!My Youtube Channel Send me an email
Image


Top
 Profile  
 
PostPosted: Fri Sep 21, 2007 12:34 pm 
Offline
Community Leader
User avatar

Joined: Sun May 28, 2006 10:29 pm
Posts: 1762
Location: Salt Lake City, UT, USA
Google Talk: Darunada@gmail.com
Quit Necroing William!

_________________
I'm on Facebook! Google Plus LinkedIn My Youtube Channel Send me an email Call me with Skype Check me out on Bitbucket Yup, I'm an EVE Online player!
Why not try my app, ColorEye, on your Android devlce?
Do you like social gaming? Fight it out in Battle Juice!

I am a professional software developer in Salt Lake City, UT.


Top
 Profile  
 
PostPosted: Fri Sep 21, 2007 12:40 pm 
Offline
Community Leader
User avatar

Joined: Mon May 29, 2006 1:00 pm
Posts: 2538
Location: Sweden
Google Talk: johansson_tk@hotmail.com
It's not necroing, I made it into a announcement so I had a reason posting.

_________________
I'm on Facebook!My Youtube Channel Send me an email
Image


Top
 Profile  
 
PostPosted: Fri Sep 21, 2007 12:45 pm 
William wrote:
It's not necroing, I made it into a announcement so I had a reason posting.


It's also your forum. :P

Dave is just in one of his moods again..


Top
  
 
PostPosted: Sun Apr 13, 2008 9:20 am 
Offline
Regular
User avatar

Joined: Sun Mar 02, 2008 2:21 am
Posts: 50
Sorry for the necro, just gotta point out, all the images are down.

_________________
Image


Top
 Profile  
 
PostPosted: Sun Apr 13, 2008 12:29 pm 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
It was just screenshots of the forms.

_________________
Quote:
Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?


Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group