Mirage Source
[Tweak] Additional Mapping Layer (For MS4) - Printable Version

+- Mirage Source (https://mirage-engine.uk/forums)
+-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61)
+--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18)
+---- Forum: Source Code Development (https://mirage-engine.uk/forums/forumdisplay.php?fid=51)
+----- Forum: Mirage Source 4 (Visual Basic 6) (https://mirage-engine.uk/forums/forumdisplay.php?fid=44)
+------ Forum: Tutorials (https://mirage-engine.uk/forums/forumdisplay.php?fid=13)
+------ Thread: [Tweak] Additional Mapping Layer (For MS4) (/showthread.php?tid=2836)



Re: [Tweak] Additional Mapping Layer (For MS4) - GIAKEN - 02-06-2009

Need to change it to Layer(0 To 3) As Integer or something...makes it easier to add more.


Re: [Tweak] Additional Mapping Layer (For MS4) - Pix€l - 16-06-2009

I've a bug in making of client !
error: " Else Without if "

In this code , pls help me !

Code:
Public Sub MapEditorMouseDown(Button As Integer)
    If Not isInBounds Then Exit Sub
    
    Select Case Button
    
        Case vbLeftButton
        
        If frmMirage.optLayers.Value Then
            
            With Map.Tile(CurX, CurY)
                If frmMirage.optGround.Value Then .Ground = EditorTileY * TILESHEET_WIDTH + EditorTileX
                If frmMirage.optMask.Value Then .Mask = EditorTileY * TILESHEET_WIDTH + EditorTileX
                If frmMirage.optAnim.Value Then .Anim = EditorTileY * TILESHEET_WIDTH + EditorTileX
                If frmMirage.optReMask.Value Then .ReMask = EditorTileY * TILESHEET_WIDTH + EditorTileX
                If frmMirage.optReAnim.Value Then .ReAnim = EditorTileY * TILESHEET_WIDTH + EditorTileX
                If frmMirage.optFringe.Value Then .Fringe = EditorTileY * TILESHEET_WIDTH + EditorTileX
                If frmMirage.optFAnim.Value Then .FAnim = EditorTileY * TILESHEET_WIDTH + EditorTileX
                If frmMirage.optOver.Value Then .Over = EditorTileY * TILESHEET_WIDTH + EditorTileX
                If frmMirage.optOverAnim.Value Then .OverAnim = EditorTileY * TILESHEET_WIDTH + EditorTileX
            End With
        
            Call CalcTilePositions
            
        Else
        
            With Map.Tile(CurX, CurY)
            
                ' clear data
                .Type = 0
                .Data1 = 0
                .Data2 = 0
                .Data3 = 0
            
                If frmMirage.optBlocked.Value Then .Type = TILE_TYPE_BLOCKED
                
                If frmMirage.optWarp.Value Then
                    .Type = TILE_TYPE_WARP
                    .Data1 = EditorData1
                    .Data2 = EditorData2
                    .Data3 = EditorData3
                End If
                If frmMirage.optItem.Value Then
                    .Type = TILE_TYPE_ITEM
                    .Data1 = EditorData1
                    .Data2 = EditorData2
                    .Data3 = 0
                End If
                If frmMirage.optNpcAvoid.Value Then
                    .Type = TILE_TYPE_NPCAVOID
                    .Data1 = 0
                    .Data2 = 0
                    .Data3 = 0
                End If
                If frmMirage.optKey.Value Then
                    .Type = TILE_TYPE_KEY
                    .Data1 = EditorData1
                    .Data2 = EditorData2
                    .Data3 = 0
                End If
                If frmMirage.optKeyOpen.Value Then
                    .Type = TILE_TYPE_KEYOPEN
                    .Data1 = EditorData1
                    .Data2 = EditorData2
                    .Data3 = 0
                End If
            End With
        End If
    
    Case vbRightButton
    
        If frmMirage.optLayers.Value Then
            
            With Map.Tile(CurX, CurY)
            
            If frmMirage.optGround.Value Then .Ground = 0
                If frmMirage.optMask.Value Then .Mask = 0
                If frmMirage.optAnim.Value Then .Anim = 0
                If frmMirage.optReMask.Value Then .ReMask = 0
                If frmMirage.optReAnim.Value Then .ReAnim = 0
                If frmMirage.optFringe.Value Then .Fringe = 0
                If frmMirage.optFAnim.Value Then .FAnim = 0
                If frmMirage.optOver.Value Then .Over = 0
                If frmMirage.optOverAnim.Value Then .OverAnim = 0
            Call CalcTilePositions
            
          [b]Else[/b]
            
            With Map.Tile(CurX, CurY)
                .Type = 0
                .Data1 = 0
                .Data2 = 0
                .Data3 = 0
            End With
        End If

    End Select

End Sub



Re: [Tweak] Additional Mapping Layer (For MS4) - GIAKEN - 16-06-2009

Need an End If after:

Code:
With Map.Tile(CurX, CurY)
                .Type = 0
                .Data1 = 0
                .Data2 = 0
                .Data3 = 0
            End With



Re: [Tweak] Additional Mapping Layer (For MS4) - ExoShox - 27-06-2009

James Wrote:After that, add all the necessary components client-side on frmMirage and you're set.

That should do it. Not the most difficult thing in the world, but for those who can't figure it out.

Well. No where near all of it. You need to edit the map data packets and the MapCache_Create on the Server or this won't work. (It only saves the Original Setup of Ground, Mask, Animation and Fringe.)


Re: [Tweak] Additional Mapping Layer (For MS4) - ExoShox - 28-06-2009

James Wrote:In MS4 is bases them off the enumeration. I don't remember editing any of that and it worked fine.
but i used ms4 to do this and it didnt work. the actual data is not sent/recieved or saved by the server


Re: [Tweak] Additional Mapping Layer (For MS4) - Jacob - 28-06-2009

Which version of MS4? This works for the byte array version because of the way I cache the maps.


Re: [Tweak] Additional Mapping Layer (For MS4) - ExoShox - 28-06-2009

Jacob Wrote:Which version of MS4? This works for the byte array version because of the way I cache the maps.
Lol im using 3.78 still. Once I finish a couple more features Im just going to convert it from .78 to .79


Re: [Tweak] Additional Mapping Layer (For MS4) - Joost - 28-06-2009

From the looks of it, it wont work. Unless the packets are really sent differently the server'll expect less tiles than it's recieving.


Re: [Tweak] Additional Mapping Layer (For MS4) - Jacob - 28-06-2009

In 3.79, I take the memory address of the map and use that to send data. This way you don't really mess with the packet data at all.

It's the same for Items, Npcs, Spells, and shops.


Re: [Tweak] Additional Mapping Layer (For MS4) - ExoShox - 28-06-2009

Jacob Wrote:In 3.79, I take the memory address of the map and use that to send data. This way you don't really mess with the packet data at all.

It's the same for Items, Npcs, Spells, and shops.

I saw that. I dont understand BAP's though. But if I can successfully rip it from MS 3.79 and put it into 3.78 i'll be fine.