1.06 Subproject: Fix Multiple-factor Event Loops

A private forum for those folks working on patches for RRT3.
milo
Engineer
Posts: 512
Joined: Sat Nov 11, 2006 5:36 pm
Location: End of the line

1.06 Subproject: Fix Multiple-factor Event Loops Unread post

Huh - I can't reproduce this one now. Multiple owners, multiple companies, multiple territories, and conditions filtering some of these combinations out all seem to work properly.
  • Messages, dialogs, newspapers, choices, and status page get evaluated only for the first match in a loop.
  • If 'one time only event' is selected, the loop stops after the first match, and the event is never evaluated again.
  • Without a condition that inspects a company/player/territory explicitly, any effects that modify company/player/territory aspects are ignored.
  • Setting the condition to 'ALWAYS TRUE' makes only game-wide aspects available. Interestingly, though, selecting 'test against all companies' causes the event to be triggered as many times as there are companies - even though the company aspects are not available.

    Example: I create an 'ALWAYS TRUE' event that increments GV1 and CV1. If it tests against 4 companies, 5 players, and 2 territories, GV1 is +40, but none of the CV1s have been incremented at all.
  • Loops that deactivate players or companies don't work reliably because what they're looping over is changing underneath them. Trying to delete all AI owners, for example, will generally do away with only about half of them.
  • There are some odd effects when 'apply effects only once per event' is selected.

    Example: I create an event that forces tests against 4 companies, 5 players, and 2 territories; it increments CV1, PV1, and TV1 for the company, player, and territory selected. With 'apply effects only once per event' turned on, all four CV1s, both TV1s, and one of the PV1s is set to 1. The event triggers a total of eight times, I think once for each company-territory combination with just the first owner. But then why aren't the CVs 2 and the TVs 4? Alternatively, if it's limiting updates to only one per variable, why aren't the other PVs 1?
What behavior have the rest of you seen? Is there something obvious to fix?
Lama
Brakeman
Posts: 178
Joined: Fri Dec 01, 2006 11:06 pm
Location: Fresno, CA

Unread post

I've never done any tests this systematic on this, but I have observed weirdness there. I usually work by trial and error, I have to say.
Post Reply