Official Codex Discord Server

  1. 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.
    Dismiss Notice

Modding TES Arena

Discussion in 'Codex Workshop' started by t4ngr4m, Aug 19, 2019.

  1. t4ngr4m Page of Swords Patron

    t4ngr4m
    Joined:
    Jul 7, 2017
    Messages:
    225
    Location:
    South Jersey
    Make the Codex Great Again! Pathfinder: Kingmaker
    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, and Google Drive.

    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.

    [​IMG]

     
    Last edited: Aug 25, 2019
    • Brofist Brofist x 10
    • Informative Informative x 1
    ^ Top  
  2. Bester ⚰️☠️⚱️ Patron Vatnik

    Bester
    Joined:
    Sep 28, 2014
    Messages:
    5,840
    Either the length is defined in the byte that precedes it, or it ends with a special character to signify the end of string.
     
    • Brofist Brofist x 1
    • Informative Informative x 1
    ^ Top  
  3. t4ngr4m Page of Swords Patron

    t4ngr4m
    Joined:
    Jul 7, 2017
    Messages:
    225
    Location:
    South Jersey
    Make the Codex Great Again! Pathfinder: Kingmaker
    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: Aug 21, 2019
    • Brofist Brofist x 1
    • Informative Informative x 1
    ^ Top  
  4. t4ngr4m Page of Swords Patron

    t4ngr4m
    Joined:
    Jul 7, 2017
    Messages:
    225
    Location:
    South Jersey
    Make the Codex Great Again! Pathfinder: Kingmaker
    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.

    [​IMG]

    [​IMG]
     
    • Brofist x 5
    • incline x 2
    • Prestigious x 1
    • Informative x 1
    • Excited! x 1
    ^ Top  
  5. t4ngr4m Page of Swords Patron

    t4ngr4m
    Joined:
    Jul 7, 2017
    Messages:
    225
    Location:
    South Jersey
    Make the Codex Great Again! Pathfinder: Kingmaker
    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.
     
    • Brofist Brofist x 4
    • Friendly Friendly x 1
    ^ Top  
  6. t4ngr4m Page of Swords Patron

    t4ngr4m
    Joined:
    Jul 7, 2017
    Messages:
    225
    Location:
    South Jersey
    Make the Codex Great Again! Pathfinder: Kingmaker
    So... custom portraits are possible, but the process is stupidly convoluted.

    [​IMG]

    [​IMG]
     
    • Funny Funny x 20
    • incline incline x 2
    • Brofist Brofist x 1
    • Excited! Excited! x 1
    ^ Top  
  7. Lemming42 Arcane

    Lemming42
    Joined:
    Nov 4, 2012
    Messages:
    3,276
    Location:
    The Satellite Of Love
    This is extraordinarily cool, some of Arena's dungeons just straight-up suck so it'd be amazing to see a modding community emerge who could revamp them.
     
    • Friendly Friendly x 2
    • Brofist Brofist x 1
    ^ Top  
  8. t4ngr4m Page of Swords Patron

    t4ngr4m
    Joined:
    Jul 7, 2017
    Messages:
    225
    Location:
    South Jersey
    Make the Codex Great Again! Pathfinder: Kingmaker
    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.
     
    • Funny x 6
    • Brofist x 4
    • Prestigious x 1
    • Salute x 1
    • Excited! x 1
    ^ Top  
  9. t4ngr4m Page of Swords Patron

    t4ngr4m
    Joined:
    Jul 7, 2017
    Messages:
    225
    Location:
    South Jersey
    Make the Codex Great Again! Pathfinder: Kingmaker
    I'm sure some of you are aware of the Daggerfall mod Eye of Argonia. It allows you to increase the view distance beyond maximum. Well I just made that mod for Arena. Enjoy the Eye of Nocturnal.

    [​IMG]
     
    • Brofist x 4
    • Funny x 2
    • incline x 1
    • Creative x 1
    • Excited! x 1
    ^ Top  
  10. t4ngr4m Page of Swords Patron

    t4ngr4m
    Joined:
    Jul 7, 2017
    Messages:
    225
    Location:
    South Jersey
    Make the Codex Great Again! Pathfinder: Kingmaker
    Y'all aren't gonna believe this shit, but it is 100% legit. You can open Terminator: Rampage maps in Arena.

    [​IMG]

    [​IMG]

    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: Aug 30, 2019
    • Brofist x 5
    • Funny x 5
    • WTF am I reading x 3
    • incline x 2
    • Friendly x 2
    • Salute x 1
    • Informative x 1
    • Excited! x 1
    ^ Top  
  11. t4ngr4m Page of Swords Patron

    t4ngr4m
    Joined:
    Jul 7, 2017
    Messages:
    225
    Location:
    South Jersey
    Make the Codex Great Again! Pathfinder: Kingmaker
    The Nexus featured one of my mods recently. Surprising, but welcome.
     
    • Brofist Brofist x 4
    • Prestigious Prestigious x 3
    • Creative Creative x 1
    • Excited! Excited! x 1
    ^ Top  
  12. Elwro Arcane

    Elwro
    Joined:
    Dec 29, 2002
    Messages:
    11,232
    Location:
    Krakow, Poland
    Divinity: Original Sin Wasteland 2
    Congrats!
     
    • Thanks! Thanks! x 1
    • Friendly Friendly x 1
    ^ Top  
  13. Alex betthurt

    Alex
    Joined:
    Jun 14, 2007
    Messages:
    5,047
    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?
     
    ^ Top  
  14. t4ngr4m Page of Swords Patron

    t4ngr4m
    Joined:
    Jul 7, 2017
    Messages:
    225
    Location:
    South Jersey
    Make the Codex Great Again! Pathfinder: Kingmaker
    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.
     
    • Informative Informative x 3
    • Thanks! Thanks! x 1
    ^ Top  
  15. t4ngr4m Page of Swords Patron

    t4ngr4m
    Joined:
    Jul 7, 2017
    Messages:
    225
    Location:
    South Jersey
    Make the Codex Great Again! Pathfinder: Kingmaker
    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.
     
    • Informative Informative x 1
    ^ Top  
  16. Ilaro Barely Literate

    Ilaro
    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?
     
    • Brofist Brofist x 1
    • Agree Agree x 1
    ^ Top  
  17. t4ngr4m Page of Swords Patron

    t4ngr4m
    Joined:
    Jul 7, 2017
    Messages:
    225
    Location:
    South Jersey
    Make the Codex Great Again! Pathfinder: Kingmaker
    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.

    [​IMG]

    [​IMG]
     
    • Friendly Friendly x 1
    ^ Top  
  18. deuxhero Arcane

    deuxhero
    Joined:
    Jul 30, 2007
    Messages:
    8,348
    Location:
    Flowery Land
    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.
     
    • Brofist Brofist x 1
    • Informative Informative x 1
    • Friendly Friendly x 1
    ^ Top  
  19. t4ngr4m Page of Swords Patron

    t4ngr4m
    Joined:
    Jul 7, 2017
    Messages:
    225
    Location:
    South Jersey
    Make the Codex Great Again! Pathfinder: Kingmaker
    You're a lifesaver, thanks. xdelta works perfectly.
     
    • Friendly Friendly x 1
    ^ Top  
  20. t4ngr4m Page of Swords Patron

    t4ngr4m
    Joined:
    Jul 7, 2017
    Messages:
    225
    Location:
    South Jersey
    Make the Codex Great Again! Pathfinder: Kingmaker
    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.

    [​IMG]
     
    • Brofist Brofist x 1
    • Friendly Friendly x 1
    ^ Top  
  21. t4ngr4m Page of Swords Patron

    t4ngr4m
    Joined:
    Jul 7, 2017
    Messages:
    225
    Location:
    South Jersey
    Make the Codex Great Again! Pathfinder: Kingmaker
    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.

    [​IMG] [​IMG]

    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.

    [​IMG]

    [​IMG]

    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.
     
    • Brofist Brofist x 3
    • Friendly Friendly x 2
    • Excited! Excited! x 1
    ^ Top  
  22. Alex betthurt

    Alex
    Joined:
    Jun 14, 2007
    Messages:
    5,047
    Location:
    São Paulo - Brasil
    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.
     
    • Brofist Brofist x 2
    • Friendly Friendly x 1
    ^ Top  
  23. t4ngr4m Page of Swords Patron

    t4ngr4m
    Joined:
    Jul 7, 2017
    Messages:
    225
    Location:
    South Jersey
    Make the Codex Great Again! Pathfinder: Kingmaker
    Yeah, I think you nailed it.
     
    • Friendly Friendly x 1
    ^ Top  
  24. t4ngr4m Page of Swords Patron

    t4ngr4m
    Joined:
    Jul 7, 2017
    Messages:
    225
    Location:
    South Jersey
    Make the Codex Great Again! Pathfinder: Kingmaker
    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. So how is it we can get a coupling to be a staff piece, and a Skimmer to be a Troll? It's so simple I couldn't believe my solution worked. You just list the items in sequence. This tells the game, apparently, that you want one thing to mean another. At this point, there are no more technical hurdles.

    [​IMG]
     
    • Brofist Brofist x 3
    • Excited! Excited! x 1
    ^ Top  
  25. t4ngr4m Page of Swords Patron

    t4ngr4m
    Joined:
    Jul 7, 2017
    Messages:
    225
    Location:
    South Jersey
    Make the Codex Great Again! Pathfinder: Kingmaker
    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?

    [​IMG]
     
    Last edited: Sep 15, 2019
    • Brofist Brofist x 2
    • Excited! Excited! x 1
    ^ Top  

(buying stuff via the above buttons helps us pay the hosting bills, thanks!)