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.

*out of date* - PS:T 1024x768 UI pack (v0.6)

elricbk

Novice
Joined
Oct 2, 2008
Messages
10
Can you try this version? While run without parameters it should look for new size in Torment.exe file. Works for my 2cd unpatched exe file.
 

taplonaplo

Scholar
Joined
Aug 8, 2008
Messages
628
works on 4cd patched, thanks!
BTW, i gotta check if window coordinates are stored in a byte or a short. If the latter maybe it's worth a try to use negative window coordinates to fake larger backgrounds to look centered on smaller resolution, tho i'm rather certain it would crash.
EDIT: it won't work with chus, but at least i get an assertion i was curious about :(
 

taplonaplo

Scholar
Joined
Aug 8, 2008
Messages
628
Here's the beta version of a basic gui editing mod for any resolution. Unfortunately there are some problems with custom graphics, so for now transparent and black background avaiable only. Transparent have some issues (flickering and overlapping) that black doesn't have so it's suggested to use that. pstchu.bat and bmppatch.exe are used to resize the bmps. Note that to properly uninstall the pictures you will have to manually delete them (i should make another bat file to do so, but i don't really know how to do so deleting>.<).
Mos files are actually bigger than they should be as it further expands the already enlarged moses of the widescreen mod (it's the easiest solution for simplicity's sake). Loading screen bars are not visible and neither faked (a modified gbarback.mos edited by ghostdog is included, if you want to use it copy it over to the override before install). There could also be some issues with low x and y values. If thats the case use the provided transp.mos, copy it to the override 2 times and rename them to gbarcap.mos and gbarfore.mos.

new link soon

some feedback and bug report would be nice. Also thanks for the vanished one for testing it.
 
Joined
Nov 7, 2006
Messages
1,246
Again, great work :D
I think it needs a thread for itself, so that people looking at the main page know that there's something new.
 

Disconnected

Scholar
Joined
Dec 17, 2007
Messages
609
taplonaplo said:
some feedback and bug report would be nice.
The only oddity I've spotted so far is the Journal -> Bestiary pics being displayed in the upper left corner.

But I only just installed it 5 minutes ago.

Question time:

Is there any way to increase font size? PS:T looks awesome in 1920x1200, but dialogue in that resolution makes me feel like I'm some fucked up gypsy trying to predict the future by reading gnat entrails.

I remember having to give up on PS:T last time around because the spell effects reduced my 8800GTX to gibbering, stuttering insanity. Is there any way around it?
 
Joined
Nov 7, 2006
Messages
1,246
Disconnected said:
Is there any way to increase font size? PS:T looks awesome in 1920x1200, but dialogue in that resolution makes me feel like I'm some fucked up gypsy trying to predict the future by reading gnat entrails.

You need to create a new FONTDLG.BAM. For such a high resolution, perhaps this could help:
http://rpgcodex.net/phpBB/viewtopic.php?p=576359#576359

As I mention in the post, it's really big.

I remember having to give up on PS:T last time around because the spell effects reduced my 8800GTX to gibbering, stuttering insanity. Is there any way around it?

Don't know about this, never had performance issues with my (much lower) resolution. I only have that annoying problem with spell effects not displaying completely, but if I disable hardware acceleration to fix that the cursor graphics are corrupted beyond acceptable.

*Sigh* it's one of the best games ever, Nvidia could at least support it decently.
 

taplonaplo

Scholar
Joined
Aug 8, 2008
Messages
628
i think the reason why journal pictures weren't resized is that your jrnlpic.bif is in the cd2/data folder (where it should be by default). If you put it to your pst root folder and run the bat it should be fine.
I'll have to find a way to locate where the cd content is with the help of the ini through weidu to fix it properly.
Thanks for reporting!
 

Disconnected

Scholar
Joined
Dec 17, 2007
Messages
609
The Vanished One said:
As I mention in the post, it's really big.
It really is :lol:

- But it works and the game is now perfectly playable in 1920x1200. Thanks a lot TVO. And sorry I was too lazy to read the entire thread before asking.

*Sigh* it's one of the best games ever, Nvidia could at least support it decently.
Haven't gotten to any spell casting yet, but if I find a fix I'll share it here.

taplonaplo said:
i think the reason why journal pictures weren't resized is that your jrnlpic.bif is in the cd2/data folder (where it should be by default). If you put it to your pst root folder and run the bat it should be fine.
I'll have to move the rest of CD 2 & correct the ini for this to work, right?

Also, you're not supposed to thank me for finding bugs, I'm supposed to thank you for making the game enjoyable again ;)
 

taplonaplo

Scholar
Joined
Aug 8, 2008
Messages
628
only jrnlpic.bif as elrick's prog reads the bif conataining original images from the folder bmppatch.exe is in then copies them to the override. The ini thing should be done on my part, so you won't have to bother with copying stuff.
EDIT: alternatively i could create the biff file with weidu to the ps-t folder.
 

Disconnected

Scholar
Joined
Dec 17, 2007
Messages
609
As you said, moving jrnlpic.bif to the game dir & running the bat fixed it.

Ran into font-related problem though. Seems the larger of the fonts bugs NPC dialogue interjections for some reason, completely stalling the game (no way out of the dialogue, no way to proceed).

If there's a way around it, I'd love to know. Otherwise it's back to divining dialogue from gnat entrails for me.

Also, assuming PS:T fonts work like the BG ones, what's the name of the floaty text file? - Corvias made a replacer for that too.
 
Joined
Nov 7, 2006
Messages
1,246
Disconnected said:
Ran into font-related problem though. Seems the larger of the fonts bugs NPC dialogue interjections for some reason, completely stalling the game (no way out of the dialogue, no way to proceed).

I had hoped it was compatible, and it looks like I was wrong. If you have a lot of free time, you could create a new fontdlg.bam by hand, although I don't know exactly how. Resizing every sequence in the frame with BAMWorkshop and pasting a new, bigger character imported from somewhere else as image file could perhaps work, although it would take time.

Also, assuming PS:T fonts work like the BG ones, what's the name of the floaty text file? - Corvias made a replacer for that too.

Should be trmtfont.bam.
 

elricbk

Novice
Joined
Oct 2, 2008
Messages
10
taplonaplo
Tried to install it for my 2cd version, 1024x600 screen. Got first error while installing (see console screen), and second while starting the game (so it didn't start at all). Widesreen mod is installed, as Unfinished Business and FixPack (though tweaks are not).


Btw, how could I help in your modification? I can make mos patching faster (as with bmps) if it's necessary. Does bmp patch need any modification? To search additional dirs, uninstalling self or something like this. It all can easily be done, just ask. Also, it's possible to add arbitrary background for mos files, but calling sequence for utility has to be discussed. So, again, don't hesitate to ask, I will gladly help.

Thanks for your work.
 

taplonaplo

Scholar
Joined
Aug 8, 2008
Messages
628
1st is just warning should cause no problems, it's black isles faulty code not mine (as i change different part of the dlg files) . I've only encountered the 2nd error when i tried run a resolution that was not supported by my videocard (1024x600 in my case). Does it work without my mod installed? (for me that looked totally fucked up but the main menu opened).
It would be nice if the bmp patcher could locate the jrnlpic.bif through the ini for easier installation (ithe chitin.key should have the answere where the bif is. Some kind of uninstall feature would also be nice.
About the mos-es with precreated graphics,i really don't know, it seem to be rather difficult (unless it's a 256 color picture :P) but i sure am curious how would you do it. The thing i know that i won't even try to do that in weidu for sure. Right now the installation time isn't fast, but i think it's still ok.
 
Joined
Nov 7, 2006
Messages
1,246
@ taplonaplo
More testing didn't turn up other problems, although I can't guarantee complete absence of bugs.
 

scient

Augur
Joined
Oct 21, 2008
Messages
203
It looks like you guys have got a good handle on getting this sorted but I figured I'd offer my assistance if needed. I saw ghostdog posts in SHS so thought I'd pop over here.

I haven't been messing with altering UI per say but while working on sorting all of the major engine bugs over the past three months I've gained an in depth knowledge of the inner workings of PST exe. However, I did have a chance to mess with a few things such as getting the journal to display all the entries since "Day 1"(stock exe is limited to 128) and some funky reset problems with spell bonus items. If there are any specific problems you are having with the engine code I'd be happy to look into them when I'm not busy. Also, do you use IDA at all?
 

taplonaplo

Scholar
Joined
Aug 8, 2008
Messages
628
Some things that i haven't been able to edit through the exe:
- getting journal picture coordinates set over 127 (it's written into 1 byte)
- As i noticed flickering is not prensent in the action menu at all. I the engine handles it slightly different from other windows (eg.: it pauses automatically, and as i said tooltips do not flicker).
As an alternative i noticed that flickering is not present under the cursor, but it's dimensions are limited to 64x64 (over that the cursor image flickers). I found a way to get around flickering over 64x64 but it caused other problems. So theoretically if mouse image had coordinates and dimensions as well, maybe it'd be possible to tweak it so that tooltip flickering could be prevented with big enough cursor image.(altho that'd require negative coordinate for a specific reason that may crash anyway).
 
Joined
Nov 7, 2006
Messages
1,246
scient said:
It looks like you guys have got a good handle on getting this sorted but I figured I'd offer my assistance if needed. I saw ghostdog posts in SHS so thought I'd pop over here.

I haven't been messing with altering UI per say but while working on sorting all of the major engine bugs over the past three months I've gained an in depth knowledge of the inner workings of PST exe. However, I did have a chance to mess with a few things such as getting the journal to display all the entries since "Day 1"(stock exe is limited to 128) and some funky reset problems with spell bonus items. If there are any specific problems you are having with the engine code I'd be happy to look into them when I'm not busy. Also, do you use IDA at all?

Thanks for offering your help, it's really appreciated. As taplonaplo said, tooltip flickering is giving us trouble. Ask for screenshots if you need any. This is one, from a really old version:

tooltips04.jpg


To solve the problem, I tried adding a "frame" around the 640x480 centered screens. Basically, I added four rectangles filled with a generic background around the screens (I just created four new windows in each .CHU). The flickering didn't disappear, although it was somewhat less severe. I ended up using the "frame" in my mod as a simple way to add a background:

Torment2008-08-2620-17-03-59.jpg


Another problem is that I'd like to decrease the value of an offset (0x2d9485 in the 4CD .exe, 0x2d92c5 in the 2CD .exe) by 142, that is, to a negative value (it's 134 now). I know that it may be impossible, but perhaps you know a workaround.

Yet another problem: the credits cinematic doesn't center properly when altering 0x03f200 and 0x03f184 (4CD) or 0x03f1c0 and 0x03f144 (2CD), even if all the other movies are centered.

Finally, if you, by chance, knew the offsets that allow GBARFORE.MOS (part of the loading bar) to display out of a 640x480 box, that'd be great. I'm currently using a workaround, i.e. two fake loading stages, as suggested by taplonaplo and ghostdog: http://www.rpgcodex.net/phpBB/viewtopic ... 551#593551

An unrelated problem: I have that awful problem that causes spell effects to display incorrectly. Disabling hardware acceleration corrupts the cursor graphics. I know that this is difficult, but perhaps you know of a solution.

Thanks for any help!
 

scient

Augur
Joined
Oct 21, 2008
Messages
203
Ok, for the flickering can you maybe use a screen capture program like fraps or camtasia to take a vid of it so I can see it in action? Also, what did you change that is causing it? From that first screenshot it looks like it may not be redrawing the screen properly?

As for making that value negative I'll need to know more but I'll assume it is a byte or word since dword you would just set it to 0xFFFFFFF8. If it is a byte or word it is possible but will require some more patching. You would just use a value of 0xF8 or 0xFFF8 then modify instances in exe where it is used with something like "MOVSX EAX, offset". This basically is a move value with sign extension, so 0xF8/0xFFF8 becomes 0xFFFFFFF8 or -8. I actually ran into a similar problem when I was rewriting the morale system because morale is stored in a byte so what would happen in stock game if you got morale below 0, say -1, it would think it was 255 (0xFF) and roll over to 20 (the max). :roll:

http://faydoc.tripod.com/cpu/movsx.htm

If you know the code in exe that uses the value, this is pretty simple to do. However, I'd ask that you show me what you're patching first to make sure it won't conflict with my bug fixes when Qwinn releases his next fix/tweak/UB packs.

As for GBARFORE.MOS, I'm not sure off hand but I'll have a look. I'll also have a look at credits cinematic.

Unfortunately I'd need the hardware to solve graphics related problems that a lot of folks are having. My guess is problems with gfx drivers but I'd have no idea. Unless someone wants to buy me a new gfx card, I'm stuck with a ATI 9800 Pro till Nehalem gets released in early '09.
 

taplonaplo

Scholar
Joined
Aug 8, 2008
Messages
628
scient said:
Ok, for the flickering can you maybe use a screen capture program like fraps or camtasia to take a vid of it so I can see it in action? Also, what did you change that is causing it? From that first screenshot it looks like it may not be redrawing the screen properly?
Exactly, it only does redwaring when the window is closed.
 
Joined
Nov 7, 2006
Messages
1,246
scient said:
Ok, for the flickering can you maybe use a screen capture program like fraps or camtasia to take a vid of it so I can see it in action? Also, what did you change that is causing it? From that first screenshot it looks like it may not be redrawing the screen properly?

If it's still needed, here's a short video:
http://rapidshare.com/files/156573369/T ... 1.avi.html
Quality is bad, but when I record at full size the FPS count is just too low (it's stuttering even at half size).
As for what we change, we just restore the original 640x480 screens. The widescreen mod uses a black background to fill the rest of the space.

As for making that value negative I'll need to know more but I'll assume it is a byte or word since dword you would just set it to 0xFFFFFFF8. If it is a byte or word it is possible but will require some more patching. You would just use a value of 0xF8 or 0xFFF8 then modify instances in exe where it is used with something like "MOVSX EAX, offset". This basically is a move value with sign extension, so 0xF8/0xFFF8 becomes 0xFFFFFFF8 or -8. I actually ran into a similar problem when I was rewriting the morale system because morale is stored in a byte so what would happen in stock game if you got morale below 0, say -1, it would think it was 255 (0xFF) and roll over to 20 (the max). :roll:

http://faydoc.tripod.com/cpu/movsx.htm

If you know the code in exe that uses the value, this is pretty simple to do. However, I'd ask that you show me what you're patching first to make sure it won't conflict with my bug fixes when Qwinn releases his next fix/tweak/UB packs.

As for what the value is, my hex editor says this: http://i315.photobucket.com/albums/ll47 ... 2d9485.jpg
And I can't understand if it's byte, short or long.
Thanks for the suggestion. I confess that I don't understand it, so I'll need to do some research before I can try to put it into practice. Or perhaps I should just give up, after all it would be a significant correction for a rather minor problem.
You can bet that I want my mod to be compatible with Qwinn's stuff. Also, thank you for helping him making this game even more awesome. One question: will the new versions of Qwinn's mods be compatible with old saves?

Unfortunately I'd need the hardware to solve graphics related problems that a lot of folks are having. My guess is problems with gfx drivers but I'd have no idea. Unless someone wants to buy me a new gfx card, I'm stuck with a ATI 9800 Pro till Nehalem gets released in early '09.
I'll just keep my problem. I'd really like to have enough money to buy everyone that helps me a new video card. That'd be a lot of cards :)

edit:
Also, do you use IDA at all?
Sorry for not replying to this earlier. If you are referring to this then no, I didn't even know it existed :oops:
 

scient

Augur
Joined
Oct 21, 2008
Messages
203
Thanks for the vid. This weekend I'm going to setup a parrell install of PST so I can debug it without messing up main one I use to sort bugs.

A dword is 4 bytes, word is 2 bytes but you have 6 bytes selected which isn't anything. If the value is 86 00 00 00 (dword), try changing it to F8 FF FF FF. Do you know what uses it exactly? I put a breakpoint on while in a debugger (olly) but it was never accessed. If you can tell me what part of the game UI uses it, I could then tell you your best course of action.

Well, I can't say for sure about the extra content he will be adding in since he's been busy and hasn't had time to put together a beta installer but for my fixes it is a yes and no.

Almost all of my engine patches are backwards compatible since most fix bugs with script functions or other aspects of the game not related directly to game progression. Here is a pretty complete list, it hasn't been updated with the last few things I've done which are in another thread.

However, I would strongly advise against trying to play an older saved game with new morale system because my system wasn't in place since Day 1. I have no way of giving back lost morale among other things that could end up being game breaking. So if you've already done parts of Dak's quests, those morale bonuses are unrecoverable. You may also miss out on certain aspects such as mage battles if you've already completed the related quest, see here.

Anyway, I'll let you know how it goes in acouple days when I get some time to look into those issues.


edit: In regards to IDA, for any serious reversing you'll need two things: debugger and dissembler. IDA is the dissembler of choice and I personally use ollydbg. Both of these would most likely be completely incomprehensible if you have no assembly knowledge. If you are interested, I could prob scrounge up a few beginner tutorials.
 
Joined
Nov 7, 2006
Messages
1,246
scient said:
A dword is 4 bytes, word is 2 bytes but you have 6 bytes selected which isn't anything. If the value is 86 00 00 00 (dword), try changing it to F8 FF FF FF.
It works!
Do you know what uses it exactly? I put a breakpoint on while in a debugger (olly) but it was never accessed. If you can tell me what part of the game UI uses it, I could then tell you your best course of action.
I should have said it earlier, sorry. Decreasing it moves S091GATE.BAM down. That's the image of a gate on clouds that appears when you cast celestial host.

Also, thanks for the other info.

edit:
If you are interested, I could prob scrounge up a few beginner tutorials.
Thanks, but debugging and disassembling is too much for me right now. Besides, I have a C++ course at uni, so perhaps by the end of the year I'll have a better understanding of programs and I will be able to keep up better with this.
 

taplonaplo

Scholar
Joined
Aug 8, 2008
Messages
628
sorry vanished, i gave wrong offset when i found it through blind hacking that's why it didn't work =/
The right offset should be 002d942d. Initial value is 410, so the new value should be 410+(y-480)/2 or y/2 + 170 (they are the same)(4CD version as for the offset)

or, ahve you got it workin with negative value? either way, i'd use the new offset, as the x is given through the same process so it's really unlikely that it messes stuff up.

About gbarfore: i know where the coords are, so i'll fool around with it tomorrow a bit.
 

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