Page 1 of 1

Foreign Entry sign confusion

Posted: Tue Oct 22, 2013 2:49 pm
by MikeV
Bug, or (mis-documented) Feature?

According to the wiki, the argument to ChangeForeignEntry should behave as one intuitively expects: a +n should increase FE, a -n should decrease it.

But that is not the behavior I am seeing. In USA_Events.sct, this event:[INDENT]SelectFaction = USA
SelectRegion = $Old_Bahama_Channel
StartEvent = evt_nam_USA_TrentAffair1861USAcool|1|2|evt_txt_USA_TrentAffair1861USAcool|Event-img_USA_TrentinEngland1861|$Old_Bahama_Channel|118

Conditions
MinDate = 1861/12/19
MaxDate = 1862/01/01
Probability = 50

Actions
DescEvent = evt_desc_USA_TrentAffair1861USAcool
ChangeFacMorale = -2
ChangeForeignEntry = 5
EndEvent

[/INDENT]

Ends up decreasing the reading on the FE meter by 5.

So, is the sign on the argument to be interpreted in the context of the latest SelectFaction command (i.e. the currently-selected faction)?
Or does some piece of code have a sign error?

Posted: Wed Oct 23, 2013 7:38 am
by PhilThib
No, WAD... this event is labelled "Cool"...it means the USA reduce the tension with Britain by giving some insurances and compromises...so it is normal that it reduces tension instead of increasing it

Sign of argument value

Posted: Wed Oct 23, 2013 12:44 pm
by MikeV
I understand the event's intent. My question is about the mechanics of the commands involved -- I had to change the sign of the argument to get it to work correctly.

Posted: Fri Oct 25, 2013 8:44 am
by Pocus
No, this command is doing the math for you somehow, whatever the faction you refer to, a positive value is moving the FE in the right direction for the faction, and a negative value is a penalty for you.

it means that +5 for CSA is augmenting FE but +5 for USA is reducing FE.

No super intuitive probably, but this how it was done in 2007.

Argument sign is relative to the last-selected faction

Posted: Fri Oct 25, 2013 4:17 pm
by MikeV
OK, that's the kind of explanation I was looking for. Thanks.
Can we add this to the wiki explanation for the command?