Forgotten World: Back At It!

forgotten-world

Those of you who have been following the comments on the Ultima 9 in Widescreen Resolutions article may have noticed Iceblade, from the Forgotten World team, contributing to the very fruitful discussion taking place there. Indeed, he and Kirinn made some very interesting discoveries about how Ultima 9 handles field-of-view, and about how it displays the in-game journal and other books to screen.

Because, you see…by default, on higher-resolution monitors, the journal and other books scale up too much, and all but block out the entirety of the interface. What Kirinn and Iceblade worked out was a way to correct this. Like so:

u9-journal-resize

It was delightful to see a fruitful, lengthy comments thread here at the Codex again; these were fairly commonplace at Old Aiera, but haven’t been quite as prevalent here. Iceblade, too, seems to have been quite positively affected by the event; he recently posted a news update to the long-dormant Forgotten World website, announcing that work had resumed on that project:

…I did my rewriting/reorganizing of the activity editor back in March and it is effectively finished apart from a bit of polishing and maybe a minor side feature or two.

More recently, I’ve attempted to do some reverse engineering with the executable and I helped Kirinn a bit with widescreen corrections. We ended up finding a few bytes in the executable (largely by coincidence) that govern the scale of all book GUMPs in the game. Pretty useful; especially for those that find the spellbook overlaps with the toolbar. For more details, check out the comments section below this post at the Codex.

Unfortunately, I’ve not had much luck in finding other useful bytes; however, I did find out that savegames store snapshots of various on-going in-game processes. These are largely spells, animation, and movement controller processes as well as a few special trigger processes like fade-in. This might prove somewhat useful at some point, but the processes are largely about stuff we don’t intend to change. I’ll probably do some more executable reverse engineering over the next few months.

On the programming front, I’m slowly advancing the triggers editor; reusing much of my GUI interface and internal code from the activity editor. Unfortunately, filling in the necessary details for 150 trigger commands will be quite time consuming even with the modular code I wrote for the activity editor, so it will be a little while before I’ll have more news about this editor.

And finally, I’ve decided to start work on the types editor. The groundwork for this will help with the trigger editor’s target type field (a parameter that selects the trigger target based on Usecode ID) by allowing me to quickly generate a drop-down list via the types database and typename flex file. At this point, I have created the code to read in and write out the types database. Typename is next on my list; followed by an editor for these two files.

He also suggests that we might possibly expect to hear some news about Beautiful Britannia next month.

16 Responses

  1. Sergorn says:

    I’m curious about a possible change/fix/whatever in UIX. Do you guys thing adding stackable regeants would be doable ? We know it was implemented in the game at some point but got cut at the eleventh hour (there was a “stacked” reagent in the vanilla U9 pre patch actually ingame), so I Wonder cos it’s the thing that makes spells cumbersome in the game.

    Also… does the Avatar has gray hair in that screen ? Oo

  2. Iceblade says:

    That’s a chainmail coif. As for stackable reagents, I’m not sure to what extent we’ll be able to deal with this, since there is no functionality in the game to split up or add to stacked objects. The two stacked reagents in Hythloth simply had a quantity property added to them. Arrows and gold are handled in a rather poor and hardcoded manner, completely divorced from player control.

  3. Kirinn says:

    Welp, I’m done testing the tool. Now to set up a downloadable package, just a moment…

    Although, as I examine the screenshots, it seems to me that the values we’ve been editing change the total fov, not just the horizontal component. I guess the game’s hardcoded to run in 4:3 aspect ratio regardless of fov, which is also why the item belt gets stretched the way it does.

    Still, at least this will fix the books, and the game looks a bit more beautiful too when the fov is brought up to modern standards. ^_^

    • WtF Dragon says:

      I’ll be happy to add this one to the U9 subdomain.

      • Kirinn says:

        Please do, thank you very much!

        http://mooncore.eu/bunny/prog.php

        Standard disclaimer applies: I don’t think it’ll break your game or saves, but make backups if you don’t want to take risks. If the tool doesn’t work as expected, you could post hereabouts or write to me at kirinn@mooncore.eu.

        I played up to restoring Compassion with a fov of 92, with Beautiful Britannia installed, and it seemed as stable as usually. Fovs of 110 or 120 would sometimes crash just when rotating to a specific angle, or even when moving a pile of gold into your backpack. I also observed a Paws cutscene being triggered from far away, before I even crossed the troll bridge, and some enemy brigands kept ignoring me instead of attacking. I’m not sure if this was all due to my hack, BB, or just the original game being itself. The hack seems fully compatible with all parts of BB, at least.

        Also, although the tool tweaks a few addresses in u9.exe, it does not touch the one that was mentioned in the original WSGF hack, since that just didn’t do anything for me.

      • WtF Dragon says:

        Awesome. I’ll get that posted presently.

      • Sergorn says:

        Ok not that I want to complain as I haven’t tried the tool yet, but.. doens’t the game look… weird in those screens ?

        I mean technically a widescreen hack should just make the view larger in the left and right – this is what the original WSGF hack did even if it seems it didn’t stick once you saved. But looking at your screens it feels as though the camera is just farther way from the Avatar, as in it changes the camera angle, thus giving a bigger views but also completly changing how the camera should be.

        Of course I need to try out ingame and see how it goes first, but looking at the screens it feels weird, especially the bottom one (feels like the picture is “stretched” toward the camera or something).

      • Sergorn says:

        So yeah I gave it a try and… the way it works now, if feels to me all it does is pushing the camera away from the Avatar.

        I mean basically I tried the default 60 FOV. And then a 75 FOV (which makes the journal a nice size) and well… of course the Avatar is way too far from teh camera, this is not a pleasant experience but basically and I just use the camera keys to move the camera closer to the Avatar as it’s supposed to be… I get the exact same view angle as the 60° FOV. Likewise : if take the default 60 FOV and just use the camera keys the move the camera farther aways from the Avatar… I have the exact same view angle as the 75° FOV.

        So I feel like an ass saying so, and I don’t mean to burst you bubble : but while this certainly fixes the journal issues (and that really is a godsend miracle), it feels to me all it does is sentially changes the camera distance in term of the rest of the game.

      • Kirinn says:

        Hehe. ^^’ You are absolutely right that the higher fovs can look weird.

        I believe my hack does the exact same thing as what the WSGF claims to do, though. I compared screenshots side by side with different values in the exe tweaked, and unfortunately found no combination that only widened the horizontal fov. Like I said, the original hack instructions didn’t quite do the job right as far as I could tell – and as far as I can tell, I have a standard copy of U9 so I don’t see how others can have gotten a different result. 🙁

        I should point out that the higher fovs are not quite the same thing as simply moving the camera. There’s a lens effect of sorts that distorts the view in higher fovs, which is what looks weird if the value is too high. Or, at least, that’s how it’s supposed to work in a modern 3D engine, and seems to be how it works in U9 as well. Here’s how to prove it: press K to switch to first-person view at a fov of 60, and at a fov of 90. The camera will by definition be in the exact same 3D coordinates, but you’ll be able to see more if the fov is set higher.

        Regarding the camera controls – I never remembered before what those were, actually. But it seems ctrl-pgup and pgdn can be used to decrease the fov from its default value, though not increase. Ctrl-home and end are the camera zoom. I should update the program description with advice to use those to finetune the in-game appearance to whatever you most like, while still getting the UI fix from my tool. Thank you for pointing this out!

      • Kirinn says:

        Um, on further checking, you’re right; ctrl-pgdn does move out to around 75 degree fov even without other adjustment. Unless you want a wider angle view, and I guess most people don’t, the only benefit then is the UI fix. Ah, well, I tried. ^_^”

  4. Sergorn says:

    Well that’s okay, fixing the book UI is a miracle in itself !

    The issure here – for me at least – is that really widening the FOV while making the Avatar further away from the camera kind of kills the whole thing for me. Ultima IX is meant to be played with the camera right behind the Avatar so having a wider field of view with the Avatar further away doesn’t work for me.

    Look I’ll look into the WGSF fix again, and make screens. Perhaps my eyes are completly screwed up, but I could swear I DID had a bigger Horizontal FOV and that’s it when I tried it. Their screens illustrate it pretty well actually when you compare the 4:3 16:9 and crazylong screenshots : it’s the exact same view but it’s just wider horizontally.

    Of course if it doesn’t stick that’s a bigger issue heh.

    • Kirinn says:

      Yes, I prefer being somewhat close behind the Avatar too, but I’d also like a wider fov. So, ctrl-PgDn to bring the fov out, and ctrl-Home to bring the camera back to a nice distance. Seems the best solution.

      I tried one more time to follow the WSGF instructions exactly, but no difference; for me it only increases the total FOV (and pressing K or M in-game cancel out the hack).

      Exactly which addresses in the savegame are you editing? 00007042 can occur multiple times.

      • Sanctimonia says:

        I forgot to mention… Narrowing/reducing the FOV is the same thing as “zooming in” on a camera. The view also becomes more orthogonal and loses perspective/parallax. The opposite applies as you increase the FOV; you get more of a “fish eye” perspective and the camera seems to move farther away. So large adjustments in FOV also require the camera’s position to be moved closer or farther away from its focal point to compensate. Ideally you’d find a good balance for a small and large FOV, then interpolate for all FOV values in between.

    • Sanctimonia says:

      If the FOV for a 4:3 monitor (the stock FOV) looks good, it shouldn’t be increased too much to accommodate a single 16:9 display. Think of the FOV as a slice of pizza you’re about to take the first bite of. The left and right edges of the slice moving away from your mouth and toward the crust should point at the left and right side of your monitor. The angle of those two lines is the FOV. A simplistic explanation, but there’s a better one here: http://en.wikipedia.org/wiki/Field_of_view_in_video_games. I normally use something between 22.5 and 45, but the best way is just to experiment until you find something nice, and/or work out a formula based on the display resolution’s aspect ratio. When it gets crazy is in triple-head setups.

      • Kirinn says:

        Highly useful commentary. Thank you. 😀 It’s always a challenge to explain technical things like this. I could certainly have done better.