User avatar
Hobbes
Posts: 4438
Joined: Sat Mar 11, 2006 12:18 am
Location: UK

FACALL bug

Sat Feb 13, 2010 4:20 pm

Hi chaps, I'm sure there is a post about this somewhere but I thought I would post it again as it has just caused me two hours of grief.

If you have an event with a line something like :-

EvalRgnStruc $Lorain|FACALL|STRUCDEF $Village

It can cause the event message to be shown to the wrong side
(and maybe some other problems).

Although the event I was using had GBR on the first line I think the FACALL can mess this up and the event is instead shown to the other side.

Worth bearing in mind (or fixing :) )

Cheers, Chris

User avatar
lodilefty
Posts: 7616
Joined: Sat Aug 11, 2007 3:27 pm
Location: Finger Lakes, NY GMT -5 US Eastern

Sat Feb 13, 2010 4:53 pm

FACALL clears "the Faction register" by definition. :blink:

That will:
a) Cause issues if the next action needs a Faction to work [as in build, replacements, etc.]
b) Cause messages to default to whatever the engine thinks is "side 0".

Rather than depending on the Splitter and Engine to sort it out, I put a SelectFaction command in after using FACALL:
[ATTACH]10172[/ATTACH]

Let us know if this sorts it out :)
Attachments
FACALL example.jpg
Always ask yourself: "Am I part of the Solution?" If you aren't, then you are part of the Problem!
[CENTER][/CENTER]
[CENTER]Visit AGEWiki - your increasingly comprehensive source for information about AGE games[/CENTER]

[CENTER]Rules for new members[/CENTER]
[CENTER]Forum Rules[/CENTER]

[CENTER]Help desk: support@slitherine.co.uk[/CENTER]

User avatar
Hobbes
Posts: 4438
Joined: Sat Mar 11, 2006 12:18 am
Location: UK

Sat Feb 13, 2010 7:21 pm

Hi Lodi, I sorted it out by moving the line above another. But if the scenario designer doesn't know about this problem it will cause a lot of hassle.
I would think FACALL should just be a command that allows you not to care about who is in control of a village for example. It shouldn't mess up an event in this way.

Cheers, Chris

User avatar
lodilefty
Posts: 7616
Joined: Sat Aug 11, 2007 3:27 pm
Location: Finger Lakes, NY GMT -5 US Eastern

Sat Feb 13, 2010 10:06 pm

Hobbes wrote:Hi Lodi, I sorted it out by moving the line above another. But if the scenario designer doesn't know about this problem it will cause a lot of hassle.
I would think FACALL should just be a command that allows you not to care about who is in control of a village for example. It shouldn't mess up an event in this way.

Cheers, Chris


I had long discussion when this was explained to me:

If you choose FACALL, how can you also choose just one FAC at same time?

Like any code, there are rules....
Always ask yourself: "Am I part of the Solution?" If you aren't, then you are part of the Problem!
[CENTER][/CENTER]

[CENTER]Visit AGEWiki - your increasingly comprehensive source for information about AGE games[/CENTER]



[CENTER]Rules for new members[/CENTER]

[CENTER]Forum Rules[/CENTER]



[CENTER]Help desk: support@slitherine.co.uk[/CENTER]

User avatar
Hobbes
Posts: 4438
Joined: Sat Mar 11, 2006 12:18 am
Location: UK

Sat Feb 13, 2010 10:31 pm

Hi Lodi, to my mind you have a command like :-

EvalRgnStruc $Le Detroit|IND|STRUCDEF $Village

so if a village exists in the region and is controlled by the IND faction then do ...


If you have :-

EvalRgnStruc $Le Detroit|FACALL|STRUCDEF $Village

then if a village exists in the region (doesn't matter who is in control) then do ...

What you don't expect is for this command to change the overall event faction. In fact even if you put a command after this such as a GenMsg with GBR in the first column the message will still appear to the IND faction not the GBR faction. This can't be right.

Cheers, Chris

P.S. am I using this command correctly? Is there something like a FACANY option which doesn't change the faction?

User avatar
lodilefty
Posts: 7616
Joined: Sat Aug 11, 2007 3:27 pm
Location: Finger Lakes, NY GMT -5 US Eastern

Sun Feb 14, 2010 1:30 am

AFAIK, The engine carries a "current faction" variable

FACALL sets that to a "wild card" [like * in file name]

It can't retain any other 'current faction' because we just told it that the current faction is ANY faction.

You are asking for what I suspect woulld be a significant code overhaul for a relatively minor issue that already has a solution.

It is what it is... live with it
Always ask yourself: "Am I part of the Solution?" If you aren't, then you are part of the Problem!
[CENTER][/CENTER]

[CENTER]Visit AGEWiki - your increasingly comprehensive source for information about AGE games[/CENTER]



[CENTER]Rules for new members[/CENTER]

[CENTER]Forum Rules[/CENTER]



[CENTER]Help desk: support@slitherine.co.uk[/CENTER]

User avatar
Hobbes
Posts: 4438
Joined: Sat Mar 11, 2006 12:18 am
Location: UK

Sun Feb 14, 2010 10:46 am

I just thought it worth highlighting in case anyone runs into this sort of problem.

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

Mon Feb 15, 2010 11:24 am

This would not be that significant to change, but I think it is ok this way, because the good thing is that it allows to have a conditional event, e.g I do an evaluation with FACALL, get the structure, and who is in charge of it get the rest of the event.

You can fix that easily (yes you have to know this change the faction, potentially) by just putting again the faction you play with in the first column:

GBR

is equivalent for the splitter to

GBR SelectFaction = GBR

for example an application of it is: evaluate the city of a region (so switch the faction pointer to its owner) then give VP to the said faction.

Sure, you can do that with EvalRgnOwner, but let's look at VGN... you can have a mine in a region owned by another country (say some British mine in a Chinese region)... I want to give a pat on the shoulder (give VP) to who ever owns the mine.
Image


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

User avatar
Hobbes
Posts: 4438
Joined: Sat Mar 11, 2006 12:18 am
Location: UK

Tue Feb 16, 2010 8:25 am

Thanks for clarifying chaps!

Chris

Return to “Modding AGE engine games”

Who is online

Users browsing this forum: No registered users and 3 guests