User avatar
MikeV
Sergeant
Posts: 83
Joined: Tue Jul 14, 2009 11:13 pm
Location: Sunny Melbourne FL USA

Foreign Entry sign confusion

Tue Oct 22, 2013 2:49 pm

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?
--
Mike
deus ex machina

User avatar
PhilThib
Posts: 13705
Joined: Tue Oct 18, 2005 5:21 pm
Location: Meylan (France)

Wed Oct 23, 2013 7:38 am

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
Image

User avatar
MikeV
Sergeant
Posts: 83
Joined: Tue Jul 14, 2009 11:13 pm
Location: Sunny Melbourne FL USA

Sign of argument value

Wed Oct 23, 2013 12:44 pm

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.

User avatar
Pocus
Posts: 25673
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

Fri Oct 25, 2013 8:44 am

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.
Image


Hofstadter's Law: "It always takes longer than you expect, even when you take into account Hofstadter's law."

User avatar
MikeV
Sergeant
Posts: 83
Joined: Tue Jul 14, 2009 11:13 pm
Location: Sunny Melbourne FL USA

Argument sign is relative to the last-selected faction

Fri Oct 25, 2013 4:17 pm

OK, that's the kind of explanation I was looking for. Thanks.
Can we add this to the wiki explanation for the command?

Return to “Help improve CW2”

Who is online

Users browsing this forum: No registered users and 10 guests