SLIC-Reference : LogRegardEvent
CTP2 Bureau
The Modding
Knowledgebase
Apolyton CTP2 forums
Apolyton CTP2 archives
Source Code Project SVN

SLIC-Reference : : LogRegardEvent  

Arguments: int_player, int_player, regardDelta, regardEvType, ID_string, duration Type: void

regardDelta is the amount to increase the first player's regard towards the second by

The Regard Event Types are ScenarioEvent, MilitaryPowerEvent, MilitarySafetyEvent, DiplomacyEvent, GoldEvent, KnowledgeEvent, & ProductionEvent. So "0" is probably the null event type. ID_string is a string used in the Diplomacy intelligence screen. Delta_length is, I think, the number of turns this should last for (Peter Triggs). Example: // Make the Allies like each other LogRegardEvent(2, 3, 1000, 0, ID_WW_BLANK, turnMax); where turnMax is the number of turns in the WW2 scenario.

Source:

// VOID LogRegardEvent(,         the current player
//                     ,         foreigner
//                      delta,               ammount the current player's regard to foreigner should change
//                      type                 REGARD_EVENT_TYPE 
//                      ID_string,           explanation string used in the Diplomacy intelligence screen
//                     [duration]            defaults to -1
//                     )

SFN_ERROR Slic_LogRegardEvent::Call(SlicArgList *args)
{
	if (args->Count() < 5)
		return SFN_ERROR_NUM_ARGS;

	sint32 argNum = 0;
	PLAYER_INDEX player;
	PLAYER_INDEX foreigner;
	sint32 delta;
	sint32 type;
	sint32 duration;
	StringId explain;

	if(!args->GetPlayer(argNum++, player))
		return SFN_ERROR_TYPE_ARGS;
	
	if(!args->GetPlayer(argNum++, foreigner))
		return SFN_ERROR_TYPE_ARGS;

	if(!args->GetInt(argNum++, delta))
		return SFN_ERROR_TYPE_ARGS;

	if(!args->GetInt(argNum++, type))
		return SFN_ERROR_TYPE_ARGS;

	if(!args->GetStringId(argNum++, explain))
		return SFN_ERROR_TYPE_ARGS;

	if(!args->GetInt(argNum++, duration))
		duration = DURATION_UNLIMITED;

	Diplomat::GetDiplomat(player).LogRegardEvent( foreigner, 
		delta, 
		static_cast(type), 
		explain,
		static_cast(duration));

	return SFN_ERROR_OK;
}

More information available at Apolyton here

Information last updated by BureauBert on 26.06.2009

User Comments:

Using this form you may add your own observations concerning the above item, e.g. additional hints for usage, limitations, oddities etc. Please note this is not the place for asking questions or carrying out discussions about modding - please refer to the Apolyton CTP2 Modification Forum on that purpose.

Subject / Title*:
Text:*
(A maximum of characters left)
Your name:*
Your website (URL):

*) Required fields

Error including libraries: Can't locate config.cfg in @INC (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.28.1 /usr/local/share/perl/5.28.1 /usr/lib/x86_64-linux-gnu/perl5/5.28 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.28 /usr/share/perl/5.28 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /home/www/ctp2.info/cgi-bin/comments.cgi line 4. Make sure they exist, permissions are set properly, and paths are set correctly.
  Administration
This site is currently maintained by: BureauBert (Webmaster)  Maquiladora (Manager)  Legal Notice: Legal Notice Statistics: 82876 unique users since 02.05.2004 (» Site Statistics) Hosted by: WebhostOne
Share this page:  VK Facebook Twitter LiveJournal OK MR Google+ LinkedIn tumblr Pinterest Blogger Digg Evernote