Mirage Source
http://miragesource.net/forums/

[Tweak] Additional Mapping Layer (For MS4)
http://miragesource.net/forums/viewtopic.php?f=183&t=5734
Page 1 of 58

Author:  James [ Tue Jun 02, 2009 6:10 am ]
Post subject:  [Tweak] Additional Mapping Layer (For MS4)

Server Side
SPOILER: (click to show)
Open modTypes

Find
Code:
Public Type TileRec
    Ground As Integer
    Mask As Integer
    Anim As Integer
    Fringe As Integer
    Type As Byte
    Data1 As Integer
    Data2 As Integer
    Data3 As Integer
End Type


Replace With:
Code:
Public Type TileRec
    Ground As Integer
    Mask As Integer
    Anim As Integer
    ReMask As Integer
    ReAnim As Integer
    Fringe As Integer
    FAnim As Integer
    Over As Integer
    OverAnim As Integer
    Type As Byte
    Data1 As Integer
    Data2 As Integer
    Data3 As Integer
End Type


Client Side

SPOILER: (click to show)
Open modTypes

Find:
Code:
Public Type TileRec
    Ground As Integer
    Mask As Integer
    Anim As Integer
    Fringe As Integer
    Type As Byte
    Data1 As Integer
    Data2 As Integer
    Data3 As Integer
End Type


Replace With:
Code:
Public Type TileRec
    Ground As Integer
    Mask As Integer
    Anim As Integer
    ReMask As Integer
    ReAnim As Integer
    Fringe As Integer
    FAnim As Integer
    Over As Integer
    OverAnim As Integer
    Type As Byte
    Data1 As Integer
    Data2 As Integer
    Data3 As Integer
End Type


Find:
Code:
Public Type TilePosRec
    PosX As Long
    PosY As Long
    Ground As DXVBLib.RECT
    Mask As DXVBLib.RECT
    Anim As DXVBLib.RECT
    Fringe As DXVBLib.RECT
End Type


Replace With:
Code:
Public Type TilePosRec
    PosX As Long
    PosY As Long
    Ground As DXVBLib.RECT
    Mask As DXVBLib.RECT
    Anim As DXVBLib.RECT
    ReMask As DXVBLib.RECT
    ReAnim As DXVBLib.RECT
    Fringe As DXVBLib.RECT
    FAnim As DXVBLib.RECT
    Over As DXVBLib.RECT
    OverAnim As DXVBLib.RECT
End Type


Open modGameEditors

Find:
Code:
            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.optFringe.Value Then .Fringe = EditorTileY * TILESHEET_WIDTH + EditorTileX
            End With


Replace With:
Code:
            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


Find:
Code:
            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.optFringe.Value Then .Fringe = 0
            End With


Replace With:
Code:
            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
            End With


Replace Public Sub MapEditorClearLayer With:
Code:
Public Sub MapEditorClearLayer()
Dim X As Long
Dim Y As Long

    ' Ground layer
    If frmMirage.optGround.Value Then
        If MsgBox("Are you sure you wish to clear the ground layer?", vbYesNo, GAME_NAME) = vbYes Then
            For X = 0 To MAX_MAPX
                For Y = 0 To MAX_MAPY
                    Map.Tile(X, Y).Ground = 0
                Next
            Next
        End If
    End If

    ' Mask layer
    If frmMirage.optMask.Value Then
        If MsgBox("Are you sure you wish to clear the mask layer?", vbYesNo, GAME_NAME) = vbYes Then
            For X = 0 To MAX_MAPX
                For Y = 0 To MAX_MAPY
                    Map.Tile(X, Y).Mask = 0
                Next
            Next
        End If
    End If

    ' Animation layer
    If frmMirage.optAnim.Value Then
        If MsgBox("Are you sure you wish to clear the animation layer?", vbYesNo, GAME_NAME) = vbYes Then
            For X = 0 To MAX_MAPX
                For Y = 0 To MAX_MAPY
                    Map.Tile(X, Y).Anim = 0
                Next
            Next
        End If
    End If
   
    ' Re-Mask layer
    If frmMirage.optReMask.Value Then
        If MsgBox("Are you sure you wish to clear the re-mask layer?", vbYesNo, GAME_NAME) = vbYes Then
            For X = 0 To MAX_MAPX
                For Y = 0 To MAX_MAPY
                    Map.Tile(X, Y).ReMask = 0
                Next
            Next
        End If
    End If

    ' Re-Animation layer
    If frmMirage.optReAnim.Value Then
        If MsgBox("Are you sure you wish to clear the re-animation layer?", vbYesNo, GAME_NAME) = vbYes Then
            For X = 0 To MAX_MAPX
                For Y = 0 To MAX_MAPY
                    Map.Tile(X, Y).ReAnim = 0
                Next
            Next
        End If
    End If

    ' Fringe layer
    If frmMirage.optFringe.Value Then
        If MsgBox("Are you sure you wish to clear the fringe layer?", vbYesNo, GAME_NAME) = vbYes Then
            For X = 0 To MAX_MAPX
                For Y = 0 To MAX_MAPY
                    Map.Tile(X, Y).Fringe = 0
                Next
            Next
        End If
    End If
   
    ' Fringe Animation layer
    If frmMirage.optFAnim.Value Then
        If MsgBox("Are you sure you wish to clear the fringe-animation layer?", vbYesNo, GAME_NAME) = vbYes Then
            For X = 0 To MAX_MAPX
                For Y = 0 To MAX_MAPY
                    Map.Tile(X, Y).FAnim = 0
                Next
            Next
        End If
    End If
   
    ' Over layer
    If frmMirage.optOver.Value Then
        If MsgBox("Are you sure you wish to clear the over layer?", vbYesNo, GAME_NAME) = vbYes Then
            For X = 0 To MAX_MAPX
                For Y = 0 To MAX_MAPY
                    Map.Tile(X, Y).Over = 0
                Next
            Next
        End If
    End If
   
    ' Over Animation layer
    If frmMirage.optOverAnim.Value Then
        If MsgBox("Are you sure you wish to clear the over-animation layer?", vbYesNo, GAME_NAME) = vbYes Then
            For X = 0 To MAX_MAPX
                For Y = 0 To MAX_MAPY
                    Map.Tile(X, Y).OverAnim = 0
                Next
            Next
        End If
    End If
   
    Call CalcTilePositions
   
End Sub


Replace Public Sub MapEditorFillLayer With:
Code:
Public Sub MapEditorFillLayer()
Dim X As Long
Dim Y As Long

    ' Ground layer
    If frmMirage.optGround.Value Then
        If MsgBox("Are you sure you wish to fill the ground layer?", vbYesNo, GAME_NAME) = vbYes Then
            For X = 0 To MAX_MAPX
                For Y = 0 To MAX_MAPY
                    Map.Tile(X, Y).Ground = EditorTileY * TILESHEET_WIDTH + EditorTileX
                Next
            Next
        End If
    End If

    ' Mask layer
    If frmMirage.optMask.Value Then
        If MsgBox("Are you sure you wish to fill the mask layer?", vbYesNo, GAME_NAME) = vbYes Then
            For X = 0 To MAX_MAPX
                For Y = 0 To MAX_MAPY
                    Map.Tile(X, Y).Mask = EditorTileY * TILESHEET_WIDTH + EditorTileX
                Next
            Next
        End If
    End If

    ' Animation layer
    If frmMirage.optAnim.Value Then
        If MsgBox("Are you sure you wish to fill the animation layer?", vbYesNo, GAME_NAME) = vbYes Then
            For X = 0 To MAX_MAPX
                For Y = 0 To MAX_MAPY
                    Map.Tile(X, Y).Anim = EditorTileY * TILESHEET_WIDTH + EditorTileX
                Next
            Next
        End If
    End If
   
    ' Re-Mask layer
    If frmMirage.optReMask.Value Then
        If MsgBox("Are you sure you wish to fill the re-mask layer?", vbYesNo, GAME_NAME) = vbYes Then
            For X = 0 To MAX_MAPX
                For Y = 0 To MAX_MAPY
                    Map.Tile(X, Y).ReMask = EditorTileY * TILESHEET_WIDTH + EditorTileX
                Next
            Next
        End If
    End If
   
    ' Re-Animation layer
    If frmMirage.optReAnim.Value Then
        If MsgBox("Are you sure you wish to fill the re-animation layer?", vbYesNo, GAME_NAME) = vbYes Then
            For X = 0 To MAX_MAPX
                For Y = 0 To MAX_MAPY
                    Map.Tile(X, Y).ReAnim = EditorTileY * TILESHEET_WIDTH + EditorTileX
                Next
            Next
        End If
    End If

    ' Fringe layer
    If frmMirage.optFringe.Value Then
        If MsgBox("Are you sure you wish to fill the fringe layer?", vbYesNo, GAME_NAME) = vbYes Then
            For X = 0 To MAX_MAPX
                For Y = 0 To MAX_MAPY
                    Map.Tile(X, Y).Fringe = EditorTileY * TILESHEET_WIDTH + EditorTileX
                Next
            Next
        End If
    End If
   
    ' Fringe Animation layer
    If frmMirage.optFAnim.Value Then
        If MsgBox("Are you sure you wish to fill the fringe-animation layer?", vbYesNo, GAME_NAME) = vbYes Then
            For X = 0 To MAX_MAPX
                For Y = 0 To MAX_MAPY
                    Map.Tile(X, Y).FAnim = EditorTileY * TILESHEET_WIDTH + EditorTileX
                Next
            Next
        End If
    End If
   
    ' Over layer
    If frmMirage.optOver.Value Then
        If MsgBox("Are you sure you wish to fill the over layer?", vbYesNo, GAME_NAME) = vbYes Then
            For X = 0 To MAX_MAPX
                For Y = 0 To MAX_MAPY
                    Map.Tile(X, Y).Over = EditorTileY * TILESHEET_WIDTH + EditorTileX
                Next
            Next
        End If
    End If
   
    ' Over Animation layer
    If frmMirage.optOverAnim.Value Then
        If MsgBox("Are you sure you wish to fill the over-animation layer?", vbYesNo, GAME_NAME) = vbYes Then
            For X = 0 To MAX_MAPX
                For Y = 0 To MAX_MAPY
                    Map.Tile(X, Y).OverAnim = EditorTileY * TILESHEET_WIDTH + EditorTileX
                Next
            Next
        End If
    End If
   
    Call CalcTilePositions
   
End Sub


Replace Public Sub CalcTilePositions With:
Code:
Public Sub CalcTilePositions()
Dim X As Long
Dim Y As Long

    For X = 0 To MAX_MAPX
        For Y = 0 To MAX_MAPY
            MapTilePosition(X, Y).PosX = X * PIC_X
            MapTilePosition(X, Y).PosY = Y * PIC_Y
       
            MapTilePosition(X, Y).Ground.Top = (Map.Tile(X, Y).Ground \ TILESHEET_WIDTH) * PIC_Y
            MapTilePosition(X, Y).Ground.Bottom = MapTilePosition(X, Y).Ground.Top + PIC_Y
            MapTilePosition(X, Y).Ground.Left = (Map.Tile(X, Y).Ground Mod TILESHEET_WIDTH) * PIC_X
            MapTilePosition(X, Y).Ground.Right = MapTilePosition(X, Y).Ground.Left + PIC_X
       
            MapTilePosition(X, Y).Mask.Top = (Map.Tile(X, Y).Mask \ TILESHEET_WIDTH) * PIC_Y
            MapTilePosition(X, Y).Mask.Bottom = MapTilePosition(X, Y).Mask.Top + PIC_Y
            MapTilePosition(X, Y).Mask.Left = (Map.Tile(X, Y).Mask Mod TILESHEET_WIDTH) * PIC_X
            MapTilePosition(X, Y).Mask.Right = MapTilePosition(X, Y).Mask.Left + PIC_X
         
            MapTilePosition(X, Y).Anim.Top = (Map.Tile(X, Y).Anim \ TILESHEET_WIDTH) * PIC_Y
            MapTilePosition(X, Y).Anim.Bottom = MapTilePosition(X, Y).Anim.Top + PIC_Y
            MapTilePosition(X, Y).Anim.Left = (Map.Tile(X, Y).Anim Mod TILESHEET_WIDTH) * PIC_X
            MapTilePosition(X, Y).Anim.Right = MapTilePosition(X, Y).Anim.Left + PIC_X
           
            MapTilePosition(X, Y).ReMask.Top = (Map.Tile(X, Y).ReMask \ TILESHEET_WIDTH) * PIC_Y
            MapTilePosition(X, Y).ReMask.Bottom = MapTilePosition(X, Y).ReMask.Top + PIC_Y
            MapTilePosition(X, Y).ReMask.Left = (Map.Tile(X, Y).ReMask Mod TILESHEET_WIDTH) * PIC_X
            MapTilePosition(X, Y).ReMask.Right = MapTilePosition(X, Y).ReMask.Left + PIC_X
         
            MapTilePosition(X, Y).ReAnim.Top = (Map.Tile(X, Y).ReAnim \ TILESHEET_WIDTH) * PIC_Y
            MapTilePosition(X, Y).ReAnim.Bottom = MapTilePosition(X, Y).ReAnim.Top + PIC_Y
            MapTilePosition(X, Y).ReAnim.Left = (Map.Tile(X, Y).ReAnim Mod TILESHEET_WIDTH) * PIC_X
            MapTilePosition(X, Y).ReAnim.Right = MapTilePosition(X, Y).ReAnim.Left + PIC_X
         
            MapTilePosition(X, Y).Fringe.Top = (Map.Tile(X, Y).Fringe \ TILESHEET_WIDTH) * PIC_Y
            MapTilePosition(X, Y).Fringe.Bottom = MapTilePosition(X, Y).Fringe.Top + PIC_Y
            MapTilePosition(X, Y).Fringe.Left = (Map.Tile(X, Y).Fringe Mod TILESHEET_WIDTH) * PIC_X
            MapTilePosition(X, Y).Fringe.Right = MapTilePosition(X, Y).Fringe.Left + PIC_X
           
            MapTilePosition(X, Y).FAnim.Top = (Map.Tile(X, Y).FAnim \ TILESHEET_WIDTH) * PIC_Y
            MapTilePosition(X, Y).FAnim.Bottom = MapTilePosition(X, Y).FAnim.Top + PIC_Y
            MapTilePosition(X, Y).FAnim.Left = (Map.Tile(X, Y).FAnim Mod TILESHEET_WIDTH) * PIC_X
            MapTilePosition(X, Y).FAnim.Right = MapTilePosition(X, Y).FAnim.Left + PIC_X
           
            MapTilePosition(X, Y).Over.Top = (Map.Tile(X, Y).Over \ TILESHEET_WIDTH) * PIC_Y
            MapTilePosition(X, Y).Over.Bottom = MapTilePosition(X, Y).Over.Top + PIC_Y
            MapTilePosition(X, Y).Over.Left = (Map.Tile(X, Y).Over Mod TILESHEET_WIDTH) * PIC_X
            MapTilePosition(X, Y).Over.Right = MapTilePosition(X, Y).Over.Left + PIC_X
           
            MapTilePosition(X, Y).OverAnim.Top = (Map.Tile(X, Y).OverAnim \ TILESHEET_WIDTH) * PIC_Y
            MapTilePosition(X, Y).OverAnim.Bottom = MapTilePosition(X, Y).OverAnim.Top + PIC_Y
            MapTilePosition(X, Y).OverAnim.Left = (Map.Tile(X, Y).OverAnim Mod TILESHEET_WIDTH) * PIC_X
            MapTilePosition(X, Y).OverAnim.Right = MapTilePosition(X, Y).OverAnim.Left + PIC_X
        Next
    Next

End Sub


Replace Public Sub BltMapTile With:
Code:
Public Sub BltMapTile(ByVal X As Long, ByVal Y As Long)
    ' Blit out ground tile without transparency
    Call DD_BltFast(MapTilePosition(X, Y).PosX, MapTilePosition(X, Y).PosY, DDS_Tile.Surface, MapTilePosition(X, Y).Ground, DDBLTFAST_WAIT)

    If MapAnim = 0 Or Map.Tile(X, Y).Anim <= 0 Then
        If Map.Tile(X, Y).Mask > 0 Then
            If TempTile(X, Y).DoorOpen = NO Then
                Call DD_BltFast(MapTilePosition(X, Y).PosX, MapTilePosition(X, Y).PosY, DDS_Tile.Surface, MapTilePosition(X, Y).Mask, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
            End If
        End If
    Else
        ' Is there an animation tile to draw?
        If Map.Tile(X, Y).Anim > 0 Then
            Call DD_BltFast(MapTilePosition(X, Y).PosX, MapTilePosition(X, Y).PosY, DDS_Tile.Surface, MapTilePosition(X, Y).Anim, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
        End If
    End If
   
    'Second Mask
    If MapAnim = 0 Or Map.Tile(X, Y).ReAnim <= 0 Then
        If Map.Tile(X, Y).ReMask > 0 Then
            Call DD_BltFast(MapTilePosition(X, Y).PosX, MapTilePosition(X, Y).PosY, DDS_Tile.Surface, MapTilePosition(X, Y).ReMask, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
        End If
    Else
        ' Is there an animation tile to draw?
        If Map.Tile(X, Y).ReAnim > 0 Then
            Call DD_BltFast(MapTilePosition(X, Y).PosX, MapTilePosition(X, Y).PosY, DDS_Tile.Surface, MapTilePosition(X, Y).ReAnim, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
        End If
    End If
   
End Sub


Replace Public Sub BltMapFringeTile With:
Code:
Public Sub BltMapFringeTile(ByVal X As Long, ByVal Y As Long)
    If MapAnim = 0 Or Map.Tile(X, Y).FAnim <= 0 Then
        If Map.Tile(X, Y).Fringe > 0 Then
            Call DD_BltFast(MapTilePosition(X, Y).PosX, MapTilePosition(X, Y).PosY, DDS_Tile.Surface, MapTilePosition(X, Y).Fringe, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
        End If
    Else
        ' Is there an animation tile to draw?
        If Map.Tile(X, Y).FAnim > 0 Then
            Call DD_BltFast(MapTilePosition(X, Y).PosX, MapTilePosition(X, Y).PosY, DDS_Tile.Surface, MapTilePosition(X, Y).FAnim, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
        End If
    End If
   
    If MapAnim = 0 Or Map.Tile(X, Y).OverAnim <= 0 Then
        If Map.Tile(X, Y).Over > 0 Then
            Call DD_BltFast(MapTilePosition(X, Y).PosX, MapTilePosition(X, Y).PosY, DDS_Tile.Surface, MapTilePosition(X, Y).Over, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
        End If
    Else
        ' Is there an animation tile to draw?
        If Map.Tile(X, Y).OverAnim > 0 Then
            Call DD_BltFast(MapTilePosition(X, Y).PosX, MapTilePosition(X, Y).PosY, DDS_Tile.Surface, MapTilePosition(X, Y).OverAnim, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
        End If
    End If
End Sub


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.

Author:  GIAKEN [ Tue Jun 02, 2009 6:02 pm ]
Post subject:  Re: [Tweak] Additional Mapping Layer (For MS4)

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

Author:  Pix€l [ Tue Jun 16, 2009 7:43 am ]
Post subject:  Re: [Tweak] Additional Mapping Layer (For MS4)

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

Author:  GIAKEN [ Tue Jun 16, 2009 8:15 am ]
Post subject:  Re: [Tweak] Additional Mapping Layer (For MS4)

Need an End If after:

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

Author:  ExoShox [ Sat Jun 27, 2009 11:21 pm ]
Post subject:  Re: [Tweak] Additional Mapping Layer (For MS4)

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.)

Author:  James [ Sat Jun 27, 2009 11:53 pm ]
Post subject:  Re: [Tweak] Additional Mapping Layer (For MS4)

In MS4 is bases them off the enumeration. I don't remember editing any of that and it worked fine.

Author:  ExoShox [ Sun Jun 28, 2009 8:36 pm ]
Post subject:  Re: [Tweak] Additional Mapping Layer (For MS4)

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

Author:  Jacob [ Sun Jun 28, 2009 9:02 pm ]
Post subject:  Re: [Tweak] Additional Mapping Layer (For MS4)

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

Author:  ExoShox [ Sun Jun 28, 2009 9:14 pm ]
Post subject:  Re: [Tweak] Additional Mapping Layer (For MS4)

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

Author:  Joost [ Sun Jun 28, 2009 9:16 pm ]
Post subject:  Re: [Tweak] Additional Mapping Layer (For MS4)

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.

Author:  Jacob [ Sun Jun 28, 2009 9:27 pm ]
Post subject:  Re: [Tweak] Additional Mapping Layer (For MS4)

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.

Author:  ExoShox [ Sun Jun 28, 2009 9:31 pm ]
Post subject:  Re: [Tweak] Additional Mapping Layer (For MS4)

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.

Author:  wanai [ Wed Dec 01, 2021 9:02 am ]
Post subject:  Re: [Tweak] Additional Mapping Layer (For MS4)

сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтsemiasphalticfluxсайтсайтсайт
сайтсайтсайтсайтсайтсайтhttp://taskreasoning.ruсайтсайтсайтинфосайтсайтtuchkasсайтсайт

Author:  wanai [ Wed Jan 05, 2022 12:22 pm ]
Post subject:  Re: [Tweak] Additional Mapping Layer (For MS4)

Econ

Author:  wanai [ Wed Jan 05, 2022 12:23 pm ]
Post subject:  Re: [Tweak] Additional Mapping Layer (For MS4)

104.7

Author:  wanai [ Wed Jan 05, 2022 12:25 pm ]
Post subject:  Re: [Tweak] Additional Mapping Layer (For MS4)

Bett

Author:  wanai [ Wed Jan 05, 2022 12:26 pm ]
Post subject:  Re: [Tweak] Additional Mapping Layer (For MS4)

Bett

Author:  wanai [ Wed Jan 05, 2022 12:27 pm ]
Post subject:  Re: [Tweak] Additional Mapping Layer (For MS4)

Clif

Author:  wanai [ Wed Jan 05, 2022 12:28 pm ]
Post subject:  Re: [Tweak] Additional Mapping Layer (For MS4)

Roxa

Author:  wanai [ Wed Jan 05, 2022 12:29 pm ]
Post subject:  Re: [Tweak] Additional Mapping Layer (For MS4)

Wann

Author:  wanai [ Wed Jan 05, 2022 12:30 pm ]
Post subject:  Re: [Tweak] Additional Mapping Layer (For MS4)

Will

Author:  wanai [ Wed Jan 05, 2022 12:31 pm ]
Post subject:  Re: [Tweak] Additional Mapping Layer (For MS4)

Gode

Author:  wanai [ Wed Jan 05, 2022 12:33 pm ]
Post subject:  Re: [Tweak] Additional Mapping Layer (For MS4)

Deux

Author:  wanai [ Wed Jan 05, 2022 12:34 pm ]
Post subject:  Re: [Tweak] Additional Mapping Layer (For MS4)

Movi

Author:  wanai [ Wed Jan 05, 2022 12:35 pm ]
Post subject:  Re: [Tweak] Additional Mapping Layer (For MS4)

Prof

Page 1 of 58 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/