Jump to content


Xcomutil + UFO Extender bugs, and other questions

3 replies to this topic

#1 siegfried_volsunga



  • Forum Members
  • Pip
  • 0 posts

Posted 11 April 2011 - 02:51 PM

I'm new to these forums, so hello to all.

I've got a few problems which I hope the knowledgeable folks here can help me with. I've played X-Com before, but I've not really ventured into modding the game. Anyhow... recently, I downloaded and installed X-Com (the Steam version). I replaced the original .exe with the one here to fix the Geoscape time bug, installed UFO Extender, then XComUtil over it and then the Combo Patch, Voices Patch and the MP3 soundtrack in that order.

Firstly, I'm not using the DOSBox version which Steam ships with. I'm running the game using RunXcom.bat, which loads up UFO Extender (I selected the option in the prompt).

I'm having problems: every time I exit the game, either by ending the process, closing the window or by clicking [Quit] from the main menu, it opens up either the geoscape or the tactical map, depending on which one I just closed. It cycles between the split .exe's repeatedly, until I manually close the RunXcom.bat command line window. Am I right in thinking that splitting the modified UFO Defense.exe caused this problem? Is there an easy way to fix this?

I'm happy to stop using XcomUtil, as long as someone can point me towards a good tutorial for editing the armour values of the initial HWPs manually (I like the Improved Tanks mod, everything else in XcomUtil that I use is already done by UFO Extender).

Thanks in advance,

EDIT: Also, is there a way to get cursor clip back after resizing / moving the window with UFO Extender? I play in windowed mode and if I multi-task, when I come back to the game the cursor won't clip properly any more and I'll have problems scrolling.

Edited by siegfried_volsunga, 11 April 2011 - 02:56 PM.

#2 Valken



  • Forum Members
  • PipPipPip
  • 34 posts

Posted 13 April 2011 - 11:10 AM

It has been a while since I last touched X-Com since I had upgraded my PC and am using Windows 7 64 bit which is not compatible with old X-Com setup (Xcomutil 9.6 it seems so need to upgrade it), which is essentially what you have but I also run it in a window since full screen on a HDTV looks like crap.

Try to make a new bat file and try my modified but was working on 32 bit Windows XP code here:

@echo off
set copycmd=/y
start /w xcomutil QueryInfo CheckSetup >nul
if errorlevel 1 goto abort
goto noabort
echo XCUSETUP has not been executed for this version of XCOMUTIL
goto finis
if not exist xcubef md xcubef
if not exist xcuaft  md xcuaft

if exist sound\sndstart.exe sound\sndstart
echo ======================================================================== >>xcomutil.log

if .%1.==.before. goto xcubef
if .%1.==.after.  goto xcuaft

if exist xcuhook0.bat call xcuhook0.bat

if not exist ufoexe\geoscape.exe goto noexe1
ufoexe\geoscape "0"
if errorlevel 2 goto nonewer
goto end

if not exist patch.dll goto noldr1
start /w ufoloader geoscape.exe "0"
goto chklvl1
start /w geoscape "0"

start /w sdump QuietMode missdat\mission2.dat newer missdat\saveinfo.dat
if errorlevel 1 goto end

if exist xcuhook1.bat call xcuhook1.bat

start /w xcomutrt missdat

if not exist chgufo1a.xcf goto endchg1a
copy maps\ufo1a.xcu   maps\ufo1a.map   >nul
copy routes\ufo1a.xcu routes\ufo1a.rmp >nul
copy terrain\ufo1.xcu terrain\ufo1.mcd >nul

if not exist chgufo02.xcf goto endchg02
copy maps\ufo01.xcu   maps\ufo02.map   >nul
copy routes\ufo01.xcu routes\ufo02.rmp >nul

start /w xcomutil missdat wrt >>xcomutil.log
if exist xcuhook2.bat call xcuhook2.bat
echo ------------------------------------------------------------------------ >>xcomutil.log

xcopy missdat xcubef >nul
goto notbef

if not exist xcubef\saveinfo.dat goto notbef

xcopy xcubef missdat >nul

if not exist ufoexe\geoscape.exe goto noexe2
ufo2exe\tactical "1"
goto chklvl2

if not exist patch.dll goto noldr2
start /w ufoloader tactical.exe "1"
goto chklvl2
start /w tactical "1"

if exist xcuhook3.bat call xcuhook3.bat

start /w xcomutrt missdat autocombat verbose >>xcomutil.log

start /w xcomutil missdat aft wrt verbose	>>xcomutil.log

if not exist chgufo1a.xcf goto enrst1a
copy  maps\noship.map	maps\ufo1a.map   >nul
copy  routes\noship.rmp  routes\ufo1a.rmp >nul
copy  terrain\blanks.mcd terrain\ufo1.mcd >nul
erase chgufo1a.xcf

if not exist chgufo02.xcf goto enrst02
copy  maps\ufo02.xcu   maps\ufo02.map   >nul
copy  routes\ufo02.xcu routes\ufo02.rmp >nul
erase chgufo02.xcf

if exist xcuhook4.bat call xcuhook4.bat

echo ------------------------------------------------------------------------ >>xcomutil.log

if not exist pauserun.xcf goto nopause
erase pauserun.xcf

xcopy missdat xcuaft >nul
goto notaft

if not exist xcuaft\saveinfo.dat goto notaft

xcopy xcuaft missdat >nul

if not exist ufoexe\geoscape.exe goto noexe3
ufoexe\geoscape "1"
if errorlevel 2 goto nonewer
goto end

if not exist patch.dll goto noldr3
start /w ufoloader geoscape.exe "1"
goto chklvl3
start /w geoscape "1"
goto begin

if exist sound\sndend.exe sound\sndend

I might need to setup Windows XP mode to see it can fix it. Let us know if it works or not as I'm itching to get my X-Com working again too.

Edited by Valken, 13 April 2011 - 11:14 AM.

#3 jaakes



  • Forum Members
  • PipPip
  • 5 posts

Posted 25 July 2011 - 05:55 AM

With regards to tanks, with the x-com .exe editor available here http://www.stonepool.com/xcom/ you can change a lot of things, like unit stats and weapon stats. However, tank or "terrorist" weapons don't appear on the items list (nor are they listed at the wiki page for items http://www.ufopaedia.org/index.php?title=OBDATA.DAT) so I don't know where those are stored and how you could change them.

So you can get better armor for your tanks but the plasma tank is still weaker than a heavy plasma for some reason (the tank cannon is a bit stronger than a heavy cannon and a tank laser is MUCH stronger than a heavy laser, you'd expect the plasma tank to outclass the soldier weapon as well).

I was able to run the editor in winxp compatibility mode on win 7.

#4 NKF



  • [Global Moderators]
  • PipPipPipPipPipPip
  • 4,798 posts

Posted 25 July 2011 - 06:56 AM

Like weapon prices tanks and built-in weapon turrets aren't stored in a separate file like those in obdata.dat. Instead they are hard coded into the executable. The exact offsets aren't chronicled on the wiki unfortunately (or at least not on a page that I could quickly direct you to).

About the only thing I can suggest is to manually track down the location of these stats by using a hex editor and search for series of values that closely correspond to the tank stats and the weapon stats you want to edit.


edit: ah, spoke too soon. The wiki page on geoscape.exe points out the that offsets for the tank and alien weapon stats for the windows version start at byte 447,868. or hex offset 0x6D57C

Edited by NKF, 25 July 2011 - 07:03 AM.

Lord High Generalissimo Ruler Supreme of Norm's Anti Pedant Society (NAPS).

Number of members: 1

Reply to this topic