Ability adder finished!

I've finished the ability adder. It seems to work fine.
This commit is contained in:
Gamer2020
2016-01-30 03:31:05 -05:00
parent 09a0de72a1
commit 614c3db7cf
16 changed files with 207 additions and 112 deletions

Binary file not shown.

View File

@@ -24,21 +24,21 @@ Partial Class AbilityAdder
Private Sub InitializeComponent()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(AbilityAdder))
Me.TabControl1 = New System.Windows.Forms.TabControl()
Me.TabPage1 = New System.Windows.Forms.TabPage()
Me.CheckBox3 = New System.Windows.Forms.CheckBox()
Me.Button1 = New System.Windows.Forms.Button()
Me.TextBox1 = New System.Windows.Forms.TextBox()
Me.Label2 = New System.Windows.Forms.Label()
Me.Label1 = New System.Windows.Forms.Label()
Me.TabPage2 = New System.Windows.Forms.TabPage()
Me.CheckBox1 = New System.Windows.Forms.CheckBox()
Me.Button2 = New System.Windows.Forms.Button()
Me.TextBox2 = New System.Windows.Forms.TextBox()
Me.Label3 = New System.Windows.Forms.Label()
Me.Label4 = New System.Windows.Forms.Label()
Me.Label1 = New System.Windows.Forms.Label()
Me.Label2 = New System.Windows.Forms.Label()
Me.TextBox1 = New System.Windows.Forms.TextBox()
Me.Button1 = New System.Windows.Forms.Button()
Me.TabPage1 = New System.Windows.Forms.TabPage()
Me.CheckBox3 = New System.Windows.Forms.CheckBox()
Me.CheckBox1 = New System.Windows.Forms.CheckBox()
Me.TabControl1.SuspendLayout()
Me.TabPage2.SuspendLayout()
Me.TabPage1.SuspendLayout()
Me.TabPage2.SuspendLayout()
Me.SuspendLayout()
'
'TabControl1
@@ -51,6 +51,66 @@ Partial Class AbilityAdder
Me.TabControl1.Size = New System.Drawing.Size(229, 174)
Me.TabControl1.TabIndex = 1
'
'TabPage1
'
Me.TabPage1.Controls.Add(Me.CheckBox3)
Me.TabPage1.Controls.Add(Me.Button1)
Me.TabPage1.Controls.Add(Me.TextBox1)
Me.TabPage1.Controls.Add(Me.Label2)
Me.TabPage1.Controls.Add(Me.Label1)
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(221, 148)
Me.TabPage1.TabIndex = 0
Me.TabPage1.Text = "Fire Red"
Me.TabPage1.UseVisualStyleBackColor = True
'
'CheckBox3
'
Me.CheckBox3.AutoSize = True
Me.CheckBox3.Location = New System.Drawing.Point(20, 74)
Me.CheckBox3.Name = "CheckBox3"
Me.CheckBox3.Size = New System.Drawing.Size(100, 17)
Me.CheckBox3.TabIndex = 12
Me.CheckBox3.Text = "Delete Old data"
Me.CheckBox3.UseVisualStyleBackColor = True
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(20, 97)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(180, 45)
Me.Button1.TabIndex = 3
Me.Button1.Text = "Expand"
Me.Button1.UseVisualStyleBackColor = True
'
'TextBox1
'
Me.TextBox1.Location = New System.Drawing.Point(154, 47)
Me.TextBox1.Name = "TextBox1"
Me.TextBox1.Size = New System.Drawing.Size(46, 20)
Me.TextBox1.TabIndex = 2
Me.TextBox1.Text = "100"
'
'Label2
'
Me.Label2.AutoSize = True
Me.Label2.Location = New System.Drawing.Point(17, 50)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(129, 13)
Me.Label2.TabIndex = 1
Me.Label2.Text = "Number of abilities to add:"
'
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.Location = New System.Drawing.Point(17, 26)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(135, 13)
Me.Label1.TabIndex = 0
Me.Label1.Text = "Number of abilities in ROM:"
'
'TabPage2
'
Me.TabPage2.Controls.Add(Me.CheckBox1)
@@ -66,6 +126,16 @@ Partial Class AbilityAdder
Me.TabPage2.Text = "Emerald"
Me.TabPage2.UseVisualStyleBackColor = True
'
'CheckBox1
'
Me.CheckBox1.AutoSize = True
Me.CheckBox1.Location = New System.Drawing.Point(20, 74)
Me.CheckBox1.Name = "CheckBox1"
Me.CheckBox1.Size = New System.Drawing.Size(100, 17)
Me.CheckBox1.TabIndex = 12
Me.CheckBox1.Text = "Delete Old data"
Me.CheckBox1.UseVisualStyleBackColor = True
'
'Button2
'
Me.Button2.Location = New System.Drawing.Point(20, 97)
@@ -101,76 +171,6 @@ Partial Class AbilityAdder
Me.Label4.TabIndex = 4
Me.Label4.Text = "Number of abilities in ROM:"
'
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.Location = New System.Drawing.Point(17, 26)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(135, 13)
Me.Label1.TabIndex = 0
Me.Label1.Text = "Number of abilities in ROM:"
'
'Label2
'
Me.Label2.AutoSize = True
Me.Label2.Location = New System.Drawing.Point(17, 50)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(129, 13)
Me.Label2.TabIndex = 1
Me.Label2.Text = "Number of abilities to add:"
'
'TextBox1
'
Me.TextBox1.Location = New System.Drawing.Point(154, 47)
Me.TextBox1.Name = "TextBox1"
Me.TextBox1.Size = New System.Drawing.Size(46, 20)
Me.TextBox1.TabIndex = 2
Me.TextBox1.Text = "100"
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(20, 97)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(180, 45)
Me.Button1.TabIndex = 3
Me.Button1.Text = "Expand"
Me.Button1.UseVisualStyleBackColor = True
'
'TabPage1
'
Me.TabPage1.Controls.Add(Me.CheckBox3)
Me.TabPage1.Controls.Add(Me.Button1)
Me.TabPage1.Controls.Add(Me.TextBox1)
Me.TabPage1.Controls.Add(Me.Label2)
Me.TabPage1.Controls.Add(Me.Label1)
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(221, 148)
Me.TabPage1.TabIndex = 0
Me.TabPage1.Text = "Fire Red"
Me.TabPage1.UseVisualStyleBackColor = True
'
'CheckBox3
'
Me.CheckBox3.AutoSize = True
Me.CheckBox3.Location = New System.Drawing.Point(20, 74)
Me.CheckBox3.Name = "CheckBox3"
Me.CheckBox3.Size = New System.Drawing.Size(100, 17)
Me.CheckBox3.TabIndex = 12
Me.CheckBox3.Text = "Delete Old data"
Me.CheckBox3.UseVisualStyleBackColor = True
'
'CheckBox1
'
Me.CheckBox1.AutoSize = True
Me.CheckBox1.Location = New System.Drawing.Point(20, 74)
Me.CheckBox1.Name = "CheckBox1"
Me.CheckBox1.Size = New System.Drawing.Size(100, 17)
Me.CheckBox1.TabIndex = 12
Me.CheckBox1.Text = "Delete Old data"
Me.CheckBox1.UseVisualStyleBackColor = True
'
'AbilityAdder
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
@@ -184,10 +184,10 @@ Partial Class AbilityAdder
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
Me.Text = "Ability Adder"
Me.TabControl1.ResumeLayout(False)
Me.TabPage2.ResumeLayout(False)
Me.TabPage2.PerformLayout()
Me.TabPage1.ResumeLayout(False)
Me.TabPage1.PerformLayout()
Me.TabPage2.ResumeLayout(False)
Me.TabPage2.PerformLayout()
Me.ResumeLayout(False)
End Sub

View File

@@ -132,4 +132,104 @@ Public Class AbilityAdder
MsgBox("Abilities expanded successfully!")
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Dim countervar As Integer
Dim AbilitiesNamesBuffer As String
Dim AbilitiesNamesNewOffset As String
Dim AbilitiesDescriptionTableBuffer As String
Dim AbilitiesDescriptionTableNewOffset As String
If System.IO.File.Exists((LoadedROM).Substring(0, LoadedROM.Length - 4) & ".ini") = True Then
MsgBox("An INI for this ROM has been detected! Values will be updated as needed.")
Else
MsgBox("INI not found! One will now be created for this ROM in the same location as the ROM. Keep the ini with the ROM so that PGE can know the location of the data.")
File.Copy(AppPath & "ini\roms.ini", (LoadedROM).Substring(0, LoadedROM.Length - 4) & ".ini", True)
End If
Cursor = Cursors.WaitCursor
'Ability Names
AbilitiesNamesBuffer = ReadHEX(LoadedROM, Int32.Parse((GetString(GetINIFileLocation(), header, "AbilityNames", "")), System.Globalization.NumberStyles.HexNumber), (GetString(GetINIFileLocation(), header, "NumberOfAbilities", "")) * 13)
'Deletes old data
If CheckBox1.Checked Then
WriteHEX(LoadedROM, Int32.Parse((GetString(GetINIFileLocation(), header, "AbilityNames", "")), System.Globalization.NumberStyles.HexNumber), MakeFreeSpaceString((Len(AbilitiesNamesBuffer) / 2)))
End If
countervar = 0
While countervar < TextBox2.Text
countervar = countervar + 1
AbilitiesNamesBuffer = AbilitiesNamesBuffer & "ACACACACACACACFF0000000000"
End While
AbilitiesNamesNewOffset = SearchFreeSpaceFourAligned(LoadedROM, &HFF, ((Len(AbilitiesNamesBuffer) / 2)), "&H" & GetString(GetINIFileLocation(), header, "StartSearchingForSpaceOffset", "800000"))
WriteHEX(LoadedROM, AbilitiesNamesNewOffset, AbilitiesNamesBuffer)
WriteString(GetINIFileLocation(), header, "AbilityNames", Hex(AbilitiesNamesNewOffset))
'Repoint ability Names
WriteHEX(LoadedROM, &H1C0, ReverseHEX(Hex((AbilitiesNamesNewOffset) + &H8000000)))
WriteHEX(LoadedROM, &H14F0D4, ReverseHEX(Hex((AbilitiesNamesNewOffset) + &H8000000)))
WriteHEX(LoadedROM, &H14F854, ReverseHEX(Hex((AbilitiesNamesNewOffset) + &H8000000)))
WriteHEX(LoadedROM, &H1C3028, ReverseHEX(Hex((AbilitiesNamesNewOffset) + &H8000000)))
'ability Descriptions
AbilitiesDescriptionTableBuffer = ReadHEX(LoadedROM, Int32.Parse((GetString(GetINIFileLocation(), header, "AbilityDescriptionTable", "")), System.Globalization.NumberStyles.HexNumber), ((GetString(GetINIFileLocation(), header, "NumberOfAbilities", ""))) * 4)
'Deletes old data
If CheckBox1.Checked Then
WriteHEX(LoadedROM, Int32.Parse((GetString(GetINIFileLocation(), header, "AbilityDescriptionTable", "")), System.Globalization.NumberStyles.HexNumber), MakeFreeSpaceString((Len(AbilitiesDescriptionTableBuffer) / 2)))
End If
countervar = 0
While countervar < TextBox2.Text
countervar = countervar + 1
AbilitiesDescriptionTableBuffer = AbilitiesDescriptionTableBuffer & "98AF3108"
End While
AbilitiesDescriptionTableNewOffset = SearchFreeSpaceFourAligned(LoadedROM, &HFF, ((Len(AbilitiesDescriptionTableBuffer) / 2)), "&H" & GetString(GetINIFileLocation(), header, "StartSearchingForSpaceOffset", "800000"))
WriteHEX(LoadedROM, AbilitiesDescriptionTableNewOffset, AbilitiesDescriptionTableBuffer)
WriteString(GetINIFileLocation(), header, "AbilityDescriptionTable", Hex(AbilitiesDescriptionTableNewOffset))
'Repoint Abilities Description Table
WriteHEX(LoadedROM, &H1C4, ReverseHEX(Hex((AbilitiesDescriptionTableNewOffset) + &H8000000)))
WriteHEX(LoadedROM, &H1C3078, ReverseHEX(Hex((AbilitiesDescriptionTableNewOffset) + &H8000000)))
'Updates the number of Abilities
WriteString(GetINIFileLocation(), header, "NumberOfAbilities", CInt((GetString(GetINIFileLocation(), header, "NumberOfAbilities", ""))) + CInt(TextBox2.Text))
Label4.Text = "Number of abilities in ROM: " & (GetString(GetINIFileLocation(), header, "NumberOfAbilities", ""))
Cursor = Cursors.Arrow
MsgBox("Abilities expanded successfully!")
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>QnyXznts4kcUxr7YwkFqFYAWzF8=</dsig:DigestValue>
<dsig:DigestValue>NitTHYSEJKneAu0uHO1bphjdGN0=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>

View File

@@ -43,14 +43,14 @@
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="PokemonGameEditor.exe" size="1608192">
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="PokemonGameEditor.exe" size="1609728">
<assemblyIdentity name="PokemonGameEditor" version="3.4.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>eQ5S6eQDbg3uxr8lKVXHbOa2ZgE=</dsig:DigestValue>
<dsig:DigestValue>DkRp3J/cipGGfrMgmfcb+7jPPk0=</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>QnyXznts4kcUxr7YwkFqFYAWzF8=</dsig:DigestValue>
<dsig:DigestValue>NitTHYSEJKneAu0uHO1bphjdGN0=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>

View File

@@ -43,14 +43,14 @@
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="PokemonGameEditor.exe" size="1608192">
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="PokemonGameEditor.exe" size="1609728">
<assemblyIdentity name="PokemonGameEditor" version="3.4.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>eQ5S6eQDbg3uxr8lKVXHbOa2ZgE=</dsig:DigestValue>
<dsig:DigestValue>DkRp3J/cipGGfrMgmfcb+7jPPk0=</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>QnyXznts4kcUxr7YwkFqFYAWzF8=</dsig:DigestValue>
<dsig:DigestValue>NitTHYSEJKneAu0uHO1bphjdGN0=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>

View File

@@ -43,14 +43,14 @@
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="PokemonGameEditor.exe" size="1608192">
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="PokemonGameEditor.exe" size="1609728">
<assemblyIdentity name="PokemonGameEditor" version="3.4.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>eQ5S6eQDbg3uxr8lKVXHbOa2ZgE=</dsig:DigestValue>
<dsig:DigestValue>DkRp3J/cipGGfrMgmfcb+7jPPk0=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>

View File

@@ -21,57 +21,50 @@ Screenshots
Features
=================
Editable INI that contains all the offsets
Editable INI that contains all the offsets. Each ROM can have it's own INI.
Pokemon Editor
Pokemon Editor.
Attack Editor
Attack Editor.
RSE Starter Editor
RSE Starter Editor.
Pokedex Order Editor
Pokedex Order Editor.
Ability Editor
Ability Editor.
Move Tutor Editor
Linux Support - Runs with mono. *Please note that I currently can't test under Linux so some things may have become broken since PGE was able to run on Linux.*
Move Tutor Editor.
Multiple Windows open at once.
Add up to 20 external programs.
Windows RT support (On Jailbroken devices)
Battle Frontier Editor.
Windows XP support
Pokedex Editor.
Battle Frontier Editor
Support for more than 5 evolutions per Pokemon.
Pokedex Editor
Support for more than 5 evolutions per Pokemon
Support for more types
Support for more types.
Ability to define evolutions.
Item editor
Item editor.
TM/HM Editor
Ability to use a seperate ini
TM/HM Editor.
Ability to add more attacks.
Egg move editor.
Habitat editor.
Planned Features
=================
Ability to add more Pokemon.
Ability to add more items.
Improved Pokemon data importing and exporting.
Program Requirements
====================
@@ -144,6 +137,8 @@ Wichu
colcolstyles
RomHackersWorld
Downloads
================================
https://github.com/Gamer2020/PokemonGameEditor/releases