mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-07-27 07:44:31 +02:00
Lots of QoL changes
- You can now run up and down a slideblock. - NPC movement type Straight is now less random and more smooth. - When renaming the rival, the skin visible at the top changes to whatever skin is set as the rivalskin. This way, the rival is not stuck with one skin. This can be useful when the rival's skin changes based on the player's gender for example. - Text messages that contain <token.tokenname>, where tokenname is a string from the localizations files, have the part between the <> replaced with that string now. - Text messages that contain <button.buttonname>, where buttonname is one of the controls defined in "Saves\Keyboard.dat", will now have the part between the <> replaced with the key assigned to that control. - Players can now be genderless instead of only either male or female in scripts. - Which skins are available in the intro is now defined in the GameMode's definition file instead of being hard-coded - Old New Game intro now uses the player skin data from the GameMode definition file - The Pokémon in the old New Game now doesn't fall too far down anymore - Scripts adjusted to match the new gender functionality
This commit is contained in:
parent
51a481da62
commit
9def5642e8
@ -15,10 +15,14 @@ version=2
|
|||||||
@Register.register(clubregisters,int,0)
|
@Register.register(clubregisters,int,0)
|
||||||
@player.move(0)
|
@player.move(0)
|
||||||
@player.turnto(1)
|
@player.turnto(1)
|
||||||
:if:<player.gender>=0
|
:if:<player.gender>=1
|
||||||
@text.show(I'm sorry this club is for mem-*Wait.~Are you perhaps~Miss <player.name>?*I am so sorry~for my rudeness.*Any trainer who is good~enough to be champion is~welcome at this club.*This club is intended~to be a place for powerful~trainers to hangout,~relax, and engage in~friendly battles.*Currently all of the~Gym Leaders of Kanto~and Johto are members,~but they rarely come by.*I am sure if a trainer~as strong as you told~them about this club and~asked them to join you~here they would do so.*They might even come~here willing to battle!)
|
@text.show(I'm sorry this club is for mem-*Wait.~Are you perhaps~Miss <player.name>?*I am so sorry~for my rudeness.*Any trainer who is good~enough to be champion is~welcome at this club.*This club is intended~to be a place for powerful~trainers to hangout,~relax, and engage in~friendly battles.*Currently all of the~Gym Leaders of Kanto~and Johto are members,~but they rarely come by.*I am sure if a trainer~as strong as you told~them about this club and~asked them to join you~here they would do so.*They might even come~here willing to battle!)
|
||||||
:else
|
:else
|
||||||
@text.show(I'm sorry this club is for mem-*Wait.~Are you perhaps~Mister <player.name>?*I am so sorry~for my rudeness.*Any trainer who is good~enough to be champion is~welcome at this club.*This club is intended~to be a place for powerful~trainers to hangout,~relax, and engage in~friendly battles.*Currently all of the~Gym Leaders of Kanto~and Johto are members,~but they rarely come by.*I am sure if a trainer~as strong as you told~them about this club and~asked them to join you~here they would do so.*They might even come~here willing to battle!)
|
:if:<player.gender>=0
|
||||||
|
@text.show(I'm sorry this club is for mem-*Wait.~Are you perhaps~Mister <player.name>?*I am so sorry~for my rudeness.*Any trainer who is good~enough to be champion is~welcome at this club.*This club is intended~to be a place for powerful~trainers to hangout,~relax, and engage in~friendly battles.*Currently all of the~Gym Leaders of Kanto~and Johto are members,~but they rarely come by.*I am sure if a trainer~as strong as you told~them about this club and~asked them to join you~here they would do so.*They might even come~here willing to battle!)
|
||||||
|
:else
|
||||||
|
@text.show(I'm sorry this club is for mem-*Wait.~Are you perhaps~<player.name>?*I am so sorry~for my rudeness.*Any trainer who is good~enough to be champion is~welcome at this club.*This club is intended~to be a place for powerful~trainers to hangout,~relax, and engage in~friendly battles.*Currently all of the~Gym Leaders of Kanto~and Johto are members,~but they rarely come by.*I am sure if a trainer~as strong as you told~them about this club and~asked them to join you~here they would do so.*They might even come~here willing to battle!)
|
||||||
|
:endif
|
||||||
:endif
|
:endif
|
||||||
@register.register(clubintro)
|
@register.register(clubintro)
|
||||||
:endif
|
:endif
|
||||||
|
Binary file not shown.
@ -164,19 +164,19 @@ inventory_menu_items,Items
|
|||||||
inventory_menu_description,Description
|
inventory_menu_description,Description
|
||||||
---
|
---
|
||||||
NewGameScreen:
|
NewGameScreen:
|
||||||
new_game_oak_1,Hello!~Sorry to keep~you waiting!*Welcome to the world~of Pokémon!*My name is Oak.~People call me~Pokémon Prof.*This world is inhabited~by creatures that~we call
|
new_game_intro_1,Hello!~Sorry to keep~you waiting!*Welcome to the world~of Pokémon!*My name is Oak.~People call me~Pokémon Prof.*This world is inhabited~by creatures that~we call
|
||||||
new_game_oak_2,Pokémon.*People and Pokémon live~together by supporting~each other.~Some people play with~Pokémon,~some battle with them.*But we don't know~everything about~Pokémon yet.~There are still many~mysteries to solve.*That's why I study~Pokémon every day.*Now, what did you~say your name was?
|
new_game_intro_2,Pokémon.*People and Pokémon live~together by supporting~each other.~Some people play with~Pokémon,~some battle with them.*But we don't know~everything about~Pokémon yet.~There are still many~mysteries to solve.*That's why I study~Pokémon every day.*Now, what did you~say your name was?
|
||||||
new_game_oak_3,~are you ready?*Your very own~Pokémon story is about~to unfold.*You'll face fun~times and tough~challenges.~A world of dreams and~adventures with Pokémon~awaits!*Let's go!*I'll be seeing~you later!
|
new_game_intro_3,~are you ready?*Your very own~Pokémon story is about~to unfold.*You'll face fun~times and tough~challenges.~A world of dreams and~adventures with Pokémon~awaits!*Let's go!*I'll be seeing~you later!
|
||||||
new_game_oak_weird_name_1,Right! So your name is~
|
new_game_intro_weird_name_1,Right! So your name is~
|
||||||
new_game_oak_weird_name_2,!*Hm that is a~weird name.
|
new_game_intro_weird_name_2,!*Hm that is a~weird name.
|
||||||
new_game_oak_known_name_1,Right! So your name is~
|
new_game_intro_known_name_1,Right! So your name is~
|
||||||
new_game_oak_known_name_2,!*Hm I am sure I~heard this name before.
|
new_game_intro_known_name_2,!*Hm I am sure I~heard this name before.
|
||||||
new_game_oak_same_name_1,Hey we got the~same names.*My name is also~
|
new_game_intro_same_name_1,Hey we got the~same names.*My name is also~
|
||||||
new_game_oak_same_name_2,!
|
new_game_intro_same_name_2,!
|
||||||
new_game_oak_name_1,Right! So your name is~
|
new_game_intro_name_1,Right! So your name is~
|
||||||
new_game_oak_name_2,!
|
new_game_intro_name_2,!
|
||||||
new_game_your_name,Your name
|
new_game_your_name,What's your name?
|
||||||
new_game_choose_skin,Choose skin
|
new_game_select_skin,Select your appearance
|
||||||
new_game_name_too_short,This name is too short
|
new_game_name_too_short,This name is too short
|
||||||
---
|
---
|
||||||
MapScreen:
|
MapScreen:
|
||||||
|
@ -99,7 +99,7 @@
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub FormatText()
|
Private Sub FormatText()
|
||||||
Dim tokenSearchBuffer As String() = Me.Text.Split(CChar("<"))
|
Dim tokenSearchBuffer As String() = Me.Text.Split(CChar("<token."))
|
||||||
Dim tokenEndIdx As Integer = 0
|
Dim tokenEndIdx As Integer = 0
|
||||||
Dim validToken As String = ""
|
Dim validToken As String = ""
|
||||||
Dim token As Token = Nothing
|
Dim token As Token = Nothing
|
||||||
@ -108,18 +108,23 @@
|
|||||||
If Not tokenEndIdx = -1 Then
|
If Not tokenEndIdx = -1 Then
|
||||||
validToken = possibleToken.Substring(0, tokenEndIdx)
|
validToken = possibleToken.Substring(0, tokenEndIdx)
|
||||||
If Localization.LocalizationTokens.ContainsKey(validToken) = True Then
|
If Localization.LocalizationTokens.ContainsKey(validToken) = True Then
|
||||||
If Localization.LocalizationTokens.TryGetValue(validToken, token) = True Then
|
Me.Text = Me.Text.Replace("<token." & validToken & ">", Localization.GetString(validToken, validToken))
|
||||||
Me.Text = Me.Text.Replace("<" & validToken & ">", token.TokenContent)
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
Me.Text = Me.Text.Replace("<playername>", Core.Player.Name)
|
Me.Text = Me.Text.Replace("<playername>", Core.Player.Name)
|
||||||
|
Me.Text = Me.Text.Replace("<player.name>", Core.Player.Name)
|
||||||
|
|
||||||
Me.Text = Me.Text.Replace("<rivalname>", Core.Player.RivalName)
|
Me.Text = Me.Text.Replace("<rivalname>", Core.Player.RivalName)
|
||||||
|
Me.Text = Me.Text.Replace("<rival.name>", Core.Player.RivalName)
|
||||||
|
|
||||||
Me.Text = Me.Text.Replace("[POKE]", "Poké")
|
Me.Text = Me.Text.Replace("[POKE]", "Poké")
|
||||||
Me.Text = Me.Text.Replace("[POKEMON]", "Pokémon")
|
Me.Text = Me.Text.Replace("[POKEMON]", "Pokémon")
|
||||||
|
|
||||||
|
Dim ClockTime = New DateTime(My.Computer.Clock.LocalTime.Year, My.Computer.Clock.LocalTime.Month, My.Computer.Clock.LocalTime.Day, My.Computer.Clock.LocalTime.Hour, My.Computer.Clock.LocalTime.Minute, My.Computer.Clock.LocalTime.Second)
|
||||||
|
Me.Text = Me.Text.Replace("<clocktime>", ClockTime.ToString("t", New System.Globalization.CultureInfo("en-US")))
|
||||||
|
Me.Text = Me.Text.Replace("<daytime>", World.GetTime.ToString)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub Update()
|
Public Sub Update()
|
||||||
|
@ -46,13 +46,21 @@
|
|||||||
Screen.Level.OverworldPokemon.Visible = False
|
Screen.Level.OverworldPokemon.Visible = False
|
||||||
Screen.Level.OverworldPokemon.warped = True
|
Screen.Level.OverworldPokemon.warped = True
|
||||||
|
|
||||||
|
Dim walkSpeed As Single = 1.0F
|
||||||
|
If Screen.Camera.Speed <> 0.04F Then
|
||||||
|
walkSpeed = Screen.Camera.Speed / 0.04F
|
||||||
|
End If
|
||||||
|
|
||||||
Dim s As String = "version=2" & Environment.NewLine &
|
Dim s As String = "version=2" & Environment.NewLine &
|
||||||
|
"@player.stopmovement" & Environment.NewLine &
|
||||||
"@player.setmovement(" & Screen.Camera.GetMoveDirection().X & ",1," & Screen.Camera.GetMoveDirection().Z & ")" & Environment.NewLine &
|
"@player.setmovement(" & Screen.Camera.GetMoveDirection().X & ",1," & Screen.Camera.GetMoveDirection().Z & ")" & Environment.NewLine &
|
||||||
|
"@player.setspeed(" & walkSpeed & ")" & Environment.NewLine &
|
||||||
"@player.move(" & Steps & ")" & Environment.NewLine &
|
"@player.move(" & Steps & ")" & Environment.NewLine &
|
||||||
"@player.setmovement(" & Screen.Camera.GetMoveDirection().X & ",0," & Screen.Camera.GetMoveDirection().Z & ")" & Environment.NewLine &
|
"@player.setmovement(" & Screen.Camera.GetMoveDirection().X & ",0," & Screen.Camera.GetMoveDirection().Z & ")" & Environment.NewLine &
|
||||||
"@pokemon.hide" & Environment.NewLine &
|
"@pokemon.hide" & Environment.NewLine &
|
||||||
"@player.move(1)" & Environment.NewLine &
|
"@player.move(1)" & Environment.NewLine &
|
||||||
"@pokemon.hide" & Environment.NewLine
|
"@pokemon.hide" & Environment.NewLine &
|
||||||
|
"@player.resetspeed" & Environment.NewLine
|
||||||
|
|
||||||
If Not Me.TempScriptEntity Is Nothing Then
|
If Not Me.TempScriptEntity Is Nothing Then
|
||||||
s &= GetScriptStartLine(Me.TempScriptEntity) & Environment.NewLine
|
s &= GetScriptStartLine(Me.TempScriptEntity) & Environment.NewLine
|
||||||
@ -131,11 +139,20 @@
|
|||||||
Screen.Level.OverworldPokemon.Visible = False
|
Screen.Level.OverworldPokemon.Visible = False
|
||||||
Screen.Level.OverworldPokemon.warped = True
|
Screen.Level.OverworldPokemon.warped = True
|
||||||
|
|
||||||
|
Dim walkSpeed As Single = 1.0F
|
||||||
|
If Screen.Camera.Speed <> 0.04F Then
|
||||||
|
walkSpeed = Screen.Camera.Speed / 0.04F
|
||||||
|
End If
|
||||||
|
|
||||||
Dim s As String = "version=2" & Environment.NewLine &
|
Dim s As String = "version=2" & Environment.NewLine &
|
||||||
|
"@player.stopmovement" & Environment.NewLine &
|
||||||
|
"@player.setmovement(" & Screen.Camera.GetMoveDirection().X & ",0," & Screen.Camera.GetMoveDirection().Z & ")" & Environment.NewLine &
|
||||||
|
"@player.setspeed(" & walkSpeed & ")" & Environment.NewLine &
|
||||||
"@player.move(1)" & Environment.NewLine &
|
"@player.move(1)" & Environment.NewLine &
|
||||||
"@player.setmovement(" & Screen.Camera.GetMoveDirection().X & ",-1," & Screen.Camera.GetMoveDirection().Z & ")" & Environment.NewLine &
|
"@player.setmovement(" & Screen.Camera.GetMoveDirection().X & ",-1," & Screen.Camera.GetMoveDirection().Z & ")" & Environment.NewLine &
|
||||||
"@player.move(" & Steps & ")" & Environment.NewLine &
|
"@player.move(" & Steps & ")" & Environment.NewLine &
|
||||||
"@pokemon.hide" & Environment.NewLine
|
"@pokemon.hide" & Environment.NewLine &
|
||||||
|
"@player.resetspeed" & Environment.NewLine
|
||||||
|
|
||||||
If Not Me.TempScriptEntity Is Nothing Then
|
If Not Me.TempScriptEntity Is Nothing Then
|
||||||
s &= GetScriptStartLine(Me.TempScriptEntity) & Environment.NewLine
|
s &= GetScriptStartLine(Me.TempScriptEntity) & Environment.NewLine
|
||||||
|
@ -101,6 +101,14 @@
|
|||||||
HasPokemonTexture = True
|
HasPokemonTexture = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Me.TextureID = "<player.skin>" Then
|
||||||
|
Me.TextureID = Core.Player.Skin
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Me.TextureID = "<rival.skin>" Then
|
||||||
|
Me.TextureID = Core.Player.RivalSkin
|
||||||
|
End If
|
||||||
|
|
||||||
Dim PokemonAddition As String = ""
|
Dim PokemonAddition As String = ""
|
||||||
|
|
||||||
If UseTextureID.StartsWith("Pokemon\Overworld\") = True Then
|
If UseTextureID.StartsWith("Pokemon\Overworld\") = True Then
|
||||||
@ -116,14 +124,13 @@
|
|||||||
Else
|
Else
|
||||||
Me.Texture = P3D.TextureManager.GetTexture(texturePath & Me.TextureID & PokemonAddition)
|
Me.Texture = P3D.TextureManager.GetTexture(texturePath & Me.TextureID & PokemonAddition)
|
||||||
End If
|
End If
|
||||||
|
If Me.Texture.Width = Me.Texture.Height / 2 Then
|
||||||
Me.FrameSize = New Vector2(CInt(Me.Texture.Width / 3), CInt(Me.Texture.Height / 4))
|
Me.FrameSize = New Vector2(CInt(Me.Texture.Width / 2), CInt(Me.Texture.Height / 4))
|
||||||
|
Else
|
||||||
If HasPokemonTexture = True Then
|
Me.FrameSize = New Vector2(CInt(Me.Texture.Width / 3), CInt(Me.Texture.Height / 4))
|
||||||
Me.FrameSize = New Vector2(Me.FrameSize.X, Me.FrameSize.Y)
|
|
||||||
End If
|
End If
|
||||||
If Me.Movement = Movements.Pokeball Then
|
If Me.Movement = Movements.Pokeball Then
|
||||||
Me.FrameSize = New Vector2(32, 32)
|
Me.FrameSize = New Vector2(Me.Texture.Width, Me.Texture.Height)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
lastRectangle = New Rectangle(0, 0, 0, 0)
|
lastRectangle = New Rectangle(0, 0, 0, 0)
|
||||||
@ -200,7 +207,7 @@
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Private Function GetAnimationX() As Integer
|
Private Function GetAnimationX() As Integer
|
||||||
If Me.HasPokemonTexture = True Then
|
If Me.Texture.Width = Me.Texture.Height / 2 Then
|
||||||
Select Case AnimationX
|
Select Case AnimationX
|
||||||
Case 1
|
Case 1
|
||||||
Return 0
|
Return 0
|
||||||
@ -211,18 +218,19 @@
|
|||||||
Case 4
|
Case 4
|
||||||
Return 1
|
Return 1
|
||||||
End Select
|
End Select
|
||||||
|
Else
|
||||||
|
Select Case AnimationX
|
||||||
|
Case 1
|
||||||
|
Return 0
|
||||||
|
Case 2
|
||||||
|
Return 1
|
||||||
|
Case 3
|
||||||
|
Return 0
|
||||||
|
Case 4
|
||||||
|
Return 2
|
||||||
|
End Select
|
||||||
End If
|
End If
|
||||||
Select Case AnimationX
|
Return 0
|
||||||
Case 1
|
|
||||||
Return 0
|
|
||||||
Case 2
|
|
||||||
Return 1
|
|
||||||
Case 3
|
|
||||||
Return 0
|
|
||||||
Case 4
|
|
||||||
Return 2
|
|
||||||
End Select
|
|
||||||
Return 1
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Sub ChangeTexture()
|
Private Sub ChangeTexture()
|
||||||
@ -554,24 +562,119 @@
|
|||||||
End If
|
End If
|
||||||
Case Movements.Straight
|
Case Movements.Straight
|
||||||
If Me.Moved = 0.0F Then
|
If Me.Moved = 0.0F Then
|
||||||
If Core.Random.Next(0, 15) = 0 Then
|
''newRotation = rotation that is used for checking a possible position and for setting the new faceRotation
|
||||||
Dim newRotation As Integer = Me.faceRotation
|
Dim newRotation As Integer = Me.faceRotation
|
||||||
While newRotation = Me.faceRotation
|
''frontRotation = original faceRotation
|
||||||
newRotation = Core.Random.Next(0, 4)
|
Dim frontRotation As Integer = Me.faceRotation
|
||||||
End While
|
|
||||||
Me.faceRotation = newRotation
|
|
||||||
End If
|
|
||||||
Dim contains As Boolean = False
|
Dim contains As Boolean = False
|
||||||
Dim newPosition As Vector3 = (GetMove() / Speed) + Me.Position
|
Dim newPosition As Vector3 = (GetMove(newRotation) / Speed) + Me.Position
|
||||||
If CheckCollision(newPosition) = True Then
|
Dim blocked As Boolean = False
|
||||||
For Each r As Rectangle In Me.MoveRectangles
|
|
||||||
If r.Contains(New Point(CInt(newPosition.X), CInt(newPosition.Z))) = True Then
|
'' check if player is not in the way
|
||||||
contains = True
|
If CInt(Screen.Camera.Position.X) = newPosition.X And CInt(Screen.Camera.Position.Z) = newPosition.Z Then
|
||||||
Exit For
|
blocked = True
|
||||||
End If
|
End If
|
||||||
Next
|
'' check if a following Pokémon is not in the way
|
||||||
|
If CInt(Screen.Level.OverworldPokemon.Position.X) = newPosition.X And CInt(Screen.Level.OverworldPokemon.Position.Z) = newPosition.Z Then
|
||||||
|
blocked = True
|
||||||
|
End If
|
||||||
|
'' check if an NPC is not in the way
|
||||||
|
For Each NPC As NPC In Screen.Level.GetNPCs()
|
||||||
|
If CInt(NPC.Position.X) = newPosition.X And CInt(NPC.Position.Z) = newPosition.Z And NPC.NPCID <> Me.NPCID Then
|
||||||
|
blocked = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
'' check if a NetworkPlayer is not in the way
|
||||||
|
For Each Player As NetworkPlayer In Screen.Level.NetworkPlayers
|
||||||
|
If CInt(Player.Position.X) = newPosition.X And CInt(Player.Position.Z) = newPosition.Z Then
|
||||||
|
blocked = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
'' check if a NetworkPokémon is not in the way
|
||||||
|
For Each Pokemon As NetworkPokemon In Screen.Level.NetworkPokemon
|
||||||
|
If CInt(Pokemon.Position.X) = newPosition.X And CInt(Pokemon.Position.Z) = newPosition.Z Then
|
||||||
|
blocked = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
If blocked = False Then
|
||||||
|
If CheckCollision(newPosition) = True Then
|
||||||
|
For Each r As Rectangle In Me.MoveRectangles
|
||||||
|
If r.Contains(New Point(CInt(newPosition.X), CInt(newPosition.Z))) = True Then
|
||||||
|
contains = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
If contains = True Then
|
If contains = True Then
|
||||||
|
'' Only change faceRotation when it's possible to move
|
||||||
|
Me.faceRotation = newRotation
|
||||||
Moved = 1.0F
|
Moved = 1.0F
|
||||||
|
Else
|
||||||
|
'' If not possible to move forward, check right
|
||||||
|
newRotation = frontRotation + 1
|
||||||
|
If newRotation > 3 Then
|
||||||
|
newRotation = newRotation - 4
|
||||||
|
End If
|
||||||
|
newPosition = (GetMove(newRotation) / Speed) + Me.Position
|
||||||
|
If CheckCollision(newPosition) = True Then
|
||||||
|
For Each r As Rectangle In Me.MoveRectangles
|
||||||
|
If r.Contains(New Point(CInt(newPosition.X), CInt(newPosition.Z))) = True Then
|
||||||
|
contains = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
If contains = True Then
|
||||||
|
'' Only change faceRotation when it's possible to move
|
||||||
|
Me.faceRotation = newRotation
|
||||||
|
Moved = 1.0F
|
||||||
|
Else
|
||||||
|
'' If not possible to move to the right, check left
|
||||||
|
newRotation = frontRotation - 1
|
||||||
|
If newRotation < 0 Then
|
||||||
|
newRotation = newRotation + 4
|
||||||
|
End If
|
||||||
|
newPosition = (GetMove(newRotation) / Speed) + Me.Position
|
||||||
|
If CheckCollision(newPosition) = True Then
|
||||||
|
For Each r As Rectangle In Me.MoveRectangles
|
||||||
|
If r.Contains(New Point(CInt(newPosition.X), CInt(newPosition.Z))) = True Then
|
||||||
|
contains = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
If contains = True Then
|
||||||
|
'' Only change faceRotation when it's possible to move
|
||||||
|
Me.faceRotation = newRotation
|
||||||
|
Moved = 1.0F
|
||||||
|
Else
|
||||||
|
'' If not possible to move to the left, check behind
|
||||||
|
newRotation = frontRotation + 2
|
||||||
|
If newRotation > 3 Then
|
||||||
|
newRotation = newRotation - 4
|
||||||
|
End If
|
||||||
|
newPosition = (GetMove(newRotation) / Speed) + Me.Position
|
||||||
|
|
||||||
|
If CheckCollision(newPosition) = True Then
|
||||||
|
For Each r As Rectangle In Me.MoveRectangles
|
||||||
|
If r.Contains(New Point(CInt(newPosition.X), CInt(newPosition.Z))) = True Then
|
||||||
|
contains = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
If contains = True Then
|
||||||
|
'' Only change faceRotation when it's possible to move
|
||||||
|
Me.faceRotation = newRotation
|
||||||
|
Moved = 1.0F
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@ -580,6 +683,7 @@
|
|||||||
|
|
||||||
Private Function CheckCollision(ByVal newPosition As Vector3) As Boolean
|
Private Function CheckCollision(ByVal newPosition As Vector3) As Boolean
|
||||||
newPosition = New Vector3(CInt(newPosition.X), CInt(newPosition.Y), CInt(newPosition.Z))
|
newPosition = New Vector3(CInt(newPosition.X), CInt(newPosition.Y), CInt(newPosition.Z))
|
||||||
|
Dim oldPosition As Vector3 = Me.Position
|
||||||
|
|
||||||
Dim interactPlayer As Boolean = True
|
Dim interactPlayer As Boolean = True
|
||||||
|
|
||||||
@ -589,6 +693,14 @@
|
|||||||
interactPlayer = False
|
interactPlayer = False
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
Else
|
||||||
|
Dim cameraNewPosition As Vector3 = Screen.Camera.GetForwardMovedPosition()
|
||||||
|
Dim cameraOldPosition As Vector3 = Screen.Camera.GetForwardMovedPosition() - Screen.Camera.GetMoveDirection()
|
||||||
|
If CInt(cameraNewPosition.X) <> newPosition.X And CInt(cameraOldPosition.X) <> newPosition.X Or CInt(cameraNewPosition.Z) <> newPosition.Z And CInt(cameraOldPosition.Z) <> newPosition.Z Then
|
||||||
|
If CInt(Screen.Level.OverworldPokemon.Position.X) <> newPosition.X Or CInt(Screen.Level.OverworldPokemon.Position.Z) <> newPosition.Z Then
|
||||||
|
interactPlayer = False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If interactPlayer = True Then
|
If interactPlayer = True Then
|
||||||
@ -677,9 +789,15 @@
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function GetMove() As Vector3
|
Private Function GetMove(Optional ByVal rotation As Integer = 6) As Vector3
|
||||||
Dim moveVector As Vector3
|
Dim moveVector As Vector3
|
||||||
Select Case Me.faceRotation
|
Dim functionRotation As Integer
|
||||||
|
If rotation = 6 Then
|
||||||
|
functionRotation = Me.faceRotation
|
||||||
|
Else
|
||||||
|
functionRotation = rotation
|
||||||
|
End If
|
||||||
|
Select Case functionRotation
|
||||||
Case 0
|
Case 0
|
||||||
moveVector = New Vector3(0, 0, -1) * Speed
|
moveVector = New Vector3(0, 0, -1) * Speed
|
||||||
Case 1
|
Case 1
|
||||||
|
@ -34,9 +34,7 @@
|
|||||||
|
|
||||||
If GameModeManager.GameModeCount > 0 Then
|
If GameModeManager.GameModeCount > 0 Then
|
||||||
Dim GameModeLocalizationPath As String = GameModeManager.ActiveGameMode.LocalizationsPath
|
Dim GameModeLocalizationPath As String = GameModeManager.ActiveGameMode.LocalizationsPath
|
||||||
If GameModeLocalizationPath <> GameMode.DefaultLocalizationsPath Then
|
LoadTokenFile(GameModeLocalizationPath, True)
|
||||||
LoadTokenFile(GameModeLocalizationPath, True)
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Logger.Debug("---Reloaded GameMode Tokens---")
|
Logger.Debug("---Reloaded GameMode Tokens---")
|
||||||
@ -44,13 +42,18 @@
|
|||||||
|
|
||||||
Private Shared Sub LoadTokenFile(ByVal path As String, ByVal IsGameModeFile As Boolean)
|
Private Shared Sub LoadTokenFile(ByVal path As String, ByVal IsGameModeFile As Boolean)
|
||||||
Dim fullpath As String = GameController.GamePath & path
|
Dim fullpath As String = GameController.GamePath & path
|
||||||
|
Dim tokenFullpath As String = fullpath & "Tokens_" & LanguageSuffix & ".dat"
|
||||||
|
|
||||||
|
Logger.Debug("Token filepath: " & tokenFullpath)
|
||||||
|
|
||||||
If System.IO.Directory.GetFiles(fullpath).Count > 0 Then
|
If System.IO.Directory.GetFiles(fullpath).Count > 0 Then
|
||||||
If System.IO.File.Exists(fullpath & "Tokens_" & LanguageSuffix & ".dat") = False Then
|
If System.IO.File.Exists(tokenFullpath) = False Then
|
||||||
|
Logger.Debug("Did NOT find token file for suffix: " & LanguageSuffix)
|
||||||
LanguageSuffix = "en"
|
LanguageSuffix = "en"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If System.IO.File.Exists(fullpath & "Tokens_" & LanguageSuffix & ".dat") = True Then
|
If System.IO.File.Exists(tokenFullpath) = True Then
|
||||||
|
Logger.Debug("Found token file for suffix: " & LanguageSuffix)
|
||||||
Dim TokensFile() As String = System.IO.File.ReadAllLines(fullpath & "Tokens_" & LanguageSuffix & ".dat")
|
Dim TokensFile() As String = System.IO.File.ReadAllLines(fullpath & "Tokens_" & LanguageSuffix & ".dat")
|
||||||
Dim splitIdx As Integer = 0
|
Dim splitIdx As Integer = 0
|
||||||
For Each TokenLine As String In TokensFile
|
For Each TokenLine As String In TokensFile
|
||||||
@ -65,6 +68,9 @@
|
|||||||
|
|
||||||
If LocalizationTokens.ContainsKey(TokenName) = False Then
|
If LocalizationTokens.ContainsKey(TokenName) = False Then
|
||||||
LocalizationTokens.Add(TokenName, New Token(TokenContent, LanguageSuffix, IsGameModeFile))
|
LocalizationTokens.Add(TokenName, New Token(TokenContent, LanguageSuffix, IsGameModeFile))
|
||||||
|
Else
|
||||||
|
LocalizationTokens.Remove(TokenName)
|
||||||
|
LocalizationTokens.Add(TokenName, New Token(TokenContent, LanguageSuffix, IsGameModeFile))
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
@ -86,6 +92,9 @@
|
|||||||
|
|
||||||
If LocalizationTokens.ContainsKey(TokenName) = False Then
|
If LocalizationTokens.ContainsKey(TokenName) = False Then
|
||||||
LocalizationTokens.Add(TokenName, New Token(TokenContent, "en", IsGameModeFile))
|
LocalizationTokens.Add(TokenName, New Token(TokenContent, "en", IsGameModeFile))
|
||||||
|
Else
|
||||||
|
LocalizationTokens.Remove(TokenName)
|
||||||
|
LocalizationTokens.Add(TokenName, New Token(TokenContent, "en", IsGameModeFile))
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
@ -101,10 +110,77 @@
|
|||||||
Return s
|
Return s
|
||||||
Else
|
Else
|
||||||
Dim result As String = resultToken.TokenContent
|
Dim result As String = resultToken.TokenContent
|
||||||
If Not Core.Player Is Nothing Then
|
If Core.Player IsNot Nothing Then
|
||||||
result = result.Replace("<playername>", Core.Player.Name)
|
result = result.Replace("<playername>", Core.Player.Name)
|
||||||
|
result = result.Replace("<player.name>", Core.Player.Name)
|
||||||
result = result.Replace("<rivalname>", Core.Player.RivalName)
|
result = result.Replace("<rivalname>", Core.Player.RivalName)
|
||||||
|
result = result.Replace("<player.name>", Core.Player.RivalName)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Dim tokenSearchBuffer As String() = result.Split("<button.")
|
||||||
|
Dim tokenEndIdx As Integer = 0
|
||||||
|
Dim validToken As String = ""
|
||||||
|
For Each possibleToken As String In tokenSearchBuffer
|
||||||
|
tokenEndIdx = possibleToken.IndexOf(">")
|
||||||
|
If Not tokenEndIdx = -1 Then
|
||||||
|
Dim key As Keys
|
||||||
|
validToken = possibleToken.Substring(0, tokenEndIdx)
|
||||||
|
Select Case validToken.ToLower()
|
||||||
|
Case "moveforward"
|
||||||
|
key = KeyBindings.ForwardMoveKey
|
||||||
|
Case "moveleft"
|
||||||
|
key = KeyBindings.LeftMoveKey
|
||||||
|
Case "movebackward"
|
||||||
|
key = KeyBindings.BackwardMoveKey
|
||||||
|
Case "moveright"
|
||||||
|
key = KeyBindings.RightMoveKey
|
||||||
|
Case "openmenu"
|
||||||
|
key = KeyBindings.OpenInventoryKey
|
||||||
|
Case "chat"
|
||||||
|
key = KeyBindings.ChatKey
|
||||||
|
Case "special", "phone"
|
||||||
|
key = KeyBindings.SpecialKey
|
||||||
|
Case "muteaudio"
|
||||||
|
key = KeyBindings.MuteAudioKey
|
||||||
|
Case "cameraleft"
|
||||||
|
key = KeyBindings.LeftKey
|
||||||
|
Case "cameraright"
|
||||||
|
key = KeyBindings.RightKey
|
||||||
|
Case "cameraup"
|
||||||
|
key = KeyBindings.UpKey
|
||||||
|
Case "cameradown"
|
||||||
|
key = KeyBindings.DownKey
|
||||||
|
Case "cameralock"
|
||||||
|
key = KeyBindings.CameraLockKey
|
||||||
|
Case "guicontrol"
|
||||||
|
key = KeyBindings.GUIControlKey
|
||||||
|
Case "screenshot"
|
||||||
|
key = KeyBindings.ScreenshotKey
|
||||||
|
Case "debugcontrol"
|
||||||
|
key = KeyBindings.DebugKey
|
||||||
|
Case "perspectiveswitch"
|
||||||
|
key = KeyBindings.PerspectiveSwitchKey
|
||||||
|
Case "fullscreen"
|
||||||
|
key = KeyBindings.FullScreenKey
|
||||||
|
Case "enter1"
|
||||||
|
key = KeyBindings.EnterKey1
|
||||||
|
Case "enter2"
|
||||||
|
key = KeyBindings.EnterKey2
|
||||||
|
Case "back1"
|
||||||
|
key = KeyBindings.BackKey1
|
||||||
|
Case "back2"
|
||||||
|
key = KeyBindings.BackKey2
|
||||||
|
Case "escape", "esc"
|
||||||
|
key = KeyBindings.EscapeKey
|
||||||
|
Case "onlinestatus"
|
||||||
|
key = KeyBindings.OnlineStatusKey
|
||||||
|
Case "lighting"
|
||||||
|
key = KeyBindings.LightKey
|
||||||
|
End Select
|
||||||
|
result = result.Replace("<button." & validToken & ">", KeyBindings.GetKeyName(key))
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
Return result
|
Return result
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
|
@ -869,6 +869,7 @@ Namespace GameJolt
|
|||||||
"MapFile|yourroom.dat" & Environment.NewLine &
|
"MapFile|yourroom.dat" & Environment.NewLine &
|
||||||
"Rotation|1.570796" & Environment.NewLine &
|
"Rotation|1.570796" & Environment.NewLine &
|
||||||
"RivalName|???" & Environment.NewLine &
|
"RivalName|???" & Environment.NewLine &
|
||||||
|
"RivalSkin|Silver" & Environment.NewLine &
|
||||||
"Money|3000" & Environment.NewLine &
|
"Money|3000" & Environment.NewLine &
|
||||||
"Badges|0" & Environment.NewLine &
|
"Badges|0" & Environment.NewLine &
|
||||||
"Gender|Male" & Environment.NewLine &
|
"Gender|Male" & Environment.NewLine &
|
||||||
|
@ -23,13 +23,21 @@
|
|||||||
_rivalName = value
|
_rivalName = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
Public Property RivalSkin() As String
|
||||||
Public Property Male() As Boolean
|
|
||||||
Get
|
Get
|
||||||
Return _male
|
Return _rivalSkin
|
||||||
End Get
|
End Get
|
||||||
Set(value As Boolean)
|
Set(value As String)
|
||||||
_male = value
|
_rivalSkin = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property Gender() As String
|
||||||
|
Get
|
||||||
|
Return _gender
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
_gender = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@ -368,8 +376,9 @@
|
|||||||
|
|
||||||
'Secure fields:
|
'Secure fields:
|
||||||
Private _name As String = "<playername>"
|
Private _name As String = "<playername>"
|
||||||
Private _rivalName As String = ""
|
Private _rivalName As String = "???"
|
||||||
Private _male As Boolean = True
|
Private _rivalSkin As String = "Silver"
|
||||||
|
Private _gender As String = "Male"
|
||||||
Private _money As Integer = 0
|
Private _money As Integer = 0
|
||||||
Private _OT As String = "00000"
|
Private _OT As String = "00000"
|
||||||
Private _points As Integer = 0
|
Private _points As Integer = 0
|
||||||
@ -758,6 +767,8 @@
|
|||||||
startMap = Value
|
startMap = Value
|
||||||
Case "rivalname"
|
Case "rivalname"
|
||||||
RivalName = Value
|
RivalName = Value
|
||||||
|
Case "rivalskin"
|
||||||
|
RivalSkin = Value
|
||||||
Case "money"
|
Case "money"
|
||||||
Money = CInt(Value)
|
Money = CInt(Value)
|
||||||
Case "badges"
|
Case "badges"
|
||||||
@ -778,11 +789,13 @@
|
|||||||
End If
|
End If
|
||||||
Case "rotation"
|
Case "rotation"
|
||||||
startRotation = CSng(Value.Replace(".", GameController.DecSeparator))
|
startRotation = CSng(Value.Replace(".", GameController.DecSeparator))
|
||||||
Case "Gender"
|
Case "gender"
|
||||||
If Value = "Male" Then
|
If Value = "0" Then
|
||||||
Male = True
|
Gender = "Male"
|
||||||
|
ElseIf Value = "1" Then
|
||||||
|
Gender = "Female"
|
||||||
Else
|
Else
|
||||||
Male = False
|
Gender = "Other"
|
||||||
End If
|
End If
|
||||||
Case "playtime"
|
Case "playtime"
|
||||||
Dim dd() As String = Value.Split(CChar(","))
|
Dim dd() As String = Value.Split(CChar(","))
|
||||||
@ -875,12 +888,12 @@
|
|||||||
If IsGameJoltSave = True And startSurfing = False Then
|
If IsGameJoltSave = True And startSurfing = False Then
|
||||||
Skin = GameJolt.Emblem.GetPlayerSpriteFile(GameJolt.Emblem.GetPlayerLevel(GameJoltSave.Points), GameJoltSave.GameJoltID, GameJoltSave.Gender)
|
Skin = GameJolt.Emblem.GetPlayerSpriteFile(GameJolt.Emblem.GetPlayerLevel(GameJoltSave.Points), GameJoltSave.GameJoltID, GameJoltSave.Gender)
|
||||||
Select Case GameJoltSave.Gender
|
Select Case GameJoltSave.Gender
|
||||||
Case "0"
|
Case "Male"
|
||||||
Male = True
|
Gender = "Male"
|
||||||
Case "1"
|
Case "Female"
|
||||||
Male = False
|
Gender = "Female"
|
||||||
Case Else
|
Case Else
|
||||||
Male = True
|
Gender = "Other"
|
||||||
End Select
|
End Select
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@ -1231,10 +1244,12 @@
|
|||||||
|
|
||||||
Public Function GetPlayerData(ByVal IsAutosave As Boolean) As String
|
Public Function GetPlayerData(ByVal IsAutosave As Boolean) As String
|
||||||
Dim GenderString As String = ""
|
Dim GenderString As String = ""
|
||||||
If Male = True Then
|
If Gender = "Male" Then
|
||||||
GenderString = "Male"
|
GenderString = "Male"
|
||||||
Else
|
ElseIf Gender = "Female" Then
|
||||||
GenderString = "Female"
|
GenderString = "Female"
|
||||||
|
Else
|
||||||
|
GenderString = "Other"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim badgeString As String = ""
|
Dim badgeString As String = ""
|
||||||
@ -1295,6 +1310,7 @@
|
|||||||
"MapFile|" & Screen.Level.LevelFile & Environment.NewLine &
|
"MapFile|" & Screen.Level.LevelFile & Environment.NewLine &
|
||||||
"Rotation|" & c.Yaw.ToString.Replace(GameController.DecSeparator, ".") & Environment.NewLine &
|
"Rotation|" & c.Yaw.ToString.Replace(GameController.DecSeparator, ".") & Environment.NewLine &
|
||||||
"RivalName|" & RivalName & Environment.NewLine &
|
"RivalName|" & RivalName & Environment.NewLine &
|
||||||
|
"RivalSkin|" & RivalSkin & Environment.NewLine &
|
||||||
"Money|" & Money & Environment.NewLine &
|
"Money|" & Money & Environment.NewLine &
|
||||||
"Badges|" & badgeString & Environment.NewLine &
|
"Badges|" & badgeString & Environment.NewLine &
|
||||||
"Gender|" & GenderString & Environment.NewLine &
|
"Gender|" & GenderString & Environment.NewLine &
|
||||||
@ -2027,7 +2043,7 @@
|
|||||||
'Restore default values:
|
'Restore default values:
|
||||||
Name = "<playername>"
|
Name = "<playername>"
|
||||||
RivalName = ""
|
RivalName = ""
|
||||||
Male = True
|
RivalSkin = ""
|
||||||
Money = 0
|
Money = 0
|
||||||
PlayTime = TimeSpan.Zero
|
PlayTime = TimeSpan.Zero
|
||||||
GameStart = Date.Now
|
GameStart = Date.Now
|
||||||
|
@ -378,12 +378,13 @@ Public Class GameMode
|
|||||||
''' <param name="StartLocationName">The start location name for the new GameMode.</param>
|
''' <param name="StartLocationName">The start location name for the new GameMode.</param>
|
||||||
''' <param name="PokemonAppear">The Pokémon that appear on the new game screen for the new GameMode.</param>
|
''' <param name="PokemonAppear">The Pokémon that appear on the new game screen for the new GameMode.</param>
|
||||||
''' <param name="IntroMusic">The intro music that plays on the new game screen for the new GameMode.</param>
|
''' <param name="IntroMusic">The intro music that plays on the new game screen for the new GameMode.</param>
|
||||||
''' <param name="IntroType">The type of intro used when starting a new game for the GameMode (0 = New Intro (3D), 1 = Old Intro (2D)).</param>
|
''' <param name="IntroType">The type of intro used when starting a new game for the GameMode (0 = Old Intro (2D), 1 = New Intro (3D)).</param>
|
||||||
''' <param name="SkinColors">The skin colors for the new GameMode. Must be the same amount as SkinFiles and SkinNames.</param>
|
''' <param name="SkinColors">The skin colors for the new GameMode. Must be the same amount as SkinFiles and SkinNames.</param>
|
||||||
''' <param name="SkinFiles">The skin files for the new GameMode. Must be the same amount as SkinColors and SkinNames.</param>
|
''' <param name="SkinFiles">The skin files for the new GameMode. Must be the same amount as SkinColors and SkinNames.</param>
|
||||||
''' <param name="SkinNames">The skin names for the new GameMode. Must be the same amount as SkinFiles and SkinColors.</param>
|
''' <param name="SkinNames">The skin names for the new GameMode. Must be the same amount as SkinFiles and SkinColors.</param>
|
||||||
|
''' <param name="SkinGenders">The skin names for the new GameMode. Must be the same amount as SkinFiles and SkinColors.</param>
|
||||||
Public Sub New(ByVal Name As String, ByVal Description As String, ByVal Version As String, ByVal Author As String, ByVal MapPath As String, ByVal ScriptPath As String, ByVal PokeFilePath As String, ByVal PokemonDataPath As String, ByVal ContentPath As String, ByVal LocalizationsPath As String, ByVal GameRules As List(Of GameRule),
|
Public Sub New(ByVal Name As String, ByVal Description As String, ByVal Version As String, ByVal Author As String, ByVal MapPath As String, ByVal ScriptPath As String, ByVal PokeFilePath As String, ByVal PokemonDataPath As String, ByVal ContentPath As String, ByVal LocalizationsPath As String, ByVal GameRules As List(Of GameRule),
|
||||||
ByVal StartMap As String, ByVal StartPosition As Vector3, ByVal StartRotation As Single, ByVal StartLocationName As String, ByVal StartDialogue As String, ByVal StartColor As Color, ByVal PokemonAppear As String, ByVal IntroMusic As String, ByVal IntroType As String, ByVal SkinColors As List(Of Color), ByVal SkinFiles As List(Of String), ByVal SkinNames As List(Of String))
|
ByVal StartMap As String, ByVal StartPosition As Vector3, ByVal StartRotation As Single, ByVal StartLocationName As String, ByVal StartDialogue As String, ByVal StartColor As Color, ByVal PokemonAppear As String, ByVal IntroMusic As String, ByVal IntroType As String, ByVal SkinColors As List(Of Color), ByVal SkinFiles As List(Of String), ByVal SkinNames As List(Of String), ByVal SkinGenders As List(Of String))
|
||||||
Me._name = Name
|
Me._name = Name
|
||||||
Me._description = Description
|
Me._description = Description
|
||||||
Me._version = Version
|
Me._version = Version
|
||||||
@ -408,6 +409,7 @@ Public Class GameMode
|
|||||||
Me._skinColors = SkinColors
|
Me._skinColors = SkinColors
|
||||||
Me._skinFiles = SkinFiles
|
Me._skinFiles = SkinFiles
|
||||||
Me._skinNames = SkinNames
|
Me._skinNames = SkinNames
|
||||||
|
Me._skinGenders = SkinGenders
|
||||||
|
|
||||||
Me._loaded = True
|
Me._loaded = True
|
||||||
End Sub
|
End Sub
|
||||||
@ -524,6 +526,14 @@ Public Class GameMode
|
|||||||
If l.Count > 0 Then
|
If l.Count > 0 Then
|
||||||
Me._skinNames = l
|
Me._skinNames = l
|
||||||
End If
|
End If
|
||||||
|
Case "skingenders"
|
||||||
|
Dim l As New List(Of String)
|
||||||
|
For Each skin As String In Value.Split(CChar(","))
|
||||||
|
l.Add(skin)
|
||||||
|
Next
|
||||||
|
If l.Count > 0 Then
|
||||||
|
Me._skinGenders = l
|
||||||
|
End If
|
||||||
End Select
|
End Select
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
@ -556,9 +566,10 @@ Public Class GameMode
|
|||||||
Dim SkinColors As List(Of Color) = {New Color(248, 176, 32), New Color(248, 216, 88), New Color(56, 88, 200), New Color(216, 96, 112), New Color(56, 88, 152), New Color(239, 90, 156)}.ToList()
|
Dim SkinColors As List(Of Color) = {New Color(248, 176, 32), New Color(248, 216, 88), New Color(56, 88, 200), New Color(216, 96, 112), New Color(56, 88, 152), New Color(239, 90, 156)}.ToList()
|
||||||
Dim SkinFiles As List(Of String) = {"Ethan", "Lyra", "Nate", "Rosa", "Hilbert", "Hilda"}.ToList()
|
Dim SkinFiles As List(Of String) = {"Ethan", "Lyra", "Nate", "Rosa", "Hilbert", "Hilda"}.ToList()
|
||||||
Dim SkinNames As List(Of String) = {"Ethan", "Lyra", "Nate", "Rosa", "Hilbert", "Hilda"}.ToList()
|
Dim SkinNames As List(Of String) = {"Ethan", "Lyra", "Nate", "Rosa", "Hilbert", "Hilda"}.ToList()
|
||||||
|
Dim SkinGenders As List(Of String) = {"Male", "Female", "Male", "Female", "Male", "Female"}.ToList()
|
||||||
|
|
||||||
Dim gameMode As New GameMode("Pokemon 3D", "The normal game mode.", GameController.GAMEVERSION, "Kolben Games", "\Content\Data\maps\", "\Content\Data\Scripts\", "\Content\Data\maps\poke\", "\Content\Pokemon\Data\", "\Content\", "\Content\Localization\", New List(Of GameRule),
|
Dim gameMode As New GameMode("Pokemon 3D", "The normal game mode.", GameController.GAMEVERSION, "Kolben Games", "\Content\Data\maps\", "\Content\Data\Scripts\", "\Content\Data\maps\poke\", "\Content\Pokemon\Data\", "\Content\", "\Content\Localization\", New List(Of GameRule),
|
||||||
"newgame\intro0.dat", New Vector3(1.0F, 0.1F, 3.0F), MathHelper.PiOver2, "Your Room", "", New Color(59, 123, 165), "0", "welcome", "1", SkinColors, SkinFiles, SkinNames)
|
"newgame\intro0.dat", New Vector3(1.0F, 0.1F, 3.0F), MathHelper.PiOver2, "Your Room", "", New Color(59, 123, 165), "0", "welcome", "1", SkinColors, SkinFiles, SkinNames, SkinGenders)
|
||||||
|
|
||||||
Dim gameRules As New List(Of GameRule)
|
Dim gameRules As New List(Of GameRule)
|
||||||
gameRules.Add(New GameRule("MaxLevel", "100"))
|
gameRules.Add(New GameRule("MaxLevel", "100"))
|
||||||
@ -650,7 +661,21 @@ Public Class GameMode
|
|||||||
iSN += 1
|
iSN += 1
|
||||||
Next
|
Next
|
||||||
|
|
||||||
s &= SkinNamesString
|
s &= SkinNamesString & Environment.NewLine
|
||||||
|
|
||||||
|
Dim SkinGendersString As String = "SkinGenders|"
|
||||||
|
Dim iSG As Integer = 0
|
||||||
|
For Each SkinGender As String In Me._skinGenders
|
||||||
|
If iSG > 0 Then
|
||||||
|
SkinGendersString &= ","
|
||||||
|
End If
|
||||||
|
|
||||||
|
SkinGendersString &= SkinGender
|
||||||
|
|
||||||
|
iSG += 1
|
||||||
|
Next
|
||||||
|
|
||||||
|
s &= SkinGendersString
|
||||||
|
|
||||||
Dim folder As String = System.IO.Path.GetDirectoryName(File)
|
Dim folder As String = System.IO.Path.GetDirectoryName(File)
|
||||||
If System.IO.Directory.Exists(folder) = False Then
|
If System.IO.Directory.Exists(folder) = False Then
|
||||||
@ -839,6 +864,7 @@ Public Class GameMode
|
|||||||
Private _skinColors As New List(Of Color)
|
Private _skinColors As New List(Of Color)
|
||||||
Private _skinFiles As New List(Of String)
|
Private _skinFiles As New List(Of String)
|
||||||
Private _skinNames As New List(Of String)
|
Private _skinNames As New List(Of String)
|
||||||
|
Private _skinGenders As New List(Of String)
|
||||||
Private _pokemonRange() As Integer
|
Private _pokemonRange() As Integer
|
||||||
|
|
||||||
''' <summary>
|
''' <summary>
|
||||||
@ -1007,6 +1033,18 @@ Public Class GameMode
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' The skin genders for this GameMode. Must be the same amount as SkinFiles and SkinColors.
|
||||||
|
''' </summary>
|
||||||
|
Public Property SkinGenders() As List(Of String)
|
||||||
|
Get
|
||||||
|
Return Me._skinGenders
|
||||||
|
End Get
|
||||||
|
Set(value As List(Of String))
|
||||||
|
Me._skinGenders = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
''' <summary>
|
''' <summary>
|
||||||
''' The default gamemode boot up script.
|
''' The default gamemode boot up script.
|
||||||
''' </summary>
|
''' </summary>
|
||||||
|
@ -152,8 +152,6 @@
|
|||||||
Core.Player.BerryData = CreateBerryData()
|
Core.Player.BerryData = CreateBerryData()
|
||||||
Core.Player.AddVisitedMap("yourroom.dat")
|
Core.Player.AddVisitedMap("yourroom.dat")
|
||||||
Core.Player.SaveCreated = GameController.GAMEDEVELOPMENTSTAGE & " " & GameController.GAMEVERSION
|
Core.Player.SaveCreated = GameController.GAMEDEVELOPMENTSTAGE & " " & GameController.GAMEVERSION
|
||||||
Core.Player.RivalName = "???"
|
|
||||||
|
|
||||||
|
|
||||||
Dim ot As String = Core.Random.Next(0, 999999).ToString()
|
Dim ot As String = Core.Random.Next(0, 999999).ToString()
|
||||||
While ot.Length < 6
|
While ot.Length < 6
|
||||||
@ -202,7 +200,10 @@
|
|||||||
|
|
||||||
Inherits Screen
|
Inherits Screen
|
||||||
|
|
||||||
Private _skins As String()
|
Private _skins As New List(Of String)
|
||||||
|
Private _names As New List(Of String)
|
||||||
|
Private _colors As New List(Of Color)
|
||||||
|
Private _genders As New List(Of String)
|
||||||
Private _sprites As New List(Of Texture2D)
|
Private _sprites As New List(Of Texture2D)
|
||||||
|
|
||||||
Private _offset As Single = 0F
|
Private _offset As Single = 0F
|
||||||
@ -221,7 +222,7 @@
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public Sub New(ByVal currentScreen As Screen, ByVal skins As String())
|
Public Sub New(ByVal currentScreen As Screen)
|
||||||
Identification = Identifications.CharacterSelectionScreen
|
Identification = Identifications.CharacterSelectionScreen
|
||||||
PreScreen = currentScreen
|
PreScreen = currentScreen
|
||||||
CanBePaused = True
|
CanBePaused = True
|
||||||
@ -230,12 +231,16 @@
|
|||||||
CanGoFullscreen = True
|
CanGoFullscreen = True
|
||||||
CanTakeScreenshot = True
|
CanTakeScreenshot = True
|
||||||
MouseVisible = True
|
MouseVisible = True
|
||||||
|
SelectedSkin = ""
|
||||||
|
|
||||||
For Each skin As String In skins
|
For Each skin As String In GameModeManager.ActiveGameMode.SkinFiles
|
||||||
_sprites.Add(TextureManager.GetTexture("Textures\NPC\" & skin))
|
_sprites.Add(TextureManager.GetTexture("Textures\OverworldSprites\PlayerSkins\" & skin))
|
||||||
Next
|
Next
|
||||||
|
|
||||||
_skins = skins
|
_skins = GameModeManager.ActiveGameMode.SkinFiles
|
||||||
|
_names = GameModeManager.ActiveGameMode.SkinNames
|
||||||
|
_genders = GameModeManager.ActiveGameMode.SkinGenders
|
||||||
|
_colors = GameModeManager.ActiveGameMode.SkinColors
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Overrides Sub Update()
|
Public Overrides Sub Update()
|
||||||
@ -291,12 +296,12 @@
|
|||||||
|
|
||||||
Public Overrides Sub Draw()
|
Public Overrides Sub Draw()
|
||||||
PreScreen.Draw()
|
PreScreen.Draw()
|
||||||
|
Dim backcolor As New Color(_colors(_index), CInt(100 * _fadeIn))
|
||||||
|
|
||||||
Canvas.DrawRectangle(windowSize, Screens.UI.ColorProvider.MainColor(False, CInt(100 * _fadeIn)))
|
Canvas.DrawRectangle(windowSize, backcolor)
|
||||||
|
|
||||||
DrawGradients(255)
|
SpriteBatch.DrawString(FontManager.MainFont, Localization.GetString("new_game_select_skin"), New Vector2(windowSize.Width / 2.0F - FontManager.MainFont.MeasureString(Localization.GetString("new_game_select_skin")).X + 2, 100 + 2), New Color(0, 0, 0, CInt(255 * _fadeIn)), 0F, Vector2.Zero, 2.0F, SpriteEffects.None, 0F)
|
||||||
|
SpriteBatch.DrawString(FontManager.MainFont, Localization.GetString("new_game_select_skin"), New Vector2(windowSize.Width / 2.0F - FontManager.MainFont.MeasureString(Localization.GetString("new_game_select_skin")).X, 100), New Color(255, 255, 255, CInt(255 * _fadeIn)), 0F, Vector2.Zero, 2.0F, SpriteEffects.None, 0F)
|
||||||
SpriteBatch.DrawString(FontManager.MainFont, "Select your appearance", New Vector2(windowSize.Width / 2.0F - FontManager.MainFont.MeasureString("Select your appearance").X, 100), New Color(255, 255, 255, CInt(255 * _fadeIn)), 0F, Vector2.Zero, 2.0F, SpriteEffects.None, 0F)
|
|
||||||
|
|
||||||
For i = 0 To _sprites.Count - 1
|
For i = 0 To _sprites.Count - 1
|
||||||
Dim sprite As Texture2D = _sprites(i)
|
Dim sprite As Texture2D = _sprites(i)
|
||||||
@ -307,7 +312,8 @@
|
|||||||
SpriteBatch.Draw(sprite, New Rectangle(CInt(windowSize.Width / 2 - CInt(outSize / 2) + i * 280 - _index * 280 + _offset), CInt(windowSize.Height / 2 - 128), outSize, outSize), New Rectangle(0, frameSize.Height * 2, frameSize.Width, frameSize.Height), New Color(255, 255, 255, CInt(255 * _fadeIn)))
|
SpriteBatch.Draw(sprite, New Rectangle(CInt(windowSize.Width / 2 - CInt(outSize / 2) + i * 280 - _index * 280 + _offset), CInt(windowSize.Height / 2 - 128), outSize, outSize), New Rectangle(0, frameSize.Height * 2, frameSize.Width, frameSize.Height), New Color(255, 255, 255, CInt(255 * _fadeIn)))
|
||||||
Next
|
Next
|
||||||
|
|
||||||
SpriteBatch.DrawString(FontManager.MainFont, _skins(_index), New Vector2(windowSize.Width / 2.0F - FontManager.MainFont.MeasureString(_skins(_index)).X / 2.0F, windowSize.Height / 2.0F + 200), New Color(255, 255, 255, CInt(255 * _fadeIn)))
|
SpriteBatch.DrawString(FontManager.MainFont, _names(_index), New Vector2(CInt(windowSize.Width / 2.0F - FontManager.MainFont.MeasureString(_names(_index)).X), CInt(windowSize.Height / 2.0F + 200)), New Color(255, 255, 255, CInt(255 * _fadeIn)), 0F, Vector2.Zero, 2.0F, SpriteEffects.None, 0F)
|
||||||
|
SpriteBatch.DrawString(FontManager.MainFont, _genders(_index), New Vector2(CInt(windowSize.Width / 2.0F - FontManager.MainFont.MeasureString(_genders(_index)).X / 2.0F), CInt(windowSize.Height / 2.0F + 300)), New Color(255, 255, 255, CInt(255 * _fadeIn)), 0F, Vector2.Zero, 1.0F, SpriteEffects.None, 0F)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
@ -1507,6 +1507,7 @@ Public Class GameModeSelectionScreen
|
|||||||
End If
|
End If
|
||||||
If Controls.Accept(True, True, True) Then
|
If Controls.Accept(True, True, True) Then
|
||||||
GameModeManager.SetGameModePointer(_gameModes(_index).DirectoryName)
|
GameModeManager.SetGameModePointer(_gameModes(_index).DirectoryName)
|
||||||
|
Localization.ReloadGameModeTokens()
|
||||||
SoundManager.PlaySound("select")
|
SoundManager.PlaySound("select")
|
||||||
If GameModeManager.ActiveGameMode.IntroType = "0" Then
|
If GameModeManager.ActiveGameMode.IntroType = "0" Then
|
||||||
SetScreen(New TransitionScreen(Me.PreScreen, New NewGameScreen(), Color.Black, False))
|
SetScreen(New TransitionScreen(Me.PreScreen, New NewGameScreen(), Color.Black, False))
|
||||||
|
@ -2,9 +2,10 @@
|
|||||||
|
|
||||||
Inherits Screen
|
Inherits Screen
|
||||||
|
|
||||||
Dim startSkins() As String = {"Ethan", "Lyra", "Nate", "Rosa", "Hilbert", "Hilda"}
|
Dim skinFiles() As String = {GameModeManager.ActiveGameMode.SkinFiles.ToString}
|
||||||
Dim skinNames() As String = {"Ethan", "Lyra", "Nate", "Rosa", "Hilbert", "Hilda"}
|
Dim skinNames() As String = {GameModeManager.ActiveGameMode.SkinNames.ToString}
|
||||||
Dim backColors() As Color = {New Color(248, 176, 32), New Color(248, 216, 88), New Color(56, 88, 200), New Color(216, 96, 112), New Color(56, 88, 152), New Color(239, 90, 156)}
|
Dim skinGenders() As String = {GameModeManager.ActiveGameMode.SkinGenders.ToString}
|
||||||
|
Dim skinColors As List(Of Color) = GameModeManager.ActiveGameMode.SkinColors
|
||||||
|
|
||||||
Public Index As Integer = 0
|
Public Index As Integer = 0
|
||||||
Dim pokeIndex As Integer = 0
|
Dim pokeIndex As Integer = 0
|
||||||
@ -78,7 +79,9 @@
|
|||||||
TextBox.Showing = False
|
TextBox.Showing = False
|
||||||
Me.Index = 0
|
Me.Index = 0
|
||||||
TextBox.reDelay = 0
|
TextBox.reDelay = 0
|
||||||
skinTexture = TextureManager.GetTexture(TextureManager.GetTexture("Textures\NPC\" & startSkins(SkinIndex)), New Rectangle(0, 64, 32, 32))
|
Dim skinTexture2D = TextureManager.GetTexture("Textures\NPC\" & skinFiles(SkinIndex))
|
||||||
|
Dim skinRectangle As New Rectangle(0, CInt(skinTexture2D.Height / 4 * 2), CInt(skinTexture2D.Width / 3), CInt(skinTexture2D.Height / 4))
|
||||||
|
skinTexture = TextureManager.GetTexture(skinTexture2D, skinRectangle)
|
||||||
|
|
||||||
MusicManager.Play("nomusic")
|
MusicManager.Play("nomusic")
|
||||||
End Sub
|
End Sub
|
||||||
@ -87,8 +90,9 @@
|
|||||||
Dim GameMode As GameMode = GameModeManager.ActiveGameMode
|
Dim GameMode As GameMode = GameModeManager.ActiveGameMode
|
||||||
|
|
||||||
Me.skinNames = GameMode.SkinNames.ToArray()
|
Me.skinNames = GameMode.SkinNames.ToArray()
|
||||||
Me.startSkins = GameMode.SkinFiles.ToArray()
|
Me.skinFiles = GameMode.SkinFiles.ToArray()
|
||||||
Me.backColors = GameMode.SkinColors.ToArray()
|
Me.skinGenders = GameMode.SkinGenders.ToArray()
|
||||||
|
Me.skinColors = GameMode.SkinColors
|
||||||
|
|
||||||
Me.pokemonRange = GameMode.PokemonRange
|
Me.pokemonRange = GameMode.PokemonRange
|
||||||
Me.introMusic = GameMode.IntroMusic
|
Me.introMusic = GameMode.IntroMusic
|
||||||
@ -104,10 +108,11 @@
|
|||||||
Dim Splits() As String = GameMode.StartDialogue.Split(CChar("|"))
|
Dim Splits() As String = GameMode.StartDialogue.Split(CChar("|"))
|
||||||
Me.Dialogues.AddRange(Splits)
|
Me.Dialogues.AddRange(Splits)
|
||||||
End If
|
End If
|
||||||
End If
|
Else
|
||||||
If Me.Dialogues.Count < 3 Then
|
If Me.Dialogues.Count < 3 Then
|
||||||
Me.Dialogues.Clear()
|
Me.Dialogues.Clear()
|
||||||
Me.Dialogues.AddRange({Localization.GetString("new_game_oak_1"), Localization.GetString("new_game_oak_2"), Localization.GetString("new_game_oak_3")})
|
Me.Dialogues.AddRange({Localization.GetString("new_game_intro_1"), Localization.GetString("new_game_intro_2"), Localization.GetString("new_game_intro_3")})
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@ -154,7 +159,7 @@
|
|||||||
Dim AimColor As Color = normalColor
|
Dim AimColor As Color = normalColor
|
||||||
|
|
||||||
If Me.Index = 4 Then
|
If Me.Index = 4 Then
|
||||||
AimColor = backColors(SkinIndex)
|
AimColor = skinColors(SkinIndex)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim diffR As Byte = 5
|
Dim diffR As Byte = 5
|
||||||
@ -207,40 +212,42 @@
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
Public Overrides Sub Draw()
|
Public Overrides Sub Draw()
|
||||||
Canvas.DrawRectangle(New Rectangle(0, 0, Core.windowSize.Width, Core.windowSize.Height), currentBackColor)
|
Canvas.DrawRectangle(New Rectangle(0, 0, Core.windowSize.Width, Core.windowSize.Height), currentBackColor)
|
||||||
|
|
||||||
TextBox.Draw()
|
TextBox.Draw()
|
||||||
|
|
||||||
Core.SpriteBatch.Draw(mainTexture, New Rectangle(CInt(Core.windowSize.Width / 2) - 62, CInt(Core.windowSize.Height / 2) - 218, 130, 256), New Rectangle(0, 0, 62, 128), New Color(255, 255, 255, ProfAlpha))
|
Core.SpriteBatch.Draw(mainTexture, New Rectangle(CInt(Core.windowSize.Width / 2) - 62, CInt(Core.windowSize.Height / 2) - 218, 130, 256), New Rectangle(0, 0, 62, 128), New Color(255, 255, 255, ProfAlpha))
|
||||||
Core.SpriteBatch.Draw(skinTexture, New Rectangle(CInt(Core.windowSize.Width / 2) - 128, CInt(Core.windowSize.Height / 2) - 218, 256, 256), New Color(255, 255, 255, OtherAlpha))
|
Core.SpriteBatch.Draw(skinTexture, New Rectangle(CInt(Core.windowSize.Width / 2) - 128, CInt(Core.windowSize.Height / 2) - 218, 256, 256), New Color(255, 255, 255, OtherAlpha))
|
||||||
|
|
||||||
Select Case pokeIndex
|
Select Case pokeIndex
|
||||||
Case 1
|
Case 1
|
||||||
Core.SpriteBatch.Draw(mainTexture, New Rectangle(CInt(ballPosition.X), CInt(ballPosition.Y), 22, 22), New Rectangle(62 + CInt(ballIndex.X * 22), 48 + CInt(ballIndex.Y * 22), 22, 22), Color.White)
|
Core.SpriteBatch.Draw(mainTexture, New Rectangle(CInt(ballPosition.X), CInt(ballPosition.Y), 22, 22), New Rectangle(62 + CInt(ballIndex.X * 22), 48 + CInt(ballIndex.Y * 22), 22, 22), Color.White)
|
||||||
Case 2
|
Case 2
|
||||||
Core.SpriteBatch.Draw(pokeTexture, New Rectangle(CInt(pokePosition.X) - 100, CInt(pokePosition.Y) - 160, 256, 256), Color.White)
|
Core.SpriteBatch.Draw(pokeTexture, New Rectangle(CInt(pokePosition.X) - 100, CInt(pokePosition.Y) - 218, 256, 256), Color.White)
|
||||||
Case 3
|
Case 3
|
||||||
If Index < 6 Then
|
If Index < 6 Then
|
||||||
Core.SpriteBatch.Draw(pokeTexture, New Rectangle(CInt(Core.windowSize.Width / 2) - 300, CInt(Core.windowSize.Height / 2) - 130, 256, 256), New Color(255, 255, 255, ProfAlpha))
|
Core.SpriteBatch.Draw(pokeTexture, New Rectangle(CInt(Core.windowSize.Width / 2) - 300, CInt(Core.windowSize.Height / 2) - 218, 256, 256), New Color(255, 255, 255, ProfAlpha))
|
||||||
End If
|
End If
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
Select Case Index
|
Select Case Index
|
||||||
Case 5
|
Case 5
|
||||||
Core.SpriteBatch.DrawString(FontManager.MiniFont, Localization.GetString("new_game_your_name") & ":", New Vector2(TextboxPosition.X, TextboxPosition.Y - 24), Color.White)
|
Core.SpriteBatch.DrawString(FontManager.MainFont, Localization.GetString("new_game_your_name") & ": ", New Vector2(TextboxPosition.X + 2, TextboxPosition.Y - 32 + 2), Color.Black)
|
||||||
|
Core.SpriteBatch.DrawString(FontManager.MainFont, Localization.GetString("new_game_your_name") & ": ", New Vector2(TextboxPosition.X, TextboxPosition.Y - 32), Color.White)
|
||||||
DrawTextBox()
|
DrawTextBox()
|
||||||
|
|
||||||
If enterCorrectName = True Then
|
If enterCorrectName = True Then
|
||||||
Core.SpriteBatch.DrawString(FontManager.MiniFont, Localization.GetString("new_game_name_too_short"), New Vector2(TextboxPosition.X, TextboxPosition.Y + 30), Color.DarkRed)
|
Core.SpriteBatch.DrawString(FontManager.MainFont, Localization.GetString("new_game_name_too_short"), New Vector2(TextboxPosition.X, TextboxPosition.Y + 48), Color.DarkRed)
|
||||||
End If
|
End If
|
||||||
Case 4
|
Case 4
|
||||||
Canvas.DrawRectangle(New Rectangle(CInt(TextboxPosition.X - 5), CInt(TextboxPosition.Y - 24), 138, 42), New Color(0, 0, 0, 80))
|
Canvas.DrawRectangle(New Rectangle(CInt(TextboxPosition.X - 5), CInt(TextboxPosition.Y - 24), 138, 42), New Color(0, 0, 0, 80))
|
||||||
|
|
||||||
Core.SpriteBatch.DrawString(FontManager.MiniFont, Localization.GetString("new_game_choose_skin") & ":" & Environment.NewLine & skinNames(SkinIndex), New Vector2(TextboxPosition.X, TextboxPosition.Y - 24), Color.White)
|
Core.SpriteBatch.DrawString(FontManager.MainFont, Localization.GetString("new_game_choose_skin") & ":" & Environment.NewLine & skinNames(SkinIndex) & Environment.NewLine & skinGenders(SkinIndex), New Vector2(TextboxPosition.X + 2, TextboxPosition.Y - 24 + 2), Color.White)
|
||||||
|
Core.SpriteBatch.DrawString(FontManager.MainFont, Localization.GetString("new_game_choose_skin") & ":" & Environment.NewLine & skinNames(SkinIndex) & Environment.NewLine & skinGenders(SkinIndex), New Vector2(TextboxPosition.X, TextboxPosition.Y - 24), Color.White)
|
||||||
|
|
||||||
Canvas.DrawScrollBar(New Vector2(TextboxPosition.X, TextboxPosition.Y + 48), startSkins.Count, 1, SkinIndex, New Size(128, 4), True, TextureManager.GetTexture(TextureManager.GetTexture("GUI\Menus\Menu"), New Rectangle(112, 12, 1, 1)), TextureManager.GetTexture(TextureManager.GetTexture("GUI\Menus\Menu"), New Rectangle(113, 12, 1, 1)))
|
Canvas.DrawScrollBar(New Vector2(TextboxPosition.X, TextboxPosition.Y + 48), skinFiles.Count, 1, SkinIndex, New Size(128, 4), True, TextureManager.GetTexture(TextureManager.GetTexture("GUI\Menus\Menu"), New Rectangle(112, 12, 1, 1)), TextureManager.GetTexture(TextureManager.GetTexture("GUI\Menus\Menu"), New Rectangle(113, 12, 1, 1)))
|
||||||
End Select
|
End Select
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub DrawTextBox()
|
Private Sub DrawTextBox()
|
||||||
@ -280,7 +287,7 @@
|
|||||||
End If
|
End If
|
||||||
AnimateBall()
|
AnimateBall()
|
||||||
Case 2
|
Case 2
|
||||||
If pokePosition.Y < CInt(Core.windowSize.Height / 2) + 38 Then
|
If pokePosition.Y < CInt(Core.windowSize.Height / 2) Then
|
||||||
pokePosition.Y += 5
|
pokePosition.Y += 5
|
||||||
Else
|
Else
|
||||||
Dim p As Pokemon = Pokemon.GetPokemonByID(pokeID)
|
Dim p As Pokemon = Pokemon.GetPokemonByID(pokeID)
|
||||||
@ -346,10 +353,11 @@
|
|||||||
SkinIndex -= 1
|
SkinIndex -= 1
|
||||||
End If
|
End If
|
||||||
|
|
||||||
SkinIndex = CInt(MathHelper.Clamp(SkinIndex, 0, startSkins.Count - 1))
|
SkinIndex = CInt(MathHelper.Clamp(SkinIndex, 0, skinFiles.Count - 1))
|
||||||
|
Dim skinTexture2D = TextureManager.GetTexture("Textures\NPC\" & skinFiles(SkinIndex))
|
||||||
|
Dim skinRectangle As New Rectangle(0, CInt(skinTexture2D.Height / 4 * 2), CInt(skinTexture2D.Width / 3), CInt(skinTexture2D.Height / 4))
|
||||||
If sIndex <> SkinIndex Then
|
If sIndex <> SkinIndex Then
|
||||||
skinTexture = TextureManager.GetTexture(TextureManager.GetTexture("Textures\NPC\" & startSkins(SkinIndex)), New Rectangle(0, 64, 32, 32))
|
skinTexture = TextureManager.GetTexture(skinTexture2D, skinRectangle)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Controls.Accept() = True Then
|
If Controls.Accept() = True Then
|
||||||
@ -454,6 +462,7 @@
|
|||||||
"MapFile|" & Me.startMap & Environment.NewLine &
|
"MapFile|" & Me.startMap & Environment.NewLine &
|
||||||
"Rotation|" & Me.startYaw.ToString() & Environment.NewLine &
|
"Rotation|" & Me.startYaw.ToString() & Environment.NewLine &
|
||||||
"RivalName|???" & Environment.NewLine &
|
"RivalName|???" & Environment.NewLine &
|
||||||
|
"RivalSkin|Silver" & Environment.NewLine &
|
||||||
"Money|3000" & Environment.NewLine &
|
"Money|3000" & Environment.NewLine &
|
||||||
"Badges|0" & Environment.NewLine &
|
"Badges|0" & Environment.NewLine &
|
||||||
"Gender|Male" & Environment.NewLine &
|
"Gender|Male" & Environment.NewLine &
|
||||||
@ -464,7 +473,7 @@
|
|||||||
"hasPokegear|0" & Environment.NewLine &
|
"hasPokegear|0" & Environment.NewLine &
|
||||||
"freeCamera|1" & Environment.NewLine &
|
"freeCamera|1" & Environment.NewLine &
|
||||||
"thirdPerson|0" & Environment.NewLine &
|
"thirdPerson|0" & Environment.NewLine &
|
||||||
"skin|" & startSkins(SkinIndex) & Environment.NewLine &
|
"skin|" & skinFiles(SkinIndex) & Environment.NewLine &
|
||||||
"location|" & Me.startLocation & Environment.NewLine &
|
"location|" & Me.startLocation & Environment.NewLine &
|
||||||
"battleAnimations|2" & Environment.NewLine &
|
"battleAnimations|2" & Environment.NewLine &
|
||||||
"BoxAmount|5" & Environment.NewLine &
|
"BoxAmount|5" & Environment.NewLine &
|
||||||
@ -537,13 +546,13 @@
|
|||||||
|
|
||||||
Select Case True
|
Select Case True
|
||||||
Case WeirdNames.Contains(name.ToLower())
|
Case WeirdNames.Contains(name.ToLower())
|
||||||
Return Localization.GetString("new_game_oak_weird_name_1") & name & Localization.GetString("new_game_oak_weird_name_2")
|
Return Localization.GetString("new_game_intro_weird_name_1") & name & Localization.GetString("new_game_intro_weird_name_2")
|
||||||
Case KnownNames.Contains(name.ToLower())
|
Case KnownNames.Contains(name.ToLower())
|
||||||
Return Localization.GetString("new_game_oak_known_name_1") & name & Localization.GetString("new_game_oak_known_name_2")
|
Return Localization.GetString("new_game_intro_known_name_1") & name & Localization.GetString("new_game_intro_known_name_2")
|
||||||
Case OwnNames.Contains(name.ToLower())
|
Case OwnNames.Contains(name.ToLower())
|
||||||
Return Localization.GetString("new_game_oak_same_name_1") & name & Localization.GetString("new_game_oak_same_name_2")
|
Return Localization.GetString("new_game_intro_same_name_1") & name & Localization.GetString("new_game_intro_same_name_2")
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
Return Localization.GetString("new_game_oak_name_1") & name & Localization.GetString("new_game_oak_name_2")
|
Return Localization.GetString("new_game_intro_name_1") & name & Localization.GetString("new_game_intro_name_2")
|
||||||
End Function
|
End Function
|
||||||
End Class
|
End Class
|
@ -25,9 +25,15 @@
|
|||||||
Core.Player.HasPokegear = True
|
Core.Player.HasPokegear = True
|
||||||
IsReady = True
|
IsReady = True
|
||||||
Case "renamerival"
|
Case "renamerival"
|
||||||
Core.SetScreen(New NameObjectScreen(Core.CurrentScreen, TextureManager.GetTexture("GUI\RenameRival"), False, False, "rival", "Silver", AddressOf Script.NameRival))
|
Dim RivalTexture As String = Core.Player.RivalSkin
|
||||||
|
Dim RivalName As String
|
||||||
|
RivalName = "???"
|
||||||
|
Core.SetScreen(New NameObjectScreen(Core.CurrentScreen, TextureManager.GetTexture(RivalTexture, New Rectangle(0, 64, 32, 32)), False, False, RivalName, "???", AddressOf Script.NameRival))
|
||||||
IsReady = True
|
IsReady = True
|
||||||
CanContinue = False
|
CanContinue = False
|
||||||
|
Case "setrivalskin"
|
||||||
|
Core.Player.RivalSkin = argument
|
||||||
|
IsReady = True
|
||||||
Case "wearskin"
|
Case "wearskin"
|
||||||
With Screen.Level.OwnPlayer
|
With Screen.Level.OwnPlayer
|
||||||
Dim TextureID As String = argument
|
Dim TextureID As String = argument
|
||||||
@ -258,6 +264,16 @@
|
|||||||
Case "setrivalname"
|
Case "setrivalname"
|
||||||
Core.Player.RivalName = argument
|
Core.Player.RivalName = argument
|
||||||
IsReady = True
|
IsReady = True
|
||||||
|
Case "setgender"
|
||||||
|
Select Case argument
|
||||||
|
Case "0", "Male", "male"
|
||||||
|
Core.Player.Gender = "Male"
|
||||||
|
Case "1", "Female", "female"
|
||||||
|
Core.Player.Gender = "Female"
|
||||||
|
Case Else
|
||||||
|
Core.Player.Gender = "Other"
|
||||||
|
End Select
|
||||||
|
IsReady = True
|
||||||
Case "setopacity"
|
Case "setopacity"
|
||||||
Dim newOpacity As Single = sng(argument.Replace("~", Screen.Level.OwnPlayer.Opacity.ToString().Replace(".", GameController.DecSeparator)))
|
Dim newOpacity As Single = sng(argument.Replace("~", Screen.Level.OwnPlayer.Opacity.ToString().Replace(".", GameController.DecSeparator)))
|
||||||
Screen.Level.OwnPlayer.Opacity = newOpacity
|
Screen.Level.OwnPlayer.Opacity = newOpacity
|
||||||
|
@ -235,7 +235,7 @@
|
|||||||
If Screens.MainMenu.NewNewGameScreen.CharacterSelectionScreen.SelectedSkin <> "" Then
|
If Screens.MainMenu.NewNewGameScreen.CharacterSelectionScreen.SelectedSkin <> "" Then
|
||||||
IsReady = True
|
IsReady = True
|
||||||
Else
|
Else
|
||||||
SetScreen(New Screens.MainMenu.NewNewGameScreen.CharacterSelectionScreen(CurrentScreen, skins))
|
SetScreen(New Screens.MainMenu.NewNewGameScreen.CharacterSelectionScreen(CurrentScreen))
|
||||||
End If
|
End If
|
||||||
Case Else
|
Case Else
|
||||||
IsReady = True
|
IsReady = True
|
||||||
|
@ -68,11 +68,7 @@
|
|||||||
Case "name"
|
Case "name"
|
||||||
Return Core.Player.Name
|
Return Core.Player.Name
|
||||||
Case "gender"
|
Case "gender"
|
||||||
If Core.Player.Male = True Then
|
Return Core.Player.Gender
|
||||||
Return "1"
|
|
||||||
Else
|
|
||||||
Return "0"
|
|
||||||
End If
|
|
||||||
Case "bp"
|
Case "bp"
|
||||||
Return Core.Player.BP.ToString()
|
Return Core.Player.BP.ToString()
|
||||||
Case "badges"
|
Case "badges"
|
||||||
@ -81,6 +77,8 @@
|
|||||||
Return ReturnBoolean(CType(Screen.Camera, OverworldCamera).ThirdPerson)
|
Return ReturnBoolean(CType(Screen.Camera, OverworldCamera).ThirdPerson)
|
||||||
Case "rival", "rivalname"
|
Case "rival", "rivalname"
|
||||||
Return Core.Player.RivalName
|
Return Core.Player.RivalName
|
||||||
|
Case "rivalskin"
|
||||||
|
Return Core.Player.RivalSkin
|
||||||
Case "ot"
|
Case "ot"
|
||||||
Return Core.Player.OT
|
Return Core.Player.OT
|
||||||
Case "gamejoltid"
|
Case "gamejoltid"
|
||||||
|
@ -475,6 +475,7 @@ Namespace ScriptVersion2
|
|||||||
r(New ScriptCommand("player", "togglepokemonfollow", "Toggles the following Pokémon's visibility."))
|
r(New ScriptCommand("player", "togglepokemonfollow", "Toggles the following Pokémon's visibility."))
|
||||||
r(New ScriptCommand("player", "save", "Saves the game."))
|
r(New ScriptCommand("player", "save", "Saves the game."))
|
||||||
r(New ScriptCommand("player", "setrivalname", {New ScriptArgument("name", ScriptArgument.ArgumentTypes.Str)}.ToList(), "Sets the rival's name."))
|
r(New ScriptCommand("player", "setrivalname", {New ScriptArgument("name", ScriptArgument.ArgumentTypes.Str)}.ToList(), "Sets the rival's name."))
|
||||||
|
r(New ScriptCommand("player", "setrivalskin", {New ScriptArgument("skin", ScriptArgument.ArgumentTypes.Str)}.ToList(), "Sets the rival's skin."))
|
||||||
r(New ScriptCommand("player", "setopacity", {New ScriptArgument("opacity", ScriptArgument.ArgumentTypes.Sng)}.ToList(), "Sets the player entity's opacity."))
|
r(New ScriptCommand("player", "setopacity", {New ScriptArgument("opacity", ScriptArgument.ArgumentTypes.Sng)}.ToList(), "Sets the player entity's opacity."))
|
||||||
|
|
||||||
' Constructs:
|
' Constructs:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user