Message Limit Hook (experimental)

A Forum dedicated to the Suggestion, Creation and Editing of XWA Dynamic Link Library Files

Moderator: JeremyaFr

Post Reply

Message Limit Hook (experimental)

Random Starfighter
Cadet 3rd Class
Posts: 34
Joined: Tue Oct 13, 2020 12:14 am

Post by Random Starfighter » Mon May 03, 2021 2:07 am

A thread was posted a few months ago, asking about the message limit. I responded, mentioned I had created a hook, but never actually posted it. So here it is.

This is an experimental hook that involves many changes to replace all instructions that reference static arrays, to reference new static arrays of increased size. This expands the message limit from 64 to 256, in theory. However, there are some issues to be aware of.

XWA loads sections of the mission file in order to display the briefing. This is a fixed size, and includes messages. That internal array has not been resized or moved, so when it loads the messages, it overflows into some other data (specifically the global goals array). There appears to a be a practical limit of about 205 messages until the game refuses to load the mission, which is probably due to this overflow. I did my testing in the Combat Simulator. Actual global goals didn't seem to be affected during the mission. I'm not sure if anything is different when playing in campaign mode.

At the time of writing the hook, I wasn't aware of the "proper" way to make hooks, so the code is somewhat unorthodox compared to the typical hooks authored by JeremyaFr.

There are many bits of code changed, so it's possible I missed an instruction somewhere. Because of this, or other things, there may be unintended side effects. Use at your own risk.

The hook, along with its source code, is attached to this post. Alternatively it can be downloaded here. The DLL is in the Release folder.
https://drive.google.com/file/d/1P7uzoR ... sp=sharing

If the included DLL doesn't work for you, you may need into install the Visual C++ 2017 Redistributable package for x86 (not x64). It may also be restricted to Windows 10, but I'm not sure. The redistributable is available here:
https://support.microsoft.com/en-us/top ... f26a218cc0

AlliED doesn't support creating more than 64 messages if you click New Message, but you can work around it by copying and pasting new messages once the list is full. This seems to work up until about 100 messages. Going beyond that, AlliED is prone to crashing. Use with caution.

YOGEME's current release build doesn't allow more than 64 messages.
I've compiled a test build of YOGEME with the XWA message limit increased to 256. It contains the latest updates from github (as of the time of this post), so it can be considered an unofficial pre-alpha. You may download my prototype build here:
https://drive.google.com/file/d/1zdSEwy ... sp=sharing
You do not have the required permissions to view the files attached to this post.

User avatar
Ace Antilles
Admiral (Moderator)
Posts: 7829
Joined: Sat Jan 22, 2000 12:01 am
Contact:

Post by Ace Antilles » Tue Jun 08, 2021 10:06 pm

Thanks for sharing this. Unlimited messages would be good if you know what you want to say in game.
More than 64 seems a lot of text to read anyway lol
There's been issues lately of too many sounds killing the playing of messages or timing. So we probably need to get that working better before having more.
Chief XWAU Team annoying nitpicker.
Ace Antilles - The X-Wing Outpost
Image

User avatar
Haakan
Cadet 2nd Class
Posts: 81
Joined: Sun Jul 14, 2019 1:36 am

Post by Haakan » Wed Jul 07, 2021 1:28 pm

This can actually be useful , specially for coop campaigns featuring more than two different teams. I.e. a whole set of rebel messages and a set of imperial messages and enough space to help develop characters during missions.

EDIT: I'll test this.
Lt. Colonel A. Araujo
Commander, 7th SpecOps Squadron "Alpha"
Battlegroup I
Emperor's Hammer.

CMDR/LC Alejandro Araujo/Alpha/Wing I/ISDII Hammer/BGI

Post Reply