Author Topic: PRACX v1.10 Release  (Read 241258 times)

0 Members and 6 Guests are viewing this topic.

Offline PlotinusRedux

PRACX v1.10 Release
« on: December 09, 2014, 11:22:10 PM »
It can be installed over Yitzi's patch--the installation will just change a few bytes of terran.exe and terranx.exe to load my dll's.

For better formatted and more up to date information on the project, go to the github project page.

Source code: https://github.com/DrazharLn/pracx
Downloads/Binaries: https://github.com/DrazharLn/pracx/releases

PRACX Change Log
================

v1.0 (12/9/2014)
================
No big bug fixes or new features, just some minor UI tweaks for things that annoyed me.  The patch is fully compatible with SMAC, SMAX, and Yitzi's patches (last tested against v3.3B).

Windowed/Full Screen
--------------------
*Toggles between Full Screen and Windowed mode;
*Window is resizable;
*Configurable Full Screen resolution (any resolution can be used);
*Automatically switches system back to native resolution when windowed;
*<TAB> key toggles for systems that don't like <ALT-TAB> (like mine for some reason);
*DirectDraw .ini setting obsolete--DirectDraw is used only for movies;
*Opening and in game movies are fully compatible and no longer block <ALT-TAB>.

Scrolling
---------
*Pixel-level scrolling (previously had to scroll at least a tile at a time);
*Right-Click and drag scrolling added;
*Edge scroll zones scroll faster the closer to the edge the mouse is;
*Configurable zone sizes and scroll speed. "Min Scroll Speed" setting is the speed of scrolling when the mouse just enters the zone, and "Max" is the speed with the mouse fully against the edge of the screen/window.

Zooming
-------
*Pixel-level re-centering--no more screen zigzag when scrolling in and out;
*Automatically sets reasonable min, max, and increment values for the current resolution;
*Mouse wheel zooms in and out;
*Configurable # of increments between min and max zoom;
*Resolves black areas after zooming defect;
*Details (units, cities, improvements, etc.) are now shown even when fully zoomed out--can be turned off in Prefs if that causes anyone performance issues.

Resource Modes
--------------
*<ALT-R> cycles between displaying:
  --Normal Mode;
  --Current Yield: Displays what each tile would produce with its current improvements (if any);
  --Potential Yield: Displays each tile's food as if it had a farm, production as if it had a mine, and energy as if it had solar panels;
*Yields are displayed as though for a faction with no current max resource per tile limits--its main purpose is to make it easier to see where to place a city.

Terrain Modes
-------------
*<ALT-T> cycles between displaying:
  --Normal Mode;
  --Faction Ownership Mode: Displays tiles colored by who owns them, if anyone;
  --Elevation Mode: Displays highest elevations as dark red and lowest as white;
  --Rainfall Mode: Displays wettest areas as dark green and driest as while;
  --Rockiness Mode: Displays rockiest areas as dark gray and flattest as white;

Miscellaneous
-------------
*In view mode (key <V>), mouse over for unit and terrain info (don't have to Shift-Right Click);
*In city mode, unworked tiles show their potential yields in grey.  Can be turned off temporarily by holding <SHIFT>, or permanently in Prefs--in which case hold <SHIFT> will display the yields rather than hiding them;
*New in-game menu and prefs window to manage the new features.
*1st mode of existing <T> cycle now hides forests and fungus so you can see what's under them.
*Mouse wheel controls zooming when the map is shown, but controls list scrolling when a list window is shown.

PRACX Hotkey Reference
======================
<TAB>      Toggle fullscreen/windowed
<ALT-R>    Cycle resource display mode
<ALT-T>    Cycle terrain display mode
<SHIFT>    On city screen, show or hide unworked resources depending on the default setting

Disabling/Uninstalling
======================
The entire patch may be temporarily disabled by setting "Disabled=1" in the [PRACX] section of Alpha Centauri.Ini in the application's directory.  It may be permanently disabled by deleting prac.dll and prax.dll in the application's directory or by uninstalling.

Acknowledgements
===============
Thanks to everyone at http://alphacentauri2.info for their comments and suggestions, and specially to Yitzi and Scient for sharing research from their patches.

Legal
====
Everyone is free to use, distribute, and modify this patch with no limitations, including bundling it in other patches and modifying the source code.

=============================================================
v1.01 (12/10/2014)
=================
Minor fixes to the v1.0 release:

*Fixed "WindowsFileBox=1" .ini setting causing full screen to switch to windowed mode on load/save;
*Fixed <V>iew mode not displaying tile info on mouse-over in SMAX;
*Fixed scaling issue with resource icons in Resource Mode for wide aspect ratios;
*Fixed "Please don't leave" dialog showing up after switching between windowed and full screen mode;
*Improved Zoom Increment calculation so that 0 zoom always lies exactly in the middle.  A side effect is the number of
Zoom Increments must now always be odd.  Even values will be rounded up to the nearest odd number;
*Added this note that <ESC> is the key to use to skip movies now;
*Window close box now acts as though the <ESC> key was pressed instead of minimizing the window.

v1.02 (12/17/2014)
==================
*Fixed incorrect resource calculation in Release build;
*Added removal of GOG <ALT-TAB> blocking to installation.
*Fixed crash when Disabled=1.

v1.03 (12/18/2014)
==================
*Re-enabled scroll wheel zoom (accidentally disabled in 1.02).

v1.04 (12/14/2014)
=============
*Significantly improved zoom level calculation.

v1.05 (01/16/2025)
==================
*Fixed lockup when zooming very large maps.
*Fixed incorrect computation of lower vertical scroll bound.
*Statically linked RTL to remove dependency on RTL DLL.

v1.06 (01/18/2015)
=================
*Compiled for XP compatibility
*Install script now actually creates the backup directory
*PRACX Preferences screen now shows the correct PRACX version

v1.07 (04/21/2016)
==================
* Change: No longer becomes windowed when window loses focus.
* Change: TAB no longer toggles windowed/full-screen.
* Change: ALT+ENTER now toggles windowed/full-screen mode.
* Fix: May fix colour calibration problems.
--DrazharLn

v1.08 (05/06/2016)
==================
* Feature: Can now set MoviePlayerCommand in .ini.
--DrazharLn

v1.09 (05/07/2017)
==================
* Fix: Video window would lose focus after two minutes
* Fix: Yitzi's patch 3.5 includes an 'Alpha Centauri.Ini' that sets bad PRACX options. I now look for them at installation time and change them to the defaults. There will be false positives, but it's better than the status quo.
--Daemonjax and DrazharLn

v1.10 (10/18/2017)
==================
* Fix: use current rather than registry display settings
* Fix: alt-tab works better
* Feature: package BUncle's Icons.pcx
* Feature: optional logging
--DrazharLn

Troubleshooting:

* Some versions of the Alpha Centauri.Ini packaged with yitzi's patch disable PRACX. If you can't open the PRACX menu, check the Ini file. v1.09 and up of the PRACX installer try to fix this for you.
* PRACX will not work with the official version of the game. You need to install the unofficial patches first.
* Windows 8 and later disable DirectPlay. Try re-enabling it ("Turn windows features on and off").
« Last Edit: October 03, 2018, 05:05:26 AM by DrazharLn »

Offline PlotinusRedux

Re: PRACX v1.0 Release
« Reply #1 on: December 09, 2014, 11:25:08 PM »
NOTES:

I used NSIS for the installer because that's what Scient was using, but I saw some reports of it giving a false positive to some antivirus software--if anyone runs into that, please let me know and I'll switch to a different installer.

I'll post the source code in a few days--I want to clean it up a bit and make sure no one finds a bug first.

Yitzi--just installing it will add it to your .exe that you can then distribute--the .exe itself isn't including in this install, it just modifies a few bytes in the SELFMOD segment and adds itself to the class initialization table.

« Last Edit: December 09, 2014, 11:48:45 PM by PlotinusRedux »

Offline Flux

Re: PRACX v1.0 Release
« Reply #2 on: December 09, 2014, 11:30:29 PM »
Yes! ;nod
Left the internet, more-or-less.... Might drop in occasionally.

Offline Mart

Re: PRACX v1.0 Release
« Reply #3 on: December 10, 2014, 12:01:08 AM »
Ok, having Win 8.1, I run the installer, but it seems the exe files are not patched.
I then tried to manually start pracxpatch.exe, but I got:
"... can't start because MSVCR120D.dll is missing..."
I placed the  MSVCR120D.dll file in Windows\system32 but no luck...

In details, there was also smth about not copied ( _backup ...)
Patch exe was started as administrator
or maybe the problem is antivirus?

Offline PlotinusRedux

Re: PRACX v1.0 Release
« Reply #4 on: December 10, 2014, 12:21:30 AM »
Mart, go to http://www.microsoft.com/en-us/download/details.aspx?id=40784 and download and run vcredist_x86.exe, then re-install my patch, that should fix it.

Offline Mart

Re: PRACX v1.0 Release
« Reply #5 on: December 10, 2014, 12:55:20 AM »
Still some problem exists.
Running pracxpatch.exe gives a message window "program has stopped working..."
any idea? antivirus?

one more thing, I have 64-bit system. Maybe this is the problem?

Offline Yitzi

Re: PRACX v1.0 Release
« Reply #6 on: December 10, 2014, 01:03:02 AM »
Still some problem exists.
Running pracxpatch.exe gives a message window "program has stopped working..."
any idea? antivirus?

one more thing, I have 64-bit system. Maybe this is the problem?

I think virtually all systems now are 64-bit.

Offline PlotinusRedux

Re: PRACX v1.0 Release
« Reply #7 on: December 10, 2014, 01:14:48 AM »
Anti-virus is possible, Mart, since it's trying to modify a .exe file--but I'd hope your AV would tell you if it was doing that, not just hang the application....

I'm attaching the zipped .exe file, you can try just running it--if it's AV, that should fix it, if it's a problem with the Visual C roundtimes it will probably crash as well.

Has anyone else installed it yet?

Offline scient

Re: PRACX v1.0 Release
« Reply #8 on: December 10, 2014, 01:16:13 AM »
Tested and working on my win7 x64 vmware install I use to debug the game. Nice work!  :)

note:
I only tested the full screen / window mode and resize features. However, it installed ok and no problems there.

Offline Mart

Re: PRACX v1.0 Release
« Reply #9 on: December 10, 2014, 01:22:48 AM »
...
I'm attaching the zipped .exe file, you can try just running it--if it's AV, that should fix it, if it's a problem with the Visual C roundtimes it will probably crash as well.
...
Yes, the attached terran.exe also gives msvcr120d.dll problem

Offline PlotinusRedux

Re: PRACX v1.0 Release
« Reply #10 on: December 10, 2014, 01:27:13 AM »
It's still complaining about the dll?  Had you manually copied msvcr120d.dll to your system directory from somewhere?  It has to be registered, not just copied--if you manually put it there, delete it and retry the msvc install.  You might also install the x86 version of the redistrib from that site.  I've got to go pick up my son, but I'll look at this more when I get back.

Offline Mart

Re: PRACX v1.0 Release
« Reply #11 on: December 10, 2014, 01:32:28 AM »
I did some online search.
http://msdn.microsoft.com/en-us/library/windows/hardware/dn448963%28v=vs.85%29.aspx

Msvcr120.dll - C runtime.
Msvcr120d.dll - Debug version of C runtime. No redistribution allowed.

Can it be, that pracxpatch.exe could refer to Msvcr120.dll, and this would solve the problem?

[edit]
I reinstalled vcredist_x86.exe, but Msvcr120d.dll is not in system32, Msvcr120.dll is though.

Offline PlotinusRedux

Re: PRACX v1.0 Release
« Reply #12 on: December 10, 2014, 01:42:26 AM »
Ah, yeah, I did compile the debug version.  I'll recorecompand repost when I get home, about 30 minutes.  I miss Borland, I hate all these MS dlls.

Offline PlotinusRedux

Re: PRACX v1.0 Release
« Reply #13 on: December 10, 2014, 02:30:55 AM »
Ok, I replaced the attachment at the top with the release compile, that should fix your issue, Mart.

Offline Mart

Re: PRACX v1.0 Release
« Reply #14 on: December 10, 2014, 03:22:53 AM »
Incredible! :)  Such UI was really unexpected... :)
Yes, it works very well now.

I checked much of the new functionality. Options screen - very nicely done, works excellent.
A question about V key. "v" is in the game for something like - find a unit to move, isn't that in conflict? This feature does not work for me.

 

* User

Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Select language:

* Community poll

SMAC v.4 SMAX v.2 (or previous versions)
-=-
24 (7%)
XP Compatibility patch
-=-
9 (2%)
Gog version for Windows
-=-
103 (32%)
Scient (unofficial) patch
-=-
40 (12%)
Kyrub's latest patch
-=-
14 (4%)
Yitzi's latest patch
-=-
89 (28%)
AC for Mac
-=-
3 (0%)
AC for Linux
-=-
6 (1%)
Gog version for Mac
-=-
10 (3%)
No patch
-=-
16 (5%)
Total Members Voted: 314
AC2 Wiki Logo
-click pic for wik-

* Random quote

I swear sometimes they're watching me.
~Bozon Pete, Shift Foremant, Metagenics Biomachinery Division (Ibid.)

* Select your theme

*
Templates: 5: index (default), PortaMx/Mainindex (default), PortaMx/Frames (default), Display (default), GenericControls (default).
Sub templates: 8: init, html_above, body_above, portamx_above, main, portamx_below, body_below, html_below.
Language files: 4: index+Modifications.english (default), TopicRating/.english (default), PortaMx/PortaMx.english (default), OharaYTEmbed.english (default).
Style sheets: 0: .
Files included: 45 - 1228KB. (show)
Queries used: 40.

[Show Queries]