MiB Posted November 7, 2007 Share Posted November 7, 2007 I was thinking about this. I doubt Steve & co would actually implement this - I'm no computer guy but I'd imagine coding it would be a nightmare on stilts - but I thought I'd share it anyway. Lots of people are complaining about the AI and how it reacts to various situations - especially when under fire. I then remembered an old game, Starcraft, where you could make custom maps with things called "triggers." Triggers were areas you painted on the map, within which you could use a very simple premade programming syntax to make cool things happen. For example, you could state that when a unit entered this space you just painted, it would spawn x amount of y units in another location, which you could then order to attack the area that was just entered. I was thinking - would this kind of system work well for all the people complaining about the AI? Instead of complaining to Steve about the reaction, you could program your own. For example, you create a new behavior that applies to all Strykers, call it "cautious" and put in language to the effect that "Whenever a Stryker is fired at by AT-infantry, it will pop smoke and reverse 25 meters" A more aggressive commander might put his default response to immediately putting down fire at the infantry or the area if they can't see them. What do you guys think? 0 Quote Link to comment Share on other sites More sharing options...
Eichmann2 Posted November 7, 2007 Share Posted November 7, 2007 Hello mate, They had triggers implemented in the excellent mission editor of the PC version of Operation Flashpoint. This made designing fairly complex scenarios easy and fun - even for programming braindeads like me 0 Quote Link to comment Share on other sites More sharing options...
Cpl Steiner Posted November 7, 2007 Share Posted November 7, 2007 MiB, Some sort of trigger system should definitely be implemented but just painting areas of the map isn't enough. What if no AI-controlled unit can see that area? If the AI doesn't know the enemy is there, it would be unrealistic for it to react to their presence in the area. A better system would be to link triggers to spotting behaviour. In other words, you paint an area on the map and the trigger for that area does something if the enemy is spotted in that area, such as execute a flanking manoeuvre. Even this isn't idea because of C2 issues. For instance, is the unit that spotted the enemy able to communicate this information to the HQ in charge of the flanking force? However, this sort of detail should probably be waived to be fair to the AI because the player-controlled force already benefits from the player's omniscience in these matters. Other triggers should be implemented to coordinate friendly forces, such as Group A waiting for Group B to arrive at its destination before moving off. 0 Quote Link to comment Share on other sites More sharing options...
Panzer76 Posted November 7, 2007 Share Posted November 7, 2007 What you describe sounds more like SOPs. God knows, the AI in SF need all the help it can get. 0 Quote Link to comment Share on other sites More sharing options...
thewood Posted November 7, 2007 Share Posted November 7, 2007 Way back in the beginning, I think Steve said SOP-like orders were a goal for CM2. Haven't seen or heard much about lately. 0 Quote Link to comment Share on other sites More sharing options...
aka_tom_w Posted November 7, 2007 Share Posted November 7, 2007 Lots of people are complaining about the AI and how it reacts to various situations - especially when under fire. I then remembered an old game, Starcraft, where you could make custom maps with things called "triggers." Triggers were areas you painted on the map, within which you could use a very simple premade programming syntax to make cool things happen. For example, you could state that when a unit entered this space you just painted, it would spawn x amount of y units in another location, which you could then order to attack the area that was just entered. I was thinking - would this kind of system work well for all the people complaining about the AI? Instead of complaining to Steve about the reaction, you could program your own. For example, you create a new behavior that applies to all Strykers, call it "cautious" and put in language to the effect that "Whenever a Stryker is fired at by AT-infantry, it will pop smoke and reverse 25 meters" A more aggressive commander might put his default response to immediately putting down fire at the infantry or the area if they can't see them. There may be two ways to look at this, are you asking if you can make the painting of the trigger area's on the map while you are actually the player playing the game OR are you asking for triggers and trigger effects to be available for the scenario designer to help prompt the AI? BOTH options would be kind of a BIG bonus and great addition to the current system, but I don't think this concept was ever part of the original design for the game. (nice idea though, just needs some working out of the details as to exactly how to make compatible with elements of the game code already in the game.) AND for sure that would be the tricky part. I am really looking to the future and hoping more options for triggers and some form of "if this then that reaction" programing is available to scenario designers for AI programing in scenario design for the eventual release of the WWII series of games some where down the road. Its clear there are not enough tools and options to let the scenario designer script the AI to react to events other then along a linear chronological timeline in the current release of the AI and Scenario editor as it stands now. [ November 07, 2007, 09:51 AM: Message edited by: aka_tom_w ] 0 Quote Link to comment Share on other sites More sharing options...
Cpl Steiner Posted November 7, 2007 Share Posted November 7, 2007 Originally posted by aka_tom_w: Are you asking if you can make the painting of the trigger area's on the map while you are actually the player playing the game OR are you asking for triggers and trigger effects to be available for the scenario designer to help prompt the AI?I'm referring to the latter - i.e. triggers as a tool in the editor for making the AI react to the player's moves. I personally don't think this is too difficult to do. If you look at the way Radio IEDs are implemented, the mechanics are already in place. An activated Radio IED detonates when an enemy unit comes close enough and the trigger man has LOS to the IED. The event triggered is an explosion, but it could just as easily be to unpause a waypoint so that units start to move out, or to bring on reinforcements after x amount of minutes. I repeat, this should not be rocket science to implement. 0 Quote Link to comment Share on other sites More sharing options...
aka_tom_w Posted November 7, 2007 Share Posted November 7, 2007 I would like to suggest if it was that easy to do it would have already been implemented in the game. The devil is in the details, but its always good to request or suggest the need for newer, better and more realistic tools in the AI editor. 0 Quote Link to comment Share on other sites More sharing options...
thewood Posted November 7, 2007 Share Posted November 7, 2007 It is one of those things I'm sure would have been done if time allowed. It seems pretty obvious the negative impact that time only triggers have on SP scenarios. 0 Quote Link to comment Share on other sites More sharing options...
MiB Posted November 7, 2007 Author Share Posted November 7, 2007 I meant SOPs, thank you whoever mentioned that. The trigger thing was just an example. Though triggers would also be great for the scenario editors. 0 Quote Link to comment Share on other sites More sharing options...
Webwing Posted November 22, 2007 Share Posted November 22, 2007 I'd love to see triggers in the editor. It would add a lot of possibilities to the scenario designers. On the other hand I think BF wanted the editor to be as user friendly as possible. Not sure how succesfull they were since there aren't that many missions designed by the comunity so far. 0 Quote Link to comment Share on other sites More sharing options...
aka_tom_w Posted November 22, 2007 Share Posted November 22, 2007 I am hoping something like "triggers" or events or reactions or something will be on "the list" to work on later in the game engine. 0 Quote Link to comment Share on other sites More sharing options...
aka_tom_w Posted November 22, 2007 Share Posted November 22, 2007 this is still a good suggestion, but I think the part about "coding would be a nightmare on stilts" is particularily appropriate here... Originally posted by MiB: I was thinking about this. I doubt Steve & co would actually implement this - I'm no computer guy but I'd imagine coding it would be a nightmare on stilts - but I thought I'd share it anyway. Lots of people are complaining about the AI and how it reacts to various situations - especially when under fire. I then remembered an old game, Starcraft, where you could make custom maps with things called "triggers." Triggers were areas you painted on the map, within which you could use a very simple premade programming syntax to make cool things happen. For example, you could state that when a unit entered this space you just painted, it would spawn x amount of y units in another location, which you could then order to attack the area that was just entered. I was thinking - would this kind of system work well for all the people complaining about the AI? Instead of complaining to Steve about the reaction, you could program your own. For example, you create a new behavior that applies to all Strykers, call it "cautious" and put in language to the effect that "Whenever a Stryker is fired at by AT-infantry, it will pop smoke and reverse 25 meters" A more aggressive commander might put his default response to immediately putting down fire at the infantry or the area if they can't see them. What do you guys think? 0 Quote Link to comment Share on other sites More sharing options...
Cpl Steiner Posted November 22, 2007 Share Posted November 22, 2007 Originally posted by aka_tom_w: this is still a good suggestion, but I think the part about "coding would be a nightmare on stilts" is particularily appropriate here...I have to disagree, based on my programming experience. The absolute core idea behind modern programming is that it is "event-driven". In the old days of programming you had lots of variables in one part of the program and lots of procedural code in another. Nowadays you have "objects" that encapsulate both the variables and the procedures they use. An object's procedures (usually called methods) are often made to fire in reaction to an event. Programmers talk about event listeners and event handlers for instance, in which a part of the program checks continuously for a particular event and then fires off its associated event handlers when the event occurs. If CM:SF has been built along the same principles, then the something you paint on the map would be an object and it would have built-in functions that are triggered when particular events occur, such as an enemy unit entering the painted area. This is not at all difficult given modern coding practices. 0 Quote Link to comment Share on other sites More sharing options...
Webwing Posted November 22, 2007 Share Posted November 22, 2007 TOW's mission editor uses triggers extensively. It's very powerfull. It is the only way to make troops react using the mission editor. Now in CMSF editor you can only act. The reaction is up to the TACAI. The beauty of the conditionals/triggers is that you can do stuff like: If A sees B, A go to X. If A takes X loses A retreats to B, etc. The possibilities are endless. Then again CMSF has a TACAI whereas TOW does not. If they include it in the editor even in a script form it would be great. If people dont want to use it, just dont, and let the AI take care of the tactics. But to be honest I wouldn't put this as a priority in my list if I was BF. [ November 22, 2007, 02:54 PM: Message edited by: Webwing ] 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.