Apolyton Archive  |  Preserved copy of the Apolyton Civilization Site and its forums as they stood in September 2005. Read-only; nothing here can be posted to or replied to.  |  Forum index |  About this archive |  The 1998–2001 UBB forums
Today on Apolyton WARDELL INTERVIEW PROMO A.C.S. HISTORY CHAPTER 4 GET CIV4 /w FREE PLUS! A.C.S. PHOTO GALLERY GET A.O.M. V1.1
Apolyton Civilization Forums
main| civ2| civ3| civ4| smac| ctp2| ron| moo3| galciv| galciv2| alt| about|
ApolytonPLUS | register | search | faq | new posts | pm (-/-) | upload | members
hall of fame new! | civgroups | civgroups news | interviews | the column | radio | chat | directory | news | store | PLUS
Apolyton Civilization Forums : Powered by vBulletin version 2.0.3 Apolyton Civilization Forums > Civilization III > Civ3-Files > UTILITY: Civilopedia Patcher
Show a Printable Version | Email This Page to Someone! | Receive updates to this thread | Report this to Apolyton news!
16.Sep: 7 NEW FILES
15.Sep: TRIAL + NO SLEEP = ONE GAME
13.Sep: PATCH THE PREVIOUSLY UNPATCHABLE

bottom of page
   - CIV3 CONQUESTS $29.99 - CIV3 from $9.99
Author
Thread    < Last Thread     Next Thread > Post New Thread     Post A Reply
wervdon is offline wervdon
Prince

Nov 2001
time: 23:21
  Old Post 20-07-2002 14:08
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
How to add or change a leaderhead without removing the old Support Apolyton, buy GURPS/ Alpha Centauri

Even though this is almost common sense, I didn't know to do it this way until it occurred to me tonight and I had to go back and redo all my leader mods because of it.

There is an easy way to change or add leaderheads without interfering with the original game or any other mod.

1) When you change a leaderhead of an existing civ or add a new civ, give it a UNIQUE civolopedia entry. For example, if you change Joan to Napolean in your mod. Change the french civ's civilopedia entry from RACE_FRENCH to RACE_YOURMODNAME_FRENCH.

2) When you add your flic file for the leaderhead animation, give it a path name like this: Scenarios\YourModName\Leader.flc rather than one like this: Art\Flics\Leader.flc

3) Open up civilopedia.txt and add a new entry for #RACE_YOURMODNAME_FRENCH or whatever race you modified or added.

4) Open up pediaicons.txt and add the entries needed for your civ. For example the first entries would be:
#RACE_YOURMODNAME_FRENCH
Scenarios\YourModName\Napolean.pcx
Scenarios\YourModName\Napolean_all.pcx

5) Create a folder in scenarios named "Yourmodname" matching the path you had been using and put all your new pcx/flic files in that.


Now when people play your scenario they use the leaders you added, when they play other scenarios or the normal game they use whats in art\whatever.


The only difficult part is that the two txt files have to be modified, but hopefully we can come up with some utility (or gramphos can add it to his) that can easily patch those without the end user needing to hand add the entries for your leaders.

wervdon is offline wervdon
Prince

Nov 2001
time: 23:21
  Old Post 20-07-2002 15:31
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Avatar Enlargement: We've got the solution

Since Gramphos said he doesn't have time right now to modify his multitool to patch pediaicons.txt and civilopedia.txt. I went ahead and created a quick C program to do it for pediaicons.txt and civilopedia.txt/


The readme file I included is below:
To Use:

1) Create a text file containing your new pediaicons.txt entries exactly as they should
appear in pediaicons.txt (for example test.txt)
2) Create a similar text file containing your new fields for civilopedia.txt as they
should appear in civilopedia.txt (for example test2.txt)
2) Run the program with the name of those files as its argument.
ie) patcher test.txt test2.txt

3) Ideally for your end users you would create a batch file to do this:
install_my_mod.bat
patcher my_mod_icons.txt my_mod_pedia.txt


It will append any entries which were missing from pediaicons.txt to the bottom of
pediaicons.txt. Any entry which is not missing is compared against a list of original key names (in the executable itself) to see if it was a key value that was part of the original text files, if so it is skipped and reported. Otherwise, it replaces the old entry.

It will append any entries missing from civilopedia.txt at the end before the #EOF
in a similar manner. Those not missing are skipped and reported.

The included test.txt and test2.txt just an examples to show how to setup a pediaicons.txt and civilopedia.txt patch files.

The program also backs up the users current civilopedia.txt and pediaicons.txt to
civilopedia.bak and pediaicons.bak in the folder it is run from.

It looks for civilopedia.txt and pediaicons.txt in the following locations in this order:
In the current folder
Full path for default install: (C:\Program Files\Infogrames Interactive\Civilization III\Text\
With the assumption its run from the scenarios folder: ..\text\


Version 3 added:
Adds the protection for original keys in the files that came with the last patch (1.29)
Allows replacing of non-protected entries rather than just skipping them. (thus a scenario author can patch his scenario)
Added an unpatcher.exe which de-applies a patch applied by patcher.

Attachment: patcher.zip
This has been downloaded 859 time(s).

Last edited by wervdon on 21-07-2002 at 09:28

wervdon is offline wervdon
Prince

Nov 2001
time: 23:21
  Old Post 20-07-2002 15:38
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Support Apolyton, buy Civilization: The Boardgame

Oh and this goes without saying, but I highly reccomend you backup your original pediaicons.txt before using it. It should be 100% non-destructive as it only opens the file for reading and appending, but just in case it never hurts

Ill try to have it make automatic backups when/if I update it again.

EDIT: The 2nd version I uploaded makes backups to the folder it is run from:

pediaicons.bak and civilopedia.bak, it overwrites those the next time it runs.

Last edited by wervdon on 20-07-2002 at 17:27

wervdon is offline wervdon
Prince

Nov 2001
time: 23:21
  Old Post 20-07-2002 15:48
Edit/Delete Message Reply w/Quote
#4 Report this post to a moderator
Support Apolyton

Last Comment: Chances are this same principle can be applied to anything which can have its civilopedia entry set in the editor and has its art files in the pediaicons.txt file, but I wouldn't swear to it without testing it

wervdon is offline wervdon
Prince

Nov 2001
time: 23:21
  Old Post 20-07-2002 17:31
Edit/Delete Message Reply w/Quote
#5 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations: Deluxe Edition

Sample text files:
test.txt
#RACE_TEST_FRENCH
scenarios\Wervdon\Napolean.pcx
scenarios\Wervdon\Napolean_all.pcx
#RACE_TEST_SPANISH
scenarios\Wervdon\Isabella.pcx

test2.txt
#RACE_TEST_FRENCH
We are the french!

patcher test.txt test2.txt

Would add those entries in test.txt to pediaicons.txt, and the entry for #RACE_TEST_FRENCH to civilopedia.txt without overwriting any old entries. If the entries for those keys already existed, they would be replaced by the new entries.

Entries which were present in the original txt files that came with the game are protected and are still skipped.

Last edited by wervdon on 21-07-2002 at 09:29

GhengisFarb is offline GhengisFarb
Deity
I want my HAMBURGERS!!
May 2002
time: 23:21
  Old Post 20-07-2002 18:36 Visit GhengisFarb's homepage!
Edit/Delete Message Reply w/Quote
#6 Report this post to a moderator
Help yourself to an AD-FREE life

I'm gonna try this out. And if it works you're a genious.
I thought about doing something like this but couldn't find the txt file where it was at.

It's not a perfect fix, but at least we've gotten the file changes down to 2 files instead of every leader .flc and .pcx.

wervdon is offline wervdon
Prince

Nov 2001
time: 23:21
  Old Post 20-07-2002 18:44
Edit/Delete Message Reply w/Quote
#7 Report this post to a moderator
Support Apolyton, buy Civilization 2

It definately works for just adding civs and leaders I tested that much. I have no idea what would happen if you tried to use it for unit graphics, but I strongly suspect it would work since the principle should be the same.

And yeah, its not perfect cause there's still alot of setup for the mod/scenario maker to do, but at least it reduces the set of instructions of end users to:
unzip mod/scenario
Run batch file
Load civ3, pick the scenario and play


The patcher still needs one more update though, but its too big of one for me to do today. Ideally, it shouldn't skip over fields it finds already in the text files since that doesnt allow mod makers to easily distribute fixes to their scenarios. But to do that Ill need code to do more than append entries to the end of those files since the original entries need to be deleted too. And if I allow replacing old entries, Ill also want to build in write-protection for any of the keys that were in the original files so mod-makers can't muk up someone's game without really trying. (ie it wouldn't let you write to #RACE_FRENCH cause it was in the original .txt files) I guess there'll be a version 3 of it sometime this week to address those issues, we don't need it yet though since no one has used it to distribute any scenarios with errors in the text files yet to need to correct Once I do that, Ill probally also supply an "unpatcher" to remove a scenario/mods entries since the only changes that'd be needed at that point is to skip the writing out of the changes function calls.
EDIT: That update is above now, I don't perceive needing anymore updates to this unless its for a bug that I missed.

Last edited by wervdon on 21-07-2002 at 09:29

Gramphos is offline Gramphos
ACS Civ III Files Manager, Prince of Development
Chalmers, Sweden
Apr 2001
time: 06:21
  Old Post 20-07-2002 22:08
Edit/Delete Message Reply w/Quote
#8 Report this post to a moderator
Support Apolyton or Terrorists Win

Now what?

Shall I move this to files?

wervdon is offline wervdon
Prince

Nov 2001
time: 23:21
  Old Post 21-07-2002 07:55
Edit/Delete Message Reply w/Quote
#9 Report this post to a moderator
Increase the size of your Attachments

You tell me, your the mod

Seriously though, go ahead if you think it belongs there

Trip is offline Trip
Firaxis Games
Hunt Valley
Apr 2002
time: 00:21
  Old Post 21-07-2002 09:01 Visit Trip's homepage!
Edit/Delete Message Reply w/Quote
#10 Report this post to a moderator
Avatar Enlargement: We've got the solution

What do you have to change so that the .FLC files are found in the correct location? I manually changed the PediaIcons.text and Civilopedia.text files, and I have yet to test it. I was just wondering how the .FLC leaderhead files are found.

wervdon is offline wervdon
Prince

Nov 2001
time: 23:21
  Old Post 21-07-2002 09:24
Edit/Delete Message Reply w/Quote
#11 Report this post to a moderator
Support Apolyton, buy Civilization III: Complete

You set those in the editor under the civilizations tab. As far as I know its the only art that is set in the editor directly.

Gramphos is offline Gramphos
ACS Civ III Files Manager, Prince of Development
Chalmers, Sweden
Apr 2001
time: 06:21
  Old Post 21-07-2002 13:30
Edit/Delete Message Reply w/Quote
#12 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations

quote:
Originally posted by wervdon
You tell me, your the mod

Seriously though, go ahead if you think it belongs there

I'm not sure...

It belengs both here and there. And they belong together. But as there are so many topped threads here I'll probably move it.

Trip is offline Trip
Firaxis Games
Hunt Valley
Apr 2002
time: 00:21
  Old Post 21-07-2002 20:16 Visit Trip's homepage!
Edit/Delete Message Reply w/Quote
#13 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations: Deluxe Edition

quote:
Originally posted by wervdon
You set those in the editor under the civilizations tab. As far as I know its the only art that is set in the editor directly.

*Smacks forhead*

I was so busy with all that text and .INI file editing I completely forgot about that!

wervdon is offline wervdon
Prince

Nov 2001
time: 23:21
  Old Post 25-07-2002 20:41
Edit/Delete Message Reply w/Quote
#14 Report this post to a moderator
Increase the size of your Attachments

Hmm, I guess with the mod manager in ptw, this will become useless this fall, but oh well Im glad they are doing it, since this couldn't handle units or such.

For those not sure what im talking about in ptw, each scenario gets its own /art directory in the scenario folder which over-rides the default game art folder for stuff present, at least thats how I read the excerpt from the chat log


I guess this will still be useful to people who don't upgrade to ptw too assuming they don't patch that into base civ3

  < Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:21.
Apolyton Time is 00:21.
    top of page
Rate This Thread:
Forum Jump:
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
 




Contact Us - Apolyton Civilization Site - Support Us!

Building a better Apolyton through better information. Click here and take our poll!
Non-US visitors, click here!

Powered by: vBulletin Version 2.0.3
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Page generated in 0.0421 seconds (90.89% PHP - 9.11% MySQL) with 30 queries
Page Loading Time:

Support Apolyton: Amazon USA | Amazon UK | Amazon DE | Amazon FR |
Support Apolyton and get FREE PLUS, Buy from Chips&Bits: Galactic Civilizations | Galactic Civilizations: Deluxe Edition | Call to Power 2 | Civilization: The Boardgame | GURPS/ Alpha Centauri | Alpha Centauri | Civilization IV | Civilization III: Complete |


Front Page | Civilization IV | Civilization III | Civilization II | Call to Power II | Alpha Centauri | Master of Orion III
Rise of Nations | Galactic Civilizations | Galactic Civilizations II | Misc
Alt.Civs | Civ I | C:CtP I | About | News | Directory | Apolyton Store | Forums | Chat | Columns | Interviews | Newsletter
Scenario League | CSC | Clash of Civs | Spanish Site | CtP Maps | Cradle of Civ | WesW's Ctp1/2 Site | Civ3 Haven

apolyton.net | apolyton.com | civilization2.net | civilization3.net | civilization4.net | civilizationiv.info | calltopower.net | galciv.net | galciv2.net | moo3.net