Jump to content
Rydygier

[SP] Pilgrimage

Recommended Posts

Does anybody know how to edit the their saved pilgrimage altis missions?

Share this post


Link to post
Share on other sites

rsoftokz

Who visits the forums routinely has done nothing to point out the variations releasing or put them in the OP.

 

I suspect Ryd might feel these ports are the wrong place to post here.

Should we start another post that can be maintained? One that the original poster can keep active and in the forefront?

It's been pointed out his release(s) have errors and they don't get fixed or commented on by him. Not trying to start a fight but we put a lot of time in the ports and I would like to see them get more visibility.

 

Thoughts?

Share this post


Link to post
Share on other sites
15 hours ago, major-stiffy said:

rsoftokz

Who visits the forums routinely has done nothing to point out the variations releasing or put them in the OP.

 

I suspect Ryd might feel these ports are the wrong place to post here.

Should we start another post that can be maintained? One that the original poster can keep active and in the forefront?

It's been pointed out his release(s) have errors and they don't get fixed or commented on by him. Not trying to start a fight but we put a lot of time in the ports and I would like to see them get more visibility.

 

Thoughts?

 

I have been thinking about this recently. With all the different ports and updates, it is difficult to keep track of the up to date versions. I love the different ports as it keeps the mission fresh, and everyone has their own take about what they would like to see in the missions.

 

To help everybody, and mainly myself, I have started a new topic with links to everyone's ports, whether working or not. I may not have the latest versions, but if links are provided I will update the first post as required.

 

 

  • Like 1

Share this post


Link to post
Share on other sites
On 7/15/2017 at 9:35 AM, neofit said:

My "Large Trunks" add-on is ready: https://www.dropbox.com/s/u4bfg1b0b5vgdy7/%40Large_Trunks.2017-07-15.zip?dl=0

 

Thanks to Ryd for providing the how-to in RYD_BT.

 

Works for all Arma3 + expansions vehicles (but carts, come on, even a cheater like me wouldn't do that) and current RHS 0.4.2.2.

 

I wanted to add the link to my signature, but just noticed that we don't have them on this forum anymore :).

 

Thanks for updating this. I would like to reduce the "truck" size. It's huge! :icon_biggrin:

Is the idea to simply reduce { maximumLoad = 1000000; }; to a smaller number?

 

 

Share this post


Link to post
Share on other sites
21 hours ago, major-stiffy said:

 

Thanks for updating this. I would like to reduce the "truck" size. It's huge! :icon_biggrin:

Is the idea to simply reduce { maximumLoad = 1000000; }; to a smaller number?

Yeah, I didn't want to waste my time moving my inventory from trunk to trunk just because of its size :).

 

The vanilla maximumLoad varies from 2000 for MRAPs like the Hunter, 3000 for trucks, 4000 on offroads like the MB 4WD (go figure).

 

You can find most of the original values on http://tikka.ws/class/index.php?b=cfgVehicles and play around with that.

  • Like 1

Share this post


Link to post
Share on other sites

How can i create a 1% chance that i can find a Blackfoot as an abandoned vehicle? :p If i can find Slammers randomly, then why not helicopters? :)

Share this post


Link to post
Share on other sites

Ok I am stumped. Only somewhat kinda know what I am doing, or maybe not.

 

I see in JR_fnc and JRinit where it calls for certain units, groups, and items for the initial game setup for checkpoints, airfields, warlords, etc and changing what they spawn. What I cannot figure out is the Ambient Combat, what I assume is JR_Warmonger, and how to restrict it to only spawn from a certain faction. Was thinking this was what I am looking for below.

 

{
case (resistance) : {_gps = RYD_JR_AllArmGroupsI;_gpKind = "arm"};
case (east) : {_gps = RYD_JR_AllArmGroupsE;_gpKind = "arm"};
}

 

More specifically the (resistance), (east) portion. Would this be what I am looking for? If so how would I restrict it to say, for faction east, CUP_O_ChDKZ?

Share this post


Link to post
Share on other sites

In short, becauce no time. As you can see, in both cases there's defined _gps array based on previously collected arrays of group configs per side. To limit these to certain faction only, you have to go, vwhere "RYD_JR_All" arrays are defined and filled and add faction filter check there to avoid adding group configs not belonging to desired faction. That is in the JRInit just after "progressLoadingScreen 0.5;" line. Sorry, but no time for ready-to-use code snippet, you have to figuret his out on your own (probably another "if then" code with determining current group config faction inside if (isClass _class) then {brackets}).

 

Quote

How can i create a 1% chance that i can find a Blackfoot as an abandoned vehicle? :p If i can find Slammers randomly, then why not helicopters? :)

 

Check JRInit.sqf, lines just above mentioned  "progressLoadingScreen 0.5;". No ready solutions, sorry. 

Share this post


Link to post
Share on other sites
13 hours ago, Rydygier said:

In short, becauce no time. As you can see, in both cases there's defined _gps array based on previously collected arrays of group configs per side. To limit these to certain faction only, you have to go, vwhere "RYD_JR_All" arrays are defined and filled and add faction filter check there to avoid adding group configs not belonging to desired faction. That is in the JRInit just after "progressLoadingScreen 0.5;" line. Sorry, but no time for ready-to-use code snippet, you have to figuret his out on your own (probably another "if then" code with determining current group config faction inside if (isClass _class) then {brackets}).

 

 

Check JRInit.sqf, lines just above mentioned  "progressLoadingScreen 0.5;". No ready solutions, sorry. 

 

Ok yeah. Was trying to follow RYD_JR_AllArmGroupsE and _units instead. Started going back through JRinit, but was dozing off. Warmonger has the classnames for the insertion helicopters, but was starting to see RYD_JR_AllArmGroupsE, and the others like it from JR_fnc, in JRinit before I went to bed. Not looking at it right now, but guessing it is in the configfile >> "CfgGroups" >> "East" >> "CUP_O_ChDKZ" >> "Mechanized" type format?

 

Learning a bassackwards way. Tried Fockers tutorial, but was banging my head in boredom by the second chapter. Well written and easy to follow, I just have issues learning that way. So I am opening it up, and seeing what does what. Tinkering with it you could say.

Share this post


Link to post
Share on other sites

Sorry another question.

 

I reused your random name generator and such for the companion, with the player. Replacing player setName, and adding the names listed in CfgWorlds depending on map.

 

_pname = RYD_JR_Names select (floor (random (count RYD_JR_Names)));
RYD_JR_Names = RYD_JR_Names - [_pname];
	
_psurname = RYD_JR_Surnames select (floor (random (count RYD_JR_Surnames)));
RYD_JR_Surnames = RYD_JR_Surnames - [_psurname];

player setName [_pname + " " + _psurname,_pname,_psurname];

Was following the RYD_JR_Mourn for the ingame messages, and was wondering about the customChat for the calls and such. Would the following work with the above?

RYD_JR_Conversations = 
	[
/////
	[
	[
	"Lucas %3: %2? Uncle Lucas here.",
	"Is it true about Philip? I can't believe it."
	],
	true,
	"Lucas %3"
	],
/////
	];

to

RYD_JR_Caller customChat [RYD_JR_RadioPhone,_sent,_pname,_psurname];

and this

_sent2 = "%2: OK. I can talk again.";
											
RYD_JR_Caller customChat [RYD_JR_Conv,_sent2,_pname];

Think I misunderstood your above message. Just to clarify, I am going to have to add another "if then" check statement to limit it for each group type, in addition to what is already there? Not something simple like adding configfile >> "CfgGroups" >> "East" >> "CUP_O_ChDKZ" >> "Mechanized" after the "foreach" for the RYD_JR_AllMechGroupsE?

 

Share this post


Link to post
Share on other sites
Quote

Would the following work with the above?

 

Idea looks good to me, but not:

RYD_JR_Caller customChat [RYD_JR_RadioPhone,_sent,_pname,_psurname];

 

rather like this:

RYD_JR_Caller customChat [RYD_JR_RadioPhone,format [_sent,_pname,_psurname]];

 

Where %1 will be the name and %2 - surname. Format need to be used. Also be sure, variables carrying name and surname are anyhow passed into spawns, where sentences are generated (or simplier - make these variables global). 

 

Quote

Not something simple like adding configfile >> "CfgGroups" >> "East" >> "CUP_O_ChDKZ" >> "Mechanized"

 

Indeed, this should work, good thinking, advices given in hurry often aren't that good. I forgot, faction is included in the group path, so groups are already given per faction. Sorry, I've not much time for BI Forums lately, and time is required to study the code, which of course I don't know by heart. 

Share this post


Link to post
Share on other sites
17 hours ago, Rydygier said:

 

Idea looks good to me, but not:


RYD_JR_Caller customChat [RYD_JR_RadioPhone,_sent,_pname,_psurname];

 

rather like this:


RYD_JR_Caller customChat [RYD_JR_RadioPhone,format [_sent,_pname,_psurname]];

 

Where %1 will be the name and %2 - surname. Format need to be used. Also be sure, variables carrying name and surname are anyhow passed into spawns, where sentences are generated (or simplier - make these variables global).

 

Ok use the format [0,1,2,etc.] array inside the customChat array. I am still lost on the whole local/global variable thing, so yeah not at this time. Though I was following the scripts for the enemy and civilian comms/chat too.

 

17 hours ago, Rydygier said:

Indeed, this should work, good thinking, advices given in hurry often aren't that good. I forgot, faction is included in the group path, so groups are already given per faction. Sorry, I've not much time for BI Forums lately, and time is required to study the code, which of course I don't know by heart. 

 

I am still wrapping my head around a lot of it with Biki's help, and there is a lot I do not understand yet, understatement and a half. Was wondering if you would let me post some of your code in Mission and Script Editing, to ask questions about it, or just do it here? Too make sure though. I was looking at this. I do not understand a lot of what is going on here, but I assume you are referring to these individual scripts for each group type. Some of an example of where I am at in knowledge too.

 

Spoiler

{
    _side = resistance;                                                                                                                                                        ///// _side being defined as resistance
    if (_foreachIndex == 1) then {_side = east};                                                                                                                  ///// How does _foreachindex become equal to 1 for it to change _side to east, from the foreach array?
    _gpClass = _x;                                                                                                                                                              ///// _x defined in foreach array

    for "_i" from 0 to ((count _gpClass) - 1) do                                                                                                                   ///// begins a count on the number of times the following code will be ran?
        {
        _class = _gpClass select _i;                                                                                                                                     ///// _class becomes the count numbered/defined group to be added to the below arrays?
        
        if (isClass _class) then                                                                                                                                             ///// isClass verifies that _class is a class? Lost on this honestly
            {
            switch (_side) do                                                                                                                                                  ///// Runs the case code that _side matches?
                {
                case (resistance) : {RYD_JR_AllArmGroupsI pushBack [_side,_class]};                                                          ///// Adds defined _side and _class to the end of the RYD_JR_AllArmGroupsI array?
                case (east) : {RYD_JR_AllArmGroupsE pushBack [_side,_class]};
                }
            }
        }
    }
foreach [configFile >> "CfgGroups" >> "Indep" >> "IND_F" >> "Armored",configFile >> "CfgGroups" >> "East" >> "OPF_F" >> "Armored"];    ///// Is this where _foreachindex becomes = 1? As in an array numbered slot [0,1,2,...]?

 

Or this one? Though the more I look at this one the more it seems to be the one I am looking for. Especially with _gpClass being defined as all "CfgGroups" right before it starts. Where the above seemed to be limited to the stock IND_F and OPF_F forces. Which it seems would have to be changed too.

 

Spoiler

_gpClass = configFile >> "CfgGroups";

 

for "_i" from 0 to ((count _gpClass) - 1) do
    {
    _class = _gpClass select _i;
    
    if (isClass _class) then
        {
        _side = configName _class;
        _rSide = east;
        
        switch (toLower _side) do
            {
            case ("east") : {_rSide = east};
            case ("west") : {_rSide = west};
            case ("indep") : {_rSide = resistance};
            default {_rSide = west};
            };        
        
        if not (_rSide == west) then
            {
            _path = _gpClass >> _side;
            
            for "_j" from 0 to ((count _path) - 1) do
                {
                _class = _path select _j;
                
                if (isClass _class) then
                    {
                    _fc = configName _class;
                    
                    _path2 = _path >> _fc;
                    
                    for "_k" from 0 to ((count _path2) - 1) do
                        {
                        _class = _path2 select _k;
                
                        if (isClass _class) then
                            {
                            _kind = configName _class;
                            
                            _path3 = _path2 >> _kind;
                            
                            for "_l" from 0 to ((count _path3) - 1) do
                                {
                                _class = _path3 select _l;
                                
                                if (isClass _class) then
                                    {
                                    _gp = configName _class;
                                    
                                    _path4 = _path3 >> _gp;
                                    
                                    _name = toLower (getText (_path4 >> "name"));
                                    if (_name in ["diver team"]) exitWith {};
                                    
                                    _cnt = count _path4;
                                    _type = "inf";
                                    
                                    for "_m" from 0 to (_cnt - 1) do
                                        {
                                        _class = _path4 select _m;
                                        
                                        if (isClass _class) then
                                            {
                                            _unit = configName _class;
                                            
                                            _veh = _path4 >> _unit >> "vehicle";
                                            
                                            if (isText _veh) then
                                                {
                                                _veh = getText _veh;
                                                _vehClass = configFile >> "CfgVehicles";
                                                _base = tolower _veh;
                                                
                                                while {not (_base in ["air","ship","tank","car","wheeled_apc_f","ugv_01_base_f"])} do
                                                    {
                                                    _base = inheritsFrom (_vehClass >> _base);
                                                    if not (isClass _base) exitWith {};
                                                    _base = tolower (configName _base);
                                                    if (_base in ["allvehicles","all"]) exitWith {};
                                                    };
                                                    
                                                if (_base in ["air","ship","tank","car","wheeled_apc_f","ugv_01_base_f"]) then
                                                    {
                                                    _type = _base
                                                    };
                                                    
                                                if not (_type in ["inf"]) exitWith {}
                                                };
                                                
                                            if not (_type in ["inf"]) exitWith {}
                                            };
                                            
                                        if not (_type in ["inf"]) exitWith {}
                                        };
                                        
                                    if not (_type in ["air","ship","ugv_01_base_f"]) then
                                        {
                                        _gp = [_rSide,_path4];
                                            
                                        switch (true) do
                                            {
                                            case (_type in ["tank"]) :
                                                {
                                                _added = false;
                                                
                                                    {
                                                    if ((_x select 1) in [_path4]) exitWith {_added = true}
                                                    }
                                                foreach (RYD_JR_AllArmGroupsI + RYD_JR_AllArmGroupsE + RYD_JR_AllMechGroupsE + RYD_JR_AllMechGroupsI);
                                                
                                                if not (_added) then
                                                    {
                                                    switch (_rSide) do
                                                        {
                                                        case (resistance) : {RYD_JR_AllArmGroupsI pushBack _gp};
                                                        case (east) : {RYD_JR_AllArmGroupsE pushBack _gp};
                                                        }
                                                    }
                                                };
                                                
                                            case (_type in ["wheeled_apc_f"]) :
                                                {
                                                _added = false;
                                                
                                                    {
                                                    if ((_x select 1) in [_path4]) exitWith {_added = true}
                                                    }
                                                foreach (RYD_JR_AllMechGroupsI + RYD_JR_AllMechGroupsE);
                                                
                                                if not (_added) then
                                                    {
                                                    switch (_rSide) do
                                                        {
                                                        case (resistance) : {RYD_JR_AllMechGroupsI pushBack _gp};
                                                        case (east) : {RYD_JR_AllMechGroupsE pushBack _gp};
                                                        }
                                                    }
                                                };
                                                
                                            case (_type in ["car"]) :
                                                {
                                                _added = false;
                                                
                                                    {
                                                    if ((_x select 1) in [_path4]) exitWith {_added = true}
                                                    }
                                                foreach (RYD_JR_AllMotGroupsI + RYD_JR_AllMotGroupsE);
                                                
                                                if not (_added) then
                                                    {
                                                    switch (_rSide) do
                                                        {
                                                        case (resistance) : {RYD_JR_AllMotGroupsI pushBack _gp};
                                                        case (east) : {RYD_JR_AllMotGroupsE pushBack _gp};
                                                        }
                                                    }
                                                };
                                                
                                            case ((_cnt < 5) and ((random 100) > 30)) :
                                                {
                                                _added = false;
                                                
                                                    {
                                                    if ((_x select 1) in [_path4]) exitWith {_added = true}
                                                    }
                                                foreach RYD_JR_AllLocalGroups;
                                                
                                                if not (_added) then
                                                    {
                                                    RYD_JR_AllLocalGroups pushBack _gp
                                                    }
                                                };    
                                                
                                            default
                                                {
                                                _added = false;
                                                
                                                    {
                                                    if ((_x select 1) in [_path4]) exitWith {_added = true}
                                                    }
                                                foreach (RYD_JR_AllInfGroupsI + RYD_JR_AllInfGroupsE);
                                                
                                                if not (_added) then
                                                    {
                                                    switch (_rSide) do
                                                        {
                                                        case (resistance) : {RYD_JR_AllInfGroupsI pushBack _gp};
                                                        case (east) : {RYD_JR_AllInfGroupsE pushBack _gp};
                                                        }
                                                    }                                        
                                                }
                                            }                                        
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    };
    
RYD_JR_AllInfGroups = RYD_JR_AllInfGroupsI + RYD_JR_AllInfGroupsE;
RYD_JR_AllMotGroups = RYD_JR_AllMotGroupsI + RYD_JR_AllMotGroupsE;
RYD_JR_AllMechGroups = RYD_JR_AllMechGroupsI + RYD_JR_AllMechGroupsE;
RYD_JR_AllArmGroups = RYD_JR_AllArmGroupsI + RYD_JR_AllArmGroupsE;

 

I may be off on this as I really do not know enough yet. Between the two scripts it looks to be that the "AllGroups" arrays are getting populated twice with IND_F and OPF_F groups. And that the second script is all that needs to be run to populate the arrays. Wait I think the _added might have something to do with that? Still trying to figure out what a lot of it is doing yet though. Though in my case I may be able to remove the second script and get away with modifying the top scripts for each array.

Share this post


Link to post
Share on other sites
Quote

Was wondering if you would let me post some of your code in Mission and Script Editing, to ask questions about it

 

 

Feel free to do so. Many skilled scripters are out there, that have more time, than I do. 

 

Quote

I am still lost on the whole local/global variable thing

 

_localVariable

GlobalVariable

 

There are some difficulties with grasping local variables, but global ones are simple. Define value as global variable (so without _ at the beginning) and you may use this variable as is anywhere in the code without worrying about passing it etc. 

 

For example instead of:

 

_name = "Alex";

 

do:

 

RYD_JR_MainCharacterName = "Alex";

 

and you have "Alex" saved under global variable RYD_JR_MainCharacterName. Global variables have often complex names given to ensure, each would stay unique, because otherwise other global variable of the same name will overwrite yours. 

 

Quote

 ///// How does _foreachindex become equal to 1 for it to change _side to east, from the foreach array?

 

You got it right:

 

Quote

///// Is this where _foreachindex becomes = 1? As in an array numbered slot [0,1,2,...]?

 

"foreach" loop runs through an array of two elements (two config paths pointing sets of predefined groups). First path has _foreachIndex equal to 0, second - equal to 1. 

 

Quote

///// _x defined in foreach array

 

Rather _gpClass defined as value hidden under _x. For readibility purpose only. It could stay and be used as plain _x. What I did is required mainly, if you have foreach loop with own internal _x nested inside another foreach loop, and you want to compare one _x with the second etc. 

 

Quote

  ///// begins a count on the number of times the following code will be ran?

 

Yes, with _i variable to be used inside with consequtive values per iteration. That's how we can run through sub-classes of given class (here: pointed by _gpClass groups set)

 

Quote

 ///// _class becomes the count numbered/defined group to be added to the below arrays?

 

_class becomes consequtive group definition class from the groups set defined under _gpClass (or just _x). 

 

Quote

   ///// isClass verifies that _class is a class? Lost on this honestly

 

Just to be sure, we check, if what we obtained under _class variable is a properly configured class indeed. Rather redundant for vanilla configs, but it's good habit, when you're dealing with configs from custom mods (not this case) of unknown  quality. We proceed further only, if this is proper class. If wouldn't - code would generate an error, would stuck and whole scenario will be broken. 

 

Quote

   ///// Runs the case code that _side matches?

 

Yes. Adds the group config to the array proper for given side. 

 

Quote

Or this one? Though the more I look at this one the more it seems to be the one I am looking for. Especially with _gpClass being defined as all "CfgGroups" right before it starts. Where the above seemed to be limited to the stock IND_F and OPF_F forces. Which it seems would have to be changed too.

 

Indeed. Here our group arrays are suplemented with any other defined groups apart from basic vanilla sets, we added in the previous code. This would add the groups from optional content if present, like Apex or mods. If you wish only groups from hand picked faction, add them in the previous part of the code by replacing config paths with chosen faction only and disable completely this "for-from-to" loop part to avoid adding any not desired factions. Just, like you figured out. :) BTW _added var is for checking, if given group is already inside the array or not. Only if not - it is added. To avoid adding two or more same groups to the array. 

Share this post


Link to post
Share on other sites

Topic 1

 

 

Been digging for two days but I cannot get Camps to spawn. Well, I have been working on other issues as well.

 

_dst = -1;
_pos2 = _pos isFlatEmpty [_dst,-1,1.0,5,0,false,_vh];

while {((count _pos2) < 2)} do
	{
	_dst = _dst - 1;
	if (_dst < 10) exitWith {};
	_pos2 = _pos isFlatEmpty [_dst,-1,1.0,5,0,false,_vh]
	};
	
_pos set [2,0.09];

    I put this in the "setting camp.sqf" but when I fire up Editor/Pilgrimage, MCC shows no camps what so ever,....only strongholds. Are there other places in another file that needs to read this and also have the accompanying data?

 

Topic 2

 

How do I spawn CP's "precicely" where the coordinates are. There is very little room so I need to spawn them in small areas, plus, I have changed the objects so that there quite a few less of them which I am hoping will work great once I find the isflatempty magic numbers.

 

 

Share this post


Link to post
Share on other sites

Setting camp.sqf is used only for unpacking hideout from vehicles trunk. Hidden camps are placed in the JRInit.sqf:

 

 

Spoiler

_spots = [];
_ct = 0;

_expression = "forest + trees - houses";
_value = selectBestPlaces [_mapC,RYD_JR_mapSize,_expression,200,24];

	{
	if ((random 1) < RYD_JR_HCDensityM) then
		{
		_spots set [(count _spots),_x select 0];
		}
	}
foreach _value;

_camps = [];

	{
	_pos0 = _x;
	_pos = _pos0;
	_pos set [2,0];
	_fe = _pos0 isFlatEmpty [18,200,0.5,5,0,false,objNull];
	
	if ((count _fe) > 0) then
		{
		_pos0 = _fe
		};
	
	_ct = 0;

	while {(((count _fe) < 1) or ((count (_pos nearRoads 60)) > 0))} do
		{
		_ct = _ct + 1;
		if (_ct > 48) exitWith {};
		_pos = [_pos0,30 + _ct,100 + (_ct * 2)] call RYD_JR_RandomAroundMM;
		_pos set [2,0];
		_fe = _pos isFlatEmpty [18,200,0.5,5,0,false,objNull];
		
		if ((count _fe) > 0) then
			{
			_pos = _fe;
			_pos set [2,0];
			};
		};
		
	if not (((count (_pos nearRoads 60)) > 0) or ((count _fe) < 1)) then
		{
		_pos = _fe;
		_pos set [2,0];
		_camps pushBack _pos;
		
		if (RYD_JR_Debug) then
			{
			_i = "fMark_" + (str _pos);
			_i = createMarker [_i,_pos];
			_i setMarkerColor "colorGreen";
			_i setMarkerShape "ICON";
			_i setMarkerType "mil_box";
			_i setMarkerSize [0.7,0.7];
			_i setMarkerText (str _foreachIndex)
			}
		}
	}
foreach _spots;

	{
	_cp = [_x] call RYD_JR_Sherwood;
	RYD_JR_CPItems = RYD_JR_CPItems + _cp;
	}
foreach _camps;

	{
	_aID = _x addAction ["<t color='#d0a900'>Establish hideout</t>", "hideout.sqf", [], 1, false, true, "", "not ((RYD_JR_inStealth) or (((_target in RYD_JR_Base) or (alive RYD_JR_PackedCamp)) and not (RYD_JR_multiHC)) or ((_target in RYD_JR_Base) and (RYD_JR_multiHC)))"];
	_aID = _x addAction ["<t color='#d0a900'>Pack hideout into vehicle</t>", "PackHideout.sqf", false, 1, false, true, "", "(not (isNull (assignedVehicle player)) and (((assignedVehicle player) distance _target) < 50)  and (_target in RYD_JR_Base) and not ((RYD_JR_inStealth) or (RYD_JR_isResting) or (alive RYD_JR_PackedCamp)))"];
	_aID = _x addAction ["<t color='#d0a900'>Rest 6 hours and heal yourself (first aid kit or medikit needed)</t>", "rest.sqf", [], 1, false, true, "", "(not ((RYD_JR_inCombat) or (RYD_JR_inStealth) or (RYD_JR_isResting)) and (_target in RYD_JR_Base))"];
	}
foreach RYD_JR_Camps;

 

 

PS You can always easily track, what was spawned where by setting this as true:

 

RYD_JR_Debug = false;//make it true

 

In the Init.sqf, line 26 in basic version. 

 

Quote

How do I spawn CP's "precicely" where the coordinates are. 

 

In the CPSetup function delete this:

 

	_mPos = getPosATL _cR;

	_pos = [_mPos,30,60] call RYD_JR_RandomAroundMM;
	_fe = (count (_pos isFlatEmpty [12,0,1.5,10,0,false,objNull])) > 0;
	_ct = 0;

	while {((isOnRoad _pos) or not (_fe) or ((count (_pos nearRoads 20)) > 0))} do
		{
		_ct = _ct + 1;
		if (_ct > 48) exitWith {};
		_pos = [_mPos,30 + (_ct/8),60 + (_ct/4)] call RYD_JR_RandomAroundMM;
		_fe = (count (_pos isFlatEmpty [12,0,1.5,10,0,false,objNull])) > 0;
		};

 

and this:

 

if not ((isOnRoad _pos) or not (_fe) or ((count (_pos nearRoads 20)) > 0)) then

 

turn into:

 

if (true) then

 

But you know, that most likely would be directly on the road. Basic coords point crossroad's road segment center, not some space near the road. Unless you define these coords in other way, than me. Hand picking or something like that. Then it may work for you.

 

Alternatively, if you don't mind placing CPs in the bush, on the trees etc, go to the RYD_JR_CPSetup function, and turn this line:

 

_fe = (count (_pos isFlatEmpty [12,0,1.5,10,0,false,objNull])) > 0;

 

into:

 

_fe = true;

 

also you may wish to adjust min-max random pos finding distances in the line:

 

_pos = [_mPos,30,60] call RYD_JR_RandomAroundMM;

 

Similar in the while loop just below:

 

	while {((isOnRoad _pos) or not (_fe) or ((count (_pos nearRoads 20)) > 0))} do
		{
		_ct = _ct + 1;
		if (_ct > 48) exitWith {};
		_pos = [_mPos,30 + (_ct/8),60 + (_ct/4)] call RYD_JR_RandomAroundMM;
		_fe = (count (_pos isFlatEmpty [12,0,1.5,10,0,false,objNull])) > 0;
		};

So the only search criteria would be "not on the road!". 

 

Nothing of above was tested, no time for this, so I might miss something, but hopefully it will help. 

  • Like 1

Share this post


Link to post
Share on other sites

Thanks for that info. I'm off to work but I also want to drop THIS pic to show what I have in mind for the new CP layout. Keep in mind that not all of these items will be used but all are considered depending on how the tight terrain allows them to be placed.

 

I wonder if that gate could replace the camonet for the "center" portion of this CP

 

....and on to another question]

I have tried numerous settings in the weather option but no matter what I put in, Pilgrimage always starts out very foggy. Then If we move forward one hour, it gets clear. This happens no matter what time of day we start. I've looked everywhere (I think) to see if Rydigier has his own weather (fog) override, but the only place I see fog is in the intro scene.

Fixed

 

Next

HelipadEmpty doesn't seem to want to flatten the grass. Any ideas?

 

Next

 

No matter how much I adjust the numbers, there are times when the objects are under trees or on near vertical slopes and on roads.

Could I use "Findsafepos" and if so could you tell me how?

 

 

 

 

_camps = [];

        {
        _pos0 = _x;
        _pos = _pos0;
        _pos set [2,0];
        _fe = _pos0 isFlatEmpty [1,200,1,7,0,false,objNull];

        if ((count _fe) > 0) then
            {


            _pos0 = _fe
            };
        
        _ct = 0;

        while {(((count _fe) < 1) or ((count (_pos nearRoads 60)) > 0))} do
            {
            _ct = _ct + 1;
            if (_ct > 48) exitWith {};
            _pos = [_pos0,30 + _ct,100 + (_ct * 2)] call RYD_JR_RandomAroundMM;
            _pos set [2,0];
            _fe = _pos isFlatEmpty [1,200,1,7,0,false,objNull];

 

 

.........and just for my educational purpose, why are there two areas to adjust the parameters?
            
            if ((count _fe) > 0) then
                {
                _pos = _fe;
                _pos set [2,0];
                };
            };

 

Share this post


Link to post
Share on other sites

I don't want to spoil anything, but in Laws Of War DLCs mini campaign (on dev branch), they are obviously refering to Pilgrimage theme...

  • Like 1

Share this post


Link to post
Share on other sites

Indeed? Really cool if so. I'm intrigued now. :)

 

Quote

No matter how much I adjust the numbers, there are times when the objects are under trees or on near vertical slopes and on roads.

 

You now, there are times, same happens for core version too. I wouldn't worry too much about that, as long these are rare exceptions. My code may be imperfect, same for game engine or the map. Of course, it may be a matter of specific parameters, you didn't found yet, but finding it is done through experiment. 

 

Also see this: https://community.bistudio.com/wiki/isFlatEmpty

 

Especially Killzone Kid's note, last part of it. That may be some alternative function to try. As for findSafePos function, it is based on the isFlatEmpty, but with some additional checks using other, new commands (nearestTerrainObjects and lineIntersectsSurfaces), so it may be worthy of try as well. How? Well:

 

https://community.bistudio.com/wiki/BIS_fnc_findSafePos

 

This must to be enough for now. Pilgrimage scripts use findSafePos too, so you may check these parts for reference. In use, it is very similar to isFlatEmpty usage, may differ as for some parameters, also if doesn't return empty array if position not found, instead it uses map's default pos (causing infamous piles of burning vehicles at this spot, we talked about). It is simplier in use, because it already contains analogous looped checks for random positions, and all, you need, to find a pos is:

 

_safePos = [_pos,0,160,10,0,4,0] call BIS_fnc_findSafePos;

 

maybe with:

_safePos set [2,0];

 

, but this may be redundant. 

Where numbers are exemplary of course. Optionally you may check, if resulting _safePos is not too close to the default map position. But not sure, if this will weed out positions on the road. 

 

Quote

and just for my educational purpose, why are there two areas to adjust the parameters?

 

First you have isFlatEmpty check for initially picked position. Only, if test is failed, a loop is started, where isFlatEmpty tests are done for other random positions around the initial, thus you have isFlatEmpty used twice. It is not the only way, there's possible syntax with only one isFlatEmpty, that would do same task.  

 

BTW sorry for the late response, if I see no new posts, I do not open the thread, so if you edit same post, I will stay not awared about new content. 

Share this post


Link to post
Share on other sites

@Ryd

No apologies required,.....Ever!

 

I am making some headway actually. I've got the HC's able to spawn in pretty well. i.e:

10%   = 2 to 3

25%   = 3 to 6

50%   = 6 to 9

75%   = 9 to 12

100% = 12 to 15

give or take.

 

   Since Pilgrimage has such a hard finding a suitable place, sometimes  HC will land on a dry creek bed and so on. It is what it is but for the most part it works pretty well. Another added fix is there is now a fourth trigger which restricts HC's from spawning outside the map play area.

   question: 1

Do you have 3 different smoke particles and is that why you 3 different settings? from what I can see, it looks like you have 2 smokes and 1 fire.

    question 2

How do I stop default vehicles/men from spawning into Pilgrimage?

Share this post


Link to post
Share on other sites

As for the smoke, the only used function is this:

 

RYD_JR_CampfireSmoke

 

It uses a single particle source, which is the smoke only. Fire is left default. Two another functions are unused/inactive, these was testing code. 

 

28 minutes ago, pvt. partz said:

How do I stop default vehicles/men from spawning into Pilgrimage?

 

No very smooth way in the code of this design, I'm affraid. Should be possible however to set a blacklist filter per faction, if you'll be able to pick faction of origin from asset's config ("faction" entry, that is _faction = getText (configFile >> "CfgVehicles" >> _class >> "faction") which could return stuff like "BLU_F"). But then this blacklist have to be updated each time BI would add new vanilla faction. There's also:

 

https://community.bistudio.com/wiki/getDLCs

 

But this may work only for DLC content, not basic vanilla. 

Share this post


Link to post
Share on other sites

For smoke, the reason I ask is..........

 

 

RYD_JR_CampFire_Smoke =
    {
    _campF = _this select 0;
    
    while {not (isNull _campF)} do
        {
        _pos = getPosATL _campF;

        _smoke = "#particlesource" createVehicle _pos;
        _smoke setParticleParams [
            ["\a3\Data_f\ParticleEffects\Universal\Universal", 16, 7, 48,0],
            "",
            "Billboard",
            20,
            20,
            [0,0,0.3],
            [0,0,0.3],
            3,1.2,1,0.25,
            [1,1,5,6],
            [[0.9,0.9,0.9,0],[0.9,0.9,0.9,0.06],[0.95,0.95,0.95,0.012],[1,1,1,0.01]],
            [0.25,0.125,0.1],
            0.75,
            0.2,
            "",
            "",
            _campF,
            0,
            true,
            0,
            [[0,0,0,0]]
            ];
            
        _smoke setParticleRandom [10, [0.2, 0.2, 0.1], [0.3, 0.3, 0.025], 0.25, 0.125, [0.01, 0.01, 0.01, 0.1], 0, 0, 10];
        _smoke setDropInterval 0.1;         
                
        waitUntil
            {
            
            };
        }
    };
    
RYD_JR_CampfireSmoke =
    {
    while {true} do
        {
        sleep 5;
        RYD_JR_CurrentCampfires = RYD_JR_CurrentCampfires - [objNull];
        
            {
            if not (isNull _x) then
                {
                _smoke = _x getVariable ["RYD_JR_mySmoke",objNull];
                
                if (inflamed _x) then
                    {                    
                    if (isNull _smoke) then
                        {
                        _pos = getPosATL _x;
                        _smoke = "#particlesource" createVehicle _pos;
                        _smoke setParticleParams [
                            ["\a3\Data_f\ParticleEffects\Universal\Universal", 16, 7, 48,0],
                            "",
                            "Billboard",
                            20,
                            20,
                            [0,0,0.3],
                            [0,0,0.3],
                            3,1.2,1,0.25,
                            [1,1,5,6],
                            [[0.9,0.9,0.9,0],[0.9,0.9,0.9,0.06],[0.95,0.95,0.95,0.012],[1,1,1,0.01]],
                            [0.25,0.125,0.1],
                            0.75,
                            0.2,
                            "",
                            "",
                            _x,
                            0,
                            true,
                            0,
                            [[0,0,0,0]]
                            ];
                            
                        _smoke setParticleRandom [10, [0.2, 0.2, 0.1], [0.3, 0.3, 0.025], 0.25, 0.125, [0.01, 0.01, 0.01, 0.1], 0, 0, 10];
                        _smoke setDropInterval 0.1;

                        _x setVariable ["RYD_JR_mySmoke",_smoke]
                        }
                    }
                else
                    {
                    deleteVehicle _smoke
                    };
                }
            }
        foreach RYD_JR_CurrentCampfires
        }
    };
    
/*RYD_JR_CampfireSmoke =
    {
    _campF = _this select 0;
    
    sleep 0.1;
    
    _smoke = objNull;
    
    while {not (isNull _campF)} do
        {
        _pos = getPosATL _campF;

        _smoke = "#particlesource" createVehicle _pos;
        _smoke setParticleParams [
            ["\a3\Data_f\ParticleEffects\Universal\Universal", 16, 7, 48,0],
            "",
            "Billboard",
            20,
            20,
            [0,0,0.3],
            [0,0,0.3],
            3,1.2,1,0.25,
            [1,1,5,6],
            [[0.9,0.9,0.9,0],[0.9,0.9,0.9,0.06],[0.95,0.95,0.95,0.012],[1,1,1,0.01]],
            [0.25,0.125,0.1],
            0.75,
            0.2,
            "",
            "",
            _campF,
            0,
            true,
            0,
            [[0,0,0,0]]
            ];
            
        _smoke setParticleRandom [10, [0.2, 0.2, 0.1], [0.3, 0.3, 0.025], 0.25, 0.125, [0.01, 0.01, 0.01, 0.1], 0, 0, 10];
        _smoke setDropInterval 0.1;         
                
        waitUntil
            {
            sleep 5;
            
            ((isNull _campF) or {not (inflamed _campF)})
            };
        
        deleteVehicle _smoke;
        if (isNull _campF) exitWith {};
        
        waitUntil
            {
            sleep 5;
            
            ((isNull _campF) or {(inflamed _campF)})
            };        
        };

 

 

 

The first and third grouping have a CampF and the middle one has a x in that spot,.....reason I ask

Share this post


Link to post
Share on other sites

_x, because it is inside foreach loop. Instead of running the while-do loop for each camp fire separetelly, there is only one such loop, each iteration going through every camp fire on the map using foreach command, where currently processed camp fire is marked by _x variable - one loop more resource-efficient. 

  • Like 1

Share this post


Link to post
Share on other sites
Quote

But this may work only for DLC content, not basic vanilla. 

That's what gave me the idea. I tried this...

 

_Restricted =
    [
    "B_Truck_01_covered_F",
    "B_Truck_01_mover_F",
    "B_Truck_01_box_F",
    "B_Truck_01_Repair_F",
    "B_Truck_01_ammo_F",
    "B_Truck_01_ammo_F",
    "B_Truck_01_fuel_F",
    "B_Truck_01_medical_F",
    "B_APC_Wheeled_01_cannon_F",
    "O_Truck_02_covered_F",
    "O_Truck_02_transport_F",
    "O_Truck_02_box_F",

etc, etc, etc

.....but it's not working. I don't mind going through all of the classnames to list them. Pretty long tedious task but it would be a genuine port. 

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

×