Hey guys!
I did a lot of modding for PotC 7 years ago, but ultimately got burned out a bit.
I'd been on Steam playing a space trading game called Drifter, which is good, although simple, when I realized that the archetype for this kind of game is the 17th century sailing ships, so I got Sea Dogs: To Each His Own. While it's a good game, it's ultimately limited in scope. There was no English manual, not even a readme file, so I wrote my own and posted it as a Steam guide. I played a lot, got over 800 hours in the game, but preferred the sandbox style of play to the story line quests. You can play a lot of sandbox in 800 hours.
I tried loading PotC, but my 5 year old computer was glitching too much to get a good load. I couldn't even download the newest Build Mod because every time the file would be corrupt. Time for a new computer, eh?
So I bought a new computer. I won't tell you the brand, but if I say I got something near top of the line and you'll think I paid too much, you can figure out what brand it is. I also got saddled with Windows 10, which makes some things easier, but I still prefer Windows 7. I'm putting up with Win 10 for now.
Sea Dogs played well on the new computer, and when I got to a point where I didn't feel like sailing to the next island, I loaded PotC. You'll need MSI Afterburner, or at least the RivaTuner that's included with it, to limit frame rates (I have mine set to my monitor's refresh rate of 60) or the game won't be playable. Currently, after getting everything set up, I only have to run RivaTuner to fix the problem.
The Build Mod downloaded with no problems, and I've been playing it a few hours. The only major problem I discovered so far is that after a few hours, suddenly every save game attempt would crash and produce an empty save. I've already found and fixed that problem, and I'm gonna guess that it's from the original code. Heck, it took less time to find and fix the problem than it did to test for computer problems before I read the error log!
Look in interface.c at the function IGetSaveString. It allocates a string variable, sets it with a function call, then tries to return the string. The problem is, strings are returned by reference, not by value, and if you have a fast computer sometimes the function has already deallocated the string before it can be used by the save function. If you declare that variable (retStr) outside the function, so that it's static and doesn't disappear, you won't have the problem any more. Give it a new name like Save_retStr. You can get away with returning a dynamic variable if you're returning a float or int, but not a string. The fact that this code ever worked is pure chance.
See? I'm back to modding already.
To compare PotC with Sea Dogs, SD is better than stock PotC, and certainly prettier, but the modded PotC is the much better game, as it should be with all the work everyone's done on it.
Given that everyone is on super high resolution monitors now, the HUD is going to be too small for many people. I've already started on a mod to scale the HUD, and I'll submit it when I'm happy that it all works right. Got the basic graphics sized right and in the right place, but there's more to it than that; for example, the icon to show time acceleration is in the wrong place and I haven't yet installed my development environment so I can search for it properly. Need to enlarge the spyglass data at the bottom, and the messages that appear on the screen. Maybe you can read them, but my 67 year old eyes aren't up to the task any more.
Gawd, it feels good to be getting my hands dirty with code again. I realized recently that in March I went over 40 years total development experience; I started my professional programming career in the US Army in 1976.
Also, it feels really good to see that "Hook & Hat" tavern sign. Probably the best tribute I've ever gotten in all those 40 years. Thanks again to whoever made the sign.
I'll be around.
Hook
I did a lot of modding for PotC 7 years ago, but ultimately got burned out a bit.
I'd been on Steam playing a space trading game called Drifter, which is good, although simple, when I realized that the archetype for this kind of game is the 17th century sailing ships, so I got Sea Dogs: To Each His Own. While it's a good game, it's ultimately limited in scope. There was no English manual, not even a readme file, so I wrote my own and posted it as a Steam guide. I played a lot, got over 800 hours in the game, but preferred the sandbox style of play to the story line quests. You can play a lot of sandbox in 800 hours.
I tried loading PotC, but my 5 year old computer was glitching too much to get a good load. I couldn't even download the newest Build Mod because every time the file would be corrupt. Time for a new computer, eh?
So I bought a new computer. I won't tell you the brand, but if I say I got something near top of the line and you'll think I paid too much, you can figure out what brand it is. I also got saddled with Windows 10, which makes some things easier, but I still prefer Windows 7. I'm putting up with Win 10 for now.
Sea Dogs played well on the new computer, and when I got to a point where I didn't feel like sailing to the next island, I loaded PotC. You'll need MSI Afterburner, or at least the RivaTuner that's included with it, to limit frame rates (I have mine set to my monitor's refresh rate of 60) or the game won't be playable. Currently, after getting everything set up, I only have to run RivaTuner to fix the problem.
The Build Mod downloaded with no problems, and I've been playing it a few hours. The only major problem I discovered so far is that after a few hours, suddenly every save game attempt would crash and produce an empty save. I've already found and fixed that problem, and I'm gonna guess that it's from the original code. Heck, it took less time to find and fix the problem than it did to test for computer problems before I read the error log!
Look in interface.c at the function IGetSaveString. It allocates a string variable, sets it with a function call, then tries to return the string. The problem is, strings are returned by reference, not by value, and if you have a fast computer sometimes the function has already deallocated the string before it can be used by the save function. If you declare that variable (retStr) outside the function, so that it's static and doesn't disappear, you won't have the problem any more. Give it a new name like Save_retStr. You can get away with returning a dynamic variable if you're returning a float or int, but not a string. The fact that this code ever worked is pure chance.
See? I'm back to modding already.
To compare PotC with Sea Dogs, SD is better than stock PotC, and certainly prettier, but the modded PotC is the much better game, as it should be with all the work everyone's done on it.
Given that everyone is on super high resolution monitors now, the HUD is going to be too small for many people. I've already started on a mod to scale the HUD, and I'll submit it when I'm happy that it all works right. Got the basic graphics sized right and in the right place, but there's more to it than that; for example, the icon to show time acceleration is in the wrong place and I haven't yet installed my development environment so I can search for it properly. Need to enlarge the spyglass data at the bottom, and the messages that appear on the screen. Maybe you can read them, but my 67 year old eyes aren't up to the task any more.
Gawd, it feels good to be getting my hands dirty with code again. I realized recently that in March I went over 40 years total development experience; I started my professional programming career in the US Army in 1976.
Also, it feels really good to see that "Hook & Hat" tavern sign. Probably the best tribute I've ever gotten in all those 40 years. Thanks again to whoever made the sign.
I'll be around.
Hook