Search the Community
Showing results for tags 'database'.
Found 15 results
-
INIDBI2 Lastest Version : 2.06 by Code34 Direct Download from Dropbox Direct Download from Armaholic Github: https://github.com/code34/inidbi2 Steamworkshop: https://steamcommunity.com/sharedfiles/filedetails/?id=1768992669 Like to Donate ? Donate with paypal inidbi2 is a rebuild from scratch of inidbi project with C# and SQF++ for windows client/server Major improvements: New architecture oriented object support improve differents methods preload addon README DOCUMENTATION You can save and load data persistently for your mission. Save money for players, inventories, etc. This is meant for servers but it could be used for clients, too. Have fun 🙂 You can also find video tutorials from gokitty1199 on this page:
- 337 replies
-
- 23
-
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 scripting tutorials from gokitty1199/IM SORRY BUFFALO(both me)
gokitty1199 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Last content update: 6/13/2018 showing how to use the radius for addAction, using params instead of select, adding to arrays with various commands, altering arrays with various commands, get/setUnitLoadout Last content update: 6/10/2018 going through config files and getting details to sort what you want, using radius with addAction, params, and altering arrays with resize, pushBack, pushBackUnique, set, and append and going over to assist with resize count. Last content update: 5/27/2018 added GUI tutorial for how to make a weapon selector using cfgWeapon Last content update: 5/24/2018 added sector control tutorial Last content update: 5/21/2018 This is my arma 3 scripting tutorial series which is aimed to help both people getting into making their own scripts with fairly detailed simple tutorials as well as for the intermediate person looking to create their own features for their missions. The plans for this series is to almost fully cover everything behind the arma 3 missions that people play on a daily basis and have enough content provided in the videos where people can go off and make their own vision for their mission with the knowledge gained. Most of these videos are made on the fly at 1AM-4AM without any pretesting which should give someone the idea of what goes into finding syntax errors and narrowing down a bug that's causing your feature to not function properly. It is also an excuse for you to cut me some slack if you see mistakes :) . A lot of these tutorials are made with multiplayer in mind since I think most people want to play their missions online with their friends(which is why publicVariable has been utilized so much so new people can get a good grasp on the power those commands have). New videos are added to the playlist almost every day so if your stuck with something, maybe it has been covered in a video. If you have any requests on what you would like to see made then please suggest it here. topics covered so far Scripting tutorial playlist Database tutorials with INIDBI2 playlist GUI/Dialog tutorials playlist- 23 replies
-
- 19
-
muliplayer Persistent data handling for multiplayer game mode
MinervaArts posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello guys, I am looking for a method to save and edit data across mission restarts. We are currently scripting a round based multiplayer game mode. After each round, the mission is restarted and a winner and loser team is determined. Now we are looking for a way to track the won rounds per team and the team that has three points first is the winner. The problem is that with each the mission restarts, the variables are overwritten. Does anyone have an idea how to achieve it so that the points per round are counted regardless of the mission? Thanks for your help- 18 replies
-
Hello people, I have been struggling to make a working custom ticket system for my mission. My goal is to have a maximum of 7 global west tickets as I have 7 available player slots. To make it more fair, I want one ticket to subtract from west side every time a new player respawns on west side, but not when they respawn again. Server should keep track of tickets subtracted and add ticket back if player chooses to change sides to east or if he disconnects the server from the west side. My guess is, i have trouble making database work... Now I don't have any real coding experience and this is my idea of the code which I heavily edited multiple times using logic and ChatGPT: onPlayerRespawn.sqf // Variable ticket system private _uid = getPlayerUID player; // Retrieve player data private _playerData = [_uid] call TAG_fnc_retrievePlayerData; private _tempSideRespawned = side player; private _tempAlreadyRespawnedAsEast; private _tempHasReturnedTicket; private _lastRespawnedSide = profileNamespace getVariable ["lastRespawnedSide", east]; if (!isNull _playerData) then { _tempAlreadyRespawnedAsEast = _playerData select 1; _tempHasReturnedTicket = _playerData select 2; } else { _tempAlreadyRespawnedAsEast = false; _tempHasReturnedTicket = false; }; // Handle ticket decrement and increment based on the respawned side if (_tempSideRespawned == east && _tempSideRespawned != _lastRespawnedSide) then { [east, -1] call BIS_fnc_respawnTickets; _tempHasReturnedTicket = false; } else { if (_tempSideRespawned == west && _lastRespawnedSide == east && !_tempAlreadyRespawnedAsEast && !_tempHasReturnedTicket) then { [west, 1] call BIS_fnc_respawnTickets; _tempAlreadyRespawnedAsEast = true; _tempHasReturnedTicket = true; }; }; // Update the player's last respawned side private _lastRespawnedSide = _tempSideRespawned; profileNamespace setVariable ["lastRespawnedSide", _tempSideRespawned]; // Update the player's data in the database [_uid, [_tempSideRespawned, _tempAlreadyRespawnedAsEast, _tempHasReturnedTicket]] call TAG_fnc_storePlayerData; initServer.sqf execVM "Scripts\functions.sqf"; // Global array to store each player's data in the TAG_database if (isNil "TAG_database") then { TAG_database = []; }; // Event handler for player disconnect addMissionEventHandler ["PlayerDisconnected", { params ["_id", "_uid", "_name", "_jip", "_owner", "_idstr"]; // Get the player's data from TAG_database using UID private _playerData = [_uid] call TAG_fnc_retrievePlayerData; if (count _playerData > 0) then { private _side = _playerData select 0; private _hasReturnedTicket = _playerData select 2; if (_side == west && !_hasReturnedTicket) then { [west, 1] call BIS_fnc_respawnTickets; // Add one ticket to West side on the server diag_log "Ticket returned to West"; // Mark that the ticket has been returned for this player to prevent multiple returns [_uid, _side, true] call TAG_fnc_storePlayerData; }; }; // Remove the player's data from TAG_database upon disconnect TAG_database = TAG_database - [_uid]; }]; functions.sqf TAG_fnc_storePlayerData = { params ["_uid", "_data"]; private _playerIndex = -1; { if ((_x select 0) == _uid) then { _playerIndex = _forEachIndex; true } else { false }; } forEach TAG_database; if (_playerIndex < 0) then { TAG_database pushBack [_uid, _data]; } else { TAG_database set [_playerIndex, [_uid, _data]]; }; }; TAG_fnc_retrievePlayerData = { params ["_uid"]; private _playerIndex = -1; { if ((_x select 0) == _uid) then { _playerIndex = _forEachIndex; true } else { false }; } forEach TAG_database; if (_playerIndex >= 0) then { TAG_database select _playerIndex select 1; } else { []; }; }; TAG_fnc_getPlayerIndex = { params ["_uid"]; private _playerIndex = -1; { if ((_x select 0) == _uid) then { _playerIndex = _forEachIndex; true } else { false }; } forEach _database; _playerIndex; }; description.ext class CfgFunctions { class Anthill { class MissionFunctions { class fnc_startTimer { file = "Scripts\functions.sqf"; }; class fnc_stopTimer { file = "Scripts\functions.sqf"; }; class fnc_resetTimer { file = "Scripts\functions.sqf"; }; class fnc_checkEmptyServer { file = "Scripts\functions.sqf"; }; class fnc_missionTimer { file = "Scripts\functions.sqf"; }; class fnc_scheduleTimer { file = "Scripts\functions.sqf"; }; class TAG_fnc_storePlayerData { file = "Scripts\functions.sqf"; }; class TAG_fnc_retrievePlayerData { file = "Scripts\functions.sqf"; }; class TAG_fnc_getPlayerIndex { file = "Scripts\functions.sqf"; }; }; }; }; I have sorted all errors in RPT files, and I still can't manage to execute full onplayerrespawn.sqf... I don't know where is the problem or how else i can diagnose it beside diag_log which doens't always work. Thanks for insights
-
Hello community! I've had this released on the Steam Workshop after a long development period, and it's about time I introduce it here. I hope communities will enjoy using this! Hunter'z Persistency Module What is it? It's an "offline" (meaning, an SQL server or similar is NOT required) persistency framework for complex dynamic missions. It's meant as an alternative to existing solutions that use SQL servers. Instead of using a server/database approach, Hunter'z Persistency Module is fully SQF-based and outputs save data to text files in SQF-format. With this module you can avoid having complex infrastructure such as SQL servers and set up a persistent server with ease. What can it do? As a framework, it's got all the functionality you need to save any object, ammo crate, or vehicle and it's designed to be very easily customised so that you can save custom information such as object or mission variables. The module is focused mostly on realism/logistics scenarios, which means whatever you want to be persistent, you can set it up with ease and it will save every detail without compromise or room for exploits. For example, if you want to set a vehicle to be persistent, all you have to do is call one line of code and its state will be saved with all details down to the number of rounds it has in its guns. Player units are also persistent by default, which means not only does it save your position or your gear upon logging out, but also how many bullets you have in the magazines inside your backpack, the damage on all your body parts including your full medical state if you use ACE, any map markers you have placed and whatever else comes to your mind. The customisation of the framework is done by using API functions that you call either through scripts in your mission or live through the in-game admin console. These are all described together with setup instructions and further information in the manual that comes with the module. How does it work? It uses Killzonekid's debug console dll extension (with his permission of course) to write to a save file on the server machine. Although the save file comes out as pure SQF, due to the limitations of extensions in Arma, large data arrays are split up into smaller ones and parsed back to normal by the module during saving and loading. This means that you might see a lot of text in your save files, but since it's all SQF, you actually have the option of editing the data manually by hand in case of any problems you have in your mission or things you want to change. Saving to file is done automatically, through an auto-save system, for which you can set the save interval. The module is very performance friendly as it only uses resources when conducting a save, which usually takes less than a second. Player persistency is managed through connect/disconnect event handlers by the server, and other than these situations the module will not be using any CPU power! Future work / TODO? I plan on adding more features to the mod. One thing I will investigate soon is persistency of damage to map objects, such as buildings that are part of the map. No promises though! Download link You can obtain the mod through the Steam Workshop. https://steamcommunity.com/sharedfiles/filedetails/?id=1207707864 Licensing The module is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. You are free to share or build upon this work as long as you credit me as the original author. You may not sell this work or any derivatives of it, or financially profit from the use of the mod in any way. Trivia Although I've been working on Arma 2/3 for a few years now, this is the first mod that I got ready to be released for public use. I'm hoping to have release versions ready for my other mods, especially the AI mod I've been developing since 3 years, but we'll see... For more info on what I do, feel free to check out my repo: https://github.com/KHunter-Arma
- 19 replies
-
- 13
-
- persistency
- database
- (and 5 more)
-
inidbi2 Help - Saving Player Location (Help with an Array)
pliskin124 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi there, Thank you for taking the time to look at my post. I am trying to save the players location data into the idbi2 database. I have the Gear, Name, and UID all saving correctly, but for the life of me I cannot get the players location to save and read. I keep getting the error "error type String, expected number" on the init.sqf line 13 the "player setPosATL [_location select 0, _location select 1, _location select 2];" section. - Any help would be most appreciated. Init.sqf: _clientID = clientOwner; _UID = getPlayerUID player; _name = name player; _location = getPosATL player; checkForDatabase = [_clientID, _UID, _name, _location]; publicVariableServer "checkForDatabase"; "loadData" addPublicVariableEventHandler { _gear = (_this select 1); _location = [_this select 0, _this select 1, _this select 2]; player setUnitLoadout _gear; player setPosATL [_location select 0, _location select 1, _location select 2]; }; }; initServer: "checkForDatabase" addPublicVariableEventHandler { private ["_data"]; _data = (_this select 1); _clientID = (_data select 0); _UID = (_data select 1); _playerName = (_data select 2); _location = [_data select 0, _data select 1, _data select 2]; _inidbi = ["new", _UID, _location] call OO_INIDBI; _fileExist = "exists" call _inidbi; if (_fileExist) then { hint "FILE DOES EXIST, GETTING DATA"; null = [_UID, _clientID, _location] execVM "getData.sqf"; } else { hint "FILE DOES NOT EXIST, CREATING DATABASE"; null = [_clientID, _UID, _playerName, _location] execVM "createDatabase.sqf"; }; }; "saveData" addPublicVariableEventHandler { private ["_data"]; _data = (_this select 1); _UID = (_data select 0); _gear = (_data select 1); _location = [_data select 0, _data select 1, _data select 2]; _inidbi = ["new", _UID] call OO_INIDBI; ["write", ["Player Location", "Location", _location]] call _inidbi; ["write", ["Player Gear", "Gear", _gear]] call _inidbi; hint "data saved"; }; getData.sqf _UID = (_this select 0); _clientID = (_this select 1); _inidbi = ["new", _UID] call OO_INIDBI; _gear = ["read", ["Player Gear", "Gear", []]] call _inidbi; _location = ["read", ["Player Location", "Location", []]] call _inidbi; loadData = _gear; _clientID publicVariableClient "loadData"; saveData.sqf { _gear = getUnitLoadout player; _location = getPosATL player; saveData = [_UID, _gear, _location]; publicVariableServer "saveData"; }- 28 replies
-
Database Driven CTI - looking for help and hosting
ronin1979ca posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
I have been developing a mission initially based off of wasteland with strong database support. It is setup to be an exclusive mission with mod supprt and persistent player data including player level and ai levels with the ability to equip any gear. It has a ton of features to make game play easier and address Arma's bugs. It also includes an economy, and many many features. The CTI component is hex based, where you fight for every piece of ground, and the ai responds to your every move. Your levels and gear are saved between sessions, you can join any slot and it will reload your position, gear etc. Separate data for east and west. I would like to really put the effort into this, and maybe use monetization to support wounded veterans and their families in Canada, the US or UK with some partners. At the very least I would like to cover server cost. I need help in improving my gui's and other aesthetics as theses are not as good as they could be. MAP in Zeus - Columns are ai capture forces, many units are simulated and cached while not in play. UI for editing AI loadouts Buy vehicles in any friendly city. Player menu accesses funds, special items, stores, custom paint jobs, squad management. Arsenal for selecting custom load outs, these can be saved and given to ai as well. In game map from west perspective with fog of war. Custom painted truck using in game paint system, demonstrating additional vehicle options to assist game play, including tow ropes. Running a convoy of captured vehicles Defending La Trinite -
Hey there! I am planning to create a mission for which I need some kind of database to show stats on a website. The best way would be a SQL-DB because I am familiar with SQL. But i honestly have no clue how to access the database within the SQF code. And the only thing I find on google is "How to set up a DB for Altis Life or Exile"... Does anyone knows how to do this? I would really appreciate the help :) Greetings Amazed
-
What gets saved by arma when you hit "save & exit"?
feldruebe posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
hey guys, i have created a gamemode for dedicated servers, but right now its not possible to continue it after the server shut down. Before we tested on a dedicated server, the mission was meant to be hosted directly from arma, so we could hit "save & exit" but that obviously didnt work. Here comes my question: what stuff needs to be stored in my database and what gets saved by arma? There are quite some scripts with many variables that need to be saved, as well as the position of vehicles on the map and their condition. Hope you guys can help me. Thanks in advance -
QWENCH Version 0.1 Git: https://github.com/code34/qwench.altis Hello, I tried yesterday to look at how Altis Life worked and start cleaning the repository. There was so much to clean up, useless code or insane trick, db management issues, and so on I have not seen yet, that finally this morning, I throw the sponge because I think it would be much easier to create a new generic server with generic tools that I have already made available to the community under the GPL license. My goal is to provide the server-side minimum required to allow anyone who wants to create RP servers (role play) to start in minutes and develop / modder directly what interests them. Do not think that it will do the work for you. The goal is to provide more efficient orders for coding good RP Basically the common base will translate like that, finally was the first idea that I have: - a ready-to-use module that manages the database. Dev just has to install extdb3, insert his credentials into a config file, and he can immediately use the server-side database through SQL queries - a message bus module that will manage all the exchanges between the clients and the server and minimize all the code to produce to do that. Client will be able to call functions on the server as if they were local (oo_bme) - no bullshit, just the minimun to do the job If you have ideas, or even share my vision, do not hesitate to show up, we may be doing great things together. I do not do it for money, for women, or for glory. If this project does not interest anyone, I would stop to focus on other developments, there is so much to do. Thanks to the google translator for his help, I must say that the language is a real obstacle to the sharing of ideas and that it is complicated to give as much as one would like.
-
custom mission [MP][CTI][DB] Lightning Warfare- Looking for community partners
ronin1979ca posted a topic in ARMA 3 - MULTIPLAYER
Server Dependent, can be run with any mod ****This can only be played on the ts.warkin.info server as server-side is not released, please watch video**** /\ New Video /\ Server and mission Explained. SO I've been piecing together a mission using a lot of community content as well as a ton of my own script to get it all together. It features procedural map objective generation, efficient scripting and a powerful database. It does borrow from wasteland and CTI, but I looked for solutions everywhere. While not everything is perfect yet, it is very playable and will save your levels etc indefinitely. It's got a ton of scripts running server side while keeping the FPS high, so it's smart capable. It's got drop in / drop out saving that will enable you to play a few minutes at a time, but contribute to the big offensive. There is a full economy, and you can also level your AI. You have a choice of 12 persistent AI as you level up who you can recruit at ease and who are saved with my drop in feature, as well as vehicles etc. The mission is town focused, but every part of the map can be captured for income. Please try it out, and comment to steer it's development. The server keeps good frame rate in spite of producing many AI in individual cities. Custom loadouts are available not only to you, but to your ai with minimal effort. As an external influence I reference 'Jagged Alliance'. Lightning Warfare = "Warfare with a small unit, co-op focus" 1. Towns will be connected in territorial mode 2. Every town will have same items available for purchase 3. Each captured town unlocks extra units and gear in all towns. 4. Fast travel will be available between towns 5. Winning condition: Capture all towns. 6. Database deals with per session and infinite saving. 7. Procedural Map with fog of war 8. Player Economy 9. In depth squad management and persistence 10. You can recolor and uniforms, see photos below 11. Rearm and re-equip you or your squad members in minimal clicks. 12. Save and utilize custom load outs for player and squad. 13 In depth medical and support scripting, ai ability to save you when injured. Not a full list, but here are the major imports. - Improved FAR Revive medical simulation - Outlawed Mag Repack - R3F logistics - Building loot spawning - Rewritten Digital load out system - Rewritten Hunter Six ai system - Taw View distance - Seth Duda Advanced Towing & advanced sling load - Outlawed Mag Repack - Zod Take down - Rewritten inidb - Rewritten A3 Wasteland - Rewritten Squeeze Hex warfare Planned additions - Sniper, SOG centric mission support. High value targets : Personnel responsible for logistics, killing will inhibit reinforcement. FOO/FAC: Responsible for coordination of Air support; Killing will disable enemy air support for a time. GUI's - Simple yet powerful Manage your squad, customize your team (Player and AI level saved in DB) Procedural Strategic Map - works on any island and identifies objectives Deep player customization, and more to come Running IFA3 -
now hosting Red devils Instant Action - Lightning Warfare (COOP or TvT)
ronin1979ca posted a topic in ARMA 3 - MULTIPLAYER
Hey I'm hosting this again on dedicated hardware. If there is interest I will leave it up and updated. The gear has been switched to the ARMA3 arsenal. Among other things you can equip your leveled AI with customized loadouts. Here is a video -
So I'm having an issue with setting a backpack skin onto my Altis Life server, before I continue I have posted on their forum as well but I can shake the feeling I'm a beggar when I post on there, I get the feeling the help is very, shall we say, limitied by choice, granted they are extremely helpful when they reply and I am very grateful for the help they provide but I kind of want to expand that help and not just confine it to the forum. Now to the issue. When I try and add the backpack skin in with the "if(backpackContainer player)" code my database throws a tanty and just gives me the 'request received from server.... validating' I've come to the conclusion that with the 'backpackContainer' part it's conflicting with the container sql code needed for housing storage. I'm fairly familiar with Arma coding but not that advanced to figure out a solution, so has anyone had this problem or doesn anyone know a solution the to problem, I'm at a loss as to fixing it. Thank you. (Please sir may I have some code?)