Jump to content


Photo

X-com Tftd Editing Question.


  • Please log in to reply
6 replies to this topic

#1 Wanderer

Wanderer

    Squaddie

  • Forum Members
  • PipPip
  • 4 posts

Posted 26 May 2007 - 08:50 AM

Hello, my apologies if this is in the wrong forum.

I wanted to ask how one edits the USO entries, as I've seen it done before and would like to modify those in my game to be somewhat more logical. Also to explain a few little things, like why they can't /swim/ for example. I've searched the forums, and havn't found anything on how its done, though chances are I missed it somewhere. Thanks in advance.

**Edit**

Ok I've figured out that I have to open the English.Dat with a word processer to make any edits. Now I'm wondering if I can clean up the file structure without screwing things up, and if copying the modified file over is enough to apply the changes.

Edited by Wanderer, 26 May 2007 - 10:36 AM.

*This space intentionally left blank*

#2 Zombie

Zombie

    Colonel

  • Xenocide Creative-Text Departmen
  • 2,947 posts

Posted 03 June 2007 - 10:46 PM

As long as you didn't delete any of the USO article delimiters (typically this is a null value), you should be good to go. I would suggest opening English.dat with something other than a word processor as some special characters may not show. Notepad is ok, but I prefer MS-Edit as it shows everything. (To open English.dat in MS-Edit, go to Start --> All Programs --> Accessories --> Command Prompt. Type "edit" at the command prompt, then go to File --> Open and navigate to your game files). :)

- Zombie

Edited by Zombie, 03 June 2007 - 10:47 PM.

The Mr. Grognard of X-COM

Zombie: Empirical data's your only man, when formulating a research plan.
A soldier's death is never in vain if it makes the formula more plain.
A few dozen make a better case for refining that third decimal place.
They call me Zombie because I don't sleep, as I slowly struggle to climb this heap,
of corpses, data points, and trials, but from the top - I'll see for miles!


#3 Wanderer

Wanderer

    Squaddie

  • Forum Members
  • PipPip
  • 4 posts

Posted 04 June 2007 - 05:30 AM

I've come to that conclusion myself, having found out with a bit of testing the simple act of saving it in Notepad or Open Office was enough to render the file unreadable by the game. Figured some part of the characters were being corrupted, but I wasn't sure which or if it was even fixable. This was even when saving in its native format, or the attempt to do so at least. However I didn't know about the MS-Edit trick, so armed with that I'll have to give it another go tonight given it should solve that problem. Thanks for the bit of advice, I know you guys are busy and I do appreciate it. :)

Edited by Wanderer, 04 June 2007 - 05:36 AM.

*This space intentionally left blank*

#4 NKF

NKF

    Commander

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

Posted 04 June 2007 - 06:46 AM

If you want to keep the null terminated strings intact in MS-Edit, you'll need to edit the thing in binary mode.

Open it up and set the width to edit at. I generally go 100, but set it to your liking.

While you're editing, you can make each line go well beyond the end of the of the 100 characters. That's fine, just note where the end of the line actually is (hit end). Everything past the last character will be spaces (or in decimal 32's) and thus ignored by MS-Edit when you save. If you close and re-open the file, everything will line up properly again.

Coincidentally, you can tell the difference between a space and where each string ends by their ascii value. They look the same, but they possess completely different values. Check the lower right hand corner near the row and column listings. The ascii value of whatever your cursor is on will be listed there. If you see a space that gives a value of 32, that's a normal space. If it's a 0, then that's the end of the string. Keep all your edits well between the 0's, and you'll do fine.

If you accidentally overwrite a 0, MS-Edit has a very curious method of typing a 0 in. Ctrl+P+2. No, don't ask.

But as always, make a backup for recovery if things go pear shaped.

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

Number of members: 1

#5 mrnikosia

mrnikosia

    Squaddie

  • Forum Members
  • PipPip
  • 8 posts

Posted 05 June 2007 - 01:15 PM

OR use a hex editor, that way you have control over each single byte, there are some hex editors
which auto translate bytes to (signed) integers, 16,32 bit

Freeware hex editor XVI32:
http://www.chmaas.ha...xvi32/xvi32.htm

#6 NKF

NKF

    Commander

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

Posted 06 June 2007 - 03:44 AM

That's what MS-Edit allows you to do too (sans the byte, word, dword conversion), albeit in a very unconventional manner. :)

However with editing null terminated strings, it's easier to be able to insert as much text as you need than to be restricted to changing only what's there. More advanced hex editors than the ones I've used probably allow this.

Oh well, shop around. There are many ways to skin a cat.

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

Number of members: 1

#7 Wanderer

Wanderer

    Squaddie

  • Forum Members
  • PipPip
  • 4 posts

Posted 06 June 2007 - 08:55 AM

MS-Edit seems to be working out just fine so far, might have to the results once I'm done for 'constructive review'. :D
*This space intentionally left blank*