Conversation Files (.cnv) - emd4600/SporeModder-FX GitHub Wiki

Conversation Files (.cnv) are files used by Spore to store the possible conversations and dialogs that you can have with other empires/civilizations on the Space/Civilization stage. Every mission in those stages has a .cnv file associated with all the dialogs related to the mission.

A conversation file is made up of blocks. There are 4 types of blocks:

  • dialog: The most important one, this defines texts and possible responses to them.
  • eventLog: Used to show small alerts while the mission is ongoing.
  • animation: Defines which animations are played by the empire's creature to show certain emotions.
  • unknown: Unknown usage, related to missions.

The text format in conversation files uses ArgScript. Conversation files are usually paired with a .locale file with the same name, in the locale~ folder, that contains all the texts. Therefore, before reading this page, it's recommended you read:

Conversation files constantly use tableID!instanceID pairs to reference texts in localization tables. In SporeModder FX, you can hover the mouse over those IDs: if you have that locale file in your project (or any of its source projects), the program will show you the text.


Dialogs

Conversations are mostly made up of dialog blocks. Each block as a unique identifier; for some of them, this identifier is used by Spore to find important dialogs (for example, the dialog used to assign a mission always has a specific name); other dialogs can have any name as its used only to identify it within the conversation. Dialogs have a text and possible responses that the player can pick, each one triggering a different action.

The most important attribute is the text that will be shown. This is the text that the empire you are talking to says. You can add more than one text with conditions on each one (e.g. require this archetype); of all the ones that meet the conditions, one will be picked randomly

text <tableID!instanceID> -emotion <string> -require <names...> -exclude <names...> A text is always composed of a tableID and an instanceID, which are used for localization. The tableID is the ID of the .locale file located in the locale~ folder. The instanceID is the ID of the specific text that will be used within that localization file.

Optionally, uou can speficy an emotion, which will make the empire's creature play an animation when the dialog happens. Below on this page you have a list of possible emotions.

require and exclude are also optional. On each you can specify a list of names from the "List of conditions" list at the end of this page. When this dialog shows to the user, a text will only be considered if all the conditions in require are met, and all of the conditions in exclude are NOT met. For example:

text test_conversation!0x00000001 -require Shaman -exclude AtWar

This text will only be considered if the other empire is of the Shaman archetype, and is not at war with you.

Responses

For each dialog, you can specify multiple possible responses that the player can choose. Each response specifies one (or more) texts that is shown to the player, following the same rules as the texts in the dialogs. Additionally, responses must also specify an action: something that happens when the player chooses that response. There are many possible actions: showing another dialog, attempting peace, closing the communication,.... There is a list of all known actions below on this page. It follows the format action <id> (<key>), where the key is optional and only used in certain actions.

Similar to text, responses can also have require and exclude commands that decide when a response will be shown.

response
	action kCnvCommEvent~ mission_tutorial_colonize_batch2!mission_assign2.cnv
	text mission_tutorial_colonize_batch2!0x00000007
	require AttitudeFurious
	exclude SourceCivReligious MasterBadgeLevel3
end

Additionally, responses also have enableRequire and enableExclude, which can be used to show the button, but disabled ("grayed out", it cannot be clicked). By default all buttons are always enabled, but if these conditions are set it will only be enabled if it meets them.

Responses can also have other attributes, but their use is unknown:

  • ints1 <ints...>
  • ints2 <ints...>
  • ints3 <ints...>
  • ints4 <ints...>

Other Attributes

Dialogs can have these other attributes:

  • action <id> (<key>) can be used on dialogs, although we don't know yet when that action is triggered.
  • showAccept <bool>: shows an accept button if true
  • showDecline <bool>: shows a decline button if true
  • value3 <bool>
  • showStatic <bool>: if true, a TV static effect will be shown instead of the empire creature
  • value5 <bool>

Examples

dialog mission_assign
	text mission_tutorial_colonize_batch2!0x00000003 -emotion Urgent

	response
		action kCnvCommEvent~ mission_tutorial_colonize_batch2!mission_assign2.cnv
		text mission_tutorial_colonize_batch2!0x00000007
	end
	response
		action kCnvCommEvent~ mission_tutorial_colonize_batch2!mission_reject.cnv
		text mission_tutorial_colonize_batch2!0x0000000B
	end
end

In this dialog, one text is shown to the player, and the other empire's creature plays an urgent animation. Two possible responses are given to the player: the first one will show another dialog called mission_assign2 within this same file, whereas the second will show a dialog called mission_reject.

Since the dialog has the name mission_assign, it's the first dialog that will be shown when offering this mission. Another important dialog name is dynamic_response_to_source, which is used when the player tries to communicate after being assigned the mission.


Event Logs

While you are carrying out a mission, sometimes you will get small alerts on the left part of the screen. These are event logs, and they are contained in .cnv files as well. They are a block like eventLog <string>, where the parameter is a name; Spore missions will use this name to know when to show the event log, so its important. This block can only contain one or more text commands, with the same structure as dialogs.

For example:

eventlog UIMediumDesc_Fulfilled
	text event_biosphere_collapse!0x00000005
end

Animations

This block describes the animations that the empire creature plays for a certain emotion. The block is written as animation <string>, where the argument is the name of the emotion (Angry, Neutral,...). The block contains other blocks called variations, which define the animations for every different archetype. The possible variation names are:

  • playerm
  • playere
  • playerc
  • ecologist
  • shaman
  • trader
  • zealot
  • warrior
  • grob
  • bard
  • scientist
  • diplomat

A variation must contain two commands:

  • idle <id...>: The IDs of the animations that can be played when the creature is idle (during the conversation)
  • action <id...>: The IDs of the animations that can be played once, when the conversation starts. These commands can have more than one animation, when the conversation starts one is picked randomly. To know how to find animation IDs, check How to: use Spore animations.

Examples

animation Afraid
	variation playerm
		idle 0x058C960A 0x058C960F
		action 0x058CA135 0x058CA13A
	end
	variation playere
		idle 0x058C960A 0x058C960F
		action 0x058CA135 0x058CA13A
	end
	# This continues for the rest of variations
end

Unknown block

There is an additional, unknown block that can be used in .cnv files, called unknown. Its attributes are:

  • missionID <id>: ID of a mission
  • value2 <id>
  • value3 <id>
  • badges1 <ids...>: IDs of badges
  • ints2 <ids...>

For example:

unknown
	missionID balance
	badges1 terrawrangler-1
end


Example

This is a small example made with random texts to show you how a complete .cnv file looks like. For most missions, .cnv files just have dialogs; there's one that is mandatory, mission_assign, which is the first one that will be shown when assigning the mission. Assume this file is called test_conversation.cnv

dialog mission_assign
	text test_conversation!0x00000001

	response
		action kCnvCommEvent~ test_conversation!test_dialog.cnv
		text test_conversation!0x00000002
	end
	response
		action kCnvCloseComm~
		text test_conversation!0x00000003
	end
end
dialog dynamic_response_to_source
	text test_conversation!0x00000004

	response
		action kCnvCommDefault~
		text test_conversation!0x00000003
	end
end
dialog test_dialog
	text test_conversation!0x00000005 -emotion Angry

	response
		action kCnvRelationshipCommunicatedMean~
		text test_conversation!0x00000003
	end
end

Let's break down what it does: the first dialog that will be shown when assigning this mission is the dialog mission_assign. The empire will show you the text assigned to 0x00000001 in the locale~/test_conversation.locale file. Then, the player is given two possible responses:

  • The first one uses the text 0x00000002 in that same locale file. The action command tells Spore what to do if the player chooses that response. In this case, action kCnvCommEvent~ test_conversation!test_dialog.cnv means "go to the dialog test_dialog on the test_conversation.cnv file".
  • The second dialog uses the text 0x00000003 in the same locale file. Its action is kCnvCloseComm~, which means that the communication screen will close if the player chooses that response.

Now let's look at the second important dialog, dynamic_response_to_source. This dialog is shown if the player communicates with the empire while the mission is ongoing. In this case, the empire will show text 0x00000004 and the player is only given one possible response. The action on this response, kCnvCommDefault~, means "go to the main communcation screen", which is where you can buy things, talk with the empire, etc

Those are the only two dialogs that have special names. The third dialog, test_dialog, doesn't have any special name, you can name it whatever you want, and will only be shown if its called from another dialog. In this case, it will be shown if the player chooses the first response on the main mission dialog.

Notice that in the text of this third dialog we added -emotion Angry; this will make the empire's creature play an angry animation when the dialog is shown. You have a list of possible emotions below.

We only give one possible response to the player, one that applies the kCnvRelationshipCommunicatedMean~ action. This means that when the player responds, it will be given a negative relationship with the other empire saying "You were mean with us".

Now we have the .cnv file, but a conversation file must always come with its equivalent .locale file in the locale~ folder, which will contain all the texts that we used. In this case, the locale~/test_conversation.locale file could look something like this:

0x00000001 We got a mission for you. No questions allowed. Do you accept?
0x00000002 Tell me more
0x00000003 Goodbye
0x00000004 Why are you still here? Don't you have a mission to carry out?
0x00000005 How mean! I told you no questions allowed! Get out of here!


List of emotions

Here are all the possible emotions you can set to your texts using -emotion <string>. It might be possible to have more emotions available if you add your own animation block in your .cnv dialog, but it has never been tested.

  • Afraid
  • Laugh
  • Sad
  • Neutral
  • Gasp
  • Urgent
  • Angry
  • Happy

List of conditions

MySpecies
Homeworld
Colony
CollectibleSpice  # ???
Alliance
AtWar
UFODamaged #For repair button?
UnderAttack
Militaristic
Cultural  # NPC empire archetype
Diplomatic
Eplorative
Sporty
Trade
GrobGoal
Warrior
Trader
Scientist
Shaman
Bard
Zealot
Diplomat
Ecologist
Grob
SourceEmpireWarrior  # Might be mission target?
SourceEmpireTrader
SourceEmpireScientist
SourceEmpireShaman
SourceEmpireBard
SourceEmpireZealot
SourceEmpireDiplomat
SourceEmpireEcologist
SourceEmpireGrob
SourceEmpireMySpecies
PlayerSaveEmpire
GrobShock  # After grox attack check?
OpenToTrades  # For trade button?
LargeGiftMoneyAvailable
MediumGiftMoneyAvailable
SmallGiftMoneyAvailable
Stingy  # Unused/Hidden empire traits?
Generous
AccidentProne
FirstContact  # Used to serve "introduction" dialogue, which shares .cnv dialogue with standard "greetings" message
StarClueBetween  # Mission clues
StarClueDistance
StarClueDistanceRange
PlanetClueOrbitOrder
PlanetClueType
HasMissionConversation  # "Sorry, we don't have anymore missions?"
HasAssignedMission  # "Go do mission we've already gave you, you must do XYZ"
CanAffordMission  # ????
CanAffordMissionTool  # Maybe intended to prevent player from receiving mission above player abilities?
ArchetypeMissionAvailable  # If mission archetype is possible to be received, possibly checking empire size?
HasActiveArchetypeMission
EnoughCargoSpaceForItemsOnAccept  # Possibly inteded to be used with Fetch type missions?
EnoughCargoForRewards
Step1
Step2
Step3
Step4
Step5
AttitudeFurious  # Face relationship Red
AttitudeAnnoyed  # Orange face
AttitudeCautious  # Yellow? face
AttitudePleased  # Blue? face
AttitudeFriendly  # Green? face
AttitudeAnnoyedOrBetter  # Orange-Green face
AttitudeCautiousOrBetter  # Yellow-Green face
AttitudePleasedOrBetter  # Blue-Green face
AttitudeAnnoyedOrWorse  # Red-Orange face
AttitudeCautiousOrWorse #Red-Yellow face
AttitudePleasedOrWorse #Red-Blue face
NotEnoughMoneyLargeGift
NotEnoughMoneyMediumGift
NotEnoughMoneySmallGift
AtLeast3200Money  # CIV
AtLeast2400Money
AtLeast1600Money
AtLeast8000Money
AtLeast4000Money
PlayerCivMilitary
PlayerCivReligious
PlayerCivEconomic
SourceCivMilitary
SourceCivReligious
SourceCivEconomic
SourceCiv0to3Cities  # Civilization city ownership
SourceCiv4to6Cities
SourceCiv7to9Cities
SourceCivMoreThan1City
SourceCivMoreThan9Cities
SourceCivCapturedPlayerCity
SourceCivCapturedNPCCity
SourceCivLostCityToPlayer
SourceCivSentGiftToPlayer
SourceCivReceivedGiftFromPlayer
SourceCivTradedWithPlayer
SourceCivAttackedPlayerMilitary
SourceCivWasAttackedByPlayerMilitary
AttackCity1
AttackCity2
AttackCity3
AttackCity4
AttackCity5
AttackCity6
AttackCity7
AttackCity8
AttackCity9
AttackCity10
AttackCityMoney
HasPosse  # Allied ships
CanHavePosse
HasTradeRoute
TradeCaptureComplete
PurchaseOfferMoneyAvailable1
PurchaseOfferMoneyAvailable2
PurchaseOfferMoneyAvailable3
PurchaseOfferMoneyAvailable4
PurchaseOfferMoneyAvailable5
PeaceOfferMoneyAvailable1
PeaceOfferMoneyAvailable2
PeaceOfferMoneyAvailable3
PeaceOfferMoneyAvailable4
PeaceOfferMoneyAvailable5
TributeMoneyAvailable
HasTalkedToAliens
MasterBadgeLevel0
MasterBadgeLevel1
MasterBadgeLevel2
MasterBadgeLevel3
MasterBadgeLevel4
MasterBadgeLevel5
MasterBadgeLevel6
MasterBadgeLevel7
MasterBadgeLevel8
MasterBadgeLevel9
MasterBadgeLevel10
EnteredGalacticCore
GrobEncounter
AttackEmpire1
AttackEmpire2
AttackEmpire3
AttackEmpire4
AttackMoneyAvailable
HasMissionTools
HasColonyOnTargetPlanet
AcceptsGifts
LargeEmpire
MediumEmpire
SmallEmpire
TeachingExploreMissionAvailable  # Homeworld tutorial missions
TeachingExpandMissionAvailable
TeachingInteractMissionAvailable

List of actions

  • kCnvCommDefault~: Shows the default communication screen.
  • kCnvCloseComm~: Closes the communication screen.
  • kCnvCommEvent~: Shows another dialog, specified as <cnv_file>!<dialog_name>.cnv. For example: action kCnvCommEvent~ mission_change_archetype_diplomat!mission_incomplete.cnv
  • kCnvMission~: Gives a mission. Sometimes has a parameter, but other times it doesn't. For example: action kCnvMission~ TutorialSetupTradeRoute

Other actions used by Spore:

kCnvCityBuyAccepted~
kCnvEndTradeRoute~
0x91386D6C
kCnvPeaceOffer4~
kCnvPeaceOffer5~
kCnvPeaceOffer2~
kCnvPeaceOffer3~
kCnvPeaceOffer1~
0x96508A98
0x9B18A2FA
0x9F0FF4CB
0xA3C1D501
0xA51B201D
0xA624E3FA
0xAB909E37
0xACC50317
0xACCF645C
0xAE44B32E
0xBF3B803A
0xC049E8B5
0xC0816F3B
0xCA667561
0xCADAC8A0
0xD13E4CA2
0xD50A1A6D
0xD648ED4D
0xD91DBA31
0xD95019BD
0xDAC9A912
0xDAFF3CE0
0xE3B5DBDF
0xE7977907
0xEAB9E2C9
0xFAA8C815
0x015BC92B
0x0764C336
0x07D5647D
0x0C5D2701
0x1125D6A9
0x12293370
0x12293371
0x12293374
0x12293376
0x12293377
0x12D9113A
0x135594F5
0x18646F36
0x18646F37
0x18646F38
0x18646F39
0x18646F3A
0x18646F3B
0x18646F3C
0x18646F3D
0x18646F3F
kCnvRelationshipWitholdTribute~
0x1FEBC3EA
0x2027BC64
kCnvRelationshipCommunicatedMean~
0x23A2D684
0x24E1525D
0x26B14441
0x2E42264B
0x307071C8
0x307071CA
0x307071CB
0x307071CD
0x31484F2C
0x3DE7CB69
0x3EF09234
0x410C4A65
0x4C113574
0x4C182387
kCnvRelationshipAcceptGift~
0x577614C6
0x5C2EFCB0
0x5D79F0CB
0x5EA6D3ED
kCnvCityBuyAcceptedHigh~
0x6BA64250
0x6C70B992
0x70C14C34
0x758330B8
0x758330BA
0x758330BB
0x758330BC
0x758330BD
0x75AD98BB
0x764EA37C
0x789418DC
0x7D8AA8BE
0x7E41D64A

⚠️ **GitHub.com Fallback** ⚠️