AI Problem

Discussion in 'Help Wanted' started by wachta, Jul 21, 2017.

  1. wachta

    wachta New Member

    Joined:
    Jul 21, 2017
    Messages:
    26
    Likes Received:
    3
    Hey,

    I have a major Problem. I can´t find a way to let west Units (Bluefor) shoot on our Players.
    I tried it with "Player addRating -10000;" which makes it work in simple multiplayer missions but not on our Server.
    I tried to set a trigger, so as soon as the Player goes into the arrior his Rating is reduced but somehow it does not want to work out.

    Is there something running in the back always increasing the rating or what is there i cannot see?
    All ways i know to let Bluefor attack civ is either with addRating / west setFriend [civ,0] / and by grouping with east (Opfor) high ranking officer. Only addRating is viable :/ .
    Please Help me ^^ .

    AI is set when mission starts not spawned.
    Thanks in advance, wachta. ;)
     
  2. SLIgaming

    SLIgaming Member

    Joined:
    Jan 29, 2017
    Messages:
    59
    Likes Received:
    7
    Hey just want to verify are you wanting EAST ai units to attack us (CIV units) ? I guess you making an AI mission?
    I would set the AI as they spawn i.e:
    Code:
    "O_G_Soldier_F" createUnit [getMarkerPos "your_marker_name", _groupAlpha];
    _groupAlpha setFriend [civilian, 0];
     
    Last edited: Jul 21, 2017
    wachta likes this.
  3. clarkycal

    clarkycal Active Member

    Joined:
    Jul 3, 2017
    Messages:
    121
    Likes Received:
    29
    This does not work at all, i have done A LOT of testing with AI and Desolation, i have found that 'Player addRating -9999999999;' is the ONLY way i could get AI to attack me, however the DEV's i think it was @Nex said using addrating will/can cause problems, i think the players need to be moved to another faction such as independent?

    Edit: Also no faction is enemy with civilian
    Code:
    NOTE: By default no side will shoot units on the civilian side, even when fired upon by them (same as for captives).
    Source: https://community.bistudio.com/wiki/Side_relations
     
    wachta and SLIgaming like this.
  4. wachta

    wachta New Member

    Joined:
    Jul 21, 2017
    Messages:
    26
    Likes Received:
    3
    first of all, thanks for the quick responses :) .

    Second of all no it is not a mission. We have a story line going on our server . In short you get to a radio station there you can check radio frequencies. One Frequency transmits a message where somebody was taken hostage by "the Military" and is in need of help. You get a small hint towards where he is. Then you can find the military base and try to free that guy. To simplify the whole thing he will be shot when you get into the room with the cells ^^. Players who make it to clear the base get rewarded. After the first people do that there will be a content patch which will progress the story.
    All of that is working and we are going to do alot more like that.
    It is pretty epic believe me :D . (just the goddamn npc´s won´t attack :mad:)

    addrating works i made it work on a non dedicated server . If you change the factions of the players the mission will not load.
    Only thing i have heard about problems is if you are adding this during a mission it could cause problems with ai behaviour.
    The only other thing i could think of is setting a trigger on the island and as soon as someone enters you change the faction of the player by grouping with an high ranking officer with joinSilent grpName . But this is pretty much the dumbest thing to do cause what happens to the players data then?

    @SLIgaming west should attack civ.
    But the attackers faction does not really matter as long as it attacks the civ´s.
    setFriend [civilian, 0]; does not work.
    AI will aim at you but will not shoot as long as your civ.
    Only system which lets that happen is the Rating thing.

    @EDIT: Tried to do it with joinsilent too. Does not work either. What is there in place to keeps the ai from shooting ??
     
    Last edited: Jul 23, 2017
    SLIgaming likes this.
  5. motopowersport

    motopowersport New Member

    Joined:
    Oct 16, 2017
    Messages:
    9
    Likes Received:
    0
    Did you ever get ai working? If so how did you do it?
     
  6. clarkycal

    clarkycal Active Member

    Joined:
    Jul 3, 2017
    Messages:
    121
    Likes Received:
    29
    i swear i seen on discord someone had it working, but i have no idea.
     
  7. Razer

    Razer Member

    Joined:
    Jun 13, 2017
    Messages:
    36
    Likes Received:
    10
    This should work:
    Go-to: @DesolationServer\Addons\Desolation\Server\fn_initServer.sqf
    Change: civilian setFriend [sideEnemy, 0]; TO sideEnemy setFriend [sideEnemy, 0];

    Then go-to: @DesolationServer\Addons\Desolation\Client\fn_initClient.sqf
    Add somewhere in there: player addRating -10000;

    I haven't tested this but I don't see any reason why it wouldn't work :)
     
  8. motopowersport

    motopowersport New Member

    Joined:
    Oct 16, 2017
    Messages:
    9
    Likes Received:
    0
    Tried this method with no luck. Please does anyone know how to make and faction a enemy of a civilian? Tried
    EAST setFriend [Civilian, 0];
    WEST setFriend [Civilian, 0];
    sideEnemy setFriend [sideEnemy, 0];
    sideEnemy setFriend [Civilian, 0];
    and nothing worked! Hope someone can help me on this! Did you get it to work? If so how?
     
    Last edited: Nov 14, 2017
  9. Razer

    Razer Member

    Joined:
    Jun 13, 2017
    Messages:
    36
    Likes Received:
    10
  10. clarkycal

    clarkycal Active Member

    Joined:
    Jul 3, 2017
    Messages:
    121
    Likes Received:
    29
    Back when i was messing with Desolation i tried everything. None of this works, the only way i could see how to do it, is by changing the player faction to another (Blufor[Epoch uses this], OpFor, Independent[Exile uses this]) then the AI will shoot at you.
     
  11. J3SUSM4N

    J3SUSM4N New Member

    Joined:
    Mar 7, 2018
    Messages:
    1
    Likes Received:
    1
    Was searching the forums for an answer to this since i decided to put together a server for me and my friends to play some dayz style like old origins. Not sure if this was answered somewhere else but i found that if you load the mission.sqm into the eden editor you can delete the civilians and replace them with Independent faction, now place down a zombie and link all the survivors to the zed pushing leftcntrl and clicking. Delete the zed and unlink the survivors by dragging to the ground and clicking. Load mission.sqm back up via pbo and now you can have hostile ai while still linked to Civilian faction. DISCLAIMER: I have only tested this with SargeAI.
    also in sarge/init/fn_preInit.sqf
    EAST setFriend [CIVILIAN, 0];
    EAST setFriend [INDEPENDENT, 0];
    WEST setFriend [CIVILIAN, 0];
    WEST setFriend [INDEPENDENT, 0];
     
    moosemilker likes this.
  12. moosemilker

    moosemilker Member

    Joined:
    Mar 1, 2018
    Messages:
    38
    Likes Received:
    9
    OK. I figured this out... The mission.sqm needs to be changed for your standard AI mod/plugin to work right (AKA: FOR AI TO SHOOT AT YOU!). :)
    1. Arma AI doesn't like to shoot civilians no matter how you modify their behavior.
    2. There is some problem with C_man_p_beggar_F that I don't have time to identify, but it prevents AI from shooting at you.

    Edit mission.sqm and change:
    • Group side from CIVILIAN to INDEPENDENT
    • Player side from CIVILIAN to INDEPENDENT
    • Player type from C_man_p_beggar_F to I_G_Survivor_F
    After that, back-fill your database by hand or by script (like the following)... This is necessary, for current living players to be shot at.

    UPDATE`desolationredux`.`charactershareables` SET `classname` = 'I_G_Survivor_F' WHERE `classname` = 'C_man_p_beggar_F';​

    A single mission.sqm edit example:

    class Item11
    {
    dataType="Group";
    side="INDEPENDENT";
    class Entities
    {
    items=1;
    class Item0
    {
    dataType="Object";
    class PositionInfo
    {
    position[]={-6048.9517,169.37521,-872.40466};
    angles[]={0,2.1686413,0};
    };
    side="INDEPENDENT";
    flags=3;
    class Attributes
    {
    isPlayable=1;
    };
    id=19;
    type="I_G_Survivor_F";
    atlOffset=6.2697144;
    class CustomAttributes

    After all that, be sure your AI mod/plugin is set to EAST and is enemy to INDEPENDENT.

    Another thing to consider is running "Unlocked Uniforms" mod (by Haleks), but you need to make it a required mod server and client side... Uniforms can have issues transferring to your inventory between Arma's factions. This will fix that.

    Enjoy!
     
    Last edited: Apr 16, 2018
  13. skueneth

    skueneth Member

    Joined:
    Nov 29, 2017
    Messages:
    99
    Likes Received:
    0
    Hello,
    the Database Script is wrong. It has to be:

    UPDATE `desolationredux`.`charactershareables` SET `classname` = 'I_G_Survivor_F' WHERE `classname` = 'C_man_p_beggar_F';

    What can I do, for new player, so that the standard class is I_G_Survivor_F

    thx for answer
     
  14. moosemilker

    moosemilker Member

    Joined:
    Mar 1, 2018
    Messages:
    38
    Likes Received:
    9
    Thx @skueneth. I edited it inline. So nice to have AI attack. :)
     
  15. skueneth

    skueneth Member

    Joined:
    Nov 29, 2017
    Messages:
    99
    Likes Received:
    0
    No Problem. It so nice, you are allright ;-)
    But what is with new Players ? Is it enough through changes in Mission-file, for example this stuff:

    side="INDEPENDENT";
    flags=3;
    class Attributes
    {
    isPlayable=1;
    };
    id=19;
    type="I_G_Survivor_F";
    atlOffset=6.2697144;
    class CustomAttributes

    thx

    PS: what script do you use for the npc´s ??

    Steven
     
  16. B.A.D.

    B.A.D. Member

    Joined:
    Dec 21, 2017
    Messages:
    92
    Likes Received:
    20
    You just change Player unit to something like i_g_survivor_f and Set friendlyness to all other factions so theyre hostile to each other in "advanced Intel" in the Editor.
     
  17. moosemilker

    moosemilker Member

    Joined:
    Mar 1, 2018
    Messages:
    38
    Likes Received:
    9
    I fully modified A3XAI to be compatible with this mod system. It is not OK for me to host it on GitHub because I am not the author, Face is... Sarge AI has a compatible version hosted on GitHub, but in my humble opinion is not as good as A3XAI. :)

    There are like 8 files to modify to get A3XAI to work with Desolation Redux. Easy. My server is testable if you search for moosemilker on Arma 3 servers in game or view my profile to get more info.
     
  18. skueneth

    skueneth Member

    Joined:
    Nov 29, 2017
    Messages:
    99
    Likes Received:
    0
    Ok I tested your server. nice. I send you pm
     
  19. Legodev

    Legodev Developer Staff Member

    Joined:
    Jul 18, 2016
    Messages:
    384
    Likes Received:
    134
    moosemilker likes this.
  20. moosemilker

    moosemilker Member

    Joined:
    Mar 1, 2018
    Messages:
    38
    Likes Received:
    9
    I asked the author for permission to host my updates, or allow me to upload a new version to his GitHub. If he gets the message and agrees to it, I'll go that route. If not, I'll consider the patch route.
     

Share This Page