Upgrade 1.0.13 to 1.0.14
From VbGORE Visual Basic Online RPG Engine
Contents |
This guide will lead you through how to upgrade Version 1.0.13 to Version 1.0.14. For help, please refer to the How to upgrade article. It is highly recommended you read it before ever upgrading.
Fix - NPC respawning spell status
Open GameServer.vbp.
Find:
<vb>
'Set vars NPCList(NPCIndex).Pos = TempPos NPCList(NPCIndex).Flags.NPCAlive = 1
</vb>
Replace with:
<vb>
'Set vars NPCList(NPCIndex).Pos = TempPos NPCList(NPCIndex).Counters.BlessCounter = 0 NPCList(NPCIndex).Counters.ProtectCounter = 0 NPCList(NPCIndex).Counters.StrengthenCounter = 0 NPCList(NPCIndex).Counters.WarCurseCounter = 0 NPCList(NPCIndex).Flags.NPCAlive = 1
</vb>
Fix - Map editor tile setting display
Open EditorMap.vbp.
Find:
<vb>
'No-attack tiles
If Not (X < MinXBorder Or X > MaxXBorder Or Y < MinYBorder Or Y > MaxYBorder) Then
If MapData(X, Y).BlockedAttack Then
InfoLayer.Tile(InfoLayer.NumTiles).NumGrhs = InfoLayer.Tile(InfoLayer.NumTiles).NumGrhs + 1
ReDim Preserve InfoLayer.Tile(InfoLayer.NumTiles).Grh(1 To InfoLayer.Tile(InfoLayer.NumTiles).NumGrhs)
InfoLayer.Tile(InfoLayer.NumTiles).Grh(InfoLayer.Tile(InfoLayer.NumTiles).NumGrhs).Grh.GrhIndex = 10
InfoLayer.Tile(InfoLayer.NumTiles).Grh(InfoLayer.Tile(InfoLayer.NumTiles).NumGrhs).PixelPosX = pX
InfoLayer.Tile(InfoLayer.NumTiles).Grh(InfoLayer.Tile(InfoLayer.NumTiles).NumGrhs).PixelPosY = pY
End If
End If
</vb>
Replace with:
<vb>
'No-attack tiles
If Not (X < MinXBorder Or X > MaxXBorder Or Y < MinYBorder Or Y > MaxYBorder) Then
If MapData(X, Y).BlockedAttack Then
InfoLayer.Tile(InfoLayer.NumTiles).NumGrhs = InfoLayer.Tile(InfoLayer.NumTiles).NumGrhs + 1
ReDim Preserve InfoLayer.Tile(InfoLayer.NumTiles).Grh(1 To InfoLayer.Tile(InfoLayer.NumTiles).NumGrhs)
InfoLayer.Tile(InfoLayer.NumTiles).Grh(InfoLayer.Tile(InfoLayer.NumTiles).NumGrhs).Grh.GrhIndex = 90
InfoLayer.Tile(InfoLayer.NumTiles).Grh(InfoLayer.Tile(InfoLayer.NumTiles).NumGrhs).PixelPosX = pX
InfoLayer.Tile(InfoLayer.NumTiles).Grh(InfoLayer.Tile(InfoLayer.NumTiles).NumGrhs).PixelPosY = pY
End If
End If
</vb>
Fix - Attack timer
Open GameClient.vbp.
Find:
<vb>
Else
If Engine_UserIsFacingChar Then
sndBuf.Allocate 2
sndBuf.Put_Byte DataCode.User_Attack
sndBuf.Put_Byte CharList(UserCharIndex).Heading
End If
End If
</vb>
Replace with:
<vb>
Else
If Engine_UserIsFacingChar Then
LastAttackTime = timeGetTime
sndBuf.Allocate 2
sndBuf.Put_Byte DataCode.User_Attack
sndBuf.Put_Byte CharList(UserCharIndex).Heading
End If
End If
</vb>
Fix - Grh categorizing
Open EditorMap.vbp.
Find:
<vb>
If UCase$(Left$(1, 3)) = "GRH" Then
</vb>
Replace with:
<vb>
If UCase$(Left$(j, 3)) = "GRH" Then
</vb>
Fix - Autosave bug
Open GameServer.vbp.
Find:
<vb>
DB_RS!stat_sp_max = .Stats.BaseStat(SID.MaxSTA)
DB_RS!server = 0
</vb>
Replace with:
<vb>
DB_RS!stat_sp_max = .Stats.BaseStat(SID.MaxSTA)
If UserList(UserIndex).Flags.UserLogged = 0 Then
DB_RS!server = 0
Else
DB_RS!server = ServerID
End If
</vb>
Fix - Weapon attack animation
Open GameClient.vbp.
Find:
<vb>
'***** Render Character ***** '***** (When updating this, make sure you copy it to the NPCEditor and MapEditor, too!) ***** CharList(CharIndex).Weapon.Walk(CharList(CharIndex).Heading).FrameCounter = CharList(CharIndex).Body.Walk(CharList(CharIndex).Heading).FrameCounter
'The body, weapon and wings
If CharList(CharIndex).ActionIndex <= 1 Then
'Walking
BodyGrh = CharList(CharIndex).Body.Walk(CharList(CharIndex).Heading)
WeaponGrh = CharList(CharIndex).Weapon.Walk(CharList(CharIndex).Heading)
WingsGrh = CharList(CharIndex).Wings.Walk(CharList(CharIndex).Heading)
Else
'Attacking
BodyGrh = CharList(CharIndex).Body.Attack(CharList(CharIndex).Heading)
WeaponGrh = CharList(CharIndex).Weapon.Attack(CharList(CharIndex).Heading)
WingsGrh = CharList(CharIndex).Wings.Attack(CharList(CharIndex).Heading)
End If
</vb>
Replace with:
<vb>
'***** Render Character ***** '***** (When updating this, make sure you copy it to the NPCEditor and MapEditor, too!) *****
'The body, weapon and wings
If CharList(CharIndex).ActionIndex <= 1 Then
'Walking
BodyGrh = CharList(CharIndex).Body.Walk(CharList(CharIndex).Heading)
WeaponGrh = CharList(CharIndex).Weapon.Walk(CharList(CharIndex).Heading)
WingsGrh = CharList(CharIndex).Wings.Walk(CharList(CharIndex).Heading)
CharList(CharIndex).Weapon.Walk(CharList(CharIndex).Heading).FrameCounter = CharList(CharIndex).Body.Walk(CharList(CharIndex).Heading).FrameCounter
Else
'Attacking
BodyGrh = CharList(CharIndex).Body.Attack(CharList(CharIndex).Heading)
WeaponGrh = CharList(CharIndex).Weapon.Attack(CharList(CharIndex).Heading)
WingsGrh = CharList(CharIndex).Wings.Attack(CharList(CharIndex).Heading)
CharList(CharIndex).Weapon.Attack(CharList(CharIndex).Heading).FrameCounter = CharList(CharIndex).Body.Attack(CharList(CharIndex).Heading).FrameCounter
End If
</vb>
Fix - ChatWindow lighting
Open GameClient.vbp.
Find:
<vb>
Case ChatWindow
With GameWindow.ChatWindow
Engine_Render_Grh .SkinGrh, .Screen.X, .Screen.Y, 0, 1, True, GUIColorValue, GUIColorValue, GUIColorValue
End With
</vb>
Replace with:
<vb>
Case ChatWindow
With GameWindow.ChatWindow
Engine_Render_Grh .SkinGrh, .Screen.X, .Screen.Y, 0, 1, True, GUIColorValue, GUIColorValue, GUIColorValue, GUIColorValue
End With
</vb>
Fix - Equipped slot moving
Open GameServer.vbp.
Find:
<vb>
'Apply the values and send the update UserList(UserIndex).Object(SrcSlot) = SrcObj UserList(UserIndex).Object(DestSlot) = DestObj User_UpdateInv False, UserIndex, SrcSlot User_UpdateInv False, UserIndex, DestSlot
</vb>
After, add:
<vb>
'Check if the equipped item slots changed
If UserList(UserIndex).ArmorEqpSlot = SrcSlot Then
UserList(UserIndex).ArmorEqpSlot = DestSlot
ElseIf UserList(UserIndex).ArmorEqpSlot = DestSlot Then
UserList(UserIndex).ArmorEqpSlot = SrcSlot
End If
If UserList(UserIndex).WeaponEqpSlot = SrcSlot Then
UserList(UserIndex).WeaponEqpSlot = DestSlot
ElseIf UserList(UserIndex).WeaponEqpSlot = DestSlot Then
UserList(UserIndex).WeaponEqpSlot = SrcSlot
End If
If UserList(UserIndex).WingsEqpSlot = SrcSlot Then
UserList(UserIndex).WingsEqpSlot = DestSlot
ElseIf UserList(UserIndex).WingsEqpSlot = DestSlot Then
UserList(UserIndex).WingsEqpSlot = SrcSlot
End If
</vb>
Fix - Move Keys Config
Open GameClient.vbp.
Find:
<vb>
If GetKeyState(vbKeyW) < 0 And GetKeyState(vbKeyD) < 0 Then
Engine_MoveUser NORTHEAST
Exit Sub
End If
If GetKeyState(vbKeyW) < 0 And GetKeyState(vbKeyA) < 0 Then
Engine_MoveUser NORTHWEST
Exit Sub
End If
If GetKeyState(vbKeyS) < 0 And GetKeyState(vbKeyD) < 0 Then
Engine_MoveUser SOUTHEAST
Exit Sub
End If
If GetKeyState(vbKeyS) < 0 And GetKeyState(vbKeyA) < 0 Then
Engine_MoveUser SOUTHWEST
Exit Sub
End If
If GetKeyState(vbKeyW) < 0 Then
Engine_MoveUser NORTH
Exit Sub
End If
If GetKeyState(vbKeyD) < 0 Then
Engine_MoveUser EAST
Exit Sub
End If
If GetKeyState(vbKeyS) < 0 Then
Engine_MoveUser SOUTH
Exit Sub
End If
If GetKeyState(vbKeyA) < 0 Then
Engine_MoveUser WEST
Exit Sub
End If
</vb>
Replace with:
<vb>
If GetKeyState(KeyDefinitions.MoveNorth) < 0 And GetKeyState(KeyDefinitions.MoveEast) < 0 Then
Engine_MoveUser NORTHEAST
Exit Sub
End If
If GetKeyState(KeyDefinitions.MoveNorth) < 0 And GetKeyState(KeyDefinitions.MoveWest) < 0 Then
Engine_MoveUser NORTHWEST
Exit Sub
End If
If GetKeyState(KeyDefinitions.MoveSouth) < 0 And GetKeyState(KeyDefinitions.MoveEast) < 0 Then
Engine_MoveUser SOUTHEAST
Exit Sub
End If
If GetKeyState(KeyDefinitions.MoveSouth) < 0 And GetKeyState(KeyDefinitions.MoveWest) < 0 Then
Engine_MoveUser SOUTHWEST
Exit Sub
End If
If GetKeyState(KeyDefinitions.MoveNorth) < 0 Then
Engine_MoveUser NORTH
Exit Sub
End If
If GetKeyState(KeyDefinitions.MoveEast) < 0 Then
Engine_MoveUser EAST
Exit Sub
End If
If GetKeyState(KeyDefinitions.MoveSouth) < 0 Then
Engine_MoveUser SOUTH
Exit Sub
End If
If GetKeyState(KeyDefinitions.MoveWest) < 0 Then
Engine_MoveUser WEST
Exit Sub
End If
</vb>