Results 11 to 18 of 18
-
09-06-2024, 12:09 AM #11
For anyone interested, I have a command-line utility to list and extract files from RES files: https://github.com/Shiryou/brut/releases/tag/nightly
Sadly, RESUTIL converts PCX files to a non-standard bitmap format before submitting them to the RES file and doesn't re-convert them during export. Adding files to RES files is next, so I have to tackle the conversion anyway and will try to write a reversal function.
For now, only FLC and WAV files export as one would expect.
Here's how to use the program:
Code:Usage: resutil resfile-name [[s nnnnn] [c] [n] [r] [u] [+|-|e sourcefile-name ]] | [l] | [v] + add file e extract file (does not remove it) x extract all files (does not remove them) hc use CRC hash (default) hi use ID hash l list contents of resource file n do not rotate PCX resources (default) u do not compress resources v verify resource file
9/7: It can now add files, but it doesn't support compression, rotation, or PCX decompression (as mentioned above) yet.
9/9: PCX decompression is now supported. There are also builds for Windows, Mac, and Ubuntu.
9/10: PCX rotation is now supported. We're almost there! Just LZSS compression is left before we have a RESUTIL replacement. Then, I'll try undoing rotation and PCX decompression and move on to creating a GUI.
9/15: I've been able to confirm that editing a resource file works. Check out a video of replaced images in the intro sequence.Last edited by Kami; 09-16-2024 at 04:23 AM.
Support, modding tools, and enjoyment of Birthright: The Gorgon's Alliance:
-
10-07-2024, 09:01 PM #12
I've written up a lot of my findings from this past weekend on my website and am copying it here for posterity.
I've figured out how to create and import custom adventures into The Gorgon's Alliance.
Birthright allows a total of 50 adventures to be loaded. The default adventure list, containing 26 adventures, is hard-coded. These hard-coded adventures are the only ones that can be tied to a location in the game. There is then room to add 24 custom adventures. These adventures appear by default on the Adventure action screen when you start a “Full Game,” regardless of difficulty.
For a custom adventure to work, you only need four files:
- SCENES\ADVENTR.SCN: The scene file, which defines the quest objective, the WAD file to load, and some other options
- WADS\ADVENTR.WAD: The adventure, including the map, items, enemies, etc.
- TEXT\ADVENTR.TXT: The description for the adventure screen
- UI\ADVSCN\ADVENTR.PCX: The title image for the adventure screen (alternatively, you can add the file to TEXTURES.RES)
All files should be no longer than eight characters, plus the extension. This is an old DOS limitation that lives on in WINBR.
Custom adventures will appear on the Adventures screen in a Full Game (regardless of difficulty). Your adventure will get its name from the WAD filename and will not have a suggested level.
birthrt-custom-adventure.png
Scenes
“Scene” files (.SCN) are Birthright’s entry into custom adventures, including the WAD filename, quest goal “thing,” background music, and sky box. User adventures are .SCN files containing the lines:
Code:[Type] 1
WADs
WAD (technically PWAD in this case) is a data file format originally defined for use in the Doom game engine. Birthright uses an engine called Nova that uses the same file format for storing levels. In Doom, resources like textures are loaded from internal WADs, whereas Nova loads them from TEXTURES.RES. This means that many Doom level editors can’t display Birthright’s textures properly.
slade-textures.png
If there is enough interest in creating custom adventures, we can submit patches to the popular Doom level editors to add support for Birthright’s textures.
The (in DOOM WAD terms) “Things”—enemies, decorative items, treasure, etc.—are referenced only by numbers. These numbers come from hard-coded definitions, so adding new enemies, spells, or items is impossible. The list of available Things is in THINGTYP.H.
slade-things.png
Descriptions
The .TXT files contain text for the adventure description in the Adventure and Advisors screens, including some customization for font styles, as below. Italics are an option in the code, but they don’t seem to do anything. Word wrap gave me the most trouble and seemed a bit wonky.
Code:^F02^W304^F02Font testing F00. ^F04Font testing F04. ^F05Font testing F05. ^F09Font testing F09. ^F16Font testing F16. ^F02^W400^F02^T0T Tran^T1sluc^T2ent ^T3text^T4 T. ^T0^UUnderlined text U.^U ^BBold text B. ^B^IItalicized text I.^I ^C001Color testing C001. ^C031Color testing C031. ^C064Color testing C064. ^C120Color testing C120. ^C136Color testing C136. ^C188Color testing C188. ^F02^C001Testing word wrap at a specific width in pixels. The quick brown fox jumps over the lazy dog. Testing text length W304. ^W325Testing word wrap at a specific width in pixels. Testing text W325. ^W250Testing word wrap at a specific width in pixels W250.
Title Image
The title image is a 432 x 233 pixel PCX image either stored in TEXTURES.RES or UI\ADVSCN with a filename corresponding to the adventure name. If you intend to share your adventure with others, you should put your title image into UI\ADVSCN, so it is easy to put the entire adventure into a file archive and extract it to the right location without affecting anything else.
userpic.png
Battle Maps
While unrelated to adventures, Birthright’s maps for battles are also WAD files. You can load them into an adventure and take a stroll around. They might be useful for getting comfortable modding, as they already define some terrain you can build on top of.
Battle map .SCN filenames are hard-coded, and there are 4 maps per terrain type. For example, BATLM0.SCN is the first mountain battle map.
The four categories are:
- W = Woods
- P = Plains
- M = Mountains
- S = Swamp
Support, modding tools, and enjoyment of Birthright: The Gorgon's Alliance:
-
10-19-2024, 06:20 AM #13
Hey, i was wondering if you have managed to discover where the xp for completing an adventure is stored. Is it stored in the adventure file itself or does the game auto calc it elsewhere?
Also, have you actually managed to recompile the game and get it to launch?
-
10-20-2024, 04:06 PM #14
This dive into the adventures has kept me from recompiling the game. I was going to direct you to this project that compiled the game, but I see you've already found that.
I will look into the XP points for adventures tonight. I've found the XP for battles and other actions, but not the adventures yet. It doesn't seem to be stored in the adventures themselves. My guess is it's based on the quest object.
I'll get back to trying to compile the game once my modding reference has most of the information necessary to build a custom adventure from scratch. This should be done within this year.
Just a quick note: I think fire-lizard's project goals are a bit different from mine. They are updating the code to compile in a modern compiler and focusing on modern OSs. My goal is to compile and still be able to run on DOS and Win 95, since the game still runs in modern OSs just fine.Support, modding tools, and enjoyment of Birthright: The Gorgon's Alliance:
-
10-21-2024, 05:58 PM #15
There's a lot of code to look through, but here are my impressions of the experience gained during adventures. I hope this helps.
- COMBATUI.CPP:414 - 1 XP per gold coin collected (double for Bard and Thief), summed up after selling inventory.
- COMBATUI.CPP:447 - 10,000 XP multiplied by the difficulty level of the adventure if the quest item is found and the regent is alive. The level of the adventure is hardcoded in CHARSEL.CPP. Custom adventures are always level 1.
- PLAYHIT.CPP:107/169 - Variable XP for the final blow to an enemy (physical/magical), based on a set XP for that enemy. It's unclear if this applies to all characters performing an attack during the killing round or just the character who lands the final blow.
Corrections:
You CAN set the difficulty of an adventure (1-4) in the scene file.
Only the character who hits the deathblow gets XP for an enemy kill.Last edited by Kami; 10-21-2024 at 08:32 PM.
Support, modding tools, and enjoyment of Birthright: The Gorgon's Alliance:
-
10-25-2024, 03:14 PM #16
I think you should be working with fire-lizard if possible, because my understanding is that he tried to compile the code on a modern PC, and couldnt do it...hence the changes he made to get it to compile. So i think it would be a lot easier for you if you just do the same thing he did and get it to compile on a modern PC, rather than try to get it to compile the exact same way the devs did (which requires outdated stuff which may no longer be available).
-
10-25-2024, 03:17 PM #17
Thanks, i was mainly wondering if it was possible to change the xp of adventures without needing to recompile the game, but it doesnt seem possible at this point.
Im curious as to where you see the difficulty in the scene file though. For example, i am looking at Aerele_MW.SCN, and i do not see a difficulty listed anywhere...
-
10-25-2024, 07:47 PM #18
I considered it, but they haven't responded to discussions on that repository in a few years. I'm also not an experienced C++ programmer, and my time is pretty limited, so I'm not sure how much I could actually help. I'm happy to help where I can, though.
Edit 10/25: After some checking, it looks like fire-waran is the same person. I'll see about shooting them a message when I'm done with my current projects.
The difficulty for default adventures is hardcoded in CHARSEL.CPP. You can set it for custom made adventures as described in TEMPLATE.SCN.
Edit 11/13: I'm taking a break to finish up another project and will then try to continue with recompiling the game. There's a bug that makes creating custom adventures frustrating, and I think it needs solving for any of my work here to be useful.Last edited by Kami; 11-14-2024 at 02:35 AM.
Support, modding tools, and enjoyment of Birthright: The Gorgon's Alliance:
Thread Information
Users Browsing this Thread
There are currently 2 users browsing this thread. (0 members and 2 guests)
Similar Threads
-
(PC) Gorgon's Alliance modding
By Morgul in forum The Royal LibraryReplies: 10Last Post: 06-30-2014, 11:57 AM -
Birthright Gorgon's Alliance mods ?
By Maverick 'Moriarty' Jones in forum The Royal LibraryReplies: 4Last Post: 10-31-2010, 04:30 PM -
BirthRight: The Gorgon's Alliance
By Mordrigar in forum The Royal LibraryReplies: 2Last Post: 08-11-2010, 02:05 PM -
[BIRTHRIGHT] Gorgon`s Alliance
By ConjurerDragon in forum The Royal LibraryReplies: 2Last Post: 04-10-2003, 09:26 AM -
Birthright: The Gorgon`s Alliance
By darkstar in forum MPGN Mailinglist archive 1996-1999Replies: 0Last Post: 03-22-1999, 02:58 PM
Bookmarks