Editable attack descriptions!

Attack descriptions are now editable!
This commit is contained in:
Gamer2020 2016-01-02 05:07:12 -05:00
parent e2c0b2281b
commit e87b861e1d
22 changed files with 177 additions and 55 deletions

Binary file not shown.

View File

@ -24,12 +24,16 @@ Partial Class AttackEditor
Private Sub InitializeComponent()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(AttackEditor))
Me.GroupBox1 = New System.Windows.Forms.GroupBox()
Me.AttackListIndex = New System.Windows.Forms.TextBox()
Me.Label20 = New System.Windows.Forms.Label()
Me.ComboBox3 = New System.Windows.Forms.ComboBox()
Me.GroupBox2 = New System.Windows.Forms.GroupBox()
Me.Button1 = New System.Windows.Forms.Button()
Me.TextBox1 = New System.Windows.Forms.TextBox()
Me.TabControl1 = New System.Windows.Forms.TabControl()
Me.TabPage1 = New System.Windows.Forms.TabPage()
Me.Label21 = New System.Windows.Forms.Label()
Me.Button6 = New System.Windows.Forms.Button()
Me.GroupBox3 = New System.Windows.Forms.GroupBox()
Me.ComboBox8 = New System.Windows.Forms.ComboBox()
Me.ComboBox7 = New System.Windows.Forms.ComboBox()
@ -85,8 +89,6 @@ Partial Class AttackEditor
Me.GroupBox4 = New System.Windows.Forms.GroupBox()
Me.Button4 = New System.Windows.Forms.Button()
Me.AnimationPointer = New System.Windows.Forms.TextBox()
Me.Label20 = New System.Windows.Forms.Label()
Me.AttackListIndex = New System.Windows.Forms.TextBox()
Me.GroupBox1.SuspendLayout()
Me.GroupBox2.SuspendLayout()
Me.TabControl1.SuspendLayout()
@ -109,6 +111,23 @@ Partial Class AttackEditor
Me.GroupBox1.TabStop = False
Me.GroupBox1.Text = "Attack Selection:"
'
'AttackListIndex
'
Me.AttackListIndex.Location = New System.Drawing.Point(46, 46)
Me.AttackListIndex.Name = "AttackListIndex"
Me.AttackListIndex.ReadOnly = True
Me.AttackListIndex.Size = New System.Drawing.Size(40, 20)
Me.AttackListIndex.TabIndex = 25
'
'Label20
'
Me.Label20.AutoSize = True
Me.Label20.Location = New System.Drawing.Point(6, 49)
Me.Label20.Name = "Label20"
Me.Label20.Size = New System.Drawing.Size(36, 13)
Me.Label20.TabIndex = 24
Me.Label20.Text = "Index:"
'
'ComboBox3
'
Me.ComboBox3.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
@ -153,11 +172,13 @@ Partial Class AttackEditor
Me.TabControl1.Location = New System.Drawing.Point(170, 28)
Me.TabControl1.Name = "TabControl1"
Me.TabControl1.SelectedIndex = 0
Me.TabControl1.Size = New System.Drawing.Size(468, 394)
Me.TabControl1.Size = New System.Drawing.Size(468, 408)
Me.TabControl1.TabIndex = 25
'
'TabPage1
'
Me.TabPage1.Controls.Add(Me.Label21)
Me.TabPage1.Controls.Add(Me.Button6)
Me.TabPage1.Controls.Add(Me.GroupBox3)
Me.TabPage1.Controls.Add(Me.Button2)
Me.TabPage1.Controls.Add(Me.Label10)
@ -189,11 +210,30 @@ Partial Class AttackEditor
Me.TabPage1.Location = New System.Drawing.Point(4, 22)
Me.TabPage1.Name = "TabPage1"
Me.TabPage1.Padding = New System.Windows.Forms.Padding(3)
Me.TabPage1.Size = New System.Drawing.Size(460, 368)
Me.TabPage1.Size = New System.Drawing.Size(460, 382)
Me.TabPage1.TabIndex = 0
Me.TabPage1.Text = "Attack Data"
Me.TabPage1.UseVisualStyleBackColor = True
'
'Label21
'
Me.Label21.AutoSize = True
Me.Label21.ForeColor = System.Drawing.SystemColors.ControlText
Me.Label21.Location = New System.Drawing.Point(284, 337)
Me.Label21.Name = "Label21"
Me.Label21.Size = New System.Drawing.Size(43, 13)
Me.Label21.TabIndex = 29
Me.Label21.Text = "Length:"
'
'Button6
'
Me.Button6.Location = New System.Drawing.Point(367, 356)
Me.Button6.Name = "Button6"
Me.Button6.Size = New System.Drawing.Size(67, 20)
Me.Button6.TabIndex = 28
Me.Button6.Text = "Save"
Me.Button6.UseVisualStyleBackColor = True
'
'GroupBox3
'
Me.GroupBox3.Controls.Add(Me.ComboBox8)
@ -268,7 +308,6 @@ Partial Class AttackEditor
Me.TextBox7.Location = New System.Drawing.Point(287, 257)
Me.TextBox7.Multiline = True
Me.TextBox7.Name = "TextBox7"
Me.TextBox7.ReadOnly = True
Me.TextBox7.Size = New System.Drawing.Size(147, 74)
Me.TextBox7.TabIndex = 24
'
@ -501,7 +540,7 @@ Partial Class AttackEditor
Me.TabPage2.Location = New System.Drawing.Point(4, 22)
Me.TabPage2.Name = "TabPage2"
Me.TabPage2.Padding = New System.Windows.Forms.Padding(3)
Me.TabPage2.Size = New System.Drawing.Size(460, 368)
Me.TabPage2.Size = New System.Drawing.Size(460, 382)
Me.TabPage2.TabIndex = 1
Me.TabPage2.Text = "Contest Data"
Me.TabPage2.UseVisualStyleBackColor = True
@ -702,28 +741,11 @@ Partial Class AttackEditor
Me.AnimationPointer.Size = New System.Drawing.Size(121, 20)
Me.AnimationPointer.TabIndex = 0
'
'Label20
'
Me.Label20.AutoSize = True
Me.Label20.Location = New System.Drawing.Point(6, 49)
Me.Label20.Name = "Label20"
Me.Label20.Size = New System.Drawing.Size(36, 13)
Me.Label20.TabIndex = 24
Me.Label20.Text = "Index:"
'
'AttackListIndex
'
Me.AttackListIndex.Location = New System.Drawing.Point(46, 46)
Me.AttackListIndex.Name = "AttackListIndex"
Me.AttackListIndex.ReadOnly = True
Me.AttackListIndex.Size = New System.Drawing.Size(40, 20)
Me.AttackListIndex.TabIndex = 25
'
'AttackEditor
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(650, 434)
Me.ClientSize = New System.Drawing.Size(650, 448)
Me.Controls.Add(Me.GroupBox4)
Me.Controls.Add(Me.Button3)
Me.Controls.Add(Me.TabControl1)
@ -817,4 +839,6 @@ Partial Class AttackEditor
Friend WithEvents Button5 As System.Windows.Forms.Button
Friend WithEvents AttackListIndex As TextBox
Friend WithEvents Label20 As Label
Friend WithEvents Button6 As Button
Friend WithEvents Label21 As Label
End Class

View File

@ -4,6 +4,7 @@
Dim AttackAni As Integer
Dim ContestMoveData As Integer
Dim ContestMoveEffectData As Integer
Dim CurrentAttackDescripLength As Integer
Private Sub AttackEditor_FormClosed(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed
MainFrm.Visible = True
@ -52,15 +53,18 @@
FileNum = FreeFile()
FileOpen(FileNum, LoadedROM, OpenMode.Binary)
Dim DexDescp As String = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
Dim AttackDescp As String = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
FileGet(FileNum, DexDescp, Int32.Parse(((TextBox6.Text)), System.Globalization.NumberStyles.HexNumber) + 1, True)
DexDescp = Sapp2Asc(DexDescp)
DexDescp = Mid$(DexDescp, 1, InStr(1, DexDescp, "\x"))
DexDescp = Replace(DexDescp, "\n", vbCrLf)
DexDescp = Replace(RTrim$(DexDescp), "\", "")
TextBox7.Text = DexDescp
TextBox7.MaxLength = Len(DexDescp)
FileGet(FileNum, AttackDescp, Int32.Parse(((TextBox6.Text)), System.Globalization.NumberStyles.HexNumber) + 1, True)
AttackDescp = Sapp2Asc(AttackDescp)
AttackDescp = Mid$(AttackDescp, 1, InStr(1, AttackDescp, "\x"))
AttackDescp = Replace(AttackDescp, "\n", vbCrLf)
AttackDescp = Replace(RTrim$(AttackDescp), "\", "")
CurrentAttackDescripLength = Len(AttackDescp)
TextBox7.Text = AttackDescp
' Label21.Text = "Length:" & CurrentAttackDescripLength & " / " & CurrentAttackDescripLength
FileClose(FileNum)
@ -292,15 +296,16 @@
WriteHEX(LoadedROM, (AttackDesc) + (0) + (ComboBox3.SelectedIndex * 4), ReverseHEX(Hex(Int32.Parse(((TextBox6.Text)), System.Globalization.NumberStyles.HexNumber) + &H8000000)))
FileNum = FreeFile()
FileOpen(FileNum, LoadedROM, OpenMode.Binary)
Dim DexDescp As String = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
Dim AttackDescp As String = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
FileGet(FileNum, DexDescp, Int32.Parse(((TextBox6.Text)), System.Globalization.NumberStyles.HexNumber) + 1, True)
DexDescp = Sapp2Asc(DexDescp)
DexDescp = Mid$(DexDescp, 1, InStr(1, DexDescp, "\x"))
DexDescp = Replace(DexDescp, "\n", vbCrLf)
DexDescp = Replace(RTrim$(DexDescp), "\", "")
TextBox7.Text = DexDescp
TextBox7.MaxLength = Len(DexDescp)
FileGet(FileNum, AttackDescp, Int32.Parse(((TextBox6.Text)), System.Globalization.NumberStyles.HexNumber) + 1, True)
AttackDescp = Sapp2Asc(AttackDescp)
AttackDescp = Mid$(AttackDescp, 1, InStr(1, AttackDescp, "\x"))
AttackDescp = Replace(AttackDescp, "\n", vbCrLf)
AttackDescp = Replace(RTrim$(AttackDescp), "\", "")
CurrentAttackDescripLength = Len(AttackDescp)
TextBox7.Text = AttackDescp
TextBox7.MaxLength = Len(AttackDescp)
FileClose(FileNum)
@ -324,4 +329,83 @@
'WriteHEX(LoadedROM, ((ContestMoveEffectData) + 2) + (ComboBox4.SelectedIndex * 4), Hex(TextBox10.Text))
MsgBox("disabled till I double check it works")
End Sub
Private Sub TextBox7_TextChanged(sender As Object, e As EventArgs) Handles TextBox7.TextChanged
Label21.Text = "Length: " & Len(TextBox7.Text) & "/" & CurrentAttackDescripLength
Label21.ForeColor = Color.Black
If Len(TextBox7.Text) > CurrentAttackDescripLength Then
Label21.Text = Label21.Text & " Requires repoint!"
Label21.ForeColor = Color.Red
End If
End Sub
Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click
Dim curdespoff As String
Dim destowrite As String
curdespoff = Hex(Val("&H" & ReverseHEX(ReadHEX(LoadedROM, (AttackDesc) + (ComboBox3.SelectedIndex * 4), 4))) - &H8000000)
destowrite = Asc2Sapp(Replace(TextBox7.Text, vbCrLf, "\n") & "\x")
If Len(TextBox7.Text) > CurrentAttackDescripLength Then
Dim result As DialogResult = MessageBox.Show("The text will be written to free space and the pointer will be repointed. Would you like to do that?",
"Repoint?",
MessageBoxButtons.YesNo)
If (result = DialogResult.Yes) Then
Dim newtextoff As String
newtextoff = SearchFreeSpaceFourAligned(LoadedROM, &HFF, (Len(destowrite & " ")), "&H" & GetString(GetINIFileLocation(), header, "StartSearchingForSpaceOffset", "800000"))
FileNum = FreeFile()
FileOpen(FileNum, LoadedROM, OpenMode.Binary)
FilePut(FileNum, destowrite & " ", ("&H" & Hex(newtextoff)) + 1, False)
FileClose(FileNum)
TextBox6.Text = Hex(newtextoff)
Button2.PerformClick()
Label21.Text = "Length: " & Len(TextBox7.Text) & "/" & CurrentAttackDescripLength
Label21.ForeColor = Color.Black
If Len(TextBox7.Text) > CurrentAttackDescripLength Then
Label21.Text = Label21.Text & " Requires repoint!"
Label21.ForeColor = Color.Red
End If
Else
End If
Else
FileNum = FreeFile()
FileOpen(FileNum, LoadedROM, OpenMode.Binary)
FilePut(FileNum, destowrite, ("&H" & curdespoff) + 1, False)
FileClose(FileNum)
TextBox6.Text = curdespoff
End If
End Sub
End Class

View File

@ -206,4 +206,8 @@ Public Class PokedexDataEditor
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
End Sub
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
End Sub
End Class

View File

@ -16,7 +16,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>6MHcpvHjtOAU6O3U/DAN9oJEyzg=</dsig:DigestValue>
<dsig:DigestValue>I2kuidxH4MS3jq/bO7aMcahxlS4=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>

View File

@ -43,14 +43,14 @@
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="GBAPokemonGameEditor.exe" size="531456">
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="GBAPokemonGameEditor.exe" size="534016">
<assemblyIdentity name="GBAPokemonGameEditor" version="3.3.0.0" language="neutral" processorArchitecture="msil" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>+LMF0Ptkj5G/vIEZ908FDxwQDMQ=</dsig:DigestValue>
<dsig:DigestValue>0WK4KLGUotwoi3yeyuwQbbNYtfM=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>

View File

@ -16,7 +16,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>6MHcpvHjtOAU6O3U/DAN9oJEyzg=</dsig:DigestValue>
<dsig:DigestValue>I2kuidxH4MS3jq/bO7aMcahxlS4=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>

View File

@ -43,14 +43,14 @@
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="GBAPokemonGameEditor.exe" size="531456">
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="GBAPokemonGameEditor.exe" size="534016">
<assemblyIdentity name="GBAPokemonGameEditor" version="3.3.0.0" language="neutral" processorArchitecture="msil" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>+LMF0Ptkj5G/vIEZ908FDxwQDMQ=</dsig:DigestValue>
<dsig:DigestValue>0WK4KLGUotwoi3yeyuwQbbNYtfM=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>

View File

@ -16,4 +16,9 @@ Psychic
Ice
Dragon
Dark
Filler
Filler
Filler
Filler
Filler
Fairy

View File

@ -484,7 +484,7 @@ AbilityDescriptionTable=24FB08
AttackAnimationTable=1C68F4
IconPals=3D3740
JamboLearnableMovesTerm=0000FF
StartSearchingForSpaceOffset=800000
StartSearchingForSpaceOffset=71A240
FreeSpaceSearchInterval=100
CryConversionTable=2539D4
NumberOfEvolutionsPerPokemon=5

View File

@ -55,6 +55,7 @@ Module modTextSapp
End If
If Len(asciistring) - (i - 1) > 1 And m = False Then
Select Case Mid(asciistring, i, 2)
Case "\l" : Y = &HFA : m = True
Case "\p" : Y = &HFB : m = True
@ -70,6 +71,7 @@ Module modTextSapp
End If
If m = False Then
Select Case Mid(asciistring, i, 1)
Case " " : Y = &H0 : m = True
Case "À" : Y = &H1 : m = True
@ -198,7 +200,7 @@ Module modTextSapp
Case "ö" : Y = &HF5 : m = True
Case "ü" : Y = &HF6 : m = True
'This whole thing auto-converted from TBL file
'This whole thing auto-converted from TBL file
Case "" : Y = &H1 '"a"
Case "" : Y = &H2 '"i"
Case "" : Y = &H3 '"u"
@ -763,11 +765,12 @@ Module modTextSapp
Private Function IsHex(ByVal hexstring As String) As Boolean
Dim z As Boolean
Dim Y As Byte
For i = 1 To Len(hexstring)
Y = Asc(Mid(hexstring, i, 1))
Dim privi As Integer
For privi = 1 To Len(hexstring)
Y = Asc(Mid(hexstring, privi, 1))
z = IIf((Y > 47 And Y < 58) Or (Y > 64 And Y < 71) Or (Y > 96 And Y < 103), True, False)
If z = False Then Exit For
Next i
Next privi
IsHex = z
End Function

View File

@ -16,7 +16,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>6MHcpvHjtOAU6O3U/DAN9oJEyzg=</dsig:DigestValue>
<dsig:DigestValue>I2kuidxH4MS3jq/bO7aMcahxlS4=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>

View File

@ -43,14 +43,14 @@
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="GBAPokemonGameEditor.exe" size="531456">
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="GBAPokemonGameEditor.exe" size="534016">
<assemblyIdentity name="GBAPokemonGameEditor" version="3.3.0.0" language="neutral" processorArchitecture="msil" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>+LMF0Ptkj5G/vIEZ908FDxwQDMQ=</dsig:DigestValue>
<dsig:DigestValue>0WK4KLGUotwoi3yeyuwQbbNYtfM=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>

View File

@ -17,6 +17,8 @@ Screenshots
![alt tag](https://raw.githubusercontent.com/Gamer2020/PokemonGameEditor/master/Screenshots/6.png)
![alt tag](https://raw.githubusercontent.com/Gamer2020/PokemonGameEditor/master/Screenshots/7.png)
Features
=================
Editable INI that contains all the offsets

BIN
Screenshots/7.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

View File

@ -484,7 +484,7 @@ AbilityDescriptionTable=24FB08
AttackAnimationTable=1C68F4
IconPals=3D3740
JamboLearnableMovesTerm=0000FF
StartSearchingForSpaceOffset=800000
StartSearchingForSpaceOffset=71A240
FreeSpaceSearchInterval=100
CryConversionTable=2539D4
NumberOfEvolutionsPerPokemon=5