P3D-Legacy/P3D/Screens/NewGameScreen.vb

553 lines
24 KiB
VB.net
Raw Normal View History

2016-09-07 18:50:38 +02:00
Public Class NewGameScreen
Inherits Screen
Dim skinFiles() As String = {GameModeManager.ActiveGameMode.SkinFiles.ToString}
Dim skinNames() As String = {GameModeManager.ActiveGameMode.SkinNames.ToString}
Dim skinGenders() As String = {GameModeManager.ActiveGameMode.SkinGenders.ToString}
Dim skinColors As List(Of Color) = GameModeManager.ActiveGameMode.SkinColors
2016-09-07 18:50:38 +02:00
Public Index As Integer = 0
Dim pokeIndex As Integer = 0
Dim ProfAlpha As Integer = 0
Dim OtherAlpha As Integer = 0
Dim Name As String = ""
Dim SkinIndex As Integer = 0
Dim skinTexture As Texture2D
Dim enterCorrectName As Boolean = False
Dim nameMessage As String = "This name is too short."
2016-09-07 18:50:38 +02:00
Dim mainTexture As Texture2D
Dim pokeTexture As Texture2D
Dim ballPosition As Vector2
Dim ballIndex As Vector2 = New Vector2(0, 0)
Dim ballAnimationDelay As Single = 0.2F
Dim ballVelocity As Single = -4.0F
Dim pokePosition As Vector2
Dim pokeID As Integer = 0
Dim CurrentText As String = ""
Dim currentBackColor As Color = New Color(59, 123, 165)
Dim normalColor As Color = New Color(59, 123, 165)
Dim pokemonRange() As Integer = {1, 252}
Dim introMusic As String = "welcome"
Dim startMap As String = "yourroom.dat"
Dim startPosition As Vector3 = New Vector3(1, 0.1F, 3)
Dim startLocation As String = "Your Room"
Dim startYaw As Single = MathHelper.PiOver2
Dim Dialogues As New List(Of String)
Public Sub New()
For Each s As String In Core.GameOptions.ContentPackNames
ContentPackManager.Load(GameController.GamePath & "\ContentPacks\" & s & "\exceptions.dat")
Next
BattleSystem.GameModeAttackLoader.Load()
If GameModeManager.ActiveGameMode.IsDefaultGamemode = False Then
Fix audio engine & contentpacks (#35) * Replaced existing Gen 2 SFX with better sounding ones (no ugly reverb) Replaced MediaPlayer with NAudio(and NAudio.Vorbis) for playing music in order to fix random stopping issues. The game now directly loads .ogg files instead of the .wma/.xnb combination from before. ContentPacks are now able to replace Music and SFX again (I haven't added a menu yet for choosing ContentPacks). To make older GameModes work with current versions, you can add the GameMode property EnterType and set it to "1", this will make the game use the older 2D NewGameScreen. * Delete GameController.vb * Add gamecontroller.vb back * Fix sfx missing * Battleintro doodle now doesn't loop anymore (for no trainer) Changed the shutter sound (aka Large Door sound) to something more large door-y Made the enter sound slightly louder The enter sound now plays when going through any warp to or from an indoor map (including falling through holes) The flying sound effect is played earlier in the animation after selecting a location Changed played sound effect when using the Escape Rope to "teleport" instead of "destroy" The bump noise now also plays when bumping into something in first person Fixed small gap between the end of the intro song and the start of the main song Replaced some songs with better songs * Fixed some more intro issues * Forgot to change a thing * Fixed an error where the main music would play, ignoring the muted musicmanager. * fix indenting in musicmanager * The music player will now only start playback on a new song if the music player is not muted, fixed the end time calculation of the intro of a song after muting, Music can't be unmuted now as long as a sound effect plays that stops the music. * Fixed league restplace position, fixed sound effects sharing the volume slider of the music, sound effects are now also muted when pressing M, changed music on/off popup to audio on/off, removed bump delay in first person, added more control on whether played songs should be looping or not. * Fixed some more scripts that turn on thirdperson mode but don't check if it was on before or set it back to what it was before afterwards, also fixed a small error in creditsscreen.vb. * Fixed indenting error in musicmanager.vb, fixed an error of mine where the loopsong parameter would be seen as the playintro parameter. * Added more music commands, added quite some menu select noises, will add more later * More select sound effects! * Fix music not resuming after soundeffect * Trainer using item now plays the single_heal soundeffect * Pokémon cries now sound louder * Possibly fixing crash when playing Pokémon cry at volume higher than 0.71 * Added better quality Pokémon cries, made random overworld cries slightly less loud, added cries for 719 and 720. * Sound effects now sound louder * Revert "Added better quality Pokémon cries, made random overworld cries slightly less loud, added cries for 719 and 720." This reverts commit 8c9296ed1a82144d17f303a52c3f2e9e65a5bfea. * Fixed the cause of why the title screen music plays even when the game is muted * Tabs to spaces * Revert Co-authored-by: darkfire006 <blazer257@live.com> Co-authored-by: JappaWakkaP3D <66885565+JappaWakkaP3D@users.noreply.github.com> Co-authored-by: JappaWakkaP3D <jasper.speelman@outlook.com> Co-authored-by: Vitaly Mikhailov <personal@aragas.org>
2020-07-09 19:59:42 +02:00
'MusicManager.LoadMusic(True)
'SoundManager.LoadSounds(True)
2016-09-07 18:50:38 +02:00
End If
SmashRock.Load()
Badge.Load()
Pokedex.Load()
BattleSystem.BattleScreen.ResetVars()
LevelLoader.ClearTempStructures()
PokemonForms.Initialize()
Me.Identification = Identifications.NewGameScreen
Me.CanChat = False
mainTexture = TextureManager.GetTexture("GUI\Intro")
LoadIntroValues()
Dim p As Pokemon = Pokemon.GetPokemonByID(Core.Random.Next(pokemonRange(0), pokemonRange(1)))
p.Generate(1, True)
pokeID = p.Number
pokeTexture = p.GetTexture(True)
CurrentText = ""
TextBox.Showing = False
Me.Index = 0
TextBox.reDelay = 0
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)
2016-09-07 18:50:38 +02:00
Fix audio engine & contentpacks (#35) * Replaced existing Gen 2 SFX with better sounding ones (no ugly reverb) Replaced MediaPlayer with NAudio(and NAudio.Vorbis) for playing music in order to fix random stopping issues. The game now directly loads .ogg files instead of the .wma/.xnb combination from before. ContentPacks are now able to replace Music and SFX again (I haven't added a menu yet for choosing ContentPacks). To make older GameModes work with current versions, you can add the GameMode property EnterType and set it to "1", this will make the game use the older 2D NewGameScreen. * Delete GameController.vb * Add gamecontroller.vb back * Fix sfx missing * Battleintro doodle now doesn't loop anymore (for no trainer) Changed the shutter sound (aka Large Door sound) to something more large door-y Made the enter sound slightly louder The enter sound now plays when going through any warp to or from an indoor map (including falling through holes) The flying sound effect is played earlier in the animation after selecting a location Changed played sound effect when using the Escape Rope to "teleport" instead of "destroy" The bump noise now also plays when bumping into something in first person Fixed small gap between the end of the intro song and the start of the main song Replaced some songs with better songs * Fixed some more intro issues * Forgot to change a thing * Fixed an error where the main music would play, ignoring the muted musicmanager. * fix indenting in musicmanager * The music player will now only start playback on a new song if the music player is not muted, fixed the end time calculation of the intro of a song after muting, Music can't be unmuted now as long as a sound effect plays that stops the music. * Fixed league restplace position, fixed sound effects sharing the volume slider of the music, sound effects are now also muted when pressing M, changed music on/off popup to audio on/off, removed bump delay in first person, added more control on whether played songs should be looping or not. * Fixed some more scripts that turn on thirdperson mode but don't check if it was on before or set it back to what it was before afterwards, also fixed a small error in creditsscreen.vb. * Fixed indenting error in musicmanager.vb, fixed an error of mine where the loopsong parameter would be seen as the playintro parameter. * Added more music commands, added quite some menu select noises, will add more later * More select sound effects! * Fix music not resuming after soundeffect * Trainer using item now plays the single_heal soundeffect * Pokémon cries now sound louder * Possibly fixing crash when playing Pokémon cry at volume higher than 0.71 * Added better quality Pokémon cries, made random overworld cries slightly less loud, added cries for 719 and 720. * Sound effects now sound louder * Revert "Added better quality Pokémon cries, made random overworld cries slightly less loud, added cries for 719 and 720." This reverts commit 8c9296ed1a82144d17f303a52c3f2e9e65a5bfea. * Fixed the cause of why the title screen music plays even when the game is muted * Tabs to spaces * Revert Co-authored-by: darkfire006 <blazer257@live.com> Co-authored-by: JappaWakkaP3D <66885565+JappaWakkaP3D@users.noreply.github.com> Co-authored-by: JappaWakkaP3D <jasper.speelman@outlook.com> Co-authored-by: Vitaly Mikhailov <personal@aragas.org>
2020-07-09 19:59:42 +02:00
MusicManager.Play("nomusic")
2016-09-07 18:50:38 +02:00
End Sub
Private Sub LoadIntroValues()
Dim GameMode As GameMode = GameModeManager.ActiveGameMode
Me.skinNames = GameMode.SkinNames.ToArray()
Me.skinFiles = GameMode.SkinFiles.ToArray()
Me.skinGenders = GameMode.SkinGenders.ToArray()
Me.skinColors = GameMode.SkinColors
2016-09-07 18:50:38 +02:00
Me.pokemonRange = GameMode.PokemonRange
Me.introMusic = GameMode.IntroMusic
Me.startMap = GameMode.StartMap
Me.startPosition = GameMode.StartPosition
Me.startLocation = GameMode.StartLocationName
Me.startYaw = GameMode.StartRotation
Me.normalColor = GameMode.StartColor
Me.currentBackColor = GameMode.StartColor
If GameMode.StartDialogue <> "" Then
If GameMode.StartDialogue.CountSplits("|") >= 3 Then
Dim Splits() As String = GameMode.StartDialogue.Split(CChar("|"))
Me.Dialogues.AddRange(Splits)
End If
Else
If Me.Dialogues.Count < 3 Then
Me.Dialogues.Clear()
Me.Dialogues.AddRange({Localization.GetString("new_game_intro_1"), Localization.GetString("new_game_intro_2"), Localization.GetString("new_game_intro_3")})
End If
2016-09-07 18:50:38 +02:00
End If
End Sub
Public Overrides Sub Update()
If Index = 5 Then
Core.GameInstance.IsMouseVisible = True
Else
Core.GameInstance.IsMouseVisible = False
End If
2016-09-07 18:50:38 +02:00
If ProfAlpha < 255 And Index = 0 Then
ProfAlpha += 2
If ProfAlpha >= 255 Then
Fix audio engine & contentpacks (#35) * Replaced existing Gen 2 SFX with better sounding ones (no ugly reverb) Replaced MediaPlayer with NAudio(and NAudio.Vorbis) for playing music in order to fix random stopping issues. The game now directly loads .ogg files instead of the .wma/.xnb combination from before. ContentPacks are now able to replace Music and SFX again (I haven't added a menu yet for choosing ContentPacks). To make older GameModes work with current versions, you can add the GameMode property EnterType and set it to "1", this will make the game use the older 2D NewGameScreen. * Delete GameController.vb * Add gamecontroller.vb back * Fix sfx missing * Battleintro doodle now doesn't loop anymore (for no trainer) Changed the shutter sound (aka Large Door sound) to something more large door-y Made the enter sound slightly louder The enter sound now plays when going through any warp to or from an indoor map (including falling through holes) The flying sound effect is played earlier in the animation after selecting a location Changed played sound effect when using the Escape Rope to "teleport" instead of "destroy" The bump noise now also plays when bumping into something in first person Fixed small gap between the end of the intro song and the start of the main song Replaced some songs with better songs * Fixed some more intro issues * Forgot to change a thing * Fixed an error where the main music would play, ignoring the muted musicmanager. * fix indenting in musicmanager * The music player will now only start playback on a new song if the music player is not muted, fixed the end time calculation of the intro of a song after muting, Music can't be unmuted now as long as a sound effect plays that stops the music. * Fixed league restplace position, fixed sound effects sharing the volume slider of the music, sound effects are now also muted when pressing M, changed music on/off popup to audio on/off, removed bump delay in first person, added more control on whether played songs should be looping or not. * Fixed some more scripts that turn on thirdperson mode but don't check if it was on before or set it back to what it was before afterwards, also fixed a small error in creditsscreen.vb. * Fixed indenting error in musicmanager.vb, fixed an error of mine where the loopsong parameter would be seen as the playintro parameter. * Added more music commands, added quite some menu select noises, will add more later * More select sound effects! * Fix music not resuming after soundeffect * Trainer using item now plays the single_heal soundeffect * Pokémon cries now sound louder * Possibly fixing crash when playing Pokémon cry at volume higher than 0.71 * Added better quality Pokémon cries, made random overworld cries slightly less loud, added cries for 719 and 720. * Sound effects now sound louder * Revert "Added better quality Pokémon cries, made random overworld cries slightly less loud, added cries for 719 and 720." This reverts commit 8c9296ed1a82144d17f303a52c3f2e9e65a5bfea. * Fixed the cause of why the title screen music plays even when the game is muted * Tabs to spaces * Revert Co-authored-by: darkfire006 <blazer257@live.com> Co-authored-by: JappaWakkaP3D <66885565+JappaWakkaP3D@users.noreply.github.com> Co-authored-by: JappaWakkaP3D <jasper.speelman@outlook.com> Co-authored-by: Vitaly Mikhailov <personal@aragas.org>
2020-07-09 19:59:42 +02:00
MusicManager.Play(Me.introMusic, True, 0.0F)
2016-09-07 18:50:38 +02:00
End If
ElseIf ProfAlpha >= 255 Or Index > 0 Then
TextBox.Update()
If TextBox.Showing = False Then
Select Case Index
Case 1
UpdatePokemon()
Case 3
UpdateTransition(False)
Case 5
UpdateTextbox()
Case 7
UpdateTransition(True)
Case 9
If ProfAlpha > 0 Then
ProfAlpha -= 2
End If
If ProfAlpha <= 0 Then
CreateGame()
End If
Case 4
UpdateChooseSkin()
Case Else
ShowText()
End Select
End If
End If
Dim AimColor As Color = normalColor
If Me.Index = 4 Then
AimColor = skinColors(SkinIndex)
2016-09-07 18:50:38 +02:00
End If
Dim diffR As Byte = 5
If (CInt(currentBackColor.R) - CInt(AimColor.R)).ToPositive() < 5 Then
diffR = 1
End If
Dim diffG As Byte = 5
If (CInt(currentBackColor.G) - CInt(AimColor.G)).ToPositive() < 5 Then
diffG = 1
End If
Dim diffB As Byte = 5
If (CInt(currentBackColor.B) - CInt(AimColor.B)).ToPositive() < 5 Then
diffB = 1
End If
If currentBackColor.R < AimColor.R Then
currentBackColor.R += diffR
ElseIf currentBackColor.R > AimColor.R Then
currentBackColor.R -= diffR
End If
If currentBackColor.G < AimColor.G Then
currentBackColor.G += diffG
ElseIf currentBackColor.G > AimColor.G Then
currentBackColor.G -= diffG
End If
If currentBackColor.B < AimColor.B Then
currentBackColor.B += diffB
ElseIf currentBackColor.B > AimColor.B Then
currentBackColor.B -= diffB
End If
End Sub
Private Sub ShowText()
Dim Text As String = ""
Select Case Index
Case 0
Text = Dialogues(0)
Case 2
Text = Dialogues(1)
Case 6
Text = NameReaction(Name)
Case 8
Text = Name & Dialogues(2)
End Select
TextBox.reDelay = 0
TextBox.Show(Text, {})
Index += 1
End Sub
2016-09-12 18:09:36 +02:00
Public Overrides Sub Draw()
Canvas.DrawRectangle(New Rectangle(0, 0, Core.windowSize.Width, Core.windowSize.Height), currentBackColor)
2016-09-07 18:50:38 +02:00
TextBox.Draw()
2016-09-07 18:50:38 +02:00
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))
2016-09-07 18:50:38 +02:00
Select Case pokeIndex
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)
Case 2
Core.SpriteBatch.Draw(pokeTexture, New Rectangle(CInt(pokePosition.X) - 100, CInt(pokePosition.Y) - 218, 256, 256), Color.White)
Case 3
If Index < 6 Then
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 Select
2016-09-07 18:50:38 +02:00
Select Case Index
Case 5
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)
2016-09-07 18:50:38 +02:00
DrawTextBox()
If enterCorrectName = True Then
Core.SpriteBatch.DrawString(FontManager.MainFont, Localization.GetString("new_game_name_too_short"), New Vector2(TextboxPosition.X, TextboxPosition.Y + 48), Color.DarkRed)
2016-09-07 18:50:38 +02:00
End If
Case 4
Core.SpriteBatch.DrawString(FontManager.MainFont, Localization.GetString("new_game_select_skin") & ":" & Environment.NewLine & skinNames(SkinIndex) & Environment.NewLine & Localization.GetString("global_" & skinGenders(SkinIndex).ToLower(), skinGenders(SkinIndex)), New Vector2(TextboxPosition.X + 2, TextboxPosition.Y - 24 + 2), Color.Black)
Core.SpriteBatch.DrawString(FontManager.MainFont, Localization.GetString("new_game_select_skin") & ":" & Environment.NewLine & skinNames(SkinIndex) & Environment.NewLine & Localization.GetString("global_" & skinGenders(SkinIndex).ToLower(), skinGenders(SkinIndex)), New Vector2(TextboxPosition.X, TextboxPosition.Y - 24), Color.White)
2016-09-07 18:50:38 +02:00
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
2016-09-07 18:50:38 +02:00
End Sub
Private Sub DrawTextBox()
Canvas.DrawRectangle(New Rectangle(CInt(Core.windowSize.Width / 2) - 74, CInt(Core.windowSize.Height / 2) + 124, 148, 32), New Color(101, 142, 255))
Canvas.DrawRectangle(New Rectangle(CInt(Core.windowSize.Width / 2) - 70, CInt(Core.windowSize.Height / 2) + 128, 140, 24), Color.White)
Dim t As String = Me.CurrentText
If t.Length < 14 Then
t &= "_"
End If
Core.SpriteBatch.DrawString(FontManager.MiniFont, t, TextboxPosition(), Color.Black)
Dim l As New Dictionary(Of Buttons, String)
l.Add(Buttons.A, "Accept")
l.Add(Buttons.X, "Edit name")
Me.DrawGamePadControls(l)
End Sub
Private Function TextboxPosition() As Vector2
Return New Vector2(CInt(Core.windowSize.Width / 2) - 70, CInt(Core.windowSize.Height / 2) + 128)
End Function
Private Sub UpdatePokemon()
Select Case pokeIndex
Case 0
ballPosition = New Vector2(CInt(Core.windowSize.Width / 2) - 40, CInt(Core.windowSize.Height / 2) - 110)
pokePosition = New Vector2(CInt(Core.windowSize.Width / 2) - 200, CInt(Core.windowSize.Height / 2) - 110)
pokeIndex = 1
AnimateBall()
Case 1
If ballPosition.X > CInt(Core.windowSize.Width / 2) - 200 Then
ballPosition.X -= 3
ballPosition.Y += ballVelocity
ballVelocity += 0.2F
Else
pokeIndex = 2
End If
AnimateBall()
Case 2
If pokePosition.Y < CInt(Core.windowSize.Height / 2) Then
2016-09-07 18:50:38 +02:00
pokePosition.Y += 5
Else
Dim p As Pokemon = Pokemon.GetPokemonByID(pokeID)
p.PlayCry()
pokeIndex = 3
Index = 2
End If
End Select
End Sub
Private Sub AnimateBall()
If ballAnimationDelay <= 0.0F Then
ballIndex.X += 1
If ballIndex.X = 2 And ballIndex.Y = 2 Then
ballIndex = New Vector2(0, 0)
End If
If ballIndex.X = 2 Then
ballIndex.X = 0
ballIndex.Y += 1
End If
ballAnimationDelay = 0.2F
Else
ballAnimationDelay -= 0.1F
End If
End Sub
Private Sub UpdateTransition(ByVal ToProf As Boolean)
If ToProf = True Then
If OtherAlpha > 0 Then
OtherAlpha -= 5
End If
If OtherAlpha <= 0 Then
If ProfAlpha < 255 Then
ProfAlpha += 5
If ProfAlpha >= 255 Then
Index += 1
End If
End If
End If
Else
If ProfAlpha > 0 Then
ProfAlpha -= 5
End If
If ProfAlpha <= 0 Then
If OtherAlpha < 255 Then
OtherAlpha += 5
If OtherAlpha >= 255 Then
Index += 1
End If
End If
End If
End If
End Sub
Private Sub UpdateChooseSkin()
Dim sIndex As Integer = SkinIndex
If Controls.Right(True, True, True, True) = True Then
SkinIndex += 1
End If
If Controls.Left(True, True, True, True) = True Then
SkinIndex -= 1
End If
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))
2016-09-07 18:50:38 +02:00
If sIndex <> SkinIndex Then
skinTexture = TextureManager.GetTexture(skinTexture2D, skinRectangle)
2016-09-07 18:50:38 +02:00
End If
If Controls.Accept() = True Then
Index += 1
End If
End Sub
Private Sub UpdateTextbox()
CanMuteAudio = False
2016-09-07 18:50:38 +02:00
If ControllerHandler.ButtonPressed(Buttons.X) = True Then
Core.SetScreen(New InputScreen(Core.CurrentScreen, "Player", InputScreen.InputModes.Name, Me.CurrentText, 14, {TextureManager.GetTexture(TextureManager.GetTexture("Textures\NPC\" & skinFiles(SkinIndex)), New Rectangle(0, 64, 32, 32))}.ToList(), AddressOf Me.ConfirmInput))
2016-09-07 18:50:38 +02:00
Else
KeyBindings.GetNameInput(Me.CurrentText, 14)
Me.CurrentText = CorrectChars(Me.CurrentText)
If Controls.Accept(False, True, True) = True And KeyBoardHandler.KeyPressed(Keys.Space) = False Then
If CurrentText.Length > 2 And String.IsNullOrWhiteSpace(CurrentText) = False Then
Me.Name = CurrentText
Index += 1
Else
enterCorrectName = True
End If
End If
End If
End Sub
Private Sub ConfirmInput(ByVal input As String)
Me.CurrentText = CorrectChars(input)
End Sub
Private Function CorrectChars(ByVal t As String) As String
Dim exclude() As String = {"\", "/", ":", "*", "?", """", "<", ">", "|", ",", "."}
Dim s As String = ""
For Each c As Char In t
If exclude.Contains(c.ToString()) = True Then
c = CChar(" ")
End If
s &= c.ToString()
Next
Return s
End Function
Private Sub CreateGame()
Dim folderPath As String = Name
Dim folderPrefix As Integer = 0
If folderPath.ToLower() = "autosave" Then
folderPath = "autosave0"
End If
Dim savePath As String = GameController.GamePath & "\Save\"
While System.IO.Directory.Exists(savePath & folderPath) = True
If folderPath <> Name Then
folderPath = folderPath.Remove(folderPath.Length - folderPrefix.ToString().Length, folderPrefix.ToString().Length)
End If
folderPath &= folderPrefix
folderPrefix += 1
End While
If System.IO.Directory.Exists(GameController.GamePath & "\Save") = False Then
System.IO.Directory.CreateDirectory(GameController.GamePath & "\Save")
End If
System.IO.Directory.CreateDirectory(savePath & folderPath)
System.IO.File.WriteAllText(savePath & folderPath & "\Player.dat", GetPlayerData())
System.IO.File.WriteAllText(savePath & folderPath & "\Pokedex.dat", "")
System.IO.File.WriteAllText(savePath & folderPath & "\Items.dat", "")
System.IO.File.WriteAllText(savePath & folderPath & "\Register.dat", "")
System.IO.File.WriteAllText(savePath & folderPath & "\Berries.dat", GetBerryData())
System.IO.File.WriteAllText(savePath & folderPath & "\Apricorns.dat", "")
System.IO.File.WriteAllText(savePath & folderPath & "\Daycare.dat", "")
System.IO.File.WriteAllText(savePath & folderPath & "\Party.dat", "")
System.IO.File.WriteAllText(savePath & folderPath & "\ItemData.dat", "")
System.IO.File.WriteAllText(savePath & folderPath & "\Options.dat", GetOptionsData())
System.IO.File.WriteAllText(savePath & folderPath & "\Box.dat", "")
System.IO.File.WriteAllText(savePath & folderPath & "\NPC.dat", "")
System.IO.File.WriteAllText(savePath & folderPath & "\HallOfFame.dat", "")
System.IO.File.WriteAllText(savePath & folderPath & "\SecretBase.dat", "")
System.IO.File.WriteAllText(savePath & folderPath & "\RoamingPokemon.dat", "")
System.IO.File.WriteAllText(savePath & folderPath & "\Statistics.dat", "")
Fix audio engine & contentpacks (#35) * Replaced existing Gen 2 SFX with better sounding ones (no ugly reverb) Replaced MediaPlayer with NAudio(and NAudio.Vorbis) for playing music in order to fix random stopping issues. The game now directly loads .ogg files instead of the .wma/.xnb combination from before. ContentPacks are now able to replace Music and SFX again (I haven't added a menu yet for choosing ContentPacks). To make older GameModes work with current versions, you can add the GameMode property EnterType and set it to "1", this will make the game use the older 2D NewGameScreen. * Delete GameController.vb * Add gamecontroller.vb back * Fix sfx missing * Battleintro doodle now doesn't loop anymore (for no trainer) Changed the shutter sound (aka Large Door sound) to something more large door-y Made the enter sound slightly louder The enter sound now plays when going through any warp to or from an indoor map (including falling through holes) The flying sound effect is played earlier in the animation after selecting a location Changed played sound effect when using the Escape Rope to "teleport" instead of "destroy" The bump noise now also plays when bumping into something in first person Fixed small gap between the end of the intro song and the start of the main song Replaced some songs with better songs * Fixed some more intro issues * Forgot to change a thing * Fixed an error where the main music would play, ignoring the muted musicmanager. * fix indenting in musicmanager * The music player will now only start playback on a new song if the music player is not muted, fixed the end time calculation of the intro of a song after muting, Music can't be unmuted now as long as a sound effect plays that stops the music. * Fixed league restplace position, fixed sound effects sharing the volume slider of the music, sound effects are now also muted when pressing M, changed music on/off popup to audio on/off, removed bump delay in first person, added more control on whether played songs should be looping or not. * Fixed some more scripts that turn on thirdperson mode but don't check if it was on before or set it back to what it was before afterwards, also fixed a small error in creditsscreen.vb. * Fixed indenting error in musicmanager.vb, fixed an error of mine where the loopsong parameter would be seen as the playintro parameter. * Added more music commands, added quite some menu select noises, will add more later * More select sound effects! * Fix music not resuming after soundeffect * Trainer using item now plays the single_heal soundeffect * Pokémon cries now sound louder * Possibly fixing crash when playing Pokémon cry at volume higher than 0.71 * Added better quality Pokémon cries, made random overworld cries slightly less loud, added cries for 719 and 720. * Sound effects now sound louder * Revert "Added better quality Pokémon cries, made random overworld cries slightly less loud, added cries for 719 and 720." This reverts commit 8c9296ed1a82144d17f303a52c3f2e9e65a5bfea. * Fixed the cause of why the title screen music plays even when the game is muted * Tabs to spaces * Revert Co-authored-by: darkfire006 <blazer257@live.com> Co-authored-by: JappaWakkaP3D <66885565+JappaWakkaP3D@users.noreply.github.com> Co-authored-by: JappaWakkaP3D <jasper.speelman@outlook.com> Co-authored-by: Vitaly Mikhailov <personal@aragas.org>
2020-07-09 19:59:42 +02:00
Core.Player.IsGameJoltSave = False
2016-09-07 18:50:38 +02:00
Core.Player.LoadGame(folderPath)
Core.SetScreen(New TransitionScreen(Me, New OverworldScreen(), Color.Black, False, 5))
End Sub
Private Function GetPlayerData() As String
Dim ot As String = Core.Random.Next(0, 65256).ToString()
While ot.Length < 5
ot = "0" & ot
End While
Fix audio engine & contentpacks (#35) * Replaced existing Gen 2 SFX with better sounding ones (no ugly reverb) Replaced MediaPlayer with NAudio(and NAudio.Vorbis) for playing music in order to fix random stopping issues. The game now directly loads .ogg files instead of the .wma/.xnb combination from before. ContentPacks are now able to replace Music and SFX again (I haven't added a menu yet for choosing ContentPacks). To make older GameModes work with current versions, you can add the GameMode property EnterType and set it to "1", this will make the game use the older 2D NewGameScreen. * Delete GameController.vb * Add gamecontroller.vb back * Fix sfx missing * Battleintro doodle now doesn't loop anymore (for no trainer) Changed the shutter sound (aka Large Door sound) to something more large door-y Made the enter sound slightly louder The enter sound now plays when going through any warp to or from an indoor map (including falling through holes) The flying sound effect is played earlier in the animation after selecting a location Changed played sound effect when using the Escape Rope to "teleport" instead of "destroy" The bump noise now also plays when bumping into something in first person Fixed small gap between the end of the intro song and the start of the main song Replaced some songs with better songs * Fixed some more intro issues * Forgot to change a thing * Fixed an error where the main music would play, ignoring the muted musicmanager. * fix indenting in musicmanager * The music player will now only start playback on a new song if the music player is not muted, fixed the end time calculation of the intro of a song after muting, Music can't be unmuted now as long as a sound effect plays that stops the music. * Fixed league restplace position, fixed sound effects sharing the volume slider of the music, sound effects are now also muted when pressing M, changed music on/off popup to audio on/off, removed bump delay in first person, added more control on whether played songs should be looping or not. * Fixed some more scripts that turn on thirdperson mode but don't check if it was on before or set it back to what it was before afterwards, also fixed a small error in creditsscreen.vb. * Fixed indenting error in musicmanager.vb, fixed an error of mine where the loopsong parameter would be seen as the playintro parameter. * Added more music commands, added quite some menu select noises, will add more later * More select sound effects! * Fix music not resuming after soundeffect * Trainer using item now plays the single_heal soundeffect * Pokémon cries now sound louder * Possibly fixing crash when playing Pokémon cry at volume higher than 0.71 * Added better quality Pokémon cries, made random overworld cries slightly less loud, added cries for 719 and 720. * Sound effects now sound louder * Revert "Added better quality Pokémon cries, made random overworld cries slightly less loud, added cries for 719 and 720." This reverts commit 8c9296ed1a82144d17f303a52c3f2e9e65a5bfea. * Fixed the cause of why the title screen music plays even when the game is muted * Tabs to spaces * Revert Co-authored-by: darkfire006 <blazer257@live.com> Co-authored-by: JappaWakkaP3D <66885565+JappaWakkaP3D@users.noreply.github.com> Co-authored-by: JappaWakkaP3D <jasper.speelman@outlook.com> Co-authored-by: Vitaly Mikhailov <personal@aragas.org>
2020-07-09 19:59:42 +02:00
Dim s As String = "Name|" & Name & Environment.NewLine &
"Position|" & Me.startPosition.X.ToString().Replace(GameController.DecSeparator, ".") & "," & Me.startPosition.Y.ToString().Replace(GameController.DecSeparator, ".") & "," & Me.startPosition.Z.ToString().Replace(GameController.DecSeparator, ".") & Environment.NewLine &
"MapFile|" & Me.startMap & Environment.NewLine &
"Rotation|" & Me.startYaw.ToString() & Environment.NewLine &
"RivalName|???" & Environment.NewLine &
"RivalSkin|Silver" & Environment.NewLine &
Fix audio engine & contentpacks (#35) * Replaced existing Gen 2 SFX with better sounding ones (no ugly reverb) Replaced MediaPlayer with NAudio(and NAudio.Vorbis) for playing music in order to fix random stopping issues. The game now directly loads .ogg files instead of the .wma/.xnb combination from before. ContentPacks are now able to replace Music and SFX again (I haven't added a menu yet for choosing ContentPacks). To make older GameModes work with current versions, you can add the GameMode property EnterType and set it to "1", this will make the game use the older 2D NewGameScreen. * Delete GameController.vb * Add gamecontroller.vb back * Fix sfx missing * Battleintro doodle now doesn't loop anymore (for no trainer) Changed the shutter sound (aka Large Door sound) to something more large door-y Made the enter sound slightly louder The enter sound now plays when going through any warp to or from an indoor map (including falling through holes) The flying sound effect is played earlier in the animation after selecting a location Changed played sound effect when using the Escape Rope to "teleport" instead of "destroy" The bump noise now also plays when bumping into something in first person Fixed small gap between the end of the intro song and the start of the main song Replaced some songs with better songs * Fixed some more intro issues * Forgot to change a thing * Fixed an error where the main music would play, ignoring the muted musicmanager. * fix indenting in musicmanager * The music player will now only start playback on a new song if the music player is not muted, fixed the end time calculation of the intro of a song after muting, Music can't be unmuted now as long as a sound effect plays that stops the music. * Fixed league restplace position, fixed sound effects sharing the volume slider of the music, sound effects are now also muted when pressing M, changed music on/off popup to audio on/off, removed bump delay in first person, added more control on whether played songs should be looping or not. * Fixed some more scripts that turn on thirdperson mode but don't check if it was on before or set it back to what it was before afterwards, also fixed a small error in creditsscreen.vb. * Fixed indenting error in musicmanager.vb, fixed an error of mine where the loopsong parameter would be seen as the playintro parameter. * Added more music commands, added quite some menu select noises, will add more later * More select sound effects! * Fix music not resuming after soundeffect * Trainer using item now plays the single_heal soundeffect * Pokémon cries now sound louder * Possibly fixing crash when playing Pokémon cry at volume higher than 0.71 * Added better quality Pokémon cries, made random overworld cries slightly less loud, added cries for 719 and 720. * Sound effects now sound louder * Revert "Added better quality Pokémon cries, made random overworld cries slightly less loud, added cries for 719 and 720." This reverts commit 8c9296ed1a82144d17f303a52c3f2e9e65a5bfea. * Fixed the cause of why the title screen music plays even when the game is muted * Tabs to spaces * Revert Co-authored-by: darkfire006 <blazer257@live.com> Co-authored-by: JappaWakkaP3D <66885565+JappaWakkaP3D@users.noreply.github.com> Co-authored-by: JappaWakkaP3D <jasper.speelman@outlook.com> Co-authored-by: Vitaly Mikhailov <personal@aragas.org>
2020-07-09 19:59:42 +02:00
"Money|3000" & Environment.NewLine &
"Badges|0" & Environment.NewLine &
"Gender|Male" & Environment.NewLine &
"PlayTime|0,0,0,0" & Environment.NewLine &
"OT|" & ot & Environment.NewLine &
"Points|0" & Environment.NewLine &
"hasPokedex|0" & Environment.NewLine &
"hasPokegear|0" & Environment.NewLine &
"freeCamera|1" & Environment.NewLine &
"thirdPerson|0" & Environment.NewLine &
"skin|" & skinFiles(SkinIndex) & Environment.NewLine &
Fix audio engine & contentpacks (#35) * Replaced existing Gen 2 SFX with better sounding ones (no ugly reverb) Replaced MediaPlayer with NAudio(and NAudio.Vorbis) for playing music in order to fix random stopping issues. The game now directly loads .ogg files instead of the .wma/.xnb combination from before. ContentPacks are now able to replace Music and SFX again (I haven't added a menu yet for choosing ContentPacks). To make older GameModes work with current versions, you can add the GameMode property EnterType and set it to "1", this will make the game use the older 2D NewGameScreen. * Delete GameController.vb * Add gamecontroller.vb back * Fix sfx missing * Battleintro doodle now doesn't loop anymore (for no trainer) Changed the shutter sound (aka Large Door sound) to something more large door-y Made the enter sound slightly louder The enter sound now plays when going through any warp to or from an indoor map (including falling through holes) The flying sound effect is played earlier in the animation after selecting a location Changed played sound effect when using the Escape Rope to "teleport" instead of "destroy" The bump noise now also plays when bumping into something in first person Fixed small gap between the end of the intro song and the start of the main song Replaced some songs with better songs * Fixed some more intro issues * Forgot to change a thing * Fixed an error where the main music would play, ignoring the muted musicmanager. * fix indenting in musicmanager * The music player will now only start playback on a new song if the music player is not muted, fixed the end time calculation of the intro of a song after muting, Music can't be unmuted now as long as a sound effect plays that stops the music. * Fixed league restplace position, fixed sound effects sharing the volume slider of the music, sound effects are now also muted when pressing M, changed music on/off popup to audio on/off, removed bump delay in first person, added more control on whether played songs should be looping or not. * Fixed some more scripts that turn on thirdperson mode but don't check if it was on before or set it back to what it was before afterwards, also fixed a small error in creditsscreen.vb. * Fixed indenting error in musicmanager.vb, fixed an error of mine where the loopsong parameter would be seen as the playintro parameter. * Added more music commands, added quite some menu select noises, will add more later * More select sound effects! * Fix music not resuming after soundeffect * Trainer using item now plays the single_heal soundeffect * Pokémon cries now sound louder * Possibly fixing crash when playing Pokémon cry at volume higher than 0.71 * Added better quality Pokémon cries, made random overworld cries slightly less loud, added cries for 719 and 720. * Sound effects now sound louder * Revert "Added better quality Pokémon cries, made random overworld cries slightly less loud, added cries for 719 and 720." This reverts commit 8c9296ed1a82144d17f303a52c3f2e9e65a5bfea. * Fixed the cause of why the title screen music plays even when the game is muted * Tabs to spaces * Revert Co-authored-by: darkfire006 <blazer257@live.com> Co-authored-by: JappaWakkaP3D <66885565+JappaWakkaP3D@users.noreply.github.com> Co-authored-by: JappaWakkaP3D <jasper.speelman@outlook.com> Co-authored-by: Vitaly Mikhailov <personal@aragas.org>
2020-07-09 19:59:42 +02:00
"location|" & Me.startLocation & Environment.NewLine &
"battleAnimations|2" & Environment.NewLine &
"BoxAmount|5" & Environment.NewLine &
"LastRestPlace|yourroom.dat" & Environment.NewLine &
"LastRestPlacePosition|1,0.1,3" & Environment.NewLine &
"DiagonalMovement|0" & Environment.NewLine &
"RepelSteps|0" & Environment.NewLine &
"LastSavePlace|yourroom.dat" & Environment.NewLine &
"LastSavePlacePosition|1,0.1,3" & Environment.NewLine &
"Difficulty|" & GameModeManager.GetGameRuleValue("Difficulty", "0") & Environment.NewLine &
"BattleStyle|0" & Environment.NewLine &
"saveCreated|" & GameController.GAMEDEVELOPMENTSTAGE & " " & GameController.GAMEVERSION & Environment.NewLine &
"LastPokemonPosition|999,999,999" & Environment.NewLine &
"DaycareSteps|0" & Environment.NewLine &
"GameMode|" & GameModeManager.ActiveGameMode.DirectoryName & Environment.NewLine &
"PokeFiles|" & Environment.NewLine &
"VisitedMaps|yourroom.dat" & Environment.NewLine &
"TempSurfSkin|Hilbert" & Environment.NewLine &
"Surfing|0" & Environment.NewLine &
"ShowModels|1" & Environment.NewLine &
"GTSStars|4" & Environment.NewLine &
2016-09-07 18:50:38 +02:00
"SandBoxMode|0"
Return s
End Function
Public Shared Function GetOptionsData() As String
Fix audio engine & contentpacks (#35) * Replaced existing Gen 2 SFX with better sounding ones (no ugly reverb) Replaced MediaPlayer with NAudio(and NAudio.Vorbis) for playing music in order to fix random stopping issues. The game now directly loads .ogg files instead of the .wma/.xnb combination from before. ContentPacks are now able to replace Music and SFX again (I haven't added a menu yet for choosing ContentPacks). To make older GameModes work with current versions, you can add the GameMode property EnterType and set it to "1", this will make the game use the older 2D NewGameScreen. * Delete GameController.vb * Add gamecontroller.vb back * Fix sfx missing * Battleintro doodle now doesn't loop anymore (for no trainer) Changed the shutter sound (aka Large Door sound) to something more large door-y Made the enter sound slightly louder The enter sound now plays when going through any warp to or from an indoor map (including falling through holes) The flying sound effect is played earlier in the animation after selecting a location Changed played sound effect when using the Escape Rope to "teleport" instead of "destroy" The bump noise now also plays when bumping into something in first person Fixed small gap between the end of the intro song and the start of the main song Replaced some songs with better songs * Fixed some more intro issues * Forgot to change a thing * Fixed an error where the main music would play, ignoring the muted musicmanager. * fix indenting in musicmanager * The music player will now only start playback on a new song if the music player is not muted, fixed the end time calculation of the intro of a song after muting, Music can't be unmuted now as long as a sound effect plays that stops the music. * Fixed league restplace position, fixed sound effects sharing the volume slider of the music, sound effects are now also muted when pressing M, changed music on/off popup to audio on/off, removed bump delay in first person, added more control on whether played songs should be looping or not. * Fixed some more scripts that turn on thirdperson mode but don't check if it was on before or set it back to what it was before afterwards, also fixed a small error in creditsscreen.vb. * Fixed indenting error in musicmanager.vb, fixed an error of mine where the loopsong parameter would be seen as the playintro parameter. * Added more music commands, added quite some menu select noises, will add more later * More select sound effects! * Fix music not resuming after soundeffect * Trainer using item now plays the single_heal soundeffect * Pokémon cries now sound louder * Possibly fixing crash when playing Pokémon cry at volume higher than 0.71 * Added better quality Pokémon cries, made random overworld cries slightly less loud, added cries for 719 and 720. * Sound effects now sound louder * Revert "Added better quality Pokémon cries, made random overworld cries slightly less loud, added cries for 719 and 720." This reverts commit 8c9296ed1a82144d17f303a52c3f2e9e65a5bfea. * Fixed the cause of why the title screen music plays even when the game is muted * Tabs to spaces * Revert Co-authored-by: darkfire006 <blazer257@live.com> Co-authored-by: JappaWakkaP3D <66885565+JappaWakkaP3D@users.noreply.github.com> Co-authored-by: JappaWakkaP3D <jasper.speelman@outlook.com> Co-authored-by: Vitaly Mikhailov <personal@aragas.org>
2020-07-09 19:59:42 +02:00
Dim s As String = "FOV|50" & Environment.NewLine &
"TextSpeed|2" & Environment.NewLine &
2016-09-07 18:50:38 +02:00
"MouseSpeed|12"
Return s
End Function
Public Shared Function GetBerryData() As String
Fix audio engine & contentpacks (#35) * Replaced existing Gen 2 SFX with better sounding ones (no ugly reverb) Replaced MediaPlayer with NAudio(and NAudio.Vorbis) for playing music in order to fix random stopping issues. The game now directly loads .ogg files instead of the .wma/.xnb combination from before. ContentPacks are now able to replace Music and SFX again (I haven't added a menu yet for choosing ContentPacks). To make older GameModes work with current versions, you can add the GameMode property EnterType and set it to "1", this will make the game use the older 2D NewGameScreen. * Delete GameController.vb * Add gamecontroller.vb back * Fix sfx missing * Battleintro doodle now doesn't loop anymore (for no trainer) Changed the shutter sound (aka Large Door sound) to something more large door-y Made the enter sound slightly louder The enter sound now plays when going through any warp to or from an indoor map (including falling through holes) The flying sound effect is played earlier in the animation after selecting a location Changed played sound effect when using the Escape Rope to "teleport" instead of "destroy" The bump noise now also plays when bumping into something in first person Fixed small gap between the end of the intro song and the start of the main song Replaced some songs with better songs * Fixed some more intro issues * Forgot to change a thing * Fixed an error where the main music would play, ignoring the muted musicmanager. * fix indenting in musicmanager * The music player will now only start playback on a new song if the music player is not muted, fixed the end time calculation of the intro of a song after muting, Music can't be unmuted now as long as a sound effect plays that stops the music. * Fixed league restplace position, fixed sound effects sharing the volume slider of the music, sound effects are now also muted when pressing M, changed music on/off popup to audio on/off, removed bump delay in first person, added more control on whether played songs should be looping or not. * Fixed some more scripts that turn on thirdperson mode but don't check if it was on before or set it back to what it was before afterwards, also fixed a small error in creditsscreen.vb. * Fixed indenting error in musicmanager.vb, fixed an error of mine where the loopsong parameter would be seen as the playintro parameter. * Added more music commands, added quite some menu select noises, will add more later * More select sound effects! * Fix music not resuming after soundeffect * Trainer using item now plays the single_heal soundeffect * Pokémon cries now sound louder * Possibly fixing crash when playing Pokémon cry at volume higher than 0.71 * Added better quality Pokémon cries, made random overworld cries slightly less loud, added cries for 719 and 720. * Sound effects now sound louder * Revert "Added better quality Pokémon cries, made random overworld cries slightly less loud, added cries for 719 and 720." This reverts commit 8c9296ed1a82144d17f303a52c3f2e9e65a5bfea. * Fixed the cause of why the title screen music plays even when the game is muted * Tabs to spaces * Revert Co-authored-by: darkfire006 <blazer257@live.com> Co-authored-by: JappaWakkaP3D <66885565+JappaWakkaP3D@users.noreply.github.com> Co-authored-by: JappaWakkaP3D <jasper.speelman@outlook.com> Co-authored-by: Vitaly Mikhailov <personal@aragas.org>
2020-07-09 19:59:42 +02:00
Dim s As String = "{route29.dat|13,0,5|6|2|0|2012,9,21,4,0,0|1}" & Environment.NewLine &
"{route29.dat|14,0,5|6|2|0|2012,9,21,4,0,0|1}" & Environment.NewLine &
"{route29.dat|15,0,5|6|2|0|2012,9,21,4,0,0|1}" & Environment.NewLine &
"{azalea.dat|9,0,3|0|2|0|2012,9,21,4,0,0|1}" & Environment.NewLine &
"{azalea.dat|9,0,4|1|1|0|2012,9,21,4,0,0|1}" & Environment.NewLine &
"{azalea.dat|9,0,5|0|2|0|2012,9,21,4,0,0|1}" & Environment.NewLine &
"{route30.dat|7,0,41|10|1|0|2012,9,21,4,0,0|1}" & Environment.NewLine &
"{route30.dat|14,0,5|2|1|0|2012,9,21,4,0,0|1}" & Environment.NewLine &
"{route30.dat|15,0,5|6|2|0|2012,9,21,4,0,0|1}" & Environment.NewLine &
"{route30.dat|16,0,5|2|1|0|2012,9,21,4,0,0|1}" & Environment.NewLine &
"{routes\route35.dat|0,0,4|7|2|0|2012,9,21,4,0,0|1}" & Environment.NewLine &
"{routes\route35.dat|1,0,4|8|2|0|2012,9,21,4,0,0|1}" & Environment.NewLine &
"{route36.dat|37,0,7|0|1|0|2012,9,21,4,0,0|1}" & Environment.NewLine &
"{route36.dat|38,0,7|4|1|0|2012,9,21,4,0,0|1}" & Environment.NewLine &
"{route36.dat|39,0,7|3|2|0|2012,9,21,4,0,0|1}" & Environment.NewLine &
"{route39.dat|8,0,2|9|1|0|2012,9,21,4,0,0|1}" & Environment.NewLine &
"{route39.dat|8,0,3|6|1|0|2012,9,21,4,0,0|1}" & Environment.NewLine &
"{route38.dat|13,0,12|16|2|0|2012,9,21,4,0,0|1}" & Environment.NewLine &
"{route38.dat|14,0,12|23|1|0|2012,9,21,4,0,0|1}" & Environment.NewLine &
"{route38.dat|15,0,12|16|2|0|2012,9,21,4,0,0|1}" & Environment.NewLine &
"{routes\route43.dat|13,0,45|23|2|0|2012,9,21,4,0,0|1}" & Environment.NewLine &
"{routes\route43.dat|13,0,46|24|2|0|2012,9,21,4,0,0|1}" & Environment.NewLine &
"{routes\route43.dat|13,0,47|25|2|0|2012,9,21,4,0,0|1}" & Environment.NewLine &
"{safarizone\main.dat|3,0,11|5|2|0|2012,9,21,4,0,0|1}" & Environment.NewLine &
"{safarizone\main.dat|4,0,11|0|2|0|2012,9,21,4,0,0|1}" & Environment.NewLine &
2016-09-07 18:50:38 +02:00
"{safarizone\main.dat|5,0,11|6|3|0|2012,9,21,4,0,0|1}"
Return s
End Function
Private Function NameReaction(ByVal name As String) As String
Dim WeirdNames() As String = {"derp", "karp"}
Dim KnownNames() As String = {"ash", "gary", "misty", "brock", "tracey", "may", "max", "dawn", "iris", "cilan", "red", "blue", "green", "gold", "silver"}
Dim OwnNames() As String = {"oak", "samuel", "prof. oak", "prof oak"}
Select Case True
Case WeirdNames.Contains(name.ToLower())
Return Localization.GetString("new_game_intro_weird_name_1") & name & Localization.GetString("new_game_intro_weird_name_2")
2016-09-07 18:50:38 +02:00
Case KnownNames.Contains(name.ToLower())
Return Localization.GetString("new_game_intro_known_name_1") & name & Localization.GetString("new_game_intro_known_name_2")
2016-09-07 18:50:38 +02:00
Case OwnNames.Contains(name.ToLower())
Return Localization.GetString("new_game_intro_same_name_1") & name & Localization.GetString("new_game_intro_same_name_2")
2016-09-07 18:50:38 +02:00
End Select
Return Localization.GetString("new_game_intro_name_1") & name & Localization.GetString("new_game_intro_name_2")
2016-09-07 18:50:38 +02:00
End Function
End Class