BeaniePope.
Member-
Content Count
8 -
Joined
-
Last visited
-
Medals
Everything posted by BeaniePope.
-
So, I have a mission file where I want players to open containers with the variable names "container1" to "containerX", and they will contain randomized loot items. My attempt at the script is below, and it doesn't throw any errors, but it also doesn't do anything. If anyone knows why my script doesn't work, please let me know! Would be a great help! (The reason it iterates through a containers array is for future usage of the array) private _loot = ["Item_AM_scrapelectronics", "Item_AM_mataljunk", "Item_AM_ductape"]; private _containerCount = 4; // ------------------------------------------------ private _containers = [""]; _containers resize _containerCount; { private _lootIndex = 0; private _lootAmount = 0; _lootSize = count _loot; _lootIndex random _lootSize; _lootAmount random 10; _lootItem = _loot select _lootIndex; private _index = _forEachIndex; _x = "container" + str _index; private _variable = _x; private _container = missionNamespace getVariable _variable; _container addItemCargoGlobal [_lootItem, _lootAmount]; } forEach _containers;
-
Getting units to spawn on marker through function
BeaniePope. posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Heyo! Here's the plan: I would like units to spawn on a marker via a function call during initServer. Spawning works! The units do spawn, but they spawn at 0, 0. why? Because the script doesn't recognize the "_markerCordon" marker from the mission, and returns the default value when getMarkerPos is called- I would love if someone could let me know how exactly I'm supposed to pass my marker (or at least my marker position) to my function, assuming I can- thank you! initServer (this works fine) call AZN_fnc_spawnMutantsCordon; fn_spawnMutantsCordon below don't mind the commenting, this is made to be plug and play for a friend. Base units for testing and one modded unit also for testing. _mutantGroup = ["B_Soldier_F", "B_Pilot_F", "B_Survivor_F", "armst_blinddog2"]; private _marker = "_markerCordon"; private _mutantCount = 3; // Counting starts from 0 ex: _mutantCount = 3 spawns 4 mutants // -- DO NOT TOUCH BELOW THIS CON -- // private _finalPosition = [0,0,0]; private _markerPosition = [0, 0, 0]; //Gets Marker _markerPosition = getMarkerPos _marker; _markerPositionX = _markerPosition select 0; _markerPositionY = _markerPosition select 1; //Randomizes pos _randomX = [-100, 100] call BIS_fnc_randomInt; _randomY = [-100, 100] call BIS_fnc_randomInt; _finalPosition set [0 , _markerPositionX + _randomX]; _finalPosition set [1 , _markerPositionY + _randomY]; //Spawns units for "_i" from 0 to _mutantCount do { private _cordonMutants = createGroup [west, true]; _unit = _mutantGroup select _i; _position = _finalPosition; _positionX = _position select 0; _positionY = _position select 1; _position set [0, _positionX + _i]; _position set [1, _positionY + _i]; _unit createUnit [_position, _cordonMutants]; }; -
Getting units to spawn on marker through function
BeaniePope. replied to BeaniePope.'s topic in ARMA 3 - MISSION EDITING & SCRIPTING
For whatever reason, this works! Thank you! -
Issues using inidbi2 for persistent saves
BeaniePope. posted a topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
I started using inidbi2 to hold persistent player data on a server my friends want to run. I have 4 sqf files, following a tutorial I watched, for using inidbi2 to get this done init.sqf _clientID = clientOwner; _playerUID = getPlayerUID player; _playername = name player; checkDatabaseEntry = [_clientID, _playerUID, _playername]; publicVariableServer "checkDatabaseEntry"; player addAction ["Save Data", { _playerUID = getPlayerUID player; _playerInventory = getUnitLoadout player; _saveData = [_playerUID, _playerInventory]; publicVariableServer "saveData"; }]; "loadData" addPublicVariableEventHandler { //private "_data"; //_data = [_this select 1]; _playerInventory = [_this select 1]; player setUnitLoadout _playerInventory; }; initServer.sqf "checkDatabaseEntry" addPublicVariableEventHandler { private "_data"; _data = [_this select 1]; _clientID = [_data select 0]; _playerUID = [_data select 1]; _playerName = [_data select 2]; _inidbi = ["new", _playerUID] call OO_INIDBI; _entryExists = "exists" call _inidbi; if (_entryExists) then { hint "Database Entry Found, Acquiring Data"; null = [_playerUID, _clientID] execVM "getDatabaseEntry.sqf"; } else { "Database Entry does not exist, creating Entry"; null = [_clientID, _playerUID, _playerName] execVM "createDatabaseEntry.sqf"; }; }; "saveData" addPublicVariableEventHandler { private "_data"; _data = [_this select 1]; _playerUID = [_this select 0]; _playerInventory = [_this select 1]; _inidbi = ["new", _playerUID] call OO_INIDBI; ["write", ["Player Inventory", "Inventory", _playerInventory]] call _inidbi; } getDatabaseEntry.sqf _playerUID = [_this select 0]; _clientID = [_this select 1]; _inidbi = ["new", _playerUID] call OO_INIDBI _playerInventory = ["read", ["Player Inventory", "Inventory", []]] call inidbi loadData = _playerInventory; _clientID publicVariableClient "loadData"; createDatabaseEntry.sqf _clientID = [_this select 0]; _playerUID = [_this select 1]; _playerName = [_this select 2]; _inidbi = ["new", _playerUID] call OO_INIDBI; ["write", ["Player Info", "Name", _playerName]] call _iniddbi Despite, my best efforts, I cannot get the scripts to work. Strangely, whenever I load in, despite following the tutorial to a T, Arma 3 seemingly skips over the checkDatabaseEntry event, and never runs it, as I never get the hint to pop up. I am running this with inidbi2 on a Armahosts server, any help would be GREATLY appreciated Thank you, Queen -
Arma 3 Server heavy catastrophic desync
BeaniePope. posted a topic in ARMA 3 - SERVERS & ADMINISTRATION
Hey! I am a part of an Arma 3 unit with around 50~ players using a custom modlist (which can be attached) and a battalion size Armahosts server with 0 HCs (250+ player slots, should be more than capable). We've been having extreme desync to the point of server failure, whenever desync starts, the server RPT stops logging, and on top of that, the server RPT reaches incredibly large file sizes (for a text document), upwards of 5mb. In order, we have 1. Trimmed the modlist to bare minimums (anything left *could* be removed but would permanently force us to make massive changes) 2. Upgraded the server to maximums (based off of 2 other Arma units using an incredibly similar modlist, with identical playerbases) 3. Each time we try to do an operation, the desync happens at seemingly random moments, but always towards the beginning of the op, and sometimes even before a firefight has broke out 4. Completely reinstalling every mod and server data, using a base Arma 3 mission file (as a test) 5. The ONLY common denominator in the operations is that the desyncs and the crippling desyncs start when we are around 20-30 minutes into the server being up (around when we step off), and someone either joins late or rejoins after disconnecting, and the server log sends in a million errors, before completely halting all logging around when major desync occurs, crippling the entire server. We have waited around 20 minutes post desync with every player still on, and to no avail. We have consulted our peers extensively, and come to the conclusion that we have no choice but to just keep doing what we know, and we don't want to force our player base to go through any more desync. If ANY of you have ideas or thoughts, any at ALL, please let me know. https://gist.github.com/BeaniePope/1bf6a3e5f15b357bcf14c5ab41f49dc1 <--- Last log file, 6/5/24 https://gist.github.com/BeaniePope/8b34f56cdf08e4b32af0fefe31e474b6 <---- Current modlist 6/5/24- 5 replies
-
- server issue
- desync
-
(and 2 more)
Tagged with:
-
Arma 3 Server heavy catastrophic desync
BeaniePope. replied to BeaniePope.'s topic in ARMA 3 - SERVERS & ADMINISTRATION
// // basic.cfg Settings // // This file has been tuned for a box running only one Arma 3 server on a // 1 GBit/s pipe with 100 slots // // See https://community.bistudio.com/wiki/basic.cfg // /////////////////////////////////////////////////////////////////////////////// // Default Options /////////////////////////////////////////////////////////////////////////////// language = "English"; adapter = -1; 3D_Performance = 1.000000; Resolution_W = 800; Resolution_H = 600; Resolution_Bpp = 32; /////////////////////////////////////////////////////////////////////////////// // Bandwidth Tuning // // Be sure to adjust this to your server settings! // This example is for 1GBit/s pipe /////////////////////////////////////////////////////////////////////////////// // 100MB * 1024 * 1024 = 104857600 MinBandwidth = 104857600; // Do NOT set this too high or your Arma server will simulate ego-ddos // 600MB * 1024 * 1024 = 629145600 MaxBandwidth = 629145600; /////////////////////////////////////////////////////////////////////////////// // Network Tuning // // Usually something we developers set. Only change these if you really know // what you are doing. Do something wrong here and your sever will burn in hell // and cause massive desych. /////////////////////////////////////////////////////////////////////////////// MaxMsgSend = 512; MaxSizeGuaranteed = 512; MaxSizeNonguaranteed = 256; MinErrorToSend = 0.008; MinErrorToSendNear = 0.06; MaxCustomFileSize = 0; Here's the server basic.cfg- 5 replies
-
- server issue
- desync
-
(and 2 more)
Tagged with:
-
Error with code, syntax most likely
BeaniePope. posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
There's a stackoverflow post with this same question if you want better readability, here https://stackoverflow.com/questions/74280551/error-on-activation-select-type-nothing-expected-array-string-config-entry But anyway, whenever I try to run this code from a trigger private _all_freedom_units = ["B_FRD_Freedomer_Patrolman_01","B_FRD_Freedomer_Sniper_01", "B_FRD_Freedomer_Exo_1", "B_FRD_Freedomer_Warrior_01", "B_FRD_Freedomer_SEVA_01", "B_FRD_Freedomer_Gaurdian_01", "B_FRD_Freedomer_Seva_II_01"]; private _final_pos = [0,0,0]; private _position_player = [0, 0, 0]; _direction = getDir player; if (_direction > 0 and _direction < 90) then {cardinal_direction = "North";}; if (_direction > 90 and _direction < 180) then {cardinal_direction = "South";}; if (_direction > 180 and _direction < 250) then{cardinal_direction = "South";}; if (_direction > 250 and _direction < 359) then{cardinal_direction = "North";}; _position_player = getPos player; _position_player_x = _position_player select 0; _position_player_y = _position_player select 1; if (cardinal_direction == "North") then{ _random_x = [250, 500] call BIS_fnc_randomInt; _random_y = [250, 500] call BIS_fnc_randomInt; _final_pos set [0 , _position_player_x + 200 + _random_x]; _final_pos set [1 , _position_player_y + 200 + _random_y]; }; if (cardinal_direction == "South") then{ _random_x = [-250, -500] call BIS_fnc_randomInt; _random_y = [-250, -500] call BIS_fnc_randomInt; _final_pos set [0 , _position_player_x + _random_x]; _final_pos set [1 , _position_player_y + _random_y]; }; _position = _final_pos; _group_freedom_patrol = createGroup [west, true]; hint str _final_pos select 0; _random_number = floor random 5; The trigger throws an error: On Activation: Select: Type Nothing, expected Array,String,Config entry and I suspect the affected code piece is _position_player = getPos player; _position_player_x = _position_player select 0; _position_player_y = _position_player select 1; since it says select in the error, but I don't know. Any help is good, thank you! -
Error with code, syntax most likely
BeaniePope. replied to BeaniePope.'s topic in ARMA 3 - MISSION EDITING & SCRIPTING
I feel like an idiot not seeing that- not even supposed to be in there. Thank you so much!