English (American)  中文(简体)
This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

by xristos at 18-06-2021, 08:26 AM





Demo video

by MangaD at 11-06-2021, 08:03 PM
In this tutorial we are going to make Shawn's arrow freeze the enemy.

[Image: arrow-freeze.gif]

It is assumed that the reader is already familiar with the HF Workshop tool. If he is not, he is advised to go to the linked thread, read it and watch the tutorial video.


1. Export the data file 142 - Data.Global_globalDat.
2. The Attack file that corresponds to Shawn's arrow is Attack_53.json. Open it.
3. Replace the type value with 100.0 in the file Attack_53.json. It should look like this:

    "Data.Attack": {
        "hp": 25.0,
        "fall": 100.0,
        "brk": 50.0,
        "name": "ite_arrowHit",
        "ref": -1.0,
        "z1": 60.0,
        "dizzy": 60.0,
        "x1": 0.0,
        "stun": 0.0,
        "x2": 150.0,
        "z2": 0.0,
        "y1": 0.0,
        "type": 100.0,
        "y2": 150.0,
        "selfStun": 0.0,
        "effect": 0.0,
        "vx": 17.0,
        "dxMirror": false,
        "vy": 0.0,
        "i": 53.0,
        "vz": 0.0,
        "j": 0.0,
        "dx": 0.0,
        "refName": null,
        "l": 1.0,
        "aaa": true

4. Save the file Attack_53.json in the zip archive.
5. Replace the 142 - Data.Global_globalDat resource in the game with the new zip file.
6. Export EXE.

BEBD has provided a list with the possible values for the type attribute and what they mean:

[Image: global-Dat-Attack-type-attribute.png]

Special thanks to @不饿白帝BEBD for telling me how to do this!
by MangaD at 02-06-2021, 12:17 PM
Although Adobe has abandoned Flash in 2020, it has transitioned the ongoing support and development of Adobe AIR to HARMAN, a Samsung company. You can read more on this here.

This means that we can still create executable versions of HF and HFX using the latest Flash Player version for the latest platforms (e.g. Android 10+).

The instructions for creating packages of HF and HFX differ, with HFX being the most complicated one. I will start with HF (PC version).

For these instructions, you will need to download and extract AIR SDK by HARMAN.

Note that in the end there will be a splash screen of this company when opening the game. It cannot be removed without payment as you can see here. Do not attempt to remove it through hacking, it is illegal.

PC version:

1. Go to AIRSDK_Windows\bin folder, create a folder for your app there (e.g. CoronationWars). Open the folder that you have just created.

2. Inside this folder, create a file called application.xml with the following content:
<?xml version="1.0" encoding="UTF-8"?> 
<application xmlns="http://ns.adobe.com/air/application/33.1"> 
    <name>Coronation Wars</name>
        <text xml:lang="en">Coronation Wars by BEBD</text>
    <filename>Coronation Wars</filename>
        <!-- Don't set the size. It will be determined automatically. -->

Notice that we are using version 33.1 of Flash Player (currently the latest and released by HARMAN). We have decided to give the version 1.1 to this package of Coronation Wars mod.

In this case we are creating a package for the 64-bit architecture, thus using the 64-bit version of the Flash Player. The reason for this is that Coronation Wars crashes on the 32-bit FP due to having large resource files inside.

3. Place the game's SWF file in this folder (with the same name as the one in the content tag in the application.xml file). Create a icons folder and place your icon images there accordingly to the information in the application.xml file. The directory structure should look like this:
├── application.xml
├── CW.swf
├── icons
│  ├── 16.png
│  ├── 32.png
│  ├── 48.png
│  ├── 256.png

4. Open PowerShell inside the CoronationWars folder. (You can do this using the context menu. Shift+right click on the empty space inside the folder for that option to appear).

5. Optionally, you can test the app right away with the following terminal command:
..\adl64.exe .\application.xml

6. Create a certificate to sign your app (this may help with some anti-viruses not giving false positives). Run the following command for this:
..\adt.bat -certificate -cn SelfSign -ou HK -o "Martial Studio Limited" -c HK 2048-RSA hf.p12 SomePasswordOfYourChoice

Instructions taken from here.

You'll be prompted for the password you chose when packaging in the next phase.

7. Now you can either create a bundle (a folder containing various necessary files and an EXE that you can run the game with) or an installer.

..\adt.bat -package -keystore hf.p12 -storetype pkcs12 -target bundle CW application.xml CW.swf icons

..\adt.bat -package -keystore hf.p12 -storetype pkcs12 -target native CW application.xml CW.swf icons

HFX (Android):

You will need the original (or modded) APK for this. You can download it from here.

1. Open the APK file with an archive manager (APK is a ZIP file).

2. Extract the classes.dex file inside the APK  and convert it to a JAR file using the dex2jar tool.

3. Open the JAR file (which is also a ZIP file) with an archive manager and extract the files inside (they are the compiled Java classes from the AIR Native Extensions that HFX uses) to some folder of your choice, we will be using them soon.

4. Inside the bin directory of Adobe AIR by HARMAN, create a directory for each extension:
├── com.adobe.ane.social
├── com.milkmangames.extensions.AndroidIAB
├── com.chartboost.plugin.air
├── com.milkmangames.extensions.CoreMobile
├── com.jirbo.airadc.AirAdColony
├── com.milkmangames.extensions.GoViral

5. The unpacked extensions can be found inside the APK, in the path /assets/META-INF/AIR/extensions/. For each extension, add catalog.xml and library.swf into a ZIP file, and renamed the ZIP extension to SWC (e.g.: com.adobe.ane.social.swc). Then, place the SWC file inside the respective extension's directory.

6. Inside each extension's directory in the APK, there is a path META-INF/ANE/ where the file extension.xml and other files can be found (e.g.: /assets/META-INF/AIR/extensions/com.adobe.ane.social/META-INF/ANE/). Place all the files inside these directories in the directories of the respective extensions that you created in the bin directory. For the com.chartboost.plugin.air extension, for example, this is what the directory structure looks like:
├── com.adobe.ane.social
├── com.milkmangames.extensions.AndroidIAB
├── com.chartboost.plugin.air
│  ├── com.chartboost.plugin.air.swc
│  ├── extension.xml
│  ├── Android-ARM
├── com.milkmangames.extensions.CoreMobile
├── com.jirbo.airadc.AirAdColony
├── com.milkmangames.extensions.GoViral

If you open the extension.xml file you can see that these are its contents (in the original APK):
<extension xmlns="http://ns.adobe.com/air/extension/16.0">
<platform name="Android-ARM">

<platform name="iPhone-ARM">
        <platform name="default">


As we are not packaging the game for iPhone-ARM nor do we have the libChartboostAir.a file, you must comment that platform block using XML comments <!--  -->, or simply remove that block altogether.

We can see that there is a default platform (I noticed that all extensions have one). So, create a directory for the default platform and copy library.swf from the Android-ARM directory to it. Then place both directories inside a platform directory. The directory structure now looks like this:
├── com.adobe.ane.social
├── com.milkmangames.extensions.AndroidIAB
├── com.chartboost.plugin.air
│  ├── com.chartboost.plugin.air.swc
│  ├── extension.xml
│  ├── platform
│  │  ├── Android-ARM
│  │  │  ├── library.swf
│  │  │  ├── <other bunch of files>
│  │  ├── default
│  │  │  ├── library.swf
├── com.milkmangames.extensions.CoreMobile
├── com.jirbo.airadc.AirAdColony
├── com.milkmangames.extensions.GoViral

Then, from the JAR file that we got at the beginning (converted from classes.dex), get all the classes related to com.chartboost.plugin.air and place them in a ZIP archive named libChartboostAir.jar. Then place libChartboostAir.jar inside the Android-ARM directory.

Open PowerShell inside the extension's folder. (You can do this using the context menu. Shift+right click on the empty space inside the folder for that option to appear).

Finally, for this extension, run the following command to generate the ANE file:
..\adt.bat -package -target ane com.chartboost.plugin.air.ane extension.xml -swc com.chartboost.plugin.air.swc -platform Android-ARM -C platform/Android-ARM . -platform default -C platform/default library.swf

Do the same for the other extensions following the above steps. At the end, there can be some classes in the JAR file (generated from classes.dex) that you haven't placed in the JAR file from any extension, because you may not know to which extension they belong. So, just placed them in a random extension's JAR file. This isn't a problem because what matters is that all classes end up being placed in the new classes.dex file, using the same directory structure as the original.

7. Once all ANE files are compiled, create a HeroFighterX directory in the bin directory.

8. Inside the original APK's assets directory, there are the app's SWF file and a _Pic_Gen directory with the app's icons. Place them both in the HeroFighterX directory. And in the original APK's /assets/META-INF/AIR/ directory there are an application.xml file and an extensions directory (with the unpacked ANEs). Placed the application.xml file inside the HeroFighterX directory. Inside this directory, create an extensions directory and place the compiled ANE files inside. So, the directory structure for this app now looks like this:
├── HFX
│  ├── application.xml
│  ├── _Pic_Gen
│  ├── HeroFighterX.swf
│  ├── extensions
│  │  ├── com.adobe.ane.social.ane
│  │  ├── com.milkmangames.extensions.AndroidIAB.ane
│  │  ├── com.chartboost.plugin.air.ane
│  │  ├── com.milkmangames.extensions.CoreMobile.ane
│  │  ├── com.jirbo.airadc.AirAdColony.ane
│  │  └── com.milkmangames.extensions.GoViral.ane

9. Change the targetSdkVersion in the manifest inside application.xml to 30, in order to support Android 11 (currently the latest). Android version and SDK correlation: https://developer.android.com/studio/releases/platforms

10. Change <application xmlns="http://ns.adobe.com/air/application/17.0"> to <application xmlns="http://ns.adobe.com/air/application/33.1">, so that it uses the latest Flash Player version (33.1 is from HARMAN).

11. Create a self-signed certificate:
..\adt.bat -certificate -cn SelfSign -ou HK -o "Martial Studio Limited" -c HK 2048-RSA hfx.p12 SomePasswordOfYourChoice

Instructions taken from here.

13. In the lib folder from AIR SDK from HARMAN there is a file called adt.cfg. Add the following line to it:

This fixes the error:
Quote:There was a problem parsing this package.
when trying to install the app on some devices.

The error that I was getting when profiling the APK with Android Studio was: INSTALL_PARSE_FAILED_RESOURCES_ARSC_COMPRESSED

Then I came across this issue in AIR SDK from HARMAN.
Opening lib/adt.cfg showed me the commented line and I simply uncommented it and added the arsc extension to it, which is the extension of the file resources.arsc that Android Studio was complaining about.

14. Finally you can package the new APK using the following command in PowerShell:
..\adt.bat -package -target apk -storetype pkcs12 -keystore hfx.p12 HeroFighterX.apk application.xml -extdir extensions HeroFighterX.swf _Pic_Gen
# enter certificate's password

15. For Android 11, the APK must now be signed using APK Signature Scheme v2 or higher (see this). Using apksigner (available in Android SDK that you can download from Android Studio), you may do this using the following command in PowerShell:
C:\Users\<user>\AppData\Local\Android\Sdk\build-tools\<version>\apksigner.bat sign -v --out HeroFighterX_v2signed.apk --ks hfx.p12 HeroFighterX.apk
mv -Force HeroFighterX_v2signed.apk HeroFighterX.apk

PS: If this tutorial was useful to you, please vote up my question and answer in this StackOverflow page.
by MangaD at 06-05-2021, 01:31 PM
Hero Fighter Technology

[Image: hft.jpg]


@Lee Catalpa Tien



Chinese notes

(0.2.0 & 0.2.2)两次更新内容:
by MangaD at 17-04-2021, 08:59 AM
Hero Fighter EX

[Image: hf-ex.jpg]

This is the PC version containing the new characters from HFX. Not everything works as in HFX as the game's code is not changed. The purpose of this version is to be a blueprint for mod producers. All the characters have been over-HD processed and are no longer HFX low-pixel characters. This version will not be updated again.


@Lee Catalpa Tien


  •  Previous
  • 1
  • 2
  • 3(current)
  • 4
  • 5
  • 45
  • Next 
Welcome, Guest
You have to register before you can post on our site.


Search Forums

Forum Statistics
Members: 278
Latest member: fearless
Forum threads: 299
Forum posts: 1,407
Online Users
There are currently 29 online users.
0 Member(s) | 29 Guest(s)
Upcoming Events
No upcoming events