Welcome Guest [Log In] [Register]
Welcome to NHL04 Rebuilt 2017. We hope you enjoy your visit.


You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Launcher pipeline; A general rundown
Topic Started: Feb 15 2016, 11:09 AM (747 Views)
Vod
Member Avatar
Development Team
Here's a little rundown about how the launcher works since most of the information is scattered throughout the forum.

[dohtml]
<div style="width:700px;font-family:Georgia;padding:20px;border:1px solid #ccc;border-radius:10px;background:#fff">
&nbsp; &nbsp; &nbsp; &nbsp;When you run nhl2004.exe via the launcher, the first thing that happens is launcher.dll gets injected into the running process and takes over. After that, all of the values in launcher.ini gets loaded into memory, which can then be accessed by the lua scripts. All lua scripts in the "system" folder are then executed one after another, followed by the "user" folder. There's no difference between loading scripts from either folder. The system folder is for more complicated scripts that add features for users scripts. User and system scripts have access to all of the lua code in the library scripts in the "library" folder, but not vice-versa.
<Br /><br />
&nbsp; &nbsp; &nbsp; &nbsp;User and system scripts can register callback functions, which are lua functions that will be called by the game when certain events happen. These events can be just about anything, such as a player scoring a goal, the game loading, dynasty simulation or a frame being rendered. Without registering callbacks, scripts are only executed once in the global scope and then nothing else happens. For performance reasons, its best to only register callback events you actually need, especially when it comes to the Tick and Render callbacks as they have the biggest performance impact. Keep in mind that the launcher is always loaded and active, regardless of whether you're in the menu\interface or you're in-game. These are just details to the Launcher.
<Br /><br />
&nbsp; &nbsp; &nbsp; &nbsp;To sum things up. Before, editing hardcode meant modifying ASM/machine code, which is not an easy task, so the answer was usually "not possible". Sure, me and Egorgiy have modified the hardcode for certain features over the years, but it hasn't been organized very well. That's why I started developing launcher 1.5. The launcher allows you to use a very basic programming language to modify the machine code in a way that's easy to read and understand. It bridges the gap between confusing machine code and human readable code.
<Br /><br />
</div>
[/dohtml]
This thread will be updated over time. I hope it helps. Please feel free to let me know if you have any questions. :)
NHL 2004 Launcher | My Changelog | NHL 2004 Preservation | NHL 2004 Debugger
Offline Profile Quote Post Goto Top
 
bigrowdy
Regular
[ *  * ]
Vod,15 February 2016
11:09 AM
Hey guys. Here's a little rundown about how the launcher works since most of the information is scattered throughout the forum.

[dohtml]
<div style="width:700px;font-family:Georgia;padding:20px;border:1px solid #ccc;border-radius:10px;background:#fff">
&nbsp; &nbsp; &nbsp; &nbsp;When you run nhl2004.exe via the launcher, the first thing that happens is launcher.dll gets injected into the running process and takes over. After that, all of the values in launcher.ini gets loaded into memory, which can then be accessed by the lua scripts. All lua scripts in the "system" folder are then executed one after another, followed by the "user" folder. There's no difference between loading scripts from either folder. The system folder is for more complicated scripts that add features for users scripts. User and system scripts have access to all of the lua code in the library scripts in the "library" folder, but not vice-versa.
<Br /><br />
&nbsp; &nbsp; &nbsp; &nbsp;User and system scripts can register callback functions, which are lua functions that will be called by the game when certain events happen. These events can be just about anything, such as a player scoring a goal, the game loading, dynasty simulation or a frame being rendered. Without registering callbacks, scripts are only executed once in the global scope and then nothing else happens. For performance reasons, its best to only register callback events you actually need, especially when it comes to the Tick and Render callbacks as they have the biggest performance impact. Keep in mind that the launcher is always loaded and active, regardless of whether you're in the menu or you're in-game. These are just details to the Launcher.
<Br /><br />
&nbsp; &nbsp; &nbsp; &nbsp;To sum things up. Before, editing hardcode literally meant modifying ASM/machine code, which is not an easy task, so the answer was usually "not possible". Sure, me and Egorgiy have modified the hardcode for certain features over the years, but it hasn't been organized very well. That's why I started developing launcher 1.5. The launcher allows almost anyone to use a very basic programming language to modify the machine code in a way that's easy to read and understand. It bridges the gap between confusing machine code and human readable code.
<Br /><br />
</div>
[/dohtml]
This thread will be updated over time. I hope it helps. Please feel free to let me know if you have any questions. :)

Thanks for this Vod. you are a freaking hero.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · NHL 2004 Launcher · Next Topic »
Add Reply