Jump to content

VEMF - Vampire's Epoch Mission Framework


TheVampire

Recommended Posts

Hey i host a Taviana Server and try to get the Bots on Sektor B

 

I did this :

// AI Group Count per City
// Default is 3 Groups
VEMFGroupCnt = 6;
 
// Enable Timeout?
// In false waits forever
VEMFTimeout = false;
 
// Blacklist Zone Array -- missions will not spawn in these areas
// format: [[x,y,z],radius]
// Ex: [[06325,07807,0],300] //Starry Sobor
VEMFBlacklistZones = [
[[6803,7344,344],17000],
[[24429.4,1339.08,39.757],300]
 
_townArr = nearestLocations [_cntr, ["NameCityCapital","NameCity","NameVillage"], 30000];
 
But the Mission don´t come  :(
 
My RPT
 
 
Xatu
Link to comment
Share on other sites

 

Hey i host a Taviana Server and try to get the Bots on Sektor B

 

I did this :

// AI Group Count per City
// Default is 3 Groups
VEMFGroupCnt = 6;
 
// Enable Timeout?
// In false waits forever
VEMFTimeout = false;
 
// Blacklist Zone Array -- missions will not spawn in these areas
// format: [[x,y,z],radius]
// Ex: [[06325,07807,0],300] //Starry Sobor
VEMFBlacklistZones = [
[[6803,7344,344],17000],
[[24429.4,1339.08,39.757],300]
 
_townArr = nearestLocations [_cntr, ["NameCityCapital","NameCity","NameVillage"], 30000];
 
But the Mission don´t come  :(
 
My RPT
 
 
Xatu

 

 

My guess would be all those other errors.

Link to comment
Share on other sites

Hey Mates,

 

I try to reconfig my Crates, but i have a Probelm.

4 Example into the crate spawn list i add 2 Weapons like "m4a3" and maybe "m249" what ever... 

if the crate spawns, there are 2 "m4a3" and 5 "m249" in there, where can i set, that every item spawn only one time so if i add 1 "m4A3" and 2 "Magazines" only this 3 items spawn ???
I want add a lot of Wepaons from @mas with about 5-10 Magazines per Weapon, but ever only 1 Weapon.

Thx 4 help.

regards,

DELTA

Link to comment
Share on other sites

On our server I added a mission failure message for towns that timeout:

 

if (!_wait) exitWith {
        diag_log text format ["[VEMF]: DynTownInv: Post failure message."];
        _msg = format ["%1's village elder was executed.", (_canTown select 0)];
        _msg = [_msg,"MISSION FAILED!"];
        _alert = [_msg] call VEMFBroadcast;
       diag_log text format ["[VEMF]: DynTownInv: Mission Ended for Timeout."];
       VEMFTownInvaded = nil;
};

Link to comment
Share on other sites

Having a problem where a group of people in a vehicle only the owner/driver is getting the mission messages.

 

Looking at:  VFunctions.sqf

 

    _curRad = 0;
    _send = false;
    // Find a Radio to Broadcast To
    while {true} do {
        {
            if ((_eRads select _curRad) in (assignedItems _x)) exitWith {
                _send = true;
            };
            if (_forEachIndex == ((count _allUnits)-1)) then {
                _curRad = _curRad + 1;
            };
        } forEach _allUnits;
        
        if (_send) exitWith {};
        if (_curRad > ((count _eRads)-1)) exitWith
        {
            /* No Radios */
        };
    };
    
    if (_send) then {
        {
            if ((_eRads select _curRad) in (assignedItems _x)) then {
                VEMFChatMsg = _msg;
                (owner (vehicle _x)) publicVariableClient "VEMFChatMsg";
                _sent = true;
            };
        } forEach _allUnits;
    } else {
        _sent = false;
    };

 

---------------------------

 

                VEMFChatMsg = _msg;
                (owner (vehicle _x)) publicVariableClient "VEMFChatMsg";

 

 

Is there another way to handle the send so all players in a vehicle will get the message?

Link to comment
Share on other sites

Add the GetIn EH to the server code that generates the vehicle. (this EH has to run on the server because it uses 'idowner'

Add the PVEH to the code that initializes the mod for your clients.

  _veh addEventHandler ["GetIn",
    {
        _owner = _this select 2;
        _idowner = owner _owner;
        TEMPVEHICLE = true;
        idowner publicVariableClient "TEMPVEHICLE";      
    }];


    "TEMPVEHICLE" addPublicVariableEventHandler
    {
        systemChat "Warning! This vehicle will disappear on server restart!";
    };
   

Link to comment
Share on other sites

I've tried to set increased crate loot number, which didn't work -  and the missions didn't notify or in most cases...AI/Missions didn't spawn? So reset to default and it worked...

 

I've also got this random issue where some players see the Mission start message top right of screen. But some hear it but don't see it...other players see it but don't hear it...?

 

Also  there is nothing in the RPT to show an error. And also noticing the instead of the 12 AI that used to spawn...it's now anywhere between 3 and 9 AI?

 

EDIT:

Just done a mission with a few players - 8 total AI kills. Cannot find anymore and the mission is not completed. Town was Neochori

Link to comment
Share on other sites

Hey Mates,

 

I try to reconfig my Crates, but i have a Probelm.

4 Example into the crate spawn list i add 2 Weapons like "m4a3" and maybe "m249" what ever... 

if the crate spawns, there are 2 "m4a3" and 5 "m249" in there, where can i set, that every item spawn only one time so if i add 1 "m4A3" and 2 "Magazines" only this 3 items spawn ???

I want add a lot of Wepaons from @mas with about 5-10 Magazines per Weapon, but ever only 1 Weapon.

Thx 4 help.

regards,

DELTA

 

You would have to modify the code to check if the weapon is already in the crate.

 

 

next update custom spawns mr vampire?

 

There will be support for spawns in the next update not attached to a town.

 

 

Having a problem where a group of people in a vehicle only the owner/driver is getting the mission messages.

 

Looking at:  VFunctions.sqf

 

    _curRad = 0;

    _send = false;

    // Find a Radio to Broadcast To

    while {true} do {

        {

            if ((_eRads select _curRad) in (assignedItems _x)) exitWith {

                _send = true;

            };

            if (_forEachIndex == ((count _allUnits)-1)) then {

                _curRad = _curRad + 1;

            };

        } forEach _allUnits;

        

        if (_send) exitWith {};

        if (_curRad > ((count _eRads)-1)) exitWith

        {

            /* No Radios */

        };

    };

    

    if (_send) then {

        {

            if ((_eRads select _curRad) in (assignedItems _x)) then {

                VEMFChatMsg = _msg;

                (owner (vehicle _x)) publicVariableClient "VEMFChatMsg";

                _sent = true;

            };

        } forEach _allUnits;

    } else {

        _sent = false;

    };

 

---------------------------

 

                VEMFChatMsg = _msg;

                (owner (vehicle _x)) publicVariableClient "VEMFChatMsg";

 

 

Is there another way to handle the send so all players in a vehicle will get the message?

 

There isn't a way to avoid this right now. vehicle _x returns the truck, and owner returns the driver.

 

 

 

Add the GetIn EH to the server code that generates the vehicle. (this EH has to run on the server because it uses 'idowner'

Add the PVEH to the code that initializes the mod for your clients.

  _veh addEventHandler ["GetIn",
    {
        _owner = _this select 2;
        _idowner = owner _owner;
        TEMPVEHICLE = true;
        idowner publicVariableClient "TEMPVEHICLE";      
    }];


    "TEMPVEHICLE" addPublicVariableEventHandler
    {
        systemChat "Warning! This vehicle will disappear on server restart!";
    };
   

 

There isn't a reason to add this yet as there are no vehicle missions yet. In the next update when vehicles get added this is already added.

Link to comment
Share on other sites

_listObjectsInVehicle = (vehicle _x) crew;

 if (_send) then {
        {
            if ((_eRads select _curRad) in (assignedItems _x)) then {
                VEMFChatMsg = _msg;
                {
                  (owner _x) publicVariableClient "VEMFChatMsg";
                  _sent = true;
                } crew (vehicle _x);
            };
        } forEach _allUnits;

This might do it. 'crew' should return everyone inside the vehicle.

 

Or remove the 'vehicle' from (vehicle _x)

 if (_send) then {
        {
            if ((_eRads select _curRad) in (assignedItems _x)) then {
                VEMFChatMsg = _msg;
                (owner _x) publicVariableClient "VEMFChatMsg";
                _sent = true;
            };
        } forEach _allUnits;

unless it is intended that only the driver of a vehicle should hear a message......

 

or maybe I am just confused as to why (vehicle _x) is being used in the original code.

Link to comment
Share on other sites

_listObjectsInVehicle = (vehicle _x) crew;

 if (_send) then {
        {
            if ((_eRads select _curRad) in (assignedItems _x)) then {
                VEMFChatMsg = _msg;
                {
                  (owner _x) publicVariableClient "VEMFChatMsg";
                  _sent = true;
                } crew (vehicle _x);
            };
        } forEach _allUnits;
This might do it. 'crew' should return everyone inside the vehicle.

Or remove the 'vehicle' from (vehicle _x)

 if (_send) then {
        {
            if ((_eRads select _curRad) in (assignedItems _x)) then {
                VEMFChatMsg = _msg;
                (owner _x) publicVariableClient "VEMFChatMsg";
                _sent = true;
            };
        } forEach _allUnits;
unless it is intended that only the driver of a vehicle should hear a message......

or maybe I am just confused as to why (vehicle _x) is being used in the original code.

I'm fairly certain owner needs an object, and giving it a unit would make it fail.

I'll change the code in a new version to check its a man or use the crew command.

Link to comment
Share on other sites

Units are objects.  The sticker comes when you work with 'groups', those are a different data type.  But to date, I have found that units, players, vehicles, are all base type 'objects' and any function that works on an object works on players, untis, vehicles, etc....

 

groups, waypoints, triggers, etc are different, unless you come up with a mechanism to typecast them...

Link to comment
Share on other sites

  • Richie unlocked this topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...