Skip to content

VuceticBranislav/era-modern

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues MIT License

Logo

ERA 3 - New era of mod making - Delphi XE, 10, 11 & 12

Code ported from Delphi 7 version to modern Delphi (Delphi XE, 10, 11 & 12)
Contains ERA and VFS projects as well as B2 library.

Original commits containing code are from ethernidee repositories:
ERA: 3d401e8
VFS: f18d56d
B2: 31f0076

Original Delphi Discord LinkedIn

Table of Contents
  1. Compiled release
  2. About The Project
  3. Getting Started
  4. Build and run project
  5. Project structure
  6. Code differences
  7. Roadmap
  8. Contributing
  9. License
  10. Acknowledgments

About The Project

Project code has been ported from Delphi 7 version to the newest Delphi version. Minimal changes to code are introduced. Main purpose of this project is to continue its legacy and provide updated functionalities. Original goals and functionalities have been preserved. The porting process has been carefully executed to ensure that the project retains its original essence while leveraging the latest features of the new Delphi version. Original code has beed developed by ethernidee.

Project goals:

  • Compile code using modern version of Delphi.
  • Maintain compatibility with ASCII strings.
  • Make minimal changes to the code.
  • Ensure that code line numbers align with the original code lines for easier comparison.
  • Avoid adding any additional features or improvements.
  • Keep the project active until this code becomes the foundation for future ERA releases.

GoUp

Getting Started


Compiled release

If you prefering to use compiled releases, please follow the steps outlined below:

  1. Download the latest self extracting Release package,
  2. Before proceeding make sure to backup (Era.dll, Vfs.dll, Era.dbgmap and Vfs.dbgmap) files in your game folder,
  3. Unpack the Release package to game folder and override existing files,
  4. Play game.

Please note that it is always recommended to create a backup of files before making any changes on them. This ensures that you can easily revert back to the previous version without any data loss or damage to your game in case of problems during installation process.

GoUp

Prerequisites

The latest version of Delphi can be obtained from the official website. It is recommended to download and install it for optimal performance. If you meet the eligibility criteria, you may choose to use the Delphi Community Edition. This will allow you to access the features and tools necessary to build this project.

In order to run the project, it is necessary to have Heroes 3 installed on your system. If you do not have it installed already, you can obtain it through the Hero 3 Launcher. The launcher provides further information about the installation process and any necessary updates. Once the game is installed, you will be able to test and run your project as desired. Don't forget to keep your Hero 3 Launcher updated. More information about Hero 3 Launcher can be found on Discord chaneel.

Local project setup

Clone repository to local machine using Git. If you do not plan to use versioning, code can be unpacked from zip file to local project folder. If you plan to use debugger set project output folder to Heroes 3 installation root folder. Follow next steps to setup project:

  1. Obtain local copy of repository from GitHub

    1.1. If you will not use version control then download zip file from GitHub and unpack it to local folder

    1.2. If you will use version control then clone the repository to local folder

     git clone https://github.com/VuceticBranislav/era-modern.git
    
  2. Open project group file in Delphi

     ProjectGroup.groupproj
    
  3. Set host application in Era and Vfs projects to Heroes 3 executable

     Era.dll project > Options... > Debugger > Target > All configurations - Windows 32-bit platform > Host application
     Vfs.dll project > Options... > Debugger > Target > All configurations - Windows 32-bit platform > Host application
    
  4. (Optional) Set output folder for compiled dlls to root of Heroes 3 installation directory

     Era.dll project > Options... > Building > Delphi compiler > Target > All configurations - All platforms > Output directory
     Vfs.dll project > Options... > Building > Delphi compiler > Target > All configurations - All platforms > Output directory
    

GoUp

Build and run project

If optional setup step in not taken, the project's files are created in a local folder, then files must be manually copied to the game root folder. It is always good idea to backup old files. File can be backed up by moving to another location or renaming (e.g. Era.dll.off or Era.dbgmap.off ...).

BuildTools is set of tools used to build Era or Vfs project. BuildTools is used to generate version information resource files in pre-build process. It is also used to generate .dbgmap files in post-build process. That is reason why it must be build first, then Era and Vfs projects can be build.

Output directory is not set

Dll files must be manually copied to game directory. Also copy .dbgmap to game "DebugMaps" folder. In order to do that replace original files with newly built files. You will not be able to use debugger if you pick this option. Follow next steps run game with new dll files:

  1. (Optional) Backup old Era.dll and Vfs.dll from Heroes 3 installation folder,
  2. (Optional) Backup old Era.dbgmap and Vfs.dbgmap from Heroes 3 "DebugMaps" folder,
  3. Build All project, (Right click on ProjectGroup in project explorer and select "Build All"),
  4. Copy new Era.dll and Vfs.dll from corresponding "Compiled" folders to Heroes 3 installation folder,
  5. Copy new Era.dbgmap and Vfs.dbgmap from corresponding "Compiled" to Heroes 3 "DebugMaps" folder,
  6. Run Heroes 3 executable.

Output directory is set

Compiled files will be automatically moved to game folder. If you need old dlls backup it before project build. Debug maps will be automatically generated and moved to game "DebugMaps" folder. Follow next steps:

  1. (Optional) Backup old Era.dll and Vfs.dll from Heroes 3 installation folder,
  2. (Optional) Backup old Era.dbgmap and Vfs.dbgmap from Heroes 3 "DebugMaps" folder,
  3. Build All project, (Right click on ProjectGroup in project explorer and select "Build All"),
  4. Select Era.dll as active project by double click on it,
  5. Run Era project in debug mode from Delphi,

GoUp

Project structure

Project structure show important content location and default location of compiled dll files if output directory is not set.

  .
  │
  ├─ BuildTools          # Tools needed to generate .dbgmap files and update dll version info
  │  ├─ Compiled
  │  │  ├─ Debug
  │  │  ├─ Release
  │  │  └─ ...           # Comiled BuildTools.exe used in build process
  │  └─ ...
  │
  ├─ Era                 # Era project
  │  ├─ Compiled
  │  │  ├─ Debug
  │  │  │  ├─ DebugMaps  # Debug version Era.dbgmap
  │  │  │  └─ ...        # Debug version Era.dll and other debug files
  │  │  └─ Release
  │  │     ├─ DebugMaps  # Release version Era.dbgmap
  │  │     └─ ...        # Release version Era.dll and Era.dbgmap file
  │  ├─ Lua
  │  └─ ...              # Source code and versioning files
  │
  ├─ Lib                 # Additional libraries needed for projects
  │  └─ ...
  │
  ├─ Vfs                 # Virtual file system project
  │  ├─ Compiled
  │  │  ├─ Debug
  │  │  │  ├─ DebugMaps  # Debug version Vfs.dbgmap
  │  │  │  └─ ...        # Debug version Vfs.dll and other debug files
  │  │  └─ Release
  │  │     ├─ DebugMaps  # Release version Vfs.dbgmap
  │  │     └─ ...        # Release version Vfs.dll file
  │  ├─ Tests
  │  └─ ...              # Source code and versioning files
  │
  └─ ...                 # Clean.bat

GoUp

Code differences

In regards to the original code, there have been a few changes implemented:

  • "Legacy.pas" has been added. It contains all the necessary code to ensure that the port works seamlessly,
  • Introduced proxy type for string and char types to allows for more efficient and streamlined handling of these types,
  • Automatic application versioning information is embended. Version number should be changed in "VersionInfo.inc",
  • "Clean.bat" added to remove all unnecessary files from project folder.

Version info

Versioning info are automatically embended to compiled files trough post build actions. Post build action execut BuildTools.exe that create VersionInfo.rc files and compiles it to VersionInfo.res files using Bcc32.exe. During building process VersionInfo.res file is used to bind versioning info. To change versioning info of compiled files and ERA_VERSION_STR and ERA_VERSION_INT project variable update VersionInfo.inc file.

GoUp

Roadmap

The following is a summary of the project's current roadmap, outlining the key features and improvements that are currently in progress or planned for the near future:

  • Use modern Delphi versions to compile Era code,
  • Use modern Delphi versions to compile Vfs code,
  • Evaluate the behavior of the newly compiled code in comparison to the original code,

GoUp

Contributing

Any contributions you make are greatly appreciated. If you have a suggestion, please fork the repo and create a pull request. You can also simply open an issue.

To contribute using fork follow next steps:

  1. Fork the Project,
  2. Create your Feature Branch (git checkout -b feature/MyFeature),
  3. Commit your Changes (git commit -m 'Add my feature'),
  4. Push to the Branch (git push origin feature/MyFeature),
  5. Open a Pull Request.

GoUp

License

See LICENSE.txt for more information.

GoUp

Acknowledgments

Aditional helpful resources

GoUp

About

Era and Vfs port to modern Delphi

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages