Welcome to The Few Good Men

Thanks for visiting our club and having a look around, there is a lot to see. Why not consider becoming a member?

Dirty Coding in CMBN

Kandu

FGM Colour Sergeant
FGM MEMBER
Joined
Apr 19, 2021
Messages
352
Reaction score
361
Location
London Ontario Canada
For almost one week and many hours I have been frustrated by 'triggers' not working properly and A.I. plans not working at all - not even untriggered movement. I have discovered that the underlying problem appears to be hidden dirty code. What do I mean by that? Well, the problem only arises when you are building a new scenario on top of an existing scenario, i.e. reusing the map and units. The unseen dirty code consists of terrain objectives and triggers assigned to the earlier scenario that have not been properly cleaned up. These may have the false appearance of having been removed if the map was cut down to a smaller size or if the trigger zone was visually erased from the map. However, the code describing the trigger and the link between the now hidden trigger and any attached units remains intact!:mad:
(n):mad:. Cutting the map down to size and/or erasing trigger zones is NOT good enough!. @%!? There is a complicated way to back-track and get rid of the trigger code but units formerly attached to the code still remain unresponsive to the new A.I. plan. (gosh! darn! drat! hmph!) I am about ready to walk away from creating scenarios in CM. Too many frustration points. That said, seems the only way to bypass the issue is to make sure you start with a brand spanking new and unused master map. fffft
 
Last edited:
Do you have example scenarios showing this? This might actually get fixed if reported.
 
Examples are easy to create. Open any existing SP vs A.I. scenario in the Scenario Editor that has A.I. plans and triggers. Select mission/terrain objectives and on the map erase any terrain objectives with triggers. Now start a new A.I. plan. Select any unit and give it an order to move. When you set the time for departure open the 'wait for tab' and you will see that the triggers are still coded and have not been erased.

Here is more garbage that is easy to demonstrate. When creating a new scenario from an existing one after erasing all units and before selecting new units you will see that the A.I. plans from the original scenario are still in code. The A.I. plans remain associated with the map and with the assigned A1, A2, A3 etc. Blah! At the very least Battlefront should add a button to DELETE select A.I. plans (not just 'orders') and when triggers and objectives are erased from the game map, they should also be cleaned up from the code.

I just went through my own Amfreville - la Fiere master map and painstakingly erased all hidden terrain objectives, triggers and A.I. plans. Now for a fresh start ...

Any lessons learned? When creating a scenario, first create the map and saved it as a MASTER map. Create your scenario on a COPY of the master map but never on the master itself. That is preventive medicine.
 
Guess I need to go back and have another look at the 82nd Airborne scenarios that I have posted so far, to see if there are any neglected triggers and A.I. plans that need to be cleaned up.
 
You can copy and paste a blank AI plan into a used AI plan in order to make the used AI plan blank and get rid of all the unwanted triggers etc. Whenever I re-use a map this is usually one of the first things I do. This is part of the reason, when creating a scenario, I always leave AI Plan #5 blank (un-used). CTRL-C to copy. CTRL-V to paste.
 
You can copy and paste a blank AI plan into a used AI plan in order to make the used AI plan blank and get rid of all the unwanted triggers etc. Whenever I re-use a map this is usually one of the first things I do. This is part of the reason, when creating a scenario, I always leave AI Plan #5 blank (un-used). CTRL-C to copy. CTRL-V to paste.
Brilliantly simple. Thank you.
 
Back
Top