Thread Tools
Old May 2, 2001, 17:11   #1
Cube
Warlord
 
Cube's Avatar
 
Local Time: 02:59
Local Date: October 31, 2010
Join Date: Nov 2000
Location: El Paso, Tx
Posts: 120
Problem Adding Improvements
REcently I tried to add The Library and the city clock from CTP using Martin G's TGAs, and I got a error at the beginning of the game. I added to the buildings, the unit Icon and the history, but it didn't want to work.
Cube is offline  
Old May 4, 2001, 00:15   #2
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: 11:59
Local Date: October 31, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
Cube it would be helpful if you give here the code of you extra buildings and the exact error message. I have to guess that the error lies in the uniticon.txt. Now here is an example of a building from the uniticon.txt: The incubation center. By the way you can add a lot of stuff to the uniticon.txt and the Great_Library.txt without any effect. To make CTP2 recordnize the stuff you need according entries in the advance.txt, wonder.txt et cetera. Here is it the building.txt.

buildings.txt:

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

IMPROVE_INCUBATION_CENTER {
DefaultIcon ICON_IMPROVE_INCUBATION_CENTER
Description DESCRIPTION_IMPROVE_INCUBATION_CENTER
EnableAdvance ADVANCE_HUMAN_CLONING

PrerequisiteBuilding IMPROVE_DRUG_STORE
PrerequisiteBuilding IMPROVE_HOSPITAL

ProductionCost 5500
Upkeep 15
RaiseOvercrowdingLevel 12
}

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

ICON_IMPROVE_INCUBATION_CENTER links to the uniticon.txt:

ICON_IMPROVE_INCUBATION_CENTER { FirstFrame "UPIP033L.TGA" Movie "NULL" Gameplay "IMPROVE_INCUBATION_CENTER_GAMEPLAY" Historical "IMPROVE_INCUBATION_CENTER_HISTORICAL" Prereq "IMPROVE_INCUBATION_CENTER_PREREQ" Vari "IMPROVE_INCUBATION_CENTER_STATISTICS" Icon "UPIP033L.TGA" LargeIcon "NULL" SmallIcon "NULL" StatText "IMPROVE_INCUBATION_CENTER_STATISTICS" }

For the images you have to define FirstFrame for the Great Library and Icon for the city build screen. Gameplay, Historical, Prereq and Vari are text entries used in the Great Library. StatText is text entry used in the city build screen. IMPROVE_INCUBATION_CENTER_GAMEPLAY, IMPROVE_INCUBATION_CENTER_HISTORICAL, IMPROVE_INCUBATION_CENTER_PREREQ, IMPROVE_INCUBATION_CENTER_STATISTICS can be found in the Great_Library.txt.

I hope tese pieces of information will help.

-Martin



[This message has been edited by Martin Gühmann (edited May 03, 2001).]
Martin Gühmann is offline  
Old May 4, 2001, 21:58   #3
Cube
Warlord
 
Cube's Avatar
 
Local Time: 02:59
Local Date: October 31, 2010
Join Date: Nov 2000
Location: El Paso, Tx
Posts: 120
This is what i added to Buildings.txt
IMPROVE_CITY_CLOCK {
DefaultIcon ICON_IMPROVE_CITY_CLOCK
Description DESCRIPTION_IMPROVE_CITY_CLOCK
EnableAdvance ADVANCE_AGE_OF_REASON
ProductionCost 800
Upkeep 8
ProductionPercent 0.05
CommercePercent 0.05
}

IMPROVE_LIBRARY {
DefaultIcon ICON_IMPROVE_LIBRARY
Description DESCRIPTION_IMPROVE_LIBRARY
EnableAdvance ADVANCE_WRITING
ProductionCost 300
Upkeep 3
SciencePercent 0.05
}
And this what I added to Uniticon.txt
ICON_IMPROVE_LIBRARY { FirstFrame "CM012F.TGA" Movie "NULL" Gameplay "IMPROVE_LIBRARY_GAMEPLAY" Historical "IMPROVE_LIBRARY_HISTORICAL"Prereq "IMPROVE_LIBRARY_PREREQ" Vari "IMPROVE_LIBRARY_STATISTICS" Icon "CM012F.TGA" LargeIcon "NULL" SmallIcon "NULL" StatText "IMPROVE_LIBRARY_STATISTICS" }

ICON_IMPROVE_CITY_CLOCK { FirstFrame "CM022F.TGA" Movie"NULL" Gameplay "IMPROVE_CITY_CLOCK_GAMEPLAY" Historical "IMPROVE_CITY_CLOCK_HISTORICAL" Prereq "IMPROVE_CITY_CLOCK_PREREQ" Vari "IMPROVE_CITY_CLOCK_STATISTICS" Icon"CM022F.TGA" LargeIcon "NULL" SmallICon "NULL" StatText "IMPROVE_CITY_CLOCK_STATISTICS" }
It says expected string Id and required field productioncost missing and upkeep missing
Cube is offline  
Old May 4, 2001, 22:15   #4
Chris B
Warlord
 
Chris B's Avatar
 
Local Time: 04:59
Local Date: October 31, 2010
Join Date: Oct 2000
Location: Canton, CT
Posts: 187
The code itself seems fine.
ADVICE>>>
I humbly admit I've never had any luck wahtsoever adding anything to the game by simply hacking into the text files. Instead, I use a freeware program called Editplus, which makes modification much easier and has made it work for me (finally). I think you can get it through Locutus's website.
If you use it already sometimes it helps to change something, change it back, then save the document again. This is especially prone to happen with numbers and values, which fits your case perfectly.

Hope this helps.
-CB
[This message has been edited by Chris B (edited May 04, 2001).]
Chris B is offline  
Old May 5, 2001, 07:23   #5
hexagonian
The Courts of Candle'Bre
Emperor
 
hexagonian's Avatar
 
Local Time: 04:59
Local Date: October 31, 2010
Join Date: Jun 1999
Location: Smemperor
Posts: 3,405
quote:

Originally posted by Cube on 05-04-2001 09:58 PM
This is what i added to Buildings.txt
IMPROVE_CITY_CLOCK {
DefaultIcon ICON_IMPROVE_CITY_CLOCK
Description DESCRIPTION_IMPROVE_CITY_CLOCK
EnableAdvance ADVANCE_AGE_OF_REASON
ProductionCost 800
Upkeep 8
ProductionPercent 0.05
CommercePercent 0.05
}

IMPROVE_LIBRARY {
DefaultIcon ICON_IMPROVE_LIBRARY
Description DESCRIPTION_IMPROVE_LIBRARY
EnableAdvance ADVANCE_WRITING
ProductionCost 300
Upkeep 3
SciencePercent 0.05
}




Change
Description DESCRIPTION_IMPROVE_CITY_CLOCK
Description DESCRIPTION_IMPROVE_LIBRARY

on your entries to

Description DESCRIPTION_IMPROVE_ARENA

and this will solve your problem

I think these description lines are carryovers from CTP1 - they are part of the CTP2 code but they need to be left alone. They do not affect gameplay.
hexagonian is offline  
Old May 5, 2001, 10:18   #6
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: 11:59
Local Date: October 31, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
I also tried to add a building to CTP2. Here is my code:

Code:
############################################################

IMPROVE_MIND_CONTROL_EMITTER {
   DefaultIcon ICON_IMPROVE_MIND_CONTROL_EMITTER
   Description DESCRIPTION_IMPROVE_MIND_CONTROL_EMITTER
   EnableAdvance ADVANCE_MIND_CONTROL

   ProductionCost 10000
   Upkeep 50
   NoUnhappyPeople
   PreventConversion 50
   PreventSlavery 100
}
	
############################################################
There were no problems with the Description entry.

Now here is the statement of the Apolyton Modification Section:

quote:



Description - This string is not used within the game but must reference a valid String ID from one of the string files.




The string file is called: junk_str.txt

Here is my addition to this file:

DESCRIPTION_IMPROVE_MIND_CONTROL_EMITTER "junkstring_DESCRIPTION_IMPROVE_IMPROVE_MIND_CONTRO L_EMITTER"

That's the reason why my add-building works. But Hexagonian is absoluty right, you can use any valid Description from junk_str.txt.

-Martin
Martin Gühmann is offline  
Old May 5, 2001, 20:18   #7
Cube
Warlord
 
Cube's Avatar
 
Local Time: 02:59
Local Date: October 31, 2010
Join Date: Nov 2000
Location: El Paso, Tx
Posts: 120
Thanks I'll try that. Does any one know If Theres such a thing as a default Improvement Icon, becuase I want to add a blacksmith building and I don't have an icon or know if there's one available for download.
Cube is offline  
Old May 6, 2001, 10:51   #8
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: 11:59
Local Date: October 31, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
Take a look into the uniticon.txt and you will find this:

ICON_IMPROVE_DEFAULT { FirstFrame "UPLG001.TGA" Movie "NULL" Gameplay "NULL" Historical "NULL" Prereq "NULL" Vari "NULL" Icon "UPIP001L.tga" LargeIcon "NULL" SmallIcon "NULL" StatText "NULL" }

I never took a look on these *.tga files but you can do it. Just replace one of the FirstFrame andIcon entries for one of the other buildings to UPIP001L.tga and than it is available, but do not ask me what you will see. It can be a blanc or something different or another building.

-Martin


Martin Gühmann 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 05:59.


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