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-Creation > Diplomacy.txt quick tutorial
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
Dan Magaha FIRAXIS is offline Dan Magaha FIRAXIS
Firaxis Games
The Metropolis known as Hunt Valley
Mar 2000
time: 00:17
Lightbulb  Old Post 29-01-2002 22:28 Visit Dan Magaha FIRAXIS's homepage!
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
Diplomacy.txt quick tutorial Put an end to popups!

This was requested at CivFanatics, posting it here as well for your reference:

Diplomacy.txt is what drives the text displayed in diplomacy dialogs. It's a plain text file, no formatting. Comments are denoted by semicolons.

The file is broken into sections which correspond to specific game conditions. Each section begins with a #LABEL which denotes the game condition we're describing. Generally the labels are self-explanatory, but if you come across one you're not sure about, let me know and I'll try to find out what it's for.

This label is followed by four control lines, each starting with a # sign, which tell the game how to parse the section. The order of these lines is important as well, because it determines how the strings are organized / sorted.

I'll explain each control line in order:

#civ (0 or 1) - if true (1), this means the strings are grouped by and correspond to each civ in the game. If this is true you should multiply the total number of strings you need to create by sixteen. The order corresponds to the position of the civ in the BIC file (see the editor to figure this out). If this is false (0), the value of the #random control line (see below) should be set to true (1).

#power (0 or 1) - if true (1), the strings are next grouped by relative civ power. There are three possible values (in order): more powerful, equal power, and less powerful. This will triple the number of required strings. If you are sorting by civ, this means you'll need three power-based strings per civ.

#mood (0 or 1) - if true (1), the strings are next grouped by the speaking civ's mood (attititude) towards the other civ. There are three possible values (in order): happy with, indifferent, and angry with. This will triple the number of required strings. If you are sorting by civ, this means you'll need three mood-based strings per civ. If you are also sorting by power, you'd need three mood strings per power string, and three power strings per civ.

#random (1 - ??) - perhaps this value is better thought of as "numchoices" because that's what it really determines: how many choices the computer can pick from, per civ, power, and/or mood.

A quick formula to determine how many choices you're going to use is like this:

total number of lines = (16 * #civ) * (3 if #power == true) * (3 if #mood == true) * #random

And as mentioned before, the order of those control lines is important, because they're hierarchical starting from the top, i.e.:



_
_ | random 1
| mood + | random 2
| |_ random 3
| _
_ | | random 1'
C | power >| mood ~ | random 2'
i | | |_ random 3'
v | | _
i | | | random 1"
l | |_ mood - | random 2"
i | |_ random 3"
z | _
a | _ | random 1
t | | mood + | random 2
i | | |_ random 3
o | | _
n | | | random 1'
| power =| mood ~ | random 2'
1 | | |_ random 3'
| | _
| | | random 1"
| |_mood - | random 2"
| |_ random 3"
|
|
|
|
| power < ...
|
|_

_
C |
i |
v |
|
2 |
. |
. |
. |_




Replacement Strings are variables denoted by a dollar sign
(e.g., $LEADER0) which can be used in your strings. Each block of text should have a commented out list of recognized strings that you can use. DO NOT TRY TO USE DIFFERENT REPLACEMENT STRINGS in other text blocks as they will not work and could crash the game.

So let's look at an example:

#USERGIFT
#civ 0
#power 0
#mood 1
#random 1
"Please accept this gift as a token of friendship and goodwill."
"I offer you this gift as a token of goodwill."
"Accept this gift as a token of goodwill."

#USERGIFT denotes that this is a new block, and we can surmise that it's called on when the user decides to give a gift to the AI.

#civ 0 tells us not to worry about sorting by civ.

#power 0 tells us not to worry about sorting by power.

#mood 1 tells us we are sorting by mood, which means we will have 3 choices times the number of random choices.

#random 1 tells us there is only one random choice per player mood.

So, we end up with three choices, one if the human player has good relations with the AI it's gifting to, the next if it's somewhat indifferent, and the last if it doesn't have such a good friendly relationship.

Hopefully this helps explain it, the best way to really see what I've explained is to pop open diplomacy.txt and give it a whirl.

Dan

Edit: fixed formula

Last edited by Dan Magaha FIRAXIS on 30-01-2002 at 05:33

Gramphos is offline Gramphos
ACS Civ III Files Manager, Prince of Development
Chalmers, Sweden
Apr 2001
time: 06:17
  Old Post 29-01-2002 23:06
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Full PM-box? Change here!

Thanks, this really look useful.

One question. Is the dublicate strings duplicated at position, or at groups.

(Will you enter one full set, then the next full set and so on, or will you enter the multiplie options together with the other options for the same thing?)

Dan Magaha FIRAXIS is offline Dan Magaha FIRAXIS
Firaxis Games
The Metropolis known as Hunt Valley
Mar 2000
time: 00:17
  Old Post 29-01-2002 23:10 Visit Dan Magaha FIRAXIS's homepage!
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Get a bigger avatar today!

I think it depends on what control options you use, start with civs and work down to random.

It makes a lot more sense when you are looking at diplomacy.txt and can see what's going on..


Dan

Gramphos is offline Gramphos
ACS Civ III Files Manager, Prince of Development
Chalmers, Sweden
Apr 2001
time: 06:17
  Old Post 29-01-2002 23:13
Edit/Delete Message Reply w/Quote
#4 Report this post to a moderator
Support Apolyton buy from Amazon

quote:
Originally posted by Dan Magaha FIRAXIS
I think it depends on what control options you use, start with civs and work down to random.

It makes a lot more sense when you are looking at diplomacy.txt and can see what's going on..


Dan

I guess it does. Time for a reebote then to get enough free memory to start notepad/wordpad.

Gramphos is offline Gramphos
ACS Civ III Files Manager, Prince of Development
Chalmers, Sweden
Apr 2001
time: 06:17
  Old Post 29-01-2002 23:31
Edit/Delete Message Reply w/Quote
#5 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations

I've a little hard to figure out how the Civs are made, but the moods are made first mode random times, second mode random times and third mode random times. The power is also sorted this way, so I guess how the civs are as well, but I'm not 100% sure.

cassembler is offline cassembler
Prince
Loud Cow Productions
Oct 2001
time: 23:17
  Old Post 30-01-2002 09:26 Visit cassembler's homepage!
Edit/Delete Message Reply w/Quote
#6 Report this post to a moderator
Remove this text

OFF TOPIC (sorry)
Dan, that's the funniest freakin' website I think I've ever seen...

TheHobbit is offline TheHobbit
Chieftain
Earth
Nov 2001
time: 23:17
Exclamation  Old Post 30-01-2002 22:50 Visit TheHobbit's homepage!
Edit/Delete Message Reply w/Quote
#7 Report this post to a moderator
Support Apolyton, buy GURPS/ Alpha Centauri

Oh my god your right that page is freakin funny, your comment made me curious and geez. I think the world is coming to an end.....

madmario is offline madmario
Chieftain
Ithaca, NY
Aug 2001
time: 05:17
  Old Post 02-02-2002 02:06 Visit madmario's homepage!
Edit/Delete Message Reply w/Quote
#8 Report this post to a moderator
Support Apolyton

This is very cool. Very cool indeed.

Will I be served a summons if I make everyone speak another language and make this available online?

-mario

prince_aki is offline prince_aki
Settler

Nov 2001
time: 00:17
  Old Post 05-02-2002 05:05
Edit/Delete Message Reply w/Quote
#9 Report this post to a moderator
Support Apolyton, buy GURPS/ Alpha Centauri

SO that's why diplomacy blows in this game.

Qilue is offline Qilue
King
Australia
Dec 1999
time: 15:17
  Old Post 16-03-2002 15:22
Edit/Delete Message Reply w/Quote
#10 Report this post to a moderator
Lose 30 kilos (of popups)

For editing uber txt files like diplomacy.txt, this utility might be of some use.

http://www.lancs.ac.uk/people/cpaap/pfe

Zylka is offline Zylka
Prince
sure
May 2000
time: 05:17
  Old Post 21-05-2002 09:17
Edit/Delete Message Reply w/Quote
#11 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations

nice!!@#@@#?!#1

Thrawn05 is offline Thrawn05
King
All Your Posts Are Belong To Ming
Dec 2001
time: 00:17
  Old Post 05-07-2002 08:05 Visit Thrawn05's homepage!
Edit/Delete Message Reply w/Quote
#12 Report this post to a moderator
Avatar Enlargement: We've got the solution

Dan, can the strings in the Diplo text file, be able to use other languages other then English, and support for different word endings and such?

Andrew_Jay is offline Andrew_Jay
Prince
St. John's, NF
Aug 2001
time: 01:47
  Old Post 16-08-2002 06:32
Edit/Delete Message Reply w/Quote
#13 Report this post to a moderator
Suffering from ads?

Sounds interesting . . . if I ever dare mess around with it. One quick question about "Power" if this is turned on, does that mean more favourable trades for the more powerful Civ?

teturkhan is offline teturkhan
Warlord
Edmonton, Alberta
Nov 2001
time: 05:17
  Old Post 21-08-2002 10:02
Edit/Delete Message Reply w/Quote
#14 Report this post to a moderator
Where is the Dummy Version? Tired of ads?

Do you have a Dummy version of the instructions?

All I want to do is insert some diplomacy text reflective of the Civs I have just added. Guess I just have to focus (takes out a cup of coffee, big sip... ok... I can figure it out- just put my mind to it)

I know my problem, I'm not getting paid,.. show me the money and my focus will be lazer sharp!

Any positions open there Mike???

teturkhan is offline teturkhan
Warlord
Edmonton, Alberta
Nov 2001
time: 05:17
  Old Post 25-08-2002 04:45
Edit/Delete Message Reply w/Quote
#15 Report this post to a moderator
Need Help Remove this text

I added 19 civs to game using the current editor, so when you go to the menu you get 19 choices but can only play with 16. All good so far... but once the game starts everything seems to work alright except the diplomcay..

When I in the diplomacy screen, instead of just seeing what the other side is saying I get some programing stuff too: ; Mediterraneans = AI's people (ADJ)

also the foreign advisor screen is all messed up, the ICons are all mixed? - got Mao's icon for English that sort of thing...

Can anyone pls help out, the mod is done finally except for this prob.. not sure if its cause I have 19 civs or somethign else..

  < Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:17.
Apolyton Time is 00:17.
    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.0477 seconds (89.66% PHP - 10.34% 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