-
Content Count
64 -
Joined
-
Last visited
-
Medals
Everything posted by SicSemperTyrannis
-
iniDB - Save and Load data to the server or your local computer without databases!
SicSemperTyrannis posted a topic in ARMA 3 - ADDONS & MODS: COMPLETE
Version: 1.0 Download: http://www.mediafire.com/?yzm429w3v5yvv5m README: DOCUMENTATION: You can save and load data persistently for your mission. Save money for players, inventories, etc. This is meant for servers but I guess it could be used for clients, too. The PBO (SQF) and C++ source is included, no viruses and such here. Have fun. -
iniDB - Save and Load data to the server or your local computer without databases!
SicSemperTyrannis replied to SicSemperTyrannis's topic in ARMA 3 - ADDONS & MODS: COMPLETE
Haven't been here in a while, kind of impressed the topic didn't go to crap. -
Variables...
SicSemperTyrannis replied to Paski's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
make the last parameter true, as opposed to false. -
iniDB - Save and Load data to the server or your local computer without databases!
SicSemperTyrannis replied to SicSemperTyrannis's topic in ARMA 3 - ADDONS & MODS: COMPLETE
If it can be converted to a string, number or array it can be saved and loaded. I don't know if that answers your question. -
iniDB - Save and Load data to the server or your local computer without databases!
SicSemperTyrannis replied to SicSemperTyrannis's topic in ARMA 3 - ADDONS & MODS: COMPLETE
Well, again, the engine would just send that data explicitly (although I guess you are trying to avoid that?) because I'm pretty sure addWeapon/addBackpack/addItem/etc works on the server. If you're trying to avoid it purposefully, maybe it's better you add me to skype (will put in my profile in a moment). -
iniDB - Save and Load data to the server or your local computer without databases!
SicSemperTyrannis replied to SicSemperTyrannis's topic in ARMA 3 - ADDONS & MODS: COMPLETE
I'm still not entirely understanding your need for it, if it's to store inventory only, the server has that information and you don't really need to specifically send your loadout from the client to the server. The server has that data explicitly, meaning, it'd be there whether you specifically sent it or not. That being the case, I could look into making a gzip extension, but it might not work well with the ini format. -
iniDB - Save and Load data to the server or your local computer without databases!
SicSemperTyrannis replied to SicSemperTyrannis's topic in ARMA 3 - ADDONS & MODS: COMPLETE
Why would you need string compression if you don't mind my asking? I can try to make a separate extension to meet your needs if I know what it is for. EDIT: @Bad Benson: No, it doesn't belong in the client init. If the server isn't running the code, it will not work. You have to execute the code on the server-side and I explain how to do that in this topic in detail. -
iniDB - Save and Load data to the server or your local computer without databases!
SicSemperTyrannis replied to SicSemperTyrannis's topic in ARMA 3 - ADDONS & MODS: COMPLETE
I hope so, that was the plan I guess. I also hope there's some C/++ coders (or other languages) that can learn a bit about the plugin format and how to send/return data to/from the extension DLLs. There's a lot more you can make. I plan on making a couple more extension modules myself. -
iniDB - Save and Load data to the server or your local computer without databases!
SicSemperTyrannis replied to SicSemperTyrannis's topic in ARMA 3 - ADDONS & MODS: COMPLETE
In the player init (on the client) I do: player setVariable["profileName", profileName, true]; //3rd var "true" reports it to the server It's explained why I do that in the comments (if a player uses a different profile it will make a new db file), I guess I should have been more clear. https://community.bistudio.com/wiki/profileName -
iniDB - Save and Load data to the server or your local computer without databases!
SicSemperTyrannis replied to SicSemperTyrannis's topic in ARMA 3 - ADDONS & MODS: COMPLETE
Couple of things... first, you can't call iniDB_read on the client. Once again guys, the server. The server. The server. Also as far as I'm aware, addWeapon does not accept arrays. Try using the script I mentioned early on to get/set loadout. Um, question. How would "player" be a valid variable on the server... ? I feel like a lot of you guys should read up on code locality in ARMA. I'm not trying to make fun of any of you guys it's just... that has to be broken. If you're running it on a test server, it might save YOUR stats since isServer == true and player is valid on a local, non-dedicated server. If you try running it with actual players i have a strong feeling it will break. Protip: If iniDB_read/iniDB_write and "player" are used nearby one another, it's likely going to be broken. -
iniDB - Save and Load data to the server or your local computer without databases!
SicSemperTyrannis replied to SicSemperTyrannis's topic in ARMA 3 - ADDONS & MODS: COMPLETE
It's stored in /@inidb/db/ The first parameter of the write/read function is the file name, just not the entire file name (since it's not needed and can cause exploits). So, _fileName = format["PlayerID_%1", getPlayerUID _unit]; Would be like: /@inidb/db/PlayerID_123456.ini -
iniDB - Save and Load data to the server or your local computer without databases!
SicSemperTyrannis replied to SicSemperTyrannis's topic in ARMA 3 - ADDONS & MODS: COMPLETE
There's no loops or anything that would cause yellow chain. There's nothing especially intensive about the code. If there's problems, it's with the script. Perhaps you'd have better luck asking in script help topics. -
iniDB - Save and Load data to the server or your local computer without databases!
SicSemperTyrannis replied to SicSemperTyrannis's topic in ARMA 3 - ADDONS & MODS: COMPLETE
It should work on ARMA2 just fine, the callExtension API is in ARMA2 as well. -
iniDB - Save and Load data to the server or your local computer without databases!
SicSemperTyrannis replied to SicSemperTyrannis's topic in ARMA 3 - ADDONS & MODS: COMPLETE
Fixed it, then. -
iniDB - Save and Load data to the server or your local computer without databases!
SicSemperTyrannis replied to SicSemperTyrannis's topic in ARMA 3 - ADDONS & MODS: COMPLETE
I said earlier that I'd post one eventually, but right now I simply do not have the time. I'm working on my own mode. -
iniDB - Save and Load data to the server or your local computer without databases!
SicSemperTyrannis replied to SicSemperTyrannis's topic in ARMA 3 - ADDONS & MODS: COMPLETE
You're coding that completely incorrectly. if(!isServer) exitWith {}; _unit = _this; _profile = format["%1", getPlayerUID _unit]; _position = [_profile, "playerdata", "position", "ARRAY"] call iniDB_read; _score = [_profile, "playerdata", "score", "NUMBER"] call iniDB_read; _unit setPos _position; _unit setScore _score; Then in the init: 0=this execVM "playerinit.sqf"; What you're doing extremely wrong is you did not read up on the scripting language. I know it's inconsistent, hard to understand and well... no apologies for the language itself, but you should learn the fundamentals before tackling something like this. -
iniDB - Save and Load data to the server or your local computer without databases!
SicSemperTyrannis replied to SicSemperTyrannis's topic in ARMA 3 - ADDONS & MODS: COMPLETE
Make sure you're only executing the loading stuff if isServer is true, and if the server can't properly set the loadout (it really should be able to) then try setting a variable and transferring the data. -
iniDB - Save and Load data to the server or your local computer without databases!
SicSemperTyrannis replied to SicSemperTyrannis's topic in ARMA 3 - ADDONS & MODS: COMPLETE
Then you want it to be in the player initPlayer.sqf (without the event handler) -
iniDB - Save and Load data to the server or your local computer without databases!
SicSemperTyrannis replied to SicSemperTyrannis's topic in ARMA 3 - ADDONS & MODS: COMPLETE
give them a respawn event handler, I suppose. In the editor, in the unit initialization do: nil=[] execVM "initPlayer.sqf"; then in there, you add the handler: _unit addEventHandler["Respawn", { //load stuff here I guess? }]; Or you could set a variable, etc. There's lots of ways. -
Full Auto Pistol/Rifle/Etc Proof of Concept
SicSemperTyrannis posted a topic in ARMA 3 - ADDONS & MODS: DISCUSSION
_mdEvent = player getVariable["mdEvent", -1]; _muEvent = player getVariable["muEvent", -1]; if(_mdEvent > -1) then { findDisplay 46 displayRemoveEventHandler ["MouseButtonDown", _mdEvent]; }; if(_muEvent > -1) then { findDisplay 46 displayRemoveEventHandler ["MouseButtonUp", _muEvent]; }; player removeAllEventHandlers "Fired"; player setVariable["mdEvent", findDisplay 46 displayAddEventHandler ["MouseButtonDown", 'player setVariable["firing", true];']]; player setVariable["muEvent", findDisplay 46 displayAddEventHandler ["MouseButtonUp", 'player setVariable["firing", false];']]; player addEventHandler["Fired", { player setVariable["lastFiredEvent", time]; [] spawn { _currentTimeVariable = player getVariable["lastFiredEvent", 0]; while{(_currentTimeVariable == player getVariable["lastFiredEvent", 0]) && ((player ammo (currentWeapon player)) != 0) && (player getVariable["firing", false])} do { player forceWeaponFire [currentWeapon player, currentWeaponMode player]; sleep 0.001; }; }; }]; Made this to have it as an option to buy at an ingame shop, it's really, really filthy and could use some retooling but it does work. -
Full Auto Pistol/Rifle/Etc Proof of Concept
SicSemperTyrannis replied to SicSemperTyrannis's topic in ARMA 3 - ADDONS & MODS: DISCUSSION
What? It's not been designed for wasteland. -
Any dialog editors that work for ARMA3?
SicSemperTyrannis posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
There doesn't seem to be any that work anymore. I don't really know where to turn, but designing dialogs is impossible manually. It might not be completely impossible, but if you're expected to get anything done a single dialog panel could take up to an hour to finish, without the accompanying functionality. Is there anything I can do about this? -
Any dialog editors that work for ARMA3?
SicSemperTyrannis replied to SicSemperTyrannis's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I'll try running it vanilla, my settings prior were: -nosplash -noPause -world=empty -cpuCount=8 -exThreads=14 -maxmem=12288 -maxvram=2048 -mod=@FA_gpstr_watermark;@brf_nvg;@inidb; ---------- Post added at 02:52 ---------- Previous post was at 02:48 ---------- Alright, problem solved. You need to launch in the editor for it to work, the multiplayer editor will not work. -
Any dialog editors that work for ARMA3?
SicSemperTyrannis replied to SicSemperTyrannis's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I get this when trying to move an object: _posX = (GUI_idcActive_pos select 0) + _diffMouseX; _posY = (GUI_id> Error position: <select 0) + _diffMouseX; _posY = (GUI_id> Error Generic error in expression File A3\functions_f\gui\editor\GUI_fnc_ctrlMouseMoving.sqf, line 162 Error in expression <ys) then { EDIT: Also, Escape and F1 thing doesn't work for me at all. -
iniDB - Save and Load data to the server or your local computer without databases!
SicSemperTyrannis replied to SicSemperTyrannis's topic in ARMA 3 - ADDONS & MODS: COMPLETE
if(isServer) then { [] execVM "serverSaveData.sqf"; }; At the end of the init.sqf, I suppose.