Page 10 of 16 FirstFirst ... 67891011121314 ... LastLast
Results 91 to 100 of 158

Thread: Ai suppression script help

  1. #91
    Quote Originally Posted by -Coulum- View Post
    Yep I am going to make a version like this as soon as I get home tonight minus the find cover as I don't think it's functional. The skills part should make it so I can bump up ai accuracy and still have some relatively long firefights, but I can understand why it not everyone's cup of tea, which is why the current versions don't have it.

    It should be relatively easy to do, as the code required is already written on page 3
    I agree, find cover does seem to be broken.

    Might be interesting to see what happens with dropping the "courage" factor when units are suppressed (nice would be proportional to # of bullets whizzing past, but that would be too CPU-intensive) - though I'm not at all clear of the relationship between "courage" & "fleeing".

  2. #92
    Master Gunnery Sergeant -Coulum-'s Avatar
    Join Date
    Dec 8 2010
    Location
    Canada
    Posts
    1,067
    Author of the Thread
    nice would be proportional to # of bullets whizzing past, but that would be too CPU-intensive
    Yes and no. It probably wouldn't be to system intensive, but there is a difference between cowardice and common sense. Right now, I see the reaction of the ai to suppression as a common sense reaction rather than one out of fear. But I will make shooting skill decrease by a factor proportional to the unit's courage to represent how men can panic under fire reducing their accuracy.

    I could be wrong, but I also believe that a units courage determines how willing he is to advance (don't quote me on that though, I have't actually tested). So ideally, if courage is decreased while under fire, it should be possible to suppress a units movement although I doubt it will be possible to totally pin them.
    --edit--

    Quote Originally Posted by -Coulum-
    Yep I am going to make a version like this as soon as I get home tonight minus the find cover as I don't think it's functional. The skills part should make it so I can bump up ai accuracy and still have some relatively long firefights, but I can understand why it not everyone's cup of tea, which is why the current versions don't have it.
    Sorry, I lied - probably won't get time to work on this until Friday, maybe Thursday.
    First post updated

  3. #93
    First Sergeant
    Join Date
    Oct 30 2009
    Location
    Brisbane, Australia
    Posts
    980
    Here's a quick and dirty proof of concept script. If the unit is suppressed by a single bullet, his aiming accuracy and shake values are set to 75% of their original. If suppressed by multiple rounds, they drop to 50%. -Coulum- has a more refined way of changing these parameters, but this should show if the concept is workable. I can't test it at work....

    Spoiler:
    Last edited by tpw; Jun 20 2012 at 01:34.

  4. #94
    First Lieutenant CameronMcDonald's Avatar
    Join Date
    Oct 10 2005
    Location
    Sydney, Australia.
    Posts
    5,553
    You need to cease all gainful employment immediately, tpw, and become a scripting poopsocker/neckbearder ASAP.

    Everyone tempted to post another inane/useless/whogivesatoss topic in the A3 forum - here.

  5. #95
    First Sergeant
    Join Date
    Oct 30 2009
    Location
    Brisbane, Australia
    Posts
    980
    Quote Originally Posted by CameronMcDonald View Post
    You need to cease all gainful employment immediately, tpw, and become a scripting poopsocker/neckbearder ASAP.
    Thanks for the high praise! If I don't stop looking at this site when I'm at work, they might cease my gainful employment for me

  6. #96
    Master Gunnery Sergeant -Coulum-'s Avatar
    Join Date
    Dec 8 2010
    Location
    Canada
    Posts
    1,067
    Author of the Thread
    Quote Originally Posted by CameronMcDonald
    You need to cease all gainful employment immediately, tpw, and become a scripting poopsocker/neckbearder ASAP.
    I concur.

  7. #97
    I had a thought... I think you guys can combine both the Distance version and the Side version together.

    Basically the script should use the distance version in overall, but the side version comes in when trying to alter the skills.
    I think this would let the friendly AI to duck when a fire from a SBF team coming from overhead (probably reduce friendly fire a bit) but the skills wont be altered.

    Just my 2cents worth

  8. #98
    First Sergeant
    Join Date
    Oct 30 2009
    Location
    Brisbane, Australia
    Posts
    980
    Fantastic idea, I am looking into it right now!

    Quote Originally Posted by Mr_Centipede View Post
    I had a thought... I think you guys can combine both the Distance version and the Side version together.

    Basically the script should use the distance version in overall, but the side version comes in when trying to alter the skills.
    I think this would let the friendly AI to duck when a fire from a SBF team coming from overhead (probably reduce friendly fire a bit) but the skills wont be altered.

    Just my 2cents worth

  9. #99
    +1, Mr_Centipede

  10. #100
    First Sergeant
    Join Date
    Oct 30 2009
    Location
    Brisbane, Australia
    Posts
    980
    I took time out from my poopsocking to implement Mr_Centipede's suggestion and so far it seems to be working OK. Please try it out.

    I also spent a bit of time trying to optimise the code a bit. There's lots of nested if statements, which look ugly but should speed things up thusly:

    For each unit on map -->
    if unit is not in a vehicle -->
    if there is an active bullet -->
    if the bullet count around unit is greater than 0 -->
    if the distance of the shooter to the unit is greater than 25m -->
    if the shooter's mag is not pistol or SMG -->
    if shooter is enemy then unit drops and skills are reduced
    else shooter is same side so unit drops but retains skills

    So most of the time the script is actually only really checking if the unit is not in a vehicle and if there are any bullets being shot, which is not draining the CPU terribly. Only as each nested requirement is met does the script delve deeper and apply more calculations.

    For this proof of principle I only bothered changing a unit's overall skill, not the various components individually.

    Script: Spoiler:
    Last edited by tpw; Jun 20 2012 at 11:26.

Page 10 of 16 FirstFirst ... 67891011121314 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •