Home   Help Search Login Register  

Author Topic: Trigger Condition to Count Number of Units & Balancing Question  (Read 2551 times)

0 Members and 1 Guest are viewing this topic.

Offline snafu

  • Members
  • *
It's January 1987 and the Soviets have launched their attack against NATO, engulfing the Inner German Border in combined arms warfare. Nogova is standing in for West Germany and NATO's mission is to hold the key bridge at Davle and stop the Soviets gaining a bridgehead.

I've got a trigger for East and a trigger for West to determine which ending to initiate. Each has a condition where if the units on a side fall below a certain number, the remaining units will retreat to a point outside of the mission area.

I've seen the East side trigger activate when the BMPs with their squads are crossing the river and there are still two active T-80 tanks, which puts the active units over 5.

The East trigger is as follows:

https://steamcommunity.com/sharedfiles/filedetails/?id=1415559147

I've seen the West trigger activate, which worked fine. But the not present trigger to actually end the mission did not fire. Does the condition also count vehicles that have been abandoned but not destroyed?

Finally, I've adapted this mission from a wargame scenario book, which gives the US side a Cobra. AA systems are abstracted in the wargame rules. I'm not sure how to balance the Cobra. The Soviets have a Shilka and Strela trooper each with a probability of presence, but the existence of one or the other usually takes the Cobra out fairly easy. On the other hand, if the Shilka and Strela trooper don't spawn then the Cobra has an easy day. Any balance ideas?

I've added a link to the mission at the end of this post. It requires Mikero's Editor Update - https://www.ofpec.com/editors-depot/index.php?action=details&id=158&game=OFP

https://drive.google.com/file/d/1yoaPoF30Pm1ZfZ_F_ZohtH27-iy1VtiS/view?usp=sharing

Offline Gruntage

  • Missions Depot
  • Administrator
  • *****
  • How do I get outta this chickensh*t outfit?
In answer to your first question, I believe abandoned vehicles do count towards that condition. Probably because they had East troops assigned to them. I can't say I've run into this scenario before. Although I have done the 'count thislist' many times as a condition for ending a mission (stops the last-man issue), but I've never used countside.

I would have thought that this bit of code would do the job just fine:

Code: [Select]
"alive _x" count thislist < 5
I've used that condition many times and I've never run into the issue of the mission not ending because of abandoned vehicles.

As for the second question, I believe the answer lies in not using the probability of presence. That's not to say that there shouldn't be a random element, but I think you should take more control of it; through unit spawning scripts for example. You could also try reducing the skill of the AA troops down.

Another possibility is increasing the strength of the cobra through an eventhandler, but that might be a bit unrealistic. There's some ideas for ya  ;)
"But one thing I can tell you from not just OFP but life in general:  criticism is directly proportional to quality. The more criticism a mission receives, the better the outcome" - macguba

Offline snafu

  • Members
  • *
Thank you, I'll give those a try and report back.

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
When using countSide thislist, or count thislist, a vehicle will always count as one no matter how many occupants it has, so a BMP with 10 squad inside will count as one single entity.
This is because both count an array in which a single vehicle is one single element.

Quote
Does the condition also count vehicles that have been abandoned but not destroyed?
No, vehicles of any side turn to civilian side the moment it's occupants leave the vehicle or die so unoccupied vehicles should not be an issue unless counting civilians.
Of course if say a tank driver and commander die the gunner stays put and the vehicle stays on the side of the gunner.

So this sort of condition for it to be perfect would require slightly more complex approach, basically you'd have to count the side by going through the array of units one by one and adding the vehicle occupants into the final count. Probably weeding out vehicles that no longer pose a threat (!canFire)..  :hmmm:

Quote
Any balance ideas?
In war there is no balance  :D
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline snafu

  • Members
  • *
Many thanks for the assistance, guys.

By the way, I've had great help from both of you over the past few months. I bought the Arma Humble Bundle to get Apex and the first batch of A3 DLC for cheap. I also got keys for the Arma 2 collection and a key for Arma 3 which I already own.

Would you guys like any of these keys? You probably have the some of these or all of them, but you could always give them to a friend or family member that might be interested in the series or playing MP with you.