Playing a civ game as the barbarians

cdscivnut

Chieftain
Joined
Jul 14, 2003
Messages
16
I want to know if anyone else besides me has played a game of civ as the barbarians. Yes, it is possible, I was messing around with something and all of the sudden I'm controlling a barbarian caravel. Has anyone else done this????
 
Yes, I played a game as barbarian sometime ago... It's easy: you only have to hex-edit the (If I recall it correctly) 47th byte of a savegame in order to do so ;)
 
Here's the way I did it: Start up a normal game(the only specific option you really should have is Barbarians- Raging Hordes). Once you get started, 1. Turn on Cheat Mode 2. Reveal whole map(you really don't have to, but this is nice) 3.Set Human player-none 4. Reveal map- Barbarians 5. Reveal map- Entire.
Keep going through the game until someone pops a barb. out of a hut or something. Its not that great but its kinda cool.
 
I experienced what i thought was the same problem. You have to click on the unit to see he damage he suffered. Remember, as the barbarians you have your ratings halved.
 
Im currently trying cdscivnuts way, and it works, only annoying thing is that i have to watch all ai moves.
 
SlowThinker, i was wrong. You have tou put the 39th, 40th and 41th bytes to 00, and the 47th byte to 80 in order to play as barbarian ;)
 
Originally posted by yaroslav
SlowThinker, i was wrong. You have tou put the 39th, 40th and 41th bytes to 00, and the 47th byte to 80 in order to play as barbarian ;)

how do i do that on mge? what file do i edit?
 
I tested this too, and I get the barbs. It doesn't work very well though, i.e. my units never win. I always lose against the AI, and they still have 100% HP left. The AI doesn't build any cities either, so I had to play a few turns before I edited it.

Here's a VB-program that edits bytes 39, 40, 41 and 47 in a sav-file if you want to try it without hexedit-program. You might need runtime-files for visual basic though.
 
As you've probably heard of, files are saved on the computer as ones and zeros, or on and off, called bits. I.e. a bit is one position in a memory that is either on or off. In most computers, these are grouped into bytes, which are 8 bits long.

The decimal system has a base of 10, which means we have 10 different digits (0-9), and after that we have a new level that is worth 10 (10 to the power of 1) instead of 1 (10^0). The third digit from the right is worth 100 (10^2), and the forth is worth 1000 (10^3). Well, the decimal system isn't that hard.

When working on computers however you only have 2 different digits, 1 and 0, which is why it is called binary (bi=2).Each new level is therefore worth twice as much as the previous one. First one is worth 1 (2^0) multiplied with the digit in that level ( i.e. 1 x 0, or 1x 1), the second is worth 2 (2^1), the third is worth 4 (2^2).
Examples:
1 = ...00000001
2 = ...00000010
3 = ...00000011
4 = ...00000100
8 = ...00001000
16318421 (Read each column from top downwards)
2426
8

Since a byte contains 8 bits, and each bit could be 1 of 2 values, you can store 256 (2^8) different combinations in a byte, or all numbers between 0 and 255.

There's also the hexadecimal (hex=6, deca=10 -> 16)system, where the base is 16. This means the next level doesn't come until you write 16. Instead of writing 10 - 15, the letters A-F are used instead. The reason why this is used is because 2 digits in the hexadecimal system represent one byte. I.e. 2^8 = 16^2 = 256.
Examples:
0=0x00 = ...00000000
1= 0x01 = ...00000001
3= 0x03 = ...00000011
15= 0x0F = ...00001111
256=0xFF = ...11111111

As you might see, the left digit in the hexadecimal number represents the 4 left bits in a byte, and the right digit in a hex number represents the four right bits in a byte. It's therefore pretty easy to convert between the numbers compared to converting between binary and decimal numbers.

Hexediting therefore is when you edit a file in "binary mode", but instead of editing each bit in a byte, you edit a two-digit hexadecimal number. To do this, you need to have a program that can show a file as hexadecimal numbers and that allow you to change the numbers. I usually use Visual C++ to do this, but I'm sure there are better smaller and free programs for this purpose on the net.

OT: When a program reads the information in a file some data though, is stored in more than 1 bytes though. E.g. two bytes can store totally 65536 different combinations, and three bytes more than 16 million combinations. In a hexediting program this is still viewed as three separate bytes. A byte, or many bytes, can also be signed, which means that the left digit is used to determine whether the number is negative or positive, but still, this can't be seen while hexediting the file, it's the file that interprets it differently.

Text on a computer is also saved as bytes, where each character represents a byte. The number a character is called that characters ASCII-code. E.g. the character 'A' has an ASCII-code that is 65 (0x41), and the character 'a' has an ASCII-code of 97 (0x61). The numbers '0'-'9' written as text has the ASCII codes from 48 to 57 (0x30-0x39). There are other standards for writing text as binary code, one is called Unicode, which IIRC uses two bytes for each character, and therefore allow more than 65000 different characters while ASCII only offers 256 different characters.


I hope it's fairly correct, but please tell if I've got something wrong.
 
First and foremost, I want to say that previous post from funxus is very good: clear, easy to read, and he uses the English better than I'm going to use it in all my life! If I'm allow to do that, I would add some details:

Originally posted by funxus
Hexediting therefore is when you edit a file in "binary mode", but instead of editing each bit in a byte, you edit a two-digit hexadecimal number. To do this, you need to have a program that can show a file as hexadecimal numbers and that allow you to change the numbers. I usually use Visual C++ to do this, but I'm sure there are better smaller and free programs for this purpose on the net.

I personally use 'Hex Workshop 3.1': it is not the best avaliable, but it's small, free and very good (only one annyoance: it doesn't "refresh" files updated outside Hex Editor well)


OT: When a program reads the information in a file some data though, is stored in more than 1 bytes though. E.g. two bytes can store totally 65536 different combinations, and three bytes more than 16 million combinations. In a hexediting program this is still viewed as three separate bytes. A byte, or many bytes, can also be signed, which means that the left digit is used to determine whether the number is negative or positive, but still, this can't be seen while hexediting the file, it's the file that interprets it differently.

It depends up to the hex-editor. Hex Workshop groups bytes automatically whenever you want :)


Text on a computer is also saved as bytes, where each character represents a byte. The number a character is called that characters ASCII-code. E.g. the character 'A' has an ASCII-code that is 65 (0x41), and the character 'a' has an ASCII-code of 97 (0x61). The numbers '0'-'9' written as text has the ASCII codes from 48 to 57 (0x30-0x39). There are other standards for writing text as binary code, one is called Unicode, which IIRC uses two bytes for each character, and therefore allow more than 65000 different characters while ASCII only offers 256 different characters.

The ASCII table varies from country to country. That's the first 128 characters are the same for all (western) countries, but from the 129 to the last they differ. There are 'Multi-Latin I', 'Multi-Latin II', 'Slavic',etc. ASCII tables :)

Windows uses ANSI table, that is very similar to the ASCII table (also 256 characters), but differs in the last 128. If I recall it correctly, Civ2 uses ANSI, not ASCII, at least in the Windows version (I know it because the Ñ doesn't get the ASCII value but the ansi)


I hope it's fairly correct, but please tell if I've got something wrong.

As said before, good post!
 
:) I use Norton Commander (a classic file manager).

I also downloaded this version of Hex Workshop:
Hex Workshop v3.11, the Professional Hex Editor
Copyright 1995-2000 BreakPoint Software, Inc.
32 bit version - hw32v31.exe
But it is not a freeware:
Hex Workshop can be ordered for $49.95. See the OrderNow.html,
online help, or http://www.hexworkshop.com/ordering for more
information.
:confused:
 
Indeed it isn't free (but there are ways :groucho:, if you know what I mean).

If you're looking for a freeware one simply type in "hex editor" in your favourite search engine (and that had better be Google). Or visit sites like download.com or tucows.com and you'll find plenty in no time... There's no harm in getting more than one, because some offer other features than others.
 
Top Bottom