Putting the 'role' back in role-playing games since 2002.
Donate to Codex
Good Old Games
  • Welcome to rpgcodex.net, a site dedicated to discussing computer based role-playing games in a free and open fashion. We're less strict than other forums, but please refer to the rules.

    "This message is awaiting moderator approval": All new users must pass through our moderation queue before they will be able to post normally. Until your account has "passed" your posts will only be visible to yourself (and moderators) until they are approved. Give us a week to get around to approving / deleting / ignoring your mundane opinion on crap before hassling us about it. Once you have passed the moderation period (think of it as a test), you will be able to post normally, just like all the other retards.

Modding TES Arena (and Battlespire?)

Moonrise

The Magnificent
Patron
Joined
Jul 7, 2017
Messages
417
Make the Codex Great Again!
After 25 years, Arena now has a mod in earnest--something more substantial than UI tweaks. I've been poking around in the dark, and this is the first fruit worth sharing.

Description from the Nexus:
Shrouded Past is an alternate start mod for The Elder Scrolls: Arena. It's designed to provide a better first impression, since many players are turned away by the game's notorious Imperial Dungeons. But there's something here for veterans too. Maybe you'd like to quickly roll new characters, or tackle Arena's demo dungeon.

Available on the Nexus.

Okay, with that over we can talk about why what I've learned is important.

Key points:
  • Maps can be edited to refer to custom configurations
  • In these configurations, monster lists are editable
So let's get into the nitty gritty. You can open maps, or MIF files, in a hex editor. There you'll find reference to a configuration, or INF file. I'm dumb so maybe I'm missing something, but the new INF must have the same character length as the old one.

The short of it is that the tone and difficulty of the entire game can be adjusted. Maybe you thought there weren't enough minotaurs in Labyrinthian. Well, you can reduce the monster list so they'll appear in greater number. This doesn't apply to random encounters, which seems level-based. Nobody knows how the maps work, but I'm assuming there are spawn points, and these spawn points grab a random monster from the monster list in the INF. But even being able to change just the "fixed" encounters is a big deal. That's how I was able to retune the demo map, making it playable for level 1 characters.

There's a lot more to discuss, but I think I'll leave it there for now. When I'm not totally exhausted, I'll write about sound effects and music.

vXNTnvE.png

Prayer to My Prince

These gifts are meager,
But I beseech you!

Guide my actions,
Hear my thoughts
Across the ages, and
Through the realms

I approach the altar,
My heart full of
Devotion and love
For my Prince!
 
Last edited:

Moonrise

The Magnificent
Patron
Joined
Jul 7, 2017
Messages
417
Make the Codex Great Again!
Alright, time for more Arena modding nonsense. Interesting fact that makes Arena easily moddable: the root directory acts as an override. Files in the root directory take precedence over files in the BSA. Also, the Arena executable can be decompressed and edited. I've only experimented with this lightly, but you can, for example, change which BSA the game refers to.

Sound effects must be 8-bit VOC files. Audacity can export to VOC if you select the "export audio" option. The sample rate doesn't matter, but a file can't be over 20kb or the game likes to crash. So you're gonna be using low sample rates anyway--11kHz or less. Stereo works, but you probably won't have the overhead for it.

Music uses the XMI format, which is essentially MIDI. But you can't just rename a MIDI file. You'll have to convert it. The CLI program MIDIFORM from Miles Design does the trick. Daggerfall features several enhanced Arena tracks, and backporting them couldn't be easier.

I'm trying to figure out how to alter the game's economy. The variables %lu and %mm are used in reference to the prices of things, but I can't find that information anywhere. I'd like to reduce prices, and remove the cost of detect magic. I can glitch the shops out rendering everything absolutely free, but that's not helpful.
 
Last edited:

Moonrise

The Magnificent
Patron
Joined
Jul 7, 2017
Messages
417
Make the Codex Great Again!
Okay, I figured it out. Prices are in the executable. They're 16-bit integers. I'm not a programmer, so boy was that confusing. Why does a beer cost a smiley face. How do you get ten thousand from an arrow and an apostrophe. Anyway, the point is... it works.

rdpYQ5A.png


54EyNnO.png
 

Moonrise

The Magnificent
Patron
Joined
Jul 7, 2017
Messages
417
Make the Codex Great Again!
No new discoveries yet, but I have published a mod that reduces the cost of potions and magic items that cast spells. This makes non-spellcasting classes more viable for play. And it's way less grindy.

Once again, available on the Nexus, and Google Drive.
 

Moonrise

The Magnificent
Patron
Joined
Jul 7, 2017
Messages
417
Make the Codex Great Again!
Sometimes people just rub you the wrong way. There's this guy, Cum41. He posted an Arena mod about 6 months ago, replacing all Khajiit with 1978 Garfield. Not only is 1978 Garfield an eldritch horror, mister 41 didn't bother telling anyone how he did it.

I present to you... All Khajiit are 1980 Garfield.

But I'm gonna tell you how I did it. So the thing is, nobody knows how CIF files work. They're essentially IMG files bundled up. ArenaToolBox offers PNG/IMG conversion and vice versa, but anything relating to CIF files is grayed out. There are three things you have to worry about: Arena's internal palettes, transparency, and offsets. Slightly annoying problem: faces on the HUD, and faces on the character sheet use different palettes! Generally the first color in the index is pure black, and it's used for transparency. Problem is, if you try to get clever and rename an IMG to CIF, the transparency doesn't stick. I found a way to deal with that, but it's kinda hacky. Anyway, if you open an IMG file in a hex editor, the first two entries are the X and Y offsets. This is how you get the heads in the right spot. Now, Arena expects 10 IMG files in that CIF bundle as far as portraits go, and if you don't include 10, the game freezes. Turns out you can do a copy/paste job. Wa fucking la. Bone apple tea.
 

Moonrise

The Magnificent
Patron
Joined
Jul 7, 2017
Messages
417
Make the Codex Great Again!
Y'all aren't gonna believe this shit, but it is 100% legit. You can open Terminator: Rampage maps in Arena.

4Sg0IrB.png

zswKrdz.png

I mean, it's not the holy grail of figuring out how MIF files work. Custom mapping is still pie in the sky. But this opens some possibilities. We're talking 32 circuitous maps that can be reskinned and repurposed.
 
Last edited:

Alex

Arcane
Joined
Jun 14, 2007
Messages
9,224
Location
São Paulo - Brasil
I am not too familiar with Arena. But how different are the file formats from those in Daggerfall? If they are not very far apart, maybe it would be possible to port Arena into Daggerfall Unity?
 

Moonrise

The Magnificent
Patron
Joined
Jul 7, 2017
Messages
417
Make the Codex Great Again!
how different are the file formats from those in Daggerfall?
While resources use some of the same file formats, the games run on different engines. Daggerfall uses XnGine, which Bethesda developed for Terminator: Future Shock. Arena... well, Arena was written entirely in ASM, and it's similar to Terminator: Rampage, as I've shown. It's funny how interwoven the Elder Scrolls was with Terminator games. Think of the difference between Doom and Quake. Daggerfall, despite using copious amounts of billboards, is actually a proper 3D game. There is a guy working on a project like Daggerfall Unity, called OpenTESArena. Progress is just very slow. With less interest, there are fewer people contributing.
 

Moonrise

The Magnificent
Patron
Joined
Jul 7, 2017
Messages
417
Make the Codex Great Again!
If Arena modding takes off, distribution will become a problem. I've realized, and maybe this is obvious to some people, that the only reasonable path is for modders to release patches for the executable. This way they can include variations, and users can run any number of modifications. I've tested the process, and it works fine. Unfortunately, most of the programs that do this are made for and by [insert color]hats, and they appear very shady. If anyone can recommend one that doesn't look like a warez cracker, that'd be great.
 

Ilaro

Barely Literate
Joined
Sep 5, 2019
Messages
1
I'm really amazed reading this. However, I'm not a modder myself, but am still interested in Arena files. Do you know if there is any way to extract maps (for dungeons, towns/cities, etc) as images from the files?
 

Moonrise

The Magnificent
Patron
Joined
Jul 7, 2017
Messages
417
Make the Codex Great Again!
Do you know if there is any way to extract maps (for dungeons, towns/cities, etc) as images from the files?
Sort of, and it doesn't require any special knowledge. If you input the keys Q+B+X, a minimap will appear on screen. Take a screenshot, and from there you can clean it up. This is the first floor of Fang Lair.

XsLU9ba.png

wFtXGVs.png
 

deuxhero

Arcane
Joined
Jul 30, 2007
Messages
11,971
Location
Flowery Land
If Arena modding takes off, distribution will become a problem. I've realized, and maybe this is obvious to some people, that the only reasonable path is for modders to release patches for the executable. This way they can include variations, and users can run any number of modifications. I've tested the process, and it works fine. Unfortunately, most of the programs that do this are made for and by [insert color]hats, and they appear very shady. If anyone can recommend one that doesn't look like a warez cracker, that'd be great.

Assuming the executable is the same for every install, how about one of the standard patch formats and programs to apply them used for romhacking? Stuff like xdelta, IPS, UPS ect. Those are well established for use with game modding. Some require hash checks (which can sometimes be disabled), but otherwise patches can stack if they don't touch different things.
 

Moonrise

The Magnificent
Patron
Joined
Jul 7, 2017
Messages
417
Make the Codex Great Again!
I don't know if this will be of use to anyone, but I've highlighted the exact spot where Arena sets its video mode. You can change it, the game will run, and DOSBox captures reflect the change. However, it completely garbles the graphics. Of course it wouldn't be that easy. Someone could conceivably alter the game to run at a higher resolution, albeit with fewer colors. But that's beyond my pay grade.

zBX2vVb.png
 

Moonrise

The Magnificent
Patron
Joined
Jul 7, 2017
Messages
417
Make the Codex Great Again!
Now for something practical. In a map file, this right here is your spawn point. Coordinates begin at the top-right, not the top-left. So a positive X value sends you to the left, and a positive Y value sends you down. What use does this have? Well, you could have the character spawn right next to the objective! Next up is the map size. Maps cap out at 128x128... blocks, I guess you would call them. Editing the height does exactly what you think it would do. It either cuts off or expands the play area. Editing the width, however, results in craziness. Maybe it's trying to stretch or squeeze the layout? I'm not sure.

aLs7UWt.png
m98SPTn.png

But let's get into the juicy stuff. I have concrete evidence that I wasn't bullshitting about the Terminator thing, and this is absolutely leading to a future mod.

L6HFqVX.png

SMd0Tyd.png

Wild... so, somebody asked me if it was possible to turn the Terminator maps into one massive gauntlet. I didn't want to say for certain until I had it working. The answer is yes. It's overkill, but totally possible. There are different ways the maps could be integrated into Arena, and I'm open to suggestions. None of this is going to happen quickly. The conversion process is tedious, because each INF file has to be thoughtfully converted. Not only are the number of entries important in ensuring everything works properly, the map key for each game is different. What I mean by that is that in Terminator: Rampage, item 13 refers to the Seeker enemy, but in Arena, item 13 refers to a piece of the Staff of Chaos. And so on and so forth. I'm not putting a release date on this, but please look forward to The Elder Scrolls: Rampage.
 

Alex

Arcane
Joined
Jun 14, 2007
Messages
9,224
Location
São Paulo - Brasil
Now for something practical. In a map file, this right here is your spawn point. Coordinates begin at the top-right, not the top-left. So a positive X value sends you to the left, and a positive Y value sends you down. What use does this have? Well, you could have the character spawn right next to the objective! Next up is the map size. Maps cap out at 128x128... blocks, I guess you would call them. Editing the height does exactly what you think it would do. It either cuts off or expands the play area. Editing the width, however, results in craziness. Maybe it's trying to stretch or squeeze the layout? I'm not sure.
(snip...)

Maybe the map works like a C planar array? In C, you can declare a planar array like "int a[10][10]". This makes a an array of integer values. Then you can access the different positions of this array by using a row and column like "a[4][3]" would access the 5th row, 4th column (it starts counting from 0). However, this is really just a way to make it easier for the programmer, internally, the array is still linear, and by accessing the above value, you are really accessing the linear position 43. If this works similarly, maybe when you change width, you change how many tiles it reads into a row before the next one is processed. For instance, if you had something that looked like this at 5x5:
Code:
*****
*   *
*   *
*   *
*****
and tried to change the layout to 6x5, it would end up looking like this:
Code:
******
   ** 
  **  
 *****
*
since it is inserting the new line on the wrong place.
 

Moonrise

The Magnificent
Patron
Joined
Jul 7, 2017
Messages
417
Make the Codex Great Again!
Exciting news. I've figured out how to manipulate the map key. Let's say we want to create an alternate main quest. The player has to be able to find pieces of the Staff of Chaos, but not too many! The parts of the VTEC plasma weapon provide a nice solution, since they're rare, and only 1-2 show up on any given map. For proof, here's the location of one of the couplings. Next to it is supposed to be a Skimmer enemy. From the minimap and coordinates, it's apparent that everything is where it's supposed to be.

ZkErW2d.png
 
Last edited:

Moonrise

The Magnificent
Patron
Joined
Jul 7, 2017
Messages
417
Make the Codex Great Again!
Don't worry, I'm hard at work. I've figured out how to edit class hit die, weapon and armor proficiency, lockpicking skill, and XP requirements. I'm still digging around for special abilities, and crit chance. I'll release a mod for all of this soon. As you can see here, I have the Nightblade wielding a dai-katana. An equip-anything mod would be completely unbalanced, but it's more in step with modern Elder Scrolls games. Not sure what all I'm gonna do yet, but I'm taking suggestions. Some people are asking for an uber Eternal Champion who is and has the best of everything. What do you guys think?

5BapuvB.png
 
Last edited:

As an Amazon Associate, rpgcodex.net earns from qualifying purchases.
Back
Top Bottom