Jump to content
iben

[RELEASE] IWAC - Autoclaim addon for WAI [v1.3.1]

Recommended Posts

===

Credits:

All credit belongs to all authors of used source files:

===

Download v1.3.1 [Last update: 2018-01-16]

===

Introduction:

... once upon a time, *mr. yeahBUT* and *mr. no_name* chatting:

---

Q: mr. yeahBUT
IWAC? OMG, what is it?

A: mr. no_name
Well, it's Autoclaim addon for WAI mission system.

---

Q: mr. yeahBUT
...yeah, but is it usefull? What it can do?

A: mr. no_name
Not sure about the first question part... but it could be.
If one of your server rules says somenthing like: "Player has to claim mission in sidechat and mark mission on map with name", well, this addon is just for you.
It's fully automatic, which means - no more sentences like: "I forgot...", "Who is doing mission xy?", "Could you please remove your marker once mission is finished?" etc.
This little addon will make all the job for you and your players.

---

Q: mr. yeahBUT
pffff... I have PVP server. Totally useless!

A: mr. no_name
Probably yes... Do you wanna hear more?

---

Q: mr. yeahBUT
hmmm.. not really, but I have nothing to do right now, so continue...

A: mr. no_name
...OK my friend. I have certainly nothing to do either, so I will... :) What's your question?

---

Q: mr. yeahBUT
ok.. let's start with somenthing I can picture in my mind. Do you have any screenshot so I can see it in action?

A: mr. no_name
yeah, sure...

1C582DD3D88465973FF3122C02977DC57F34634D

---

Q: mr. yeahBUT
What is that red circle around mission?

A: mr. no_name
This is somenthing I call it "claiming zone". You can configure it using these variables:

iben_wai_ACzoneActivate = true; // Turn claiming border ON/OFF
iben_wai_ACzoneMarkerColor = "ColorRed"; // Border color
iben_wai_ACdistance = 1300; // Distance from mission center to claiming border

---

Q: mr. yeahBUT
hm.. 1300m? It's a little bit too much. Should be much shorter distance.

A: mr. no_name
It's completely up to you. If you want to be loved by your snipers, set it to 400m and set AI skills to max - no kidding, I experienced this setup already :))
Also remember - there is somenthing called timeout distance in WAI - you can search variable `wai_timeout_distance` in WAI config.
If `wai_timeout_distance` < `iben_wai_ACdistance`, mission can dissapear in front of player's face (which doesn't mean it's a bad thing...)

---

Q: mr. yeahBUT
Well, it's too bad. Can you imagine what happen if two or three missions spawns close to each other? You think it's not a problem player could claim multiple missions?

A: mr. no_name
How should I answer this question...? Let's start with this: When you try to setup any system, you should think about it.
I mean - there are variables `wai_avoid_missions` and `wai_avoid_traders` in WAI config for example.
Just use bellow formulas and you should prevent mission (mission claim zones) overlapping:

wai_avoid_missions = ((iben_wai_ACdistance * 2) + 500);
wai_avoid_traders = (iben_wai_ACdistance + 200 + 500);
// ... also see picture bellow:

01A930D625193C4A3D72C2368C505943870BC755

---

Q: mr. yeahBUT
That's nice, but I've already experienced mission placement is not perfect... there is a chance player will claim two missions!

A: mr. no_name
In fact, it's not possible. If player is already 'claimer', he is registered and system doesn't allow him to claim multiple times (you can see it in the video at the bottom).

---

Q: mr. yeahBUT
Alright... what's that flag with name? I don't want to expose player name!

A: mr. no_name
It's up to you again. You can configure all about player marker using these variables:

iben_wai_ACshowNames = true; // If false, text = "Claimed by a player [realtime status info]"
iben_wai_ACmarkerType = "hd_flag";
iben_wai_ACmarkerColor = "ColorBlack";

---

Q: mr. yeahBUT
ok... yeah, but it's too bad to expose player by setting marker on his position...

A: mr. no_name
You are not exposing his position. Marker is created in random spot within given range. You can adjust it by setting variable:

iben_wai_ACmarkerRange = 400;

---

Q: mr. yeahBUT
cool... so why not create flag object to be visible close mission? Cool idea, huh?

A: mr. no_name
yeah, sure it is :) You can use these variables:

iben_wai_ACcreateFlagOjb = true;
iben_wai_ACmarkerFlagClass = "FlagCarrierINDFOR_EP1";
// ... see the picture bellow:

948AE6E3D0B16880C657A1A47FF9AE54DB45E2DF

---

Q: mr. yeahBUT
How will player know about claiming is happening?

A: mr. no_name
You can enable message system and let player know. Just use bellow variable and install client side files: 

iben_wai_ACplayerMsg = true;

---

Q: mr. yeahBUT
Yeah, but... still. Why should all players force to read useless msg that are not about them?
Also... that's server resources waste to broadcoast so many msgs...!

A: mr. no_name
Actually msg is private. Only player involved is informed and can see the msg.

---

Q: mr. yeahBUT
Yeah... but there is couple more troubles. For example: Mission just spawn close to my position or I'm just passing by location.
I don't want to be a part of mission fight, but still... I'm in zone... That's not good.

A: mr. no_name
You can use bellow variable and set it to some reasonable value in seconds.
That gives passing by players enough time to decide to stay or leave claiming area.

iben_wai_ACsafeClaimDelay = 60;

---

Q: mr. yeahBUT
Too many troubles... what about players in bases?

A: mr. no_name
Just make your decision if you want to allow players fight missions from base or not. You can use following variables.
This way you can force autoclaim system to ignore these players.

iben_wai_ACplotRestriction = true;
iben_wai_ACplotRange = 30; // If 'iben_wai_ACplotRestriction' is true, what distance from plotpole is not allowed?

---

Q: mr. yeahBUT
Hm, but what if player claimed the mission and dies, loses connection etc. What then, ha...?

A: mr. no_name
As you can see at the above picture, there is marker with player name (or anonymous name) and so called `realtime status`.
If player is alive and fighting inside claiming zone, status is `Active`. If player is gone - timeout is fired.
That means, system will wait given time for claimer return. If timeout runs off, mission is free for claiming.
You can set some reasonable time for timeout in seconds:

iben_wai_ACtimeout = 300;

---

Q: mr. yeahBUT
What about my admins? I don't want them to claim missions just because they are helping inside zone...

A: mr. no_name
Yeah, got it. You can exclude your admins from system:

iben_wai_ACexcludeAdmins = true;
iben_wai_ACadmins = ["0","0"]; // List your admins UID's

---

Q: mr. yeahBUT
Wait! I'm using moving missions like 'patrol'. It's a nonsense to use autoclaim for that kind of missions!

A: mr. no_name
Agree. If you have any kind of moving missions, or custom missions you want to be free for all, just exclude them:

iben_wai_ACexcludedTypes = ["patrol"];

---

Q: mr. yeahBUT
Ok then. So... I have couple more minutes before my favourite movie starts. So last a few questions:
I believe you will face problems in such scenarios like: multiple players in the same time in the zone - who will be first?
What about other players? And what about player or better players in vehicle?
You will not be able to sort them out and it's gonna be chaos!

A: mr. no_name
Well, I made the best I could in given time and space. I don't want to go too deep, but imagin autoclaim system as somenthing like simple `memory buffer`.
This buffer is **(a)** able to recognize all players in area (including all players inside vehicles); **(b)** is able to sort them out by distance.
It's very small probability two players will reach the same distance in the same time - the only exception crossed my mind are players
n the same vehicle - they share the same distance. But system is able to recognize them and sort them from driver to cargo.
But anyway, system is able to handle these scenarios pretty well (at least I hope so according to test results);
**(c)** System works in layers - from register list, wait list to claim list. Each layer is equiped by self-cleaning mechanism,
so each list is real image of status in claiming zone. (self-cleaning means, once player leave area etc., he is kicked from list
and next player in list takes his place - there are no `dead souls in list`).

---

Q: mr. yeahBUT
OK... here we go. So another loop for WAI. It's already server performace killer as it is...!

A: mr. no_name
Hm... good point! And no, we are not creating any extra loop (not single one...). We are using already existing loops -
and we are using these loops only and only if it's reasonable and exiting them immediately if condition isn't met.
According to couple weeks testing on populated server with cca 20 players, no FPS drop was recognized.
BTW: you can add some debug logs to loop critical points and see the result.

---

Q: mr. yeahBUT
...yeah, but I can imagine how installation is gonna be difficult...

A: mr. no_name
Actually, it's not. Visit this github repo and clone or download files. Follow repo structure and merge it with your server/client files.

---

Q: mr. yeahBUT
That's all you can say about installation??? Are you serious??

A: mr. no_name
No and yes. One more thing - addon is designed the way so you don't need to touch any of WAI core files (except a few lines in init).
If you will follow repo structure, you can quickly switch between default WAI files and addon files by setting bellow variable to true/false.

iben_wai_ACuseAddon = true;
// :: WARNING > If you don't know what I mean by "merge files" at this momment,
// :: you should probably wait a little bit and learn, before you start to play with (especially) server-side files.

---

Q: mr. yeahBUT
Hmmm... my movie has just started... have to go now. And BTW... your English sucks... and this addon too... bye...

A: mr. no_name
:( ... I know... bye...

===

Later in time...

===

Q: mr. yeahBUT
Hey! IWAC is now part of WAI by default?

A: mr. no_name
Yes, it is. Since v1.2. It's updated for Epoch 1.0.6.2...

---

Q: mr. yeahBUT
I don't get it... Seems v1.3.1 is out and it's not the same version as WAI has inside the package. What does it mean?

A: mr. no_name
Well, it's just a little improvement. Couple days ago several people made a fix for "mission overlapping". We decided to stick with our approach.
 If you update to v1.3.1, you will get 2 new options in your 'customsettings.sqf' file (see bellow + detailed info in 'customsettings.sqf'_).

Now, what is important:

  • 'iben_wai_ACcoordProtectorTimer' gvar means:
    "If you give me any value > 0 in seconds, I'm gonna protect your just finished mission area against new mission spawn for given time."
  • Protection is processed only if:
    • valid spot for new mission was already found;
    • there is at least 1 item in 'iben_wai_ACprotectedCoord' array
      (that means, at least one mission was completed and coordinates has to be protected agains new mission spawn).
  • If you decide to update and you don't want use this fix, just set 'iben_wai_ACcoordProtectorTimer' value to 0.
    Default position fnc will be used with default WAI fix (note: if you've already updated your WAI core files).
iben_wai_ACcoordProtectorTimer = 300; // @since v1.3

if (iben_wai_ACdevmode) then {
  iben_waiACfindPosLimiter = 999;     // @since v1.3
};

// :: If iben_wai_ACcoordProtectorTimer > 0 && iben_wai_ACdevmode is true,
// :: you will see in your server RPT somenthing like that:

// 19:14:07 "=== [IBEN WAI AUTOCLAIM ADDON, v1.3] || DEBUG [find_position.sqf] >> 'iben_wai_ACcoordProtectorTimer' active (300s) >> Initialising custom position FNC for mission coord protection..."
// 19:14:07 "=== [IBEN WAI AUTOCLAIM ADDON, v1.3] || DEBUG [IBEN_fnc_AC.sqf] >> Currently protected missions coordinates (iben_wai_ACprotectedCoord) >> [[561.226,[12890.3,11228.4,0.0142517],"MainHero1"]]"
// 19:14:07 "=== [IBEN WAI AUTOCLAIM ADDON, v1.3] || DEBUG [find_position.sqf] >> Spot found. Checking if spot is in protected coordinates >> iben_wai_ACprotectedCoord >> [[561.226,[12890.3,11228.4,0.0142517],"MainHero1"]]"
// 19:14:07 "=== [IBEN WAI AUTOCLAIM ADDON, v1.3] || DEBUG [find_position.sqf] >> Loop complete valid position >> [6129.23,8784.35,0] >> in 1/999 attempts"

---

The end.

===

Showcase:

===

IWAC - private server msgs, map markers, status, respawn:

===

===

IWAC - multiple claiming protection, exclude plotpole area option:

===

===

That's all I've got... enjoy, have fun...
Cheers...

===

Edited by iben
Update v1.3.1: Mission overlapping fix,minor updates

Share this post


Link to post
Share on other sites

Nice. 
I personally added claiming report on chat. (I hope this function to be included.)

Spoiler

          if (_fnd == 1) exitWith {
            // ------------------------------------------------------------------
            if ((!_msc) && {(_pia select 0) == 0}) exitWith {
              _cls = [_pia select 1];
              _wls = [_wls, (_pia select 0)] call IBEN_fnc_clsIndex;
              _mrd = [];
              _ccl = CML(_cls,0);
              _mrd = ([_position, _ccl, _mission] call IBEN_fnc_createFlag);
              _psc = [STRLO("STR_IWAC_MARKER_UNKNOWN"), (name _ccl)] select (iben_wai_ACshowNames);
              WMD(_mission) set [4, [true,[_psc,STRLO("STR_IWAC_MARKER_ACTIVE")],(_mrd select 0),(_mrd select 1)]];
              IWACS(_mission,CML(_cls,1));
              _ciz = true;
              _msc = true;
              RMSG(CML(_cls,1),FSTR2(STRLO("STR_IWAC_CLAIMED"),ACSTR,CMNAME(_mission)));
              if (wai_radio_announce) then {
                RemoteMessage = ["radio",format["[RADIO] %1 has claimed a mission.",(name _ccl)]];
                publicVariable "RemoteMessage";
              };

            };
          };


 

Share this post


Link to post
Share on other sites
1 hour ago, Schalldampfer said:

I personally added claiming report on chat. (I hope this function to be included.)

All msgs are private by default - only player involved can see it.
But yes, if you want to let all players know someone claimed mission in system chat, it's possible use default WAI msg system, of course...

Share this post


Link to post
Share on other sites
2 hours ago, l1nkrx7 said:

Can't seem to get it working in server rpt says it's running but not using it it's using wai config

Let's have a look... send me PM with full RPT logs (server && client) and if it's not problem for you, attach your dayz_server pbo file so I can look into it..

Cheers...

Share this post


Link to post
Share on other sites

its all active in customsettings heres my rpt load information

20:20:42 "WAI: AI Config File Loaded"
20:20:42 "WAI: Custom Config File Loaded"
20:20:42 "DEBUG: Spawning a care package (Misc_cargo_cont_net1) at [3904.87,8384.17,0] with 3 items."
20:20:42 "WAI: Initialising missions"
20:20:42 "=== [IBEN WAI AUTOCLAIM ADDON, v1.0] || DEBUG [customsettings.sqf] >> Addon relative root >> [z\addons\dayz_server\WAI]"
20:20:43 "WAI: AI Monitor Started"

as can see its using wait mission init not iwac mission init or it would state: diag_log "WAI: Initialising missions with IBEN AUTOCLAIM ADDON";

Share this post


Link to post
Share on other sites
1 hour ago, iben said:

Let's have a look... send me PM with full RPT logs (server && client) and if it's not problem for you, attach your dayz_server pbo file so I can look into it..

Cheers...

my rpts are bit messy thats wjy ive added relative code

Share this post


Link to post
Share on other sites
1 hour ago, l1nkrx7 said:

its all active in customsettings heres my rpt load information

20:20:42 "WAI: AI Config File Loaded"
20:20:42 "WAI: Custom Config File Loaded"
20:20:42 "DEBUG: Spawning a care package (Misc_cargo_cont_net1) at [3904.87,8384.17,0] with 3 items."
20:20:42 "WAI: Initialising missions"
20:20:42 "=== [IBEN WAI AUTOCLAIM ADDON, v1.0] || DEBUG [customsettings.sqf] >> Addon relative root >> [z\addons\dayz_server\WAI]"
20:20:43 "WAI: AI Monitor Started"

as can see its using wait mission init not iwac mission init or it would state: diag_log "WAI: Initialising missions with IBEN AUTOCLAIM ADDON";

From above LOG, reason is wrong loading order. If you want to fix this, provide what I asked you in my last post (mainly server pbo file).
There could be mutliple reasons why it's happening. It's nonsense to speculate - let me look to source, save some time.

Before you do, try to use in your "WAI/init.sqf" (at the bottom):

  if ((preProcessFileLineNumbers ("\z\addons\dayz_server\WAI\customsettings.sqf")) != "") then {
    ExecVM "\z\addons\dayz_server\WAI\customsettings.sqf";
    waitUntil {WAIcustomConfigloaded}; // add this one
    diag_log "WAI: Custom Config File Loaded";
  };

Cheers...

Share this post


Link to post
Share on other sites
3 minutes ago, Kovicson said:

Anyone have any idea why the messages wont come up? I have merged the Stringtable.xml

 

No idea

Hello,

if there is no RPT error and you cannot get messages - make sure, you have radio in your gear.

Cheers...

Share this post


Link to post
Share on other sites
21 hours ago, iben said:

Hello,

if there is no RPT error and you cannot get messages - make sure, you have radio in your gear.

Cheers...

Its okay man, got it to work... Dunno how all I done was restart the server haha!

Share this post


Link to post
Share on other sites

Couldn't get it working on Namalsk but @iben did for me lol. Even him at first didn't really know why the hell it wouldn't work but when he tested with my files and logged on the server he realized the problem which was simple (for him lol). Small map and too many traders on Namalsk = missions not spawning.

So If some of you guys want that script installed on a small map like Namalsk remember to change the iben_wai_ACdistance = 700; (normal distance is 1300) also the  wai_avoid_traders = 400; 

If you know how, remove all traders and build one north of  Namalsk so mission can spawn. If you don't know how message me I will send you mine (Namalsk).

 

Thanks @iben

Share this post


Link to post
Share on other sites

You could turn on the user defined spawn points feature on WAI and turn off the dynamic spawning system. The missions spawn faster and it eliminates the constant looping when trying to find a "safe spot", so less server load. There is a wealth of static spawn points created by forum members here.

 

Share this post


Link to post
Share on other sites
9 minutes ago, JasonTM said:

You could turn on the user defined spawn points feature on WAI and turn off the dynamic spawning system. The missions spawn faster and it eliminates the constant looping when trying to find a "safe spot", so less server load. There is a wealth of static spawn points created by forum members here.

 

Very good point! Thank you @JasonTM!

Share this post


Link to post
Share on other sites
1 hour ago, _Lance_ said:

Can this be made to work on DZMS missions as well?

Hi @_Lance_,
Short answer: autoclaim idea could be implemented into DZMS with additional coding. If more server owners will ask for such implementation, I can do it.

My small advice outside question scope, if I may, pick only one mission system - just one system is already "heavy enough" with huge impact to server performace (but I'm pretty sure you know this well...).

Cheers...

Share this post


Link to post
Share on other sites
1 hour ago, iben said:

Hi @_Lance_,
Short answer: autoclaim idea could be implemented into DZMS with additional coding. If more server owners will ask for such implementation, I can do it.

My small advice outside question scope, if I may, pick only one mission system - just one system is already "heavy enough" with huge impact to server performace (but I'm pretty sure you know this well...).

Cheers...

Oh yes, prior to this I was running DZAI patrols and statics, and then about 12 missions at once, half wai half dzms, with skalisty island and cherno covered with about 100 dynamic AI each as well. Now I'm just running the dynamic DZAI and then WAI for missions. I'm willing to be a tester for dang sure this mod is a sensation in the PVE community. I sent you a pm if you ever decide to do it just send me a test kit ha.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Similar Content

    • By Adam1911
      TWZ - The Walking Z Overpoch Server
      Server IP: 54.37.244.16:2302
      Discord: Discord
      Website: Website
      Top Server Features:
      Full Day / Night cycle with Time Acceleration. (No Voting)
      Build Limit based off humanity.
      Custom PvP Zone.
      Indestructible Bases with in the PvE Zone Only.
      Custom AI Missions.
      High Loot Spawns.
      Slow Zombies (still a threat and more of them.)
      Custom Traders for 10k / 50k / 100k / 500k Humanity.
      Mystery Briefcase.
      Custom AI Missions.
      Roaming AI.
      Paychecks (get x amount of money every hour)
      Locate Vehicle.
      Quests
      Simi-Militarised.
      25k Coin Start
    • By Voltan
      Hey guys, (@salival hoping you can assist here buddy)
      I will preface this by saying that I am using Epoch 1.0.5.1 and server files provided by @Ultima_weapon
      I am getting this error in my console from WAI:
      I found something related here on page 7 here:
      https://epochmod.com/forum/topic/43666-release-wicked-ai-223-106/page/7/
      But this did not fix my issue.
      Here is the spawn_group.sqf:
      and the spawn_static.sqf:
      Anyone know what could cause this?
    • By Vladick
      BSBS Server IP: 216.244.93.103:7802
      Website: https://bsbsepoch.000webhostapp.com/
      Discord: https://discord.gg/PVn8PvG
      Server Features:
      PvPvE Database wiped 1/5/18 ESS V3 spawn selection Coins and Global Banking WAI missions and Roaming DZAI Bandits Customized map additions Skalisky Bridge Skalisky Island Bandit Camp with high loot (fun mission!) Garage Door Opener Virtual Garage Deploy bike Refuel, Repair, Rearm Take clothes Bury Body Butcher Body Locate vehicle with keys and GPS One plot poll per player Indestructible bases Trader Safe Zones Day/Night Schedule 4-hour restarts
    • By heiko33
      Downlod        
      https://ln.sync.com/dl/043e1b3c0/wkrywtzv-idjkp722-wzfqg9g6-53b7xfyj
       
       
       
    • By FG_Trap
      Made a quick static ai mission that spawns on restart. 
      12 ai patrol the compound 
      4 Static m2's
      1 Heli Patrolling the compound 
      Crate for who ever clears all the ai.
      Some screenshots of the compound 


       
      https://github.com/Trapxxgods/Wai-Static-Mission 
  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...