Thread Tools
Old January 10, 2002, 16:31   #1
The Raptor
Settler
 
Local Time: 13:11
Local Date: October 31, 2010
Join Date: Jan 2002
Location: Lincoln, NE
Posts: 14
Creating Wonders
I'm trying to add a new wonder to the game, and have added the information to: CRA_wonder.txt and CRA_great Library.txt. Now, as the game loads, I get "CRA_wonder.txt:602: Expected string ID" and "CRA_wonder.txt:602: Warning: required field ProductionCost missing." I C&P the Olymipic's entry (cuz they do similar things), and everything that's different between the two was changed, not deleted.

The Raptor is offline  
Old January 11, 2002, 11:40   #2
hexagonian
The Courts of Candle'Bre
Emperor
 
hexagonian's Avatar
 
Local Time: 14:11
Local Date: October 31, 2010
Join Date: Jun 1999
Location: Smemperor
Posts: 3,405
I need to update the Modder's Guide, so I will be updating the info in the near future, as time permits.

Here is the step-by-step process for adding a Wonder.

1. To add new Wonders, or to simply modify existing ones, go to

ctp2_data/default/gamedata/CRA_wonder.txt.

or similar named file, based on the Mod you are using. Please note that the CRA_ prefix is for all Cradle files. The default gamefiles do not have those prefixes, so if you are changing the default gamefiles, look for the files without the prefix

That file is a list of all the wonders and their characteristics. You can copy any one of them, paste it back in as a template, and modify it to your heart's content. Below is an entry that I had made for Cradle.

################################################## ##########

WONDER_MECCA {
DefaultIcon ICON_WONDER_MECCA
Description DESCRIPTION_WONDER_GUTTENBERGS_BIBLE
Movie MOVIE_WONDER_MECCA
EnableAdvance ADVANCE_ISLAM

ObsoleteAdvance ADVANCE_MASS_MEDIA

ProductionCost 5500
IncKnowledgePercent 10
IncreaseScientists 2
}

Changes can be made to the following entries
DefaultIcon
Movie
EnableAdvance
ObsoleteAdvance
ProductionCost

Do not change the Description entry. It is a carryover from CTP1 and changing this line will cause file crashes. It does not have a bearing on your Wonder.

Scroll through the list of Wonders to see the flags that you can use for your Wonder?s effect, and use those flags in your entry. You can change the numbers, which will change the effect.

2. Next, go into the
ctp2_data/default/gamedata/CRA_uniticon.txt file
and create an entry for your Wonder. It will look like this

ICON_WONDER_MECCA { FirstFrame "UPWP113L.TGA" Movie "NULL" Gameplay "WONDER_MECCA_GAMEPLAY" Historical "WONDER_MECCA_HISTORICAL" Prereq "WONDER_MECCA_PREREQ" Vari "WONDER_MECCA_STATISTICS" Icon "UPWP113L.TGA" LargeIcon "NULL" SmallIcon "NULL" StatText "WONDER_MECCA_STATISTICS" }

This entry will also link up your Wonder with the graphic elements of the game, so you need to be concerned with the following text in this entry, which will look similar to this

UPWP113L.TGA

You can use an graphic from an existing Wonder, but if you want your own graphic, do the following

If you have access to Photoshop or a similar program, create a image file with the following parameters

160x120 pixels in size
RGB format
Targa

This file will be the icon that will appear in the Great Library and in the game when you pick that Wonder to build. Place that file into the
CtP/data/default/graphics/pictures folder.

Name the file to the format below

UPWPxxxL.TGA
(where xxx will be a number - your choice)

You can also use the existing Movie. For Mecca, I used the entry NULL since there wasn't any Movie that fit the theme of Mecca.

3. Go to the file
ctp2_data/default/gamedata/CRA_wondermovie.txt and make an entry

MOVIE_WONDER_MECCA "NULL"

4. Go to the
ctp2_data/english/gamedata/CRA_gl_str file
and add titles for each of the new Wonders. Entries will look like below

WONDER_MECCA "Mecca"

There is also an entry for all of the Wonders regarding placing the word ''The'' in front of all descriptive entries in the game. Make an entry in the corresponding list that will look like below.

WONDER_MECCA_ARTICLE ""

5. To make an entry in the Great Library go to the
ctp2_data/english/gamedata/CRA_Great_Library.txt file and cut and paste an existing entry with your own info

6. Finally, go into ctp2_data/default/aidata/CRA_WonderBuildLists.txt and add your new Wonder into the proper lists so the AI players will research them.

Please note that if you have to be exact in using the correct characters when typing in entries - a missed character will cause file crashes. I recommend cutting and pasting existing entries to use, and if the entry is in caps, then typing your entry in caps too.
__________________
Yes, let's be optimistic until we have reason to be otherwise...No, let's be pessimistic until we are forced to do otherwise...Maybe, let's be balanced until we are convinced to do otherwise. -- DrSpike, Skanky Burns, Shogun Gunner
...aisdhieort...dticcok...
hexagonian is offline  
Old January 14, 2002, 08:46   #3
The Big Mc
CTP2 Source Code Project
King
 
The Big Mc's Avatar
 
Local Time: 19:11
Local Date: October 31, 2010
Join Date: Oct 2001
Location: Of the universe / England
Posts: 2,061
hi hexagonian

I know you have the sprits of ctp some were but I was wondering was there any different wonder movies and if so were could I get them (sort of robing a bank to get some money to buy the game )
__________________
"Every time I learn something new it pushes some old stuff out of my brain" Homer Jay Simpson
The BIG MC making ctp2 a much unsafer place.
Visit the big mc’s website
The Big Mc is offline  
Old January 15, 2002, 14:43   #4
The Raptor
Settler
 
Local Time: 13:11
Local Date: October 31, 2010
Join Date: Jan 2002
Location: Lincoln, NE
Posts: 14
I followed your instructions, and the wonder appears, but the Great Library description still used the Olympics' description (which it's effects are similar to).

So then I changed the Description line, just you said not to, and it crashes. Where should I look to get the Great Library description right?
The Raptor is offline  
Old January 15, 2002, 15:26   #5
hexagonian
The Courts of Candle'Bre
Emperor
 
hexagonian's Avatar
 
Local Time: 14:11
Local Date: October 31, 2010
Join Date: Jun 1999
Location: Smemperor
Posts: 3,405
Could you cut and paste your Great Library entry?

I had the same problem in December with an attempt to add a couple of Wonders.

This much I know - everything worked except the Great Library entry. I ended up combining the entries for my Wonders into 1 entry in the Great Library, since they were variations of the same effect. (As a sidenote, this addition is not a part of the official 'Cradle' package as of yet).

Still, I did not have the problem with the addition of Wonders when I set up the file last March, so I am a little stumped as to why it occured this time.

I suggest the following, and please make a backup of the files you are changing before proceeding, so you will still be able to go back to where you are now.

There is a file within the english/gamedata folder that contains the all the obsolete and ctp1 carryover strings I think it also includes the DESCRIPTION_ strings. Offhand, I do not know what the name of that file is, (I think it is junk_str.txt) but if you open the files, you should be able to locate it.

Locate that file (junk_str.txt) open it and take a look at the entries in there. Look for the list of DESCRIPTION_ entries and make one for your new wonder.

Rename that file CRA_junk_str.txt.

Go into the CRA_Strings.txt file and look for the line of text

import "junk_str.txt"

and change it to

import "CRA_junk_str.txt"

There is also a CRAI_Strings.txt file - depending on what file you want to use for your setup, make the change in that file also.

Go to CRA_wonders.txt and alter the
DESCRIPTION_
line that will be in your Wonder, to the name you created in the CRA_junk_str.txt file.

Make the same change to the DESCRIPTION_ entry in the Great Library File.

Let me know if this works - I do not know if it will, but it is worth a shot.
__________________
Yes, let's be optimistic until we have reason to be otherwise...No, let's be pessimistic until we are forced to do otherwise...Maybe, let's be balanced until we are convinced to do otherwise. -- DrSpike, Skanky Burns, Shogun Gunner
...aisdhieort...dticcok...
hexagonian is offline  
Old January 15, 2002, 15:45   #6
The Raptor
Settler
 
Local Time: 13:11
Local Date: October 31, 2010
Join Date: Jan 2002
Location: Lincoln, NE
Posts: 14
[WONDER_DARBY_QUEEN_PREREQ]
Requires:
ATABASE_ADVANCES,ADVANCE_DEMOCRACY>Democracy

Costs:
{WonderDB(Wonder[0]).ProductionCost}
ATABASE_CONCEPTS,CONCEPT_PRODUCTION>Production
[END]

[WONDER_DARBY_QUEEN_STATISTICS]
Gives:
+20% health for all units.

Obsolete:
ATABASE_ADVANCES,ADVANCE_CHAOS_THEORY>Chaos Theory
[END]

[WONDER_DARBY_QUEEN_GAMEPLAY]
The Darby Queen is the obstacle course at the end of the Ranger Indoctrination Program.
[END]

[WONDER_DARBY_QUEEN_HISTORICAL]
[END]

Last edited by The Raptor; January 15, 2002 at 15:57.
The Raptor is offline  
Old January 15, 2002, 16:00   #7
The Raptor
Settler
 
Local Time: 13:11
Local Date: October 31, 2010
Join Date: Jan 2002
Location: Lincoln, NE
Posts: 14
I'm not sure what you mean with "Make the same change to the DESCRIPTION_ entry in the Great Library File. " My entry in the Great Library file is above.

*Note: The symbols "" on several lines doesn't show in the above entry, but they are there in the .txt file.*
The Raptor is offline  
Old January 15, 2002, 16:40   #8
hexagonian
The Courts of Candle'Bre
Emperor
 
hexagonian's Avatar
 
Local Time: 14:11
Local Date: October 31, 2010
Join Date: Jun 1999
Location: Smemperor
Posts: 3,405
Your entry looks correct.

I didn't have the Great Library setup in front of me - I was guessing that possibly, there was a DESCRIPTION_ entry in that file for each Wonder.

When I set up the new Wonder in Cradle, it had been hooking into the same info as the Wonder that was in the DESCRIPTION_ line in the Wonder.txt file, and that was the only carryover for my new entry.

What you may want to try first is using another existing DESCRIPTION_ in the Wonder.txt file for your Wonder to see if the Great Library entry hooks into that other entry.

If so, then my solution is on the right track and give it a try.

If not, you can use an existing Great Library entry that will cover both your new Wonder and a related Wonder. I had created a series of smaller Emancipation Act Wonders, and the Great Library entry for Emancipation Act had a description for all those Wonders.

Not an elegant solution, but at least workable.
__________________
Yes, let's be optimistic until we have reason to be otherwise...No, let's be pessimistic until we are forced to do otherwise...Maybe, let's be balanced until we are convinced to do otherwise. -- DrSpike, Skanky Burns, Shogun Gunner
...aisdhieort...dticcok...
hexagonian is offline  
Old January 15, 2002, 17:43   #9
The Raptor
Settler
 
Local Time: 13:11
Local Date: October 31, 2010
Join Date: Jan 2002
Location: Lincoln, NE
Posts: 14
OK, long post upcoming:

I still get the description for Olympics (including the upper section: prerequisite, cost, etc) in the Great Library. So here's what I have done, following your steps (as I understand them):

CRA_Wonder.txt
WONDER_DARBY_QUEEN {
DefaultIcon ICON_WONDER_OLYMPICS
Description DESCRIPTION_WONDER_ARISTOTLES_LYCEUM
Movie MOVIE_WONDER_OLYMPICS
EnableAdvance ADVANCE_DEMOCRACY

ObsoleteAdvance ADVANCE_CHAOS_THEORY

ProductionCost 15000
IncreaseHp 2
}


((Note: I just changed the description line to Aristotles Lyceum on this last try.))

CRA_uniticon.txt:
ICON_WONDER_DARBY_QUEEN { FirstFrame "UPWP101L.TGA" Movie "NULL" Gameplay "WONDER_DARBY_QUEEN_GAMEPLAY" Historical "WONDER_DARBY_QUEEN_HISTORICAL" Prereq "WONDER_DARBY_QUEEN_PREREQ" Vari "WONDER_DARBY_QUEEN_STATISTICS" Icon "UPWP101L.TGA" LargeIcon "NULL" SmallIcon "NULL" StatText "WONDER_DARBY_QUEEN_STATISTICS" }

And the Great Library file is displayed above.
The Raptor is offline  
Old January 15, 2002, 17:59   #10
The Raptor
Settler
 
Local Time: 13:11
Local Date: October 31, 2010
Join Date: Jan 2002
Location: Lincoln, NE
Posts: 14
I changed CRA-Wonder.txt to read:

WONDER_DARBY_QUEEN {
DefaultIcon ICON_WONDER_DARBY_QUEEN
Description DESCRIPTION_WONDER_ARISTOTLES_LYCEUM
Movie MOVIE_WONDER_DARBY_QUEEN
EnableAdvance ADVANCE_DEMOCRACY

ObsoleteAdvance ADVANCE_CHAOS_THEORY

ProductionCost 15000
IncreaseHp 2
}

When Description reads "...DARBY_QUEEN," she crashes to the desktop. When it reads anything else, it works except no icon (but I'm working on that).

ie, Everything works OK now. I just forgot to finish updating the CRA_uniticon.txt file. It still called for the Olympics specs. Thanx for your help.

Last edited by The Raptor; January 15, 2002 at 18:24.
The Raptor is offline  
Old January 16, 2002, 03:21   #11
Martin Gühmann
staff
Call to Power II Democracy GameCall to Power Democracy GameCTP2 Source Code Project
Super Moderator
 
Martin Gühmann's Avatar
 
Local Time: 21:11
Local Date: October 31, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
Quote:
Originally posted by The Raptor
PHP Code:
[WONDER_DARBY_QUEEN_PREREQ]
Requires:
 <
L:DATABASE_ADVANCES,ADVANCE_DEMOCRACY>Democracy<e>

Costs:
{
WonderDB(Wonder[0]).ProductionCost}  
 <
L:DATABASE_CONCEPTS,CONCEPT_PRODUCTION>Production<e>
[
END]

[
WONDER_DARBY_QUEEN_STATISTICS]
Gives:
+
20health for all units.

Obsolete:
 <
L:DATABASE_ADVANCES,ADVANCE_CHAOS_THEORY>Chaos Theory<e>
[
END]

[
WONDER_DARBY_QUEEN_GAMEPLAY]
The Darby Queen is the obstacle course at the end of the Ranger Indoctrination Program.
[
END]

[
WONDER_DARBY_QUEEN_HISTORICAL]
[
END
You could use the [ PHP ] code tags [ /PHP ] . Use this these small php-tags that I posted here of course without the spaces.

-Martin
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
Old January 16, 2002, 05:40   #12
Locutus
Apolytoners Hall of FameCiv4 SP Democracy GameCiv4 InterSite DG: Apolyton TeamBtS Tri-LeagueC4BtSDG TemplarsC4WDG Team ApolytonCivilization IV CreatorsCTP2 Source Code ProjectPolyCast Team
Deity
 
Locutus's Avatar
 
Local Time: 21:11
Local Date: October 31, 2010
Join Date: Nov 1999
Location: De Hel van Enschede
Posts: 11,702
Quote:
Originally posted by The Raptor
OK, long post upcoming:
You call that a long post? You've never seen me posting any of my long posts, have you?
__________________
Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery
Locutus is offline  
Old January 16, 2002, 10:45   #13
hexagonian
The Courts of Candle'Bre
Emperor
 
hexagonian's Avatar
 
Local Time: 14:11
Local Date: October 31, 2010
Join Date: Jun 1999
Location: Smemperor
Posts: 3,405
So using the ARISTOTLES_LYCEUM for the DESCRIPTION_ entry still ties you into the OLYMPICS Great Library entry?

Boy, I'm stumped on this one - this does not make any sense as to why this is happening.
__________________
Yes, let's be optimistic until we have reason to be otherwise...No, let's be pessimistic until we are forced to do otherwise...Maybe, let's be balanced until we are convinced to do otherwise. -- DrSpike, Skanky Burns, Shogun Gunner
...aisdhieort...dticcok...

Last edited by hexagonian; January 16, 2002 at 10:51.
hexagonian is offline  
Old January 17, 2002, 01:51   #14
The Raptor
Settler
 
Local Time: 13:11
Local Date: October 31, 2010
Join Date: Jan 2002
Location: Lincoln, NE
Posts: 14
Quote:
Originally posted by hexagonian
So using the ARISTOTLES_LYCEUM for the DESCRIPTION_ entry still ties you into the OLYMPICS Great Library entry?

Boy, I'm stumped on this one - this does not make any sense as to why this is happening.
No, I had forgotten to update teh CRA_uniticon.txt to pull the new description. It was C&P from Olympics.

Everything is OK now. It works. Thanx.
The Raptor is offline  
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 15:11.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Apolyton Civilization Site | Copyright © The Apolyton Team