Jump to content
x39

XInsurgency - Lightweight Insurgency gamemode

Recommended Posts

I think I found the reason why intel wont drop when not using vanilla units. 
In X39_XLib_AmmoCaches.sqf on lines 68 - 77 variable _enemySideTypeOfPrefix is set to starting prefix on class name(for example I_ for RESISTANCE) and later compared with dead units using typeOf. Problem is that not vanilla units are not using this prefix, for example RHS uses rhs.
Quick fix would be to check dead unit group side. I tested only with RHS units so I dont know if it will work for CAF as well. 
 
Old code:
                _enemySide = RESISTANCE;
		_enemySideTypeOfPrefix = toArray "I_";
		switch(_logic getVariable "DropIntelSide") do
		{
			case 1:{_enemySide = WEST;		_enemySideTypeOfPrefix = toArray "B_";};
			case 2:{_enemySide = EAST;		_enemySideTypeOfPrefix = toArray "O_";};
			case 3:{_enemySide = RESISTANCE;	_enemySideTypeOfPrefix = toArray "I_";};
			case 4:{_enemySide = CIVILIAN;		_enemySideTypeOfPrefix = toArray "C_";};
			default{_enemySide = RESISTANCE;	_enemySideTypeOfPrefix = toArray "I_";};
		};
if(_enemySideTypeOfPrefix select 0 == _cArr select 0 && {_enemySideTypeOfPrefix select 1 == _cArr select 1}) then

New:

                _enemySide = RESISTANCE;
		_enemySideTypeOfPrefix = "GUER";
		switch(_logic getVariable "DropIntelSide") do
		{
			case 1:{_enemySide = WEST;	        _enemySideTypeOfPrefix = "WEST";};
			case 2:{_enemySide = EAST;		_enemySideTypeOfPrefix = "EAST";};
			case 3:{_enemySide = RESISTANCE;	_enemySideTypeOfPrefix = "GUER";};
			case 4:{_enemySide = CIVILIAN;		_enemySideTypeOfPrefix = "CIV";};
			default{_enemySide = RESISTANCE;	_enemySideTypeOfPrefix = "GUER";};
		};
if(str(side (group _x)) == _enemySideTypeOfPrefix)then

Link to fixed file:  https://www.dropbox.com/s/475wzwk9i5jkeia/X39_XLib_AmmoCaches.sqf?dl=0

 

Share this post


Link to post
Share on other sites

I think I found the reason why intel wont drop when not using vanilla units. 

In X39_XLib_AmmoCaches.sqf on lines 68 - 77 variable _enemySideTypeOfPrefix is set to starting prefix on class name(for example I_ for RESISTANCE) and later compared with dead units using typeOf. Problem is that not vanilla units are not using this prefix, for example RHS uses rhs.

Quick fix would be to check dead unit group side. I tested only with RHS units so I dont know if it will work for CAF as well. 

 

Old code:

                _enemySide = RESISTANCE;
		_enemySideTypeOfPrefix = toArray "I_";
		switch(_logic getVariable "DropIntelSide") do
		{
			case 1:{_enemySide = WEST;		_enemySideTypeOfPrefix = toArray "B_";};
			case 2:{_enemySide = EAST;		_enemySideTypeOfPrefix = toArray "O_";};
			case 3:{_enemySide = RESISTANCE;	_enemySideTypeOfPrefix = toArray "I_";};
			case 4:{_enemySide = CIVILIAN;		_enemySideTypeOfPrefix = toArray "C_";};
			default{_enemySide = RESISTANCE;	_enemySideTypeOfPrefix = toArray "I_";};
		};
if(_enemySideTypeOfPrefix select 0 == _cArr select 0 && {_enemySideTypeOfPrefix select 1 == _cArr select 1}) then
New:

                _enemySide = RESISTANCE;
		_enemySideTypeOfPrefix = "GUER";
		switch(_logic getVariable "DropIntelSide") do
		{
			case 1:{_enemySide = WEST;	        _enemySideTypeOfPrefix = "WEST";};
			case 2:{_enemySide = EAST;		_enemySideTypeOfPrefix = "EAST";};
			case 3:{_enemySide = RESISTANCE;	_enemySideTypeOfPrefix = "GUER";};
			case 4:{_enemySide = CIVILIAN;		_enemySideTypeOfPrefix = "CIV";};
			default{_enemySide = RESISTANCE;	_enemySideTypeOfPrefix = "GUER";};
		};
if(str(side (group _x)) == _enemySideTypeOfPrefix)then
Link to fixed file:  https://www.dropbox.com/s/475wzwk9i5jkeia/X39_XLib_AmmoCaches.sqf?dl=0

well dude

its all on the github (fork --> update --> pull request)

https://github.com/X39/XInsurgency

also, if modded units are not conform with the naming that BIS does it is more or less their problem (however, having code in there that is that horrible like it looks like i did back then is not good ... thus this has to be fixed anyway for performance reasons)

Share this post


Link to post
Share on other sites

Having trouble with setting map size manually. Panthera3, for example, is 10240 meters square. So I edited the Init of the Game Logic for AmmoCaches to look like this, but I still get the mapsize incorrect error - I had a read of the wiki, but am not sure what I am doing wrong...

				items=1;
				class Item0
				{
					position[]={6403.1382,9.25,969.46521};
					id=2;
					side="LOGIC";
					vehicle="Logic";
					leader=1;
					skill=0.60000002;
					text="AmmoCaches";
					init="this setVariable [""overrideMapSize"", 10240];  this setVariable [""Count"", paramsArray select 1];  this setVariable [""DropIntelType"", paramsArray select 2];  this setVariable [""DropIntelSide"", 3];  this setVariable [""IntelRate"", paramsArray select 3];  this setVariable [""EndMission"", ""END1""];  [this] call X39_XLib_Modules_fnc_X39_XLib_AmmoCaches;";
				};

Share this post


Link to post
Share on other sites

Having trouble with setting map size manually. Panthera3, for example, is 10240 meters square. So I edited the Init of the Game Logic for AmmoCaches to look like this, but I still get the mapsize incorrect error - I had a read of the wiki, but am not sure what I am doing wrong...

				items=1;
				class Item0
				{
					position[]={6403.1382,9.25,969.46521};
					id=2;
					side="LOGIC";
					vehicle="Logic";
					leader=1;
					skill=0.60000002;
					text="AmmoCaches";
					init="this setVariable [""overrideMapSize"", 10240];  this setVariable [""Count"", paramsArray select 1];  this setVariable [""DropIntelType"", paramsArray select 2];  this setVariable [""DropIntelSide"", 3];  this setVariable [""IntelRate"", paramsArray select 3];  this setVariable [""EndMission"", ""END1""];  [this] call X39_XLib_Modules_fnc_X39_XLib_AmmoCaches;";
				};

needs further investingation by me

you did nothing wrong

apparently i dont find the time to continue developing this mission right now

could you take a screenshot or something of the exact error msg?

Share this post


Link to post
Share on other sites

Sure thing - this is the error message:

 

PVG5fPBl.jpg

overread that

did you JUST modified the ammocaches module?

you have to modify the ammocaches AND the insurgency module

Share this post


Link to post
Share on other sites

Is there any way you can change the spawn amount on Agia Marina, I think the spawn amount is high? Everywhere else is fine, but Agia Marina spawn count needs to be cut in half.

Share this post


Link to post
Share on other sites

Is there any way you can change the spawn amount on Agia Marina, I think the spawn amount is high? Everywhere else is fine, but Agia Marina spawn count needs to be cut in half.

currently planning to rewrite the entire spawning part and to add some proper algo to spawn those guys

however, right now i dont come up with ideas for it thus no updates are driven

Share this post


Link to post
Share on other sites

got something nice for you ppl

soon, it is done :)

the "rewrite" is nearly finished

just a little bit of polishing is needed before i can deploy a complete new codebase to all missions

faster, simpler, better

stay tuned! looking forward to a release in feb :)

greets

X39

  • Like 3

Share this post


Link to post
Share on other sites

The possibility of a new version this month is making me excited!

Share this post


Link to post
Share on other sites

The possibility of a new version this month is making me excited!

well

right now i only got a lil problem with the units not acting like i want them to act ...

they clunch up way too much ...

Share this post


Link to post
Share on other sites

Quick Status-Update

so ... the code is litterally done ... but for some reason i get a weird behaviour with the different squares are spawning invalid (eg. units of square X spawn uphill and only in one building, you walk up to that building and they despawn just to spawn at a different position) ...

so ... release still delays a little as i still try to nail that problem down ...

as little "time-killer" ... here is the most recent codebase :)

http://x39.io/XInsurgency/InDev.zip

greetings

X39

Share this post


Link to post
Share on other sites

Problem fixed by magic

going into MP testing now

one problem which somehow remains ... for no reason at all ...

some variables are not set for some reason and some markers are not deleted ...

why? because magic ...

still analyzing but ... no solution yet found

Share this post


Link to post
Share on other sites

Little bit late ... but here is a PreRelease

http://x39.io/XInsurgency/XInsurgency_PreRelease.zip

"official" release candidate will come as soon as i found the time to properly review the missions themself (codebase is clean as far as i tested)

  • Like 2

Share this post


Link to post
Share on other sites

I owe you an apology X39, I made a mission and uploaded it without giving you proper credit for your work.

I have corrected this error Ive made and gave credit where its due.

 

 

 

imgres-36.jpeg

Share this post


Link to post
Share on other sites

Using the XInsurgency Altis PBO 1.2 from Armaholic.   It says that AmmoCache destruction should have been fixed.  But we tried PCML and tank rounds and the Cargo Net box just rolls around even after we've destroyed the building housing it.   Did the bug regress?

 

UPDATE:  Found the X39_Xlib_AmmoCaches.sqf, line 85 through 129.   O_supplyCrate_F is normally destructible by any large damage but it appears there is a special damage handelr in line 88 where only Satchel or Demo charges are allowed to destroy it.  "SatchelCharge_Remote_Ammo", "SatchelCharge_Remote_Ammo_Scripted", "DemoCharge_Remote_Ammo_Scripted".   To allow other means of destruction I would have to find and list all other possible explosives.   I'm not to scripting ... now I have to figure out where this list comes from ... :-)

UPDATE2: https://community.bistudio.com/wiki/Arma_3_CfgMagazines

if((_this select 4) in ["SatchelCharge_Remote_Ammo", "SatchelCharge_Remote_Ammo_Scripted", "DemoCharge_Remote_Ammo_Scripted", "M_NLAW_AT_F", "R_PG32V_F","R_TBG32V_F", "G_40mm_HE", "GrenadeHand","mini_Grenade","Sh_120mm_HE","Sh_125mm_HE"]) then

UPDATE3: Nope, still invulnerable after the above change.

Share this post


Link to post
Share on other sites

hello x39, I dont want to get in trouble for "breaking the forum rules" however, how is one to know if there is interest in their work if i dont ask...

 

I am curious if this is still alive and in DEV. Not asking for release date or etc... just looking for a upto date insurgency. trying to see what missions are still getting love?!

Share this post


Link to post
Share on other sites

hello x39, I dont want to get in trouble for "breaking the forum rules" however, how is one to know if there is interest in their work if i dont ask...

 

I am curious if this is still alive and in DEV. Not asking for release date or etc... just looking for a upto date insurgency. trying to see what missions are still getting love?!

It is not dead but it is on hold ...

due to real life i currently have litterally zero free time i could invest in modding :/

unfortunately this means stuff i created not receiving HEAVILY needed updates (and prevents some other projects i only got on my hdd on being released)

 

in regards of this mission, you can pick development up anytime by forking it

 

the latest codebase is not really understandable in SQF that much ... reason is: latest codebase was coded in OOS (you can see that source code here https://github.com/X39/XInsurgency/tree/OOS_Insurgencyand to get to know what OOS is, you just have to follow my signature link)

 

 

development will continue activly as soon as i can make room for it again

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

×