Mirage Source

Free ORPG making software.
It is currently Thu May 23, 2024 9:25 am

All times are UTC




Post new topic Reply to topic  [ 13 posts ] 
Author Message
PostPosted: Fri Oct 17, 2008 3:52 am 
Offline
Newbie

Joined: Thu Oct 16, 2008 8:41 pm
Posts: 24
Ok so i just joined today and i have taken a crack at jumping head first into mirage. My first edit I wanted to try would be to add a new morale called "Cola" just for fun. So here is the code i have
Code:
Public Sub UpdateDrawMapName()
    DrawMapNameX = (MAX_MAPX + 1) * PIC_X \ 2 - ((Len(Trim$(Map.Name)) \ 2) * 8)
    DrawMapNameY = 1
     
    Select Case Map.Moral
        Case MAP_MORAL_NONE
            DrawMapNameColor = QBColor(BrightRed)
           
        Case MAP_MORAL_SAFE
            DrawMapNameColor = QBColor(White)
       
        Case MAP_MORAL_COLA
            DrawMapNameColor = QBColor(Blue)

         
        Case Else
            DrawMapNameColor = QBColor(White)
    End Select
   
End Sub


On the top line
Code:
Public Sub UpdateDrawMapName()
it says that it is not defined when i run the client.


Top
 Profile  
 
PostPosted: Fri Oct 17, 2008 3:59 am 
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
might be jumping in over your head with this one, there are server side changes too. Did you find a tutorial for this?


It's probably MAP_MORAL_COLA that is undefined. If you right click on the other morals, and hit definition, it will take you to the place where you can define them.

_________________
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 Oct 17, 2008 4:01 am 
Offline
Knowledgeable
User avatar

Joined: Fri Sep 12, 2008 11:18 pm
Posts: 176
Location: England.
Under " ' Map constants " add " Public Const MAP_MORAL_COLA As Byte = 2 ", you do that for all Morals & such other stuff in modConstants, you also do the same in Server. Enjoy.


Last edited by Mattyw on Fri Oct 17, 2008 5:21 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Fri Oct 17, 2008 4:14 am 
Offline
Newbie

Joined: Thu Oct 16, 2008 8:41 pm
Posts: 24
Still not working. I added that line of code to the map constants client side and server side.


Last edited by Cigar And A Sheep on Fri Oct 17, 2008 4:18 am, edited 2 times in total.

Top
 Profile  
 
PostPosted: Fri Oct 17, 2008 4:17 am 
Offline
Knowledgeable
User avatar

Joined: Fri Sep 12, 2008 11:18 pm
Posts: 176
Location: England.
Well, gave direct location, couldn't have been easier. =-p No problem.


Top
 Profile  
 
PostPosted: Fri Oct 17, 2008 4:19 am 
Offline
Newbie

Joined: Thu Oct 16, 2008 8:41 pm
Posts: 24
I edited my post please read it and answer again.


Last edited by Cigar And A Sheep on Fri Oct 17, 2008 4:37 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Fri Oct 17, 2008 4:27 am 
Offline
Knowledgeable
User avatar

Joined: Fri Sep 12, 2008 11:18 pm
Posts: 176
Location: England.
Show us all the Moral stuff added.


Top
 Profile  
 
PostPosted: Fri Oct 17, 2008 4:33 am 
Offline
Newbie

Joined: Thu Oct 16, 2008 8:41 pm
Posts: 24
Code:
' Map constants
Public Const MAX_MAPS As Long = 100
Public Const MAX_MAPX As Byte = 15
Public Const MAX_MAPY As Byte = 11
Public Const MAP_MORAL_NONE As Byte = 0
Public Const MAP_MORAL_SAFE As Byte = 1
Public Const MAX_MORAL_COLA As Byte = 2


Here is where i placed it in the map constants client side.

Code:
' Map constants
Public Const MAX_MAPS As Long = 100
Public Const MAX_MAPX As Byte = 15
Public Const MAX_MAPY As Byte = 11
Public Const MAP_MORAL_NONE As Byte = 0
Public Const MAP_MORAL_SAFE As Byte = 1
Public Const MAX_MORAL_COLA As Byte = 2


Here is where i placed it in the server constants client side.

Code:
Public Sub UpdateDrawMapName()
    DrawMapNameX = (MAX_MAPX + 1) * PIC_X \ 2 - ((Len(Trim$(Map.Name)) \ 2) * 8)
    DrawMapNameY = 1
     
    Select Case Map.Moral
        Case MAP_MORAL_NONE
            DrawMapNameColor = QBColor(BrightRed)
           
        Case MAP_MORAL_SAFE
            DrawMapNameColor = QBColor(White)
         
        Case MAP_MORAL_COLA
            DrawMapNameColor = QBColor(Blue)
         
        Case Else
            DrawMapNameColor = QBColor(White)
    End Select
   
End Sub


This is what i have in game logic client side.

Also, if the game knows about the morale, where do you tell the program what the morale does? I would like the question answered becasue if you add anything new say a new layer or spell thing, or map attribute, where do you tell the program what it does you know what i mean?


Top
 Profile  
 
PostPosted: Fri Oct 17, 2008 5:06 am 
Offline
Knowledgeable
User avatar

Joined: Fri Sep 12, 2008 11:18 pm
Posts: 176
Location: England.
Go to "frmMapProperties", "cmbMoral", then add "Cola Zone". SHOULD work?


Top
 Profile  
 
PostPosted: Fri Oct 17, 2008 5:13 am 
Offline
Persistant Poster
User avatar

Joined: Thu Jul 24, 2008 6:42 am
Posts: 703
Google Talk: infectiousbyte@gmail.com
You have MAX_MORAL_COLA instead of MAP_MORAL_COLA

=3

_________________
Image
GIAKEN wrote:
Since I'm into men, not women

GIAKEN wrote:
I can't take these huge penises anymore! All that's left is shame! And blood


Top
 Profile  
 
PostPosted: Fri Oct 17, 2008 5:22 am 
Offline
Knowledgeable
User avatar

Joined: Fri Sep 12, 2008 11:18 pm
Posts: 176
Location: England.
Nean wrote:
You have MAX_MORAL_COLA instead of MAP_MORAL_COLA

=3


& that. XD

Sorry, quick & easy mistake. Lawl.


Top
 Profile  
 
PostPosted: Fri Oct 17, 2008 7:17 am 
Offline
Persistant Poster
User avatar

Joined: Tue May 30, 2006 2:07 am
Posts: 836
Location: Nashville, Tennessee, USA
Google Talk: rs.ruggles@gmail.com
It depends on what you want to use the Cola Map moral for. For example, if you want the Cola Moral to make players drop gold when they die, then you'll be looking for Sub NPCAttackPlayer and Sub AttackPlayer.

_________________
I'm on Facebook! Google Plus My Youtube Channel My Steam Profile

Image


Top
 Profile  
 
PostPosted: Fri Oct 17, 2008 6:34 pm 
Offline
Pro
User avatar

Joined: Mon May 29, 2006 3:26 pm
Posts: 493
Location: São Paulo, Brasil
Google Talk: blackagesbr@gmail.com
When you want to add things to your game, I think the most easy way to proceed is to use the find(Ctrl+F) and find(duh) everything that's been used and where, then you add the new functionality basically by coping and pasting. Search for every piece of code that has MAP_MORAL_SAFE, I think that's a good starting point.
Good luck.

_________________
http://www.blackages.com.br
Image
Dave wrote:
GameBoy wrote:
www.FreeMoney.com
I admit I clicked. I immediately closed upon realizing there was, in fact, no free money.
Robin wrote:
I love you and your computer.Marry me.


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 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:  
Powered by phpBB® Forum Software © phpBB Group