Forum Jump :

Author Message


Posts: 20251
Rank:


Level: Super Admin

Country: nl
Location: The Netherlands
Occupation:
Age: 41
In-game name: Foxhound

 
#31 Posted at 2016-06-17 21:36        
     
Thanks for always keeping us up to date with your work :-)
News is up on the frontpage and you can find our mirror here:





In addition I have also frontpaged the new version of the Extended Fatigue.
You can find our mirror here:


Visit my family webshop desteigerhoutshop.nl.

Author Message


Posts: 2
Rank:


Level: Member

Country: cn
Location:
Occupation:
Age:
In-game name:

 
#32 Posted at 2016-06-18 06:31        
     
Hello, Vlad333000! I made certain change in fn_eachFrame.sqf, implementing isEqualTo to avoid calculation weight on each frame, as well as a RIFLEWEIGHTCOEF factor to balance the way arma3 calculation the mass of rifles / launchers differently from their realistic weight. (Rifle is about 24.5 * kg, launchers 13.3 * kg. Maybe it's because launchers are at most time carried on the back, so they cause less fatigue, which equals to have less mass. So I think rifles carried on the back should have the similar mass reduction as well)

Unnecessary parts are removed to better demo the code changes.

#define RIFLEWEIGHTCOEF 0.54285714285714285714285714285714
// 13.3 / 24.5
// .....
if (isStaminaEnabled player) then
{
	//Check fatigue
	private _coef = player getVariable ["DW_oldFatigueCoef",-1];
	if( (_coef >= 0) && { (player getVariable ["DW_oldWeapons",[]]) isEqualTo (player getVariable ["DW_weapons",[]]) } )then
	{
	
	}
	else
	{
		private _addMass = 0;
		{
			if(getNumber (configFile >> "CfgWeapons" >> (_x param [2, "", [""]]) >> "primary") == 1)then
			{
				_addMass = _addMass + RIFLEWEIGHTCOEF * getNumber (configFile >> "CfgWeapons" >> (_x param [2, "", [""]]) >> "WeaponSlotsInfo" >> "mass");
			}
			else
			{
				_addMass = _addMass + getNumber (configFile >> "CfgWeapons" >> (_x param [2, "", [""]]) >> "WeaponSlotsInfo" >> "mass");
			};
			
			{
				_addMass = _addMass + getNumber (configFile >> "CfgWeapons" >> _x >> "ItemInfo" >> "mass");
			} forEach (_x param [3, [], [[]]]);
			
			{
				_addMass = _addMass + ((getNumber (configFile >> "CfgMagazines" >> (_x param [0, "", [""]]) >> "mass")) * ((_x param [1, 0, [0]]) / ((getNumber (configFile >> "CfgMagazines" >> (_x param [0, "", [""]]) >> "count")) max 1)));
			} forEach (_x param [4, [], [[]]]);
		} forEach (player getVariable ["DW_weapons", []]);
		private _maxMass = getNumber (configFile >> "CfgInventoryGlobalVariable" >> "maxSoldierLoad");
		_coef = (_addMass * 2) / _maxMass;
		player setVariable ["DW_oldWeapons", player getVariable ["DW_weapons", []]];
		player setVariable ["DW_oldFatigueCoef", _coef];
	};
	private _stamina = getStamina player;
	private _oldStamina = player getVariable ["DW_oldStamina",_stamina];
	private _diff = _oldStamina - _stamina;
	if(_diff > 0 )then
	{
		_diff = _coef * _diff;
		_stamina = (_stamina - _diff) max 0;
		player setStamina _stamina;
		systemChat str [_coef,_diff]; // debug info
	};
	player setVariable ["DW_oldStamina", _stamina, false];
};

Yours,
gpgpgpgp


Advertisement


Author Message


Posts: 19
Rank:


Level: Member

Country: ru
Location: Moscow
Occupation:
Age:
In-game name: Vlad333000, SVlad

 
#33 Posted at 2016-06-18 12:16        
     
# gpgpgpgp : Hello, Vlad333000! I made certain change in fn_eachFrame.sqf, implementing isEqualTo to avoid calculation weight on each frame, as well as a RIFLEWEIGHTCOEF factor to balance the way arma3 calculation the mass of rifles / launchers differently from their realistic weight. (Rifle is about 24.5 * kg, launchers 13.3 * kg. Maybe it's because launchers are at most time carried on the back, so they cause less fatigue, which equals to have less mass. So I think rifles carried on the back should have the similar mass reduction as well)

Unnecessary parts are removed to better demo the code changes.
...
Yours,
gpgpgpgp
Hello, thanks, still a lot of work to optimize the code. I first made it work :)
And vanila system important weight of equipment, no matter where it is stored (In backpack, in hands or on back), and I do not make the difference between vanila "on back" and mod "on back"

This post was edited by Vlad333000 (2016-06-18 17:43, 488 days ago)


Author Message


Posts: 2
Rank:


Level: Member

Country: cn
Location:
Occupation:
Age:
In-game name:

 
#34 Posted at 2016-06-19 11:27        
     
# Vlad333000 : Hello, thanks, still a lot of work to optimize the code. I first made it work :)
And vanila system important weight of equipment, no matter where it is stored (In backpack, in hands or on back), and I do not make the difference between vanila "on back" and mod "on back"

Ok then. Keep up the good work!


Author Message


Posts: 19
Rank:


Level: Member

Country: ru
Location: Moscow
Occupation:
Age:
In-game name: Vlad333000, SVlad

 
#35 Posted at 2016-06-22 20:47        
     
WIP: orders to bots in your group (If leader)


Author Message


Posts: 19
Rank:


Level: Member

Country: ru
Location: Moscow
Occupation:
Age:
In-game name: Vlad333000, SVlad

 
#36 Posted at 2016-06-25 11:51        
     
Update v1.3 changelog:
  • Fix: same bugs in MP
  • Fix: bug with dead
  • Add: keybindings (Optional: DW_CBA_keys.pbo)
  • Add: orders to your bots in group
  • Other: total optimisation

For mod/mission makers:
Variables:
unit getVariable "DW_weapons";   //Weapons on back:
//ARRAY of ARRAYs in fromat:
//0: STRING - weapon type ("PRIMARY", "SECONDARY")
//1: STRING - weapon class name ("arifle_MX_f")
//2: ARRAY of STRINGs - weapon's attachments (["optic_hamr", "acc_flashlight"])
//3: ARRAY of ARRAYs in fromat ([["30Rnd_65x39_caseless_mag", 25], ["1Rnd_HE_Grenade_shell", 1]]):
//   0: STRING - magazine class name ("30Rnd_65x39_caseless_mag")
//   1: NUMBER - bullets in magazine (30)
//Example: [["PRIMARY", "arifle_MX_GL_F", ["optic_Hamr", "acc_pointer_IR"], [["30Rnd_65x39_caseless_mag", 30], ["1Rnd_HE_Grenade_shell", 1]]], ["SECONDARY", "launch_NLAW_F", [], []]]

Config parameters:
DW_weaponIsLight = <NUMBER>;   //For weapons: 0 - check weight, 1 - weapon is heavy, 2 - weapon is light
DW_weapons[] = {}              //For characters: weapons on back (Init) (See variable DW_weapons

If need save weapons on back then save variable "DW_weapons" and simple set this variable to unit for load
_savedData = unit getVariable "DW_weapons";    //Save
unit setVariable ["DW_weapons", _savedData];   //Load
If more then one players can connect to one slot from lobby then after disconnect first player reset variable "DW_weapons" for avoid apply weapons on back for next player:
unit setVariable ["DW_weapons", [], true];   //Reset global variable

For view all functions check "Functions viewer" in editor

Double Weapon v1.3 (Google Drive)

This post was edited by Vlad333000 (2016-06-25 12:11, 481 days ago)


Author Message


Posts: 20251
Rank:


Level: Super Admin

Country: nl
Location: The Netherlands
Occupation:
Age: 41
In-game name: Foxhound

 
#37 Posted at 2016-06-29 12:03        
     
Thanks again for the update mate :-)
News is up on the frontpage and you can find our mirror here:



Visit my family webshop desteigerhoutshop.nl.

Author Message

Belbo  



Posts: 13
Rank:


Level: Member

Country: de
Location:
Occupation:
Age:
In-game name:

 
#38 Posted at 2016-06-29 13:35        
     
The mod is currently incompatible with MRT Accessory Functions.
That could be added to the description (or, better yet, fixed ;)).


Author Message


Posts: 19
Rank:


Level: Member

Country: ru
Location: Moscow
Occupation:
Age:
In-game name: Vlad333000, SVlad

 
#39 Posted at 2016-06-29 14:54        
     
# Belbo : The mod is currently incompatible with MRT Accessory Functions.
That could be added to the description (or, better yet, fixed ;)).
It may be better not write this?! Or i need to write each mods created for A3 if i did not create compatibility?
for reference: much more effective to write compatible with any mods. And if you read description of this mod: has no compatibility with any addon despite the fact that some third party may be used as optionals. but I bring you good news: a modification is potentially compatible with all modifications that have been written properly - not rewrite configs, just add parameters/functions or simple change (Not CBA ad all mods with CBA)

This post was edited by Vlad333000 (2016-06-29 15:02, 477 days ago)


Author Message

Belbo  



Posts: 13
Rank:


Level: Member

Country: de
Location:
Occupation:
Age:
In-game name:

 
#40 Posted at 2016-06-29 15:41        
     
There's no mention of compatibility at all on your download page, so it might be interesting for users that this mod might probably not be compatible with other mods which alter the behaviour of weapon accessories.


Author Message


Posts: 19
Rank:


Level: Member

Country: ru
Location: Moscow
Occupation:
Age:
In-game name: Vlad333000, SVlad

 
#41 Posted at 2016-06-29 16:00        
     
# Belbo : There's no mention of compatibility at all on your download page, so it might be interesting for users that this mod might probably not be compatible with other mods which alter the behaviour of weapon accessories.
Yes, that's right - there is no mention of compatibility with other modes, but because of the lack of mention of compatibility - any normal person could conclude that this mod has no direct compatibility.
Next: the incompatibility - the bad property of any product, and therefore should not be present in a public description - you have written about it this, thank you, I will know and try to add compatibility if it is so important


Author Message


Posts: 30
Rank:


Level: Member

Country: nl
Location: holland is small, find me
Occupation: security manager
Age: 39
In-game name: Supergrunt

 
#42 Posted at 2016-07-09 21:56        
     
i am getting the following problem on screen when setting a animation to a AI character with this mod activated

"...pons_holder";
private _countweapons = |#|count _weapons;
private _countweaponshol...'
error count: type number, not a number, expacted array,string,config entry

this only happens when setting a ambient animation , when i remove all animations from characters the error does not show / dissapears

Si vis pacem, para bellum

Author Message


Posts: 3
Rank:


Level: Member

Country: cz
Location:
Occupation:
Age:
In-game name:

 
#43 Posted at 2016-07-10 18:12        
     
Hi, we run your mod on our private server and we run in issue, its spamming our server log and have some sort of issu with @CUP and @RHS.
Here is our RPT log.
https://drive.google.com/file/d/0B7s4RT71dsATenJPTElyWGp0ODQ/view


edit:
The issue is that your addon is trying to set the second slot for weapon for AI units, so its spamming our server log

This post was edited by callofmarty (2016-07-11 17:49, 465 days ago)


Author Message


Posts: 19
Rank:


Level: Member

Country: ru
Location: Moscow
Occupation:
Age:
In-game name: Vlad333000, SVlad

 
#44 Posted at 2016-08-01 11:34        
     
# callofmarty : Hi, we run your mod on our private server and we run in issue, its spamming our server log and have some sort of issu with @CUP and @RHS.
Here is our RPT log.
https://drive.google.com/file/d/0B7s4RT71dsATenJPTElyWGp0ODQ/view


edit:
The issue is that your addon is trying to set the second slot for weapon for AI units, so its spamming our server log

you are sure that spam caused my mod? I found only one error associated directly with my mod: script error in fatigue effect


Author Message


Posts: 612
Rank:


Level: Member

Country: au
Location: Perth
Occupation: Arma Addict
Age: 20
In-game name: BroBeans

 
#45 Posted at 2016-08-01 13:16        
     
# callofmarty : Hi, we run your mod on our private server and we run in issue, its spamming our server log and have some sort of issu with @CUP and @RHS.
Here is our RPT log.
https://drive.google.com/file/d/0B7s4RT71dsATenJPTElyWGp0ODQ/view


edit:
The issue is that your addon is trying to set the second slot for weapon for AI units, so its spamming our server log

looks pretty minor tbh,

what other issues is it causing?