Jump to content
Sign in to follow this  
maquez

need help with Zeus - make Zeus faction sided

Recommended Posts

hello,

I am the head developer of this mission: ALiVE RHS | Cold War

I need help with Zeus, the mission has for each faction a Zeus and my goal is to make the Zeus faction sided so that he can see and edit units only from his own faction.

Chaotic BI wiki is not really very help full and more a pain. Researches on google also gave me no real results.
I would be really very thank full if anybody could help me with this.

kind regards
maquez [Q-Net]

Share this post


Link to post
Share on other sites

hi all,

 

need still help with zeus please, what I have so far is follow:

 

init.sqf:

if (isServer) then {
//--- init Zeus Server Script
[] execVM "zeus.sqf";
};

zeus.sqf:

if (!isServer) exitWith{};
//--- wait for world to initialize
sleep 60;
/*
//--- get all the stuff on the map after load
{
    z_west addCuratorEditableObjects [[_x],true];
    z_east addCuratorEditableObjects [[_x],true];
    z_guer addCuratorEditableObjects [[_x],true];
} foreach (allMissionObjects "All");
*/
//--- get all players, ai and vehicles every 30 seconds
while {true} do {
    sleep 30; {
            if ((side _x) == west || (side _x) == east || (side _x) == resistance) then {
                z_west addCuratorEditableObjects [[_x],true];
                z_east addCuratorEditableObjects [[_x],true];
                z_guer addCuratorEditableObjects [[_x],true];
            };
    }foreach allUnits;
};    
//--- allows edit and see units only from own faction
case WEST: {
    if ((side _x) == east || (side _x) == resistance) then {
        z_west removeCuratorEditableObjects [[_x],true];    //removes editable objects from enemy sides for zeus west
    };
};
case EAST: {    
    if ((side _x) == west || (side _x) == resistance) then {
        z_east removeCuratorEditableObjects [[_x],true];    //removes editable objects from enemy sides for zeus east
    };
};
case RESISTANCE: {    
    if ((side _x) == west || (side _x) == east) then {    
        z_guer removeCuratorEditableObjects [[_x],true];    //removes editable objects from enemy sides for zeus independent
    };
};

but it does not work :(

 

my mission is a TVT/PVP mission with three playable Zeus and my goal is to remove
the editable objects and visible units of the opposite sides for each zeus.

 

mission has:

three zeus modules named: z_west, z_east, z_guer

 

z_west is synced to squad leader WEST
z_east is synced to squad leader EAST
z_guer is synced to squad leader RESISTANCE

 

what I need:

z_west: should be able only to edit WEST objects, RESISTANCE and EAST should be invisible, not editable
z_east: should be able only to edit EAST objects, RESISTANCE and WEST should be invisible, not editable
z_guer: should be able only to edit RESISTANCE objects, EAST and WEST should be invisible, not editable

 

would really appreciate any help

 

kind regards

maquez [Q-Net]

Share this post


Link to post
Share on other sites

Try not adding them in the first place, instead of removing them (outside the while loop even...)

while {true} do {
    sleep 30;
    {
        if ((side _x) == west) then {
            z_west addCuratorEditableObjects [[_x],true];
        };
        if ((side _x) == east) then {
            z_east addCuratorEditableObjects [[_x],true];
        };
        if ((side _x) == independent) then {
            z_guer addCuratorEditableObjects [[_x],true];
        };
    } foreach allUnits;
};

Put this in after the 60 second sleep and remove everthing else below.

Share this post


Link to post
Share on other sites

you joke ?

this is what I don't try to achieve, with this code zeus is still able to see and edit opposite sides and this is what I exact not want !

if (!isServer) exitWith{};
//--- wait for world to initialize
sleep 60;	
//--- allows edit and see units only from own faction
while {true} do {
    sleep 30;
    {
        if ((side _x) == west) then {
            z_west addCuratorEditableObjects [[_x],true];
        };
        if ((side _x) == east) then {
            z_east addCuratorEditableObjects [[_x],true];
        };
        if ((side _x) == independent) then {
            z_guer addCuratorEditableObjects [[_x],true];
        };
    } foreach allUnits;
};

to repeat, each zeus should be able to see and edit units only from his own side !

 

thanks anyway for trying to help me

 

maquez [Q-Net]

Share this post


Link to post
Share on other sites

you joke ?

this is what I don't try to achieve, with this code zeus is still able to see and edit opposite sides and this is what I exact not want !

That's kind of exactly what this code does. It only adds the units of the particular side of the z_SIDE-zeus. If you want to remove all other units simultaneously, just do it like this:

while {true} do {
    sleep 10;
    {
        if ((side _x) == west) then {
            z_west addCuratorEditableObjects [[_x],true];
        } else {
            z_west removeCuratorEditableObjects [[_x],true];
        };
        if ((side _x) == east) then {
            z_east addCuratorEditableObjects [[_x],true];
        } else {
            z_east removeCuratorEditableObjects [[_x],true];
        };
        if ((side _x) == independent) then {
            z_guer addCuratorEditableObjects [[_x],true];
        } else {
            z_guer removeCuratorEditableObjects [[_x],true];
        };
    } foreach allUnits;
};

Share this post


Link to post
Share on other sites

 

That's kind of exactly what this code does. It only adds the units of the particular side of the z_SIDE-zeus. If you want to remove all other units simultaneously, just do it like this:

while {true} do {
    sleep 10;
    {
        if ((side _x) == west) then {
            z_west addCuratorEditableObjects [[_x],true];
        } else {
            z_west removeCuratorEditableObjects [[_x],true];
        };
        if ((side _x) == east) then {
            z_east addCuratorEditableObjects [[_x],true];
        } else {
            z_east removeCuratorEditableObjects [[_x],true];
        };
        if ((side _x) == independent) then {
            z_guer addCuratorEditableObjects [[_x],true];
        } else {
            z_guer removeCuratorEditableObjects [[_x],true];
        };
    } foreach allUnits;
};

 

He's trying to do this in an ALiVE environment which automatically add's units created by ALiVE to the curator list.

 

So to bend it to that context, just edit the code to only remove units of the undesired sides.

  • Like 2

Share this post


Link to post
Share on other sites

Damn you, ALiVE!

while {true} do {
    sleep 10;
    {
        if !((side _x) == west) then {
            z_west removeCuratorEditableObjects [[_x],true];
        };
        if !((side _x) == east) then {
            z_east removeCuratorEditableObjects [[_x],true];
        };
        if !((side _x) == independent) then {
            z_guer removeCuratorEditableObjects [[_x],true];
        };
    } foreach allUnits;
};
  • Like 1

Share this post


Link to post
Share on other sites

did try your first code snipped on server ... result was zeus was still able to edit and see all units opposite/enemies included !

okay will try your second snipped and report back

 

 

please give me a rocket so that I can shoot this f!#@*$ng useless BI wiki into another galaxy ...  :angry:

Share this post


Link to post
Share on other sites

did try your first code snipped on server ... result was zeus was still able to edit and see all units opposite/enemies included !

okay will try your second snipped and report back

 

 

please give me a rocket so that I can shoot this fucking useless BI wiki into another galaxy ...  :angry:

If it doesn't work, it's ALiVE's fault, not the biki's.

Try to disable ALiVE's system to add units to zeus first, before you try anything else.

Share this post


Link to post
Share on other sites

It'll work fine with ALiVE

 

I set up a quick mission to test (BLU_F vs OPF_F)

 

Just execute this code in the debug console

 

 
Just change "west" in this snippet to whatever side you want the curator to be able to edit
if !((side _x) == west) then {

 

Once you can confirm this is working though, I would recommend switching back to an EH instead of looping every 10s

  • Like 1

Share this post


Link to post
Share on other sites

wow ... you so cooooooooool :P .....

finally units spawned on map are invisible and not editable :rolleyes:

 

I spend freaking 7 days on that shit using BI wiki.... it confuses you only and is all other than a really help :angry:

 

but there still remains a little problem, im still able to "create" in zeus windows units from enemy side.

 

how to disable that?

 

kind regards

maquez [Q-Net]

Share this post


Link to post
Share on other sites

Can't say, never really messed with Zeus much

 

 

Looking at..

 

https://community.bistudio.com/wiki/Curator#Manual

 

Specifically this section

myCurator addEventHandler [
    "CuratorObjectRegistered",
    {
        _classes = _this select 1;
        _costs = [];
        {
            _cost = if (_x isKindOf "Man") then {[true,0.1]} else {[false,0]}; // Show only objects of type "Man", hide everything else
            _costs = _costs + [_cost];
        } forEach _classes; // Go through all classes and assign cost for each of them
        _costs
    }
];

You might be able to look through the side of each _classes and remove them if they are not of side west (or whichever side)

  • Like 1

Share this post


Link to post
Share on other sites

If it doesn't work, it's ALiVE's fault, not the biki's.

Try to disable ALiVE's system to add units to zeus first, before you try anything else.

 disable ALiVE :huh: .... :angry:  NEVER :D

 

if BI only would be able to create something amazing like this.... but this will remain a dream

Share this post


Link to post
Share on other sites

Place the "Set Costs (Side)"-module.

do i need to sync to each zeus module, or set for each zeus a own "Set Costs (Side)"-module?

Share this post


Link to post
Share on other sites

found it out :)

 

guys, thank you both very much your name will be credited for sure in script when I update and release it to public.

 

kind regards

maquez [Q-Net]

Share this post


Link to post
Share on other sites

problem solved

 

a special thank towards all those that helped me in this case

specially to mention are belbo and spyderblack723 for outstanding help

Share this post


Link to post
Share on other sites

make zeus faction sided (for use together with ALiVE):

 

init.sqf

//--- init Zeus Server Script
if (isServer) then {
	[] execVM "zeus.sqf";
};

zeus.sqf

if (!isServer) exitWith{};
//--- wait for world to initialize
sleep 60;
//--- allows to edit and see units only from own side
while {true} do {
    sleep 10;
    {
        if !((side _x) == west) then {
            z_west removeCuratorEditableObjects [[_x],true];    //removes editable enemy units and vehicles on map for zeus west
        };
        if !((side _x) == east) then {
            z_east removeCuratorEditableObjects [[_x],true];    //removes editable enemy units and vehicles on map for zeus east
        };
        if !((side _x) == independent) then {
            z_guer removeCuratorEditableObjects [[_x],true];    //removes editable enemy units and vehicles on map for zeus independent
        };
    } foreach allUnits + vehicles;
};

z_west= name of the zeus module for WEST    -(in my case this module is synced with squad leader west)

z_east= name of the zeus module for EAST    -(in my case this module is synced with squad leader east)

z_guer= name of the zeus module for INDEPENDENT    -(in my case this module is synced with squad leader independent)

 

to disable that zeus is able to create units from his opposite factions/sides place "Set Costs (Side)"-modules and sync them to the corresponding zeus

set costs to "1" for the factions/sides zeus should not be able to create, for the other factions/sides zeus should be able to create set this to "0"

 

kind regards

maquez [Q-Net]

  • Like 4

Share this post


Link to post
Share on other sites

The most easiest way to do it is to link a side cost module to the zeus. Then just overprice the sides that you dont want to add to the zeus.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×