Fortress Europe

Thanks Catfish. I don't know how I managed to delete the owner parameter as I copy & pasted the event above it and that does have the parameter :confused: Fixed now anyway.

@JP
99.9% of the Super Bunkers will be pre-placed. This city is the only one that needed one that's not already in Axis hands. From your test Sevastapol does ok without one. Good idea re the tech test. I have set up quite a few test saves. I was just hoping there was a simpler way to do this as the AI's turn is pretty long. I guess I could delete the majority of its units for the test save though.
 
A question about the Move unit event. Do they work best with odd or even co-ordinates for the boxes corners? I always thought it was even numbers but looking at the events for Frederick the Great I noticed they were odd numbers.

Just double checking the co-ordinates are ordered: Top left, top right, bottom right and finally bottom left, correct?

I know there is a paper on them somewhere but do you guys have any tips on getting them to work efficiently? I already have them doubled up to happen every turn and also when any unit is killed.
 
Sorry, I'm skimming. Didn't read the second question. The ReceivedTechnology trigger is only checked at the beginning of each turn (unless paired up with another trigger). Using the Cheat menu to assign techs will work, but as JP said, you won't see it take effect until the following turn.

A question about the Move unit event. Do they work best with odd or even co-ordinates for the boxes corners? I always thought it was even numbers but looking at the events for Frederick the Great I noticed they were odd numbers.
Doesn't matter.

Just double checking the co-ordinates are ordered: Top left, top right, bottom right and finally bottom left, correct?
Yep, it's in macro.txt.

I know there is a paper on them somewhere but do you guys have any tips on getting them to work efficiently? I already have them doubled up to happen every turn and also when any unit is killed.
Best used when units are first created and they have no orders, ie, over production areas and spawn locations.
 
Thanks for confirming that Catfish. I'm pretty confident all the move unit events will work and I can move on to the next task. Things are progressing very nicely now. The major job is adding the Super Bunkers and getting their home cities right so the Russians advance at pace with the Allies. Lots of checking maps and wikipedia for city capture dates. I need to finish off the read me and describe files and add a couple more events then it will be ready for testing. I think the biggest issue now will be the economy but I think that can be tweaked quite easily via altering the Lend Lease and Strategic Bombing payoffs.

I still have a bit of event space and some extras frills I can still add just to make the scenario more colourful. The space is there so I may as well use it up. I will keep these in a special section in the events file so that if I find out I need extra events after testing I can delete these extras. Its always wise to keep a bit in reserve to cover any emergencies!
 
I'm having more events troubles. When I trigger this event it works:

@IF
CITYTAKEN
CITY=Benghazi
ATTACKER=Allies
DEFENDER=Axis
@THEN
TEXT
British and American forces make landings in Vichy North Africa in three Task Forces:
Western TF under Patton around Casablanca, Center TF under Fredendall around Oran and
Eastern under Ryder around Algiers. Their objective is to capture Tunis and link up
with the 8th Army advancing from the east.
ENDTEXT
JUSTONCE
CREATEUNIT
UNIT=Mechanized Infantry
OWNER=Allies
Veteran=no
Count=3
Homecity=NONE
locations
19,167 ; WESTERN TASK FORCE
18,168
17,169
endlocations
@ENDIF

But when I trigger this one nothing happens. To me they look almost identical. What have I missed?

@IF
CITYTAKEN
CITY=Tunis
ATTACKER=Allies
DEFENDER=Axis
@THEN
TEXT
Tunis falls to the Allied armies of Patton and Montgomery. The once mighty Africa
Corps is no more and the Axis is driven from North Africa. Now the allies can turn
their attentions to the soft underbelly of Europe. ORDERS: Launch an Invasion of
Sicily as soon as possible!
ENDTEXT
JUSTONCE
CREATEUNIT
UNIT=Transport
owner=Allies
veteran=yes
Count=8
homecity=NONE
locations
114,162
endlocations
@ENDIF

I have run @DEBUG and the report seems ok. It ends with the Tunis event that is the last one in the text doc:

@IF CITYTAKEN found
looking for [continuous],city=,attacker=,defender=
found city=Tunis
found attacker=Allies (king id=3)
found defender=Axis (king id=3)
@THEN found

@THEN TEXT found
looking for [no broadcast],ENDTEXT
found ENDTEXT

@THEN JUSTONCE found
not looking for anything else here

@THEN CREATEUNIT found
looking for unit=,owner=,veteran=,homecity=,[incapital],locations,endlocations,[count=]
found unit=Transport (unit id=43)
found owner=Allies (king id=6)
found count=8 (integer 8)
found homecity=NONE
found locations
found location 0: 114, 162, 0 (map=0)
found endlocations
@ENDIF found
@ENDEVENTS found

remaining heap space: 10984 bytes
 
Found the problem after about an hours fiddling. It was worthwhile as I found several minor errors in the events file whilst looking! The problem was that Tunis had a space after its name on the Rename box of the city screen. Once this stray space was removed the event works a charm! Now to check all city names for stray spaces :cry:
 
Wow, that was a tedious task. Worthwhile though as I found Cassino and El Agheila both had rogue spaces after their names!

I was just wondering if umlauts cause problems with events. I remember reading about this once but can't remember the answer.
 
I have decided to remove the Neutral Civ and its six cities as they have no involvement in the war. I decided it was more important to include cities like Mareth and Ortona which played a vital part in the war. This leaves me with a spare Civ to play with.

I did toy with the idea of creating a Yugoslav Partiznan Civ, but that would be a lot of work to get right. Romania would be interesting but it would make for a very complex picture later in the war when the Soviets are at the gates.

An easier option would be to introduce a Vichy French Civ in North Africa and Southern France. This would just mean some swapping around city ownership and units. It has the advantage of making the Torch landings a lot more realistic but it throws up problems with Tunisia and the German occupation of Vichy France in 1942.

I would welcome your input on this guys :)
 
I guess Yugoslav Partiznans could be represented by barbarian units (or soviets). Vichy France makes the most sense to me. The Germans could declare war on them (maybe even create some occupational units) via events when the time is right, or if the players "liberate" a city.
 
A bit of a radical proposal... But what about the United States? It would enable friends to play together, and would virtually eliminate the lengthy AI turns if played in hot seat mode.
 
Thanks for the feedback guys. In the end I decided a seperate Yugoslav Partisan Civ would be too complex to be worthwhile, too many pitfalls. Easier to keep them as Soviet controlled units. If they take a city from the Germans it will fly the communist flag and that's good enough for me.

I decided to include the Vichy French but to have them as the Barbarians. All of the historical cities in the game that were under Vichy control are now Barbarian (renamed) bar Tunis and Bizerte as they are too key to the allied campaign. I may change this later on but it will take a lot of event space to sort out. In Metropolitan Vichy France the cities have Super Bunkers (now called Strongpoints) which are homed to Casablanca. When the allies take Casablanca these bunkers are disbanded and the Axis can move in to mop up any odd units the Barbs have built. It seems that the AI Axis doesn't bother attacking the Vichy Strongpoint units as they are too tough, but I will need to do some more testing to confirm this.

The spare Neutral cities (Portuguese and Swedish) and a few unessential Soviet cities (Yerevan) were disbanded and used for Kassel (to fill a gap in western Germany), Ortona (part of the Gothic line), Mareth, Mersa Matruh and El Alamein. I may disband a few more remote cities to add new ones that are more central to the Allied campaign. After all, when your playing your not going to care if Yerevan is there or not and it is unlikely to become an AI battleground!

As the dockyard unit near Liverpool (used for the Lend Lease event) is a barbarian unit I can still ditch the two remaining Swiss cities and use the Neutral civ for something else! I like the idea of a separate USA but I don't intend to make this a multiplayer game yet (that's going to be the next version of Rise of the Dictators). So I am really no closer to deciding a use for this Civ :D I guess I will just keep it in reserve in case of a sudden Brainwave.

Things are progressing well all round. I would say I'm now 90% finished. There are loads of new events, including Operation Market Garden, and the Strongpoint system and Orders events are almost finished. I think the problem of the over strength USSR is sorted and they will now advance in step with the allies until the final race for Germany! I have been doing a lot of work on the events to revamp them. I will probably add in a bit more flag stuff to make them even more flexible, but only after I get the thing running smoothly.
 
Does this line in the Report file mean I have used up all the events space?:

@IF found - creating new event structure
WARNING - SCENEVNT HEAP GET FAILURE
Failed to create new event structure

Also, I have renamed the Barbarians/Barbarian to Vichy French/Vichy France in the labels file. I take it I use the Vichy French in the events file or does renaming the barbs screw events up? I ask as the Lend Lease event doesn't seem to be triggering.

This may be due to the other bugs in the file though. At what point do the events stop working? After the event with the bug or do they not work fullstop if there are bugs in the file?
 
Does this line in the Report file mean I have used up all the events space?:

@IF found - creating new event structure
WARNING - SCENEVNT HEAP GET FAILURE
Failed to create new event structure

Also, I have renamed the Barbarians/Barbarian to Vichy French/Vichy France in the labels file. I take it I use the Vichy French in the events file or does renaming the barbs screw events up? I ask as the Lend Lease event doesn't seem to be triggering.

This may be due to the other bugs in the file though. At what point do the events stop working? After the event with the bug or do they not work fullstop if there are bugs in the file?

EDIT: I found out the main bug was too many events. Time to start culling unessential text and events with minor impact! I also found the answer to the question on barbs and when the events stop working! Any tips on events would be appreciated still though :D
 
I have just been trying to reduce the amount of text by adding semicolins. ToT is now crashing to desktop with the message:

CivII-Fatal Error
Error"-3" in module "12" data:7.4

Any ideas what this could be before I begin cutting the events up into chunks to test it?
 
i always got module error when some dot's or names in the rules.txt were wrong...

Best try and replace your rules.txt with the vanilla and see what happens.
 
In this case it seems to have been a mistake in the events file. It didn't seem to like having loads of semicolons blocking out lines of the events, but I can put them between events or after grid co-ordinates etc... It seems that I am still nine events too heavy but thats not too big a deal as there are a few I can easily delete.
 
My events file is all working now and I have about 652 bytes of events memory left. This led me to do a little experiment to see how much space certain events take up. I worked out that for each letter in a TEXT action it used 1 byte of memory. I think a CREATEUNIT event takes up about 23 bytes. Adding the COUNT= line doesn't seem to take any extra space. This will not be news to most of you guys but it is something I have not looked at in detail before. I was wondering if there was a list somewhere detailing approximately how much memory each event type takes up. I know I would make use of it when planning out the final parts of my events file and when deciding which events to delete!

One important question I do have is regarding the DELAY line. I know you must leave spare memory to cope with the delays or they will not trigger. In my events file I currently have 16 events with a 1 turn delay, 1 event with a 2 turn delay and 5 events with an 8 turn delay. Is there a way to calculate how much memory space I need to leave?
 
I think I have found the answer to my question in the Miscellaneous Gibberings of 2004 section of Catfish's cave:

For events files, the Debug file (report.txt) now includes the amount of stack space left for your use. Please note, however, that this total does NOT include the stack space needed by DELAYed events. Each DELAY adds 284 bytes to the space used. Overlapping DELAYs (those whose counters could be running at the same time) add up, but those that do not overlap do not-- i.e. they can re-use the same 284 bytes.

So if I understand this correctly I would have 10x 1 turn delay events running at the same time and I would need 2840 bytes free (10x 284), but if they were staggered throughout the game and didn't overlap I would only need to put 284 bytes aside to cope with them, right?

Also, if I understand this right a delay event with a delay of 8 turns will still only take up 284 bytes as long as it is in effect. I have five of these running together so I just need to reserve 1420 bytes and check there are no other ones that are likely to trigger at the same time. Is this correct?

I want to be sure about this as these events are pretty vital! Thanks.

EDIT: Having looked at Catfish's LotR events I think I have it right. It says there are 4755 bytes remaining heap space to cope with
16 concurrent delayed events. 16 x 284 = 4544 bytes. Good!
 
Can anyone help with these events please.

Is this possible and if so how do I structure it?:

If Brussels taken then Delay 12 turns then check Allied Flag 2 is off. If so then display text and create Heavy Panzers at x/y.

Is it possible to trigger the event, wait twelve turns and then check if the flag is on/off before triggering the event (or not triggering if flag is on)?

EDIT 1: I have a feeling that the DelayPerFlag line may help but having read the MACRO info I am none the wiser. Help!

EDIT 2: If this is not possible I will just go with the simple option and have the units spawn in city squares, then if the Allies already occupy the city after the delay the spawning will be blocked. It would be interesting to know if the other method would work though.

also

Is it possible to give a random percentage chance of a unit being created as a result of a UNITKILLED trigger?

IE: TRIGGER: French Infantry killed = ACTION: 50% chance of Free French unit being created

I know you can set units to appear on a random turn but I can't see anything in the MACRO file about using this as an action or modifier so I guess the answer is probably no.
 
I was wondering if there was a list somewhere detailing approximately how much memory each event type takes up. I know I would make use of it when planning out the final parts of my events file and when deciding which events to delete!
An event uses 284 bytes + strings. Double-trigger (@AND) events are stored as two separate events. Therefore, any strings in the action part of a double-trigger event are duplicated! Each character in a string = 1 byte. Each string ends with a null terminator: add another byte. Which events use strings?

Triggers:

AlphaCentauriArrival (Race)
BribeUnit (Who, Whom)
CheckFlag (Who)
CityDestroyed (City, Owner)
CityProduction (Builder)
CityTaken (City, Attacker, Defender)
Negotiation (Talker, Listener)
ReceivedTechnology (Receiver)
UnitKilled (Unit, Attacker, Defender)

Actions:

ChangeMoney (Receiver)
CreateUnit (Owner, Unit, HomeCity)
MakeAggression (Who, Whom)
MoveUnit (Owner, Unit)
PlayAVIFile ([FileName.avi])
PlayWaveFile ([FileName.wav])
Text ([Text])*

* Each line (maximum of 10 lines, 255 characters each) is a separate string with a null terminator.

There are quite a few event parameters that would appear to be strings, but are, in fact, converted to flags and form part of the main body (284 bytes) of the event. They could've done the same with a number of those listed above.

Example:

Code:
@IF
CityTaken
city=Wizard's Tower [15 bytes]
attacker=Heroes [7 bytes]
defender=Necromancers [13 bytes]
@THEN
CreateUnit
owner=Heroes [7 bytes]
unit=Bone Golem [11 bytes]
veteran=true
homecity=None [5 bytes]
locations
20,20
endlocations
Text
1234567890 [11 bytes]
1234567890 [11 bytes]
EndText
@ENDIF

Total = 284 (body) + 80 (strings) = 364 bytes

One important question I do have is regarding the DELAY line. I know you must leave spare memory to cope with the delays or they will not trigger. In my events file I currently have 16 events with a 1 turn delay, 1 event with a 2 turn delay and 5 events with an 8 turn delay. Is there a way to calculate how much memory space I need to leave?
See this thread.

So if I understand this correctly I would have 10x 1 turn delay events running at the same time and I would need 2840 bytes free (10x 284), but if they were staggered throughout the game and didn't overlap I would only need to put 284 bytes aside to cope with them, right?

Also, if I understand this right a delay event with a delay of 8 turns will still only take up 284 bytes as long as it is in effect. I have five of these running together so I just need to reserve 1420 bytes and check there are no other ones that are likely to trigger at the same time. Is this correct?
Yes and yes. See link.

Having looked at Catfish's LotR events I think I have it right. It says there are 4755 bytes remaining heap space to cope with 16 concurrent delayed events. 16 x 284 = 4544 bytes. Good!
You obviously don't have the latest version. ;)

If Brussels taken then Delay 12 turns then check Allied Flag 2 is off. If so then display text and create Heavy Panzers at x/y.

Is it possible to trigger the event, wait twelve turns and then check if the flag is on/off before triggering the event (or not triggering if flag is on)?
Yes. Use two flags. Turn on a second flag at the beginning of the game. Capturing Brussels switches it off 12 turns later. Have another event (JustOnce modifier) check the state of both flags every turn. When both are off, heavy panzers are created. If, after 12 turns, Allied Flag 2 is switched on, no panzers will be created. However, it would be possible for the Germans to obtain the tanks at a later time if Allied Flag 2 is switched off at a later time. If that's a situation you want to avoid, then switch the states of the flags and drop the Continuous modifier from the second. That way the panzers can only appear 12 turns after the fall of Brussels. Clear as mud?

I have a feeling that the DelayPerFlag line may help but having read the MACRO info I am none the wiser.
Not here.

Is it possible to give a random percentage chance of a unit being created as a result of a UNITKILLED trigger?

IE: TRIGGER: French Infantry killed = ACTION: 50% chance of Free French unit being created
Yes, see the link above. There are two methods listed there.
 
Top Bottom