Jump to content

7erra

Member
  • Content Count

    753
  • Joined

  • Last visited

  • Medals

Everything posted by 7erra

  1. VASS - Virtual Arsenal Shop System Introduction VASS provides a simple to setup shop system and is the successor to the Arsenal Shop. The system provides several functions to handle traders and items. As of now it does not come bundled with an economy system but the implementation of an external one is easily possible. Setup Enable system: Download the GitHub repo: https://github.com/7erra/VASS-Virtual-Arsenal-Shop-System Check the example mission (Mission.VR) Copy the VASS folder to your mission Add the lines from the description.ext Add trader: Execute the addShop function: [this] call TER_fnc_addShop Add an inventory with the addShopCargo function: [this, ["itemclass0", 15, 5, ..., "itemClassN", price, amount]] call TER_fnc_addShopCargo For easier setup of this cost table I have created a mod that does this task with a user interface: https://steamcommunity.com/sharedfiles/filedetails/?id=1760193128. The settings can be changed by opening the object's attribute window and scrolling down to the "VASS" section. Handle money: Edit the TER_fnc_VASShandler in "VASS\fnc\fn_VASShandler.sqf" Change the getMoney and setMoney functions to match your economy system Documentation GitHub will have a wiki on all aspects of the system. In addition to that all relevant functions have a header at the beggining of the file to show you what arguments they expect and what they do. Further links GitHub: https://github.com/7erra/VASS-Virtual-Arsenal-Shop-System VASS 3den mod: https://steamcommunity.com/sharedfiles/filedetails/?id=1760193128 BI forums: https://forums.bohemia.net/forums/topic/219677-release-virtual-arsenal-shop-system/ Screenshots That's all for now and I hope that you find this useful! 7erra DISCLAIMER - This post was edited nearly a year after the original post. Don't expect comments from the previous discussion (up until page 5) to be applicable to the new system
  2. Heya, it's been a while 🙂 Has this been resolved in the meantime? I made some changes a bit ago where I fixed some locality issues, not sure if this was the same problem. By default the money is calculated on the rating of the unit as a very basic implementation of a money system. I'd recommend to use an actual money system and integrate it via https://github.com/7erra/VASS-Virtual-Arsenal-Shop-System/blob/master/Mission.VR/VASS/fnc/fn_VASShandler.sqf As many as the Arsenal/Arma can handle. There should be no issue using mods. Can you give the steps to reproduce this behavior? Also make sure to use the latest version, there were some locality issues in earlier ones that should be fixed now.
  3. Hello my fellow mission editors! Since the Notepad++ Editor is so customizable why not customize it for ArmA? I.) SQF Syntax Highlighting and Auto Completion Obviously the most important improvement. Instructions can be found at the respective sites. II.) BIKI search Poseidon Tools already has it and Notepad++ can do it too: The instant jump to the BIKI (Bohemia Interacitve Wikipedia) with the selected command. Here are the steps to get it working: Go to "EDIT >> On Selection >> Change search engine" Select "Set your search engine here:" Paste the following into the blank field: https://community.bistudio.com/wiki/$(CURRENT_WORD) Close the dialog Now select a command and right click "Search on Internet" will take you to the command's BIKI site (Optional) Set a hotkey Go to "Settings >> Shortcut Mapper" Filter for "Search on Internet" Edit the entry by doubleclicking Select your preferred key/combination from the dropdown menu Press OK Close the overlay III.) Open latest log Since Notepad++ has a tail function you can use it to analyse you Arma log. NOTE: This is a very very basic approach which I put together with my non-existent batch skills and exceptional Google skills. Create a file anywhere on your computer (eg in the Notepad++ directory) Rename the file and the file extension to eg "LatestLog.bat" (w/o the quotation marks) Edit it with Notepad++ Paste the following lines into the file: FOR /f %%i IN ('dir "C:\Users\%USERNAME%\AppData\Local\Arma 3\*.rpt" /o:d /b') DO (set LAST=%%i) start notepad++ "C:\Users\%USERNAME%\AppData\Local\Arma 3\%LAST%" Save the file Go to "Run >> Run" or press F5 Press the 3 dots Locate your .bat file and press "Open" Save with custom name The function can now be found under the "Run" menu as the last entry IV.) Enable Tail "Tailing" a file will make it scroll to the last line automatically. This is especially useful for logs which get updated frequently. Enable/Disable the tail functionality by... Clicking the "👁️" in the hotbar Going to "View >> Monitoring (tail -f)" (Global setting) Going to "Settings >> Preferences >> MISC. >> File Status Auto-Detection" and checking the "Scroll to last line after update" option V.) Automatic File Updates Normally Notepad++ will ask you if you want to reload a file that has been edited externally. This can and will get annoying especially with logs. Make it automatic with the following steps: Go to "Settings >> Preferences >> MISC. >> File Status Auto-Detection" Check the "Enable" and "Update silently" option VI.) Plugins There are hundreds of plugins so here is a list of some that I personally found useful or interesting. Install Plugins: Before doing anything: Save unsaved files! Notepad++ will be restarted during the process Go to "Plugins >> Plugin Manager >> Show Plugin Manager" Select the "Available" tab Wait for the list to refresh (might take a minute or two) When selecting an entry the description will be displayed in the text field below the browser Check the boxes for plugins that you need and press "Install" After the download finished restart Notepad++ The plugin(s) can be found under the "Plugins" dropdown menu List of useful plugins: Don Rowlett Color Picker Does as the name says: It has a UI where you can set the desired color and converts it to different formats. The most useful output is the HTML format which is used in Structured Text. The RGB format sadly isn't the same as A3 (0-255 instead of 0-1). Quick Color Picker + Another color palet. But with additional functionalities: Select a color from your screen, edit/preview already written down colors MathPad A simple calculator. If you want to evaluate an expression without switching to another program. MultiClipboard Store your copy/paste history and access it with CTRL+SHIFT+V. Getting your PhD has never been easier. Falling Blocks Need some distraction from getting angry/sad at not working scripts? And more to follow. Feel free to share your own tips and tricks as well as thoughts and questions! 7erra
  4. 7erra

    Center dialogs

    https://community.bistudio.com/wiki/Arma_3:_GUI_Coordinates#Using_the_grids_in_the_GUI_Editor For centered dialogs you use the GUI_GRID_CENTER macros, so GUI_GRID_CENTER_X, -Y, -W and -H. H and W are the same for all GUI_GRIDS, you can paste the values from the page i linked above. For x and y you have to replace the macros in "\a3\ui_f\hpp\definecommongrids.inc" with actualy commands (a bit of work but you only have to do it once). Or you can use my mod: There is a page on the Extended Debug Console where you can set these values permanently.
  5. 7erra

    ListBox overflow issue

    There's only the limit that you implement yourself. How many items are we talking about and what exactly is the bug?
  6. There are some newer config viewers. I know of @Leopard20 Advanced Developer Tools and my own one. I can also recommend doing a config dump with the new diag_exportConfig command.
  7. 7erra

    Problem with init.sqf

    why didnt you post the code? its just two lines: _actionID = player addAction ["Exec the file", "randomspawn.sqf"] hint str _this; init.sqf is executed for the server and all clients before mission start. try initPlayerLocal.sqf instead
  8. 7erra

    Coop Parameters

    In that case you'll have to follow the instructions on the page you linked. Set up the description.ext and then you can use BIS_fnc_getParamValue to get the value the player selected
  9. This forum might be more fitting: https://forums.bohemia.net/forums/forum/200-arma-3-find-or-offer-editing/
  10. Saving files is not supported by sqf. For vanilla Arma 3 you can use profileNamespace, this will write data to your NAME.Arma3Profile: https://community.bistudio.com/wiki/Profile. The other, maybe better, option is to use an extension with file writing capabilities or writing your own, eg.:
  11. 7erra

    Coop Parameters

    what parameters do you mean? function parameters or mission parameters?
  12. 7erra

    COPY RIGHT?

    it's a spam bot, see the comment history. he's posting vague answers and then editing his posts with links to websites
  13. 7erra

    COPY RIGHT?

    that is not possible. you are the creator, you hold all the rights to your work. sqf files are merely text files, there are no special tools needed to write a script. In German law the creator is very well protected. In doubt, he will win the case. But from the original post it does not sound like anyone was paid, so the server/community holds no rights to the mission files. Now for some less legal advice: No plaintiff, no judge.
  14. 7erra

    COPY RIGHT?

    Disclaimer: I am not a lawyer, this is not legal advice. This is to my best knowledge from a uni course about German law. Technically you can, that's what copyright is for. The creator of the mission files is the copyright holder. But filing a DMCA on Steam (as you said) or in fact any other hoster is usually the easier route. Now what I am only 90% sure about is the copyright of the client files, I would say they also belong to the server files' author because they are the result of his work. And to answer this question: I would say no, because you are not the copyright holder, you would need permission from him to make any modifications, redistributions, etc..
  15. 7erra

    Script Radio online?

    There was a release recently that adds radio stations to Arma but I have not used it myself, check it out here: https://steamcommunity.com/sharedfiles/filedetails/?id=2172022102
  16. This is logically wrong and invalid in sqf. Logically, because this code will only get executed once and invalid because you can't compare different data types with "==". Wrong syntax, check the BIKI. correct one would be "this removeAction id" where id is the return value of the addAction command. _Player is undefined Wrong syntax for addAction, second param is code not an object (this refers to the flag pole), third param is also wrong it has to be an array.
  17. Locality. I guess you are playing on a hosted server? initPlayerLocal.sqf might solve your problem. 15m Default for addaction distance is 50m according to BIKI
  18. You could disable the rating system with the HandleRating Eventhandler and overwrite the default engine behaviour by returning your own rating // initPlayerLocal.sqf player addEventHandler ["HandleRating", { 0 }];
  19. There are a lot of errors in your script. Have you read the Introduction to Arma Scripting? _Flags = ["USFlag1","NFFlag1","RCFlag1","RangeFlag1","RangeFlag2","RangeFlag3",]; // Error: trailing "," USFlag = _Flags select 0; Nato = _Flags select 1; RedCross = _Flags select 2; Range = _Flags select 3,4,5; // Error: Invalid use of select and commas // Range = _flags select [startindex, range]; [ // Error: Trying to create an array forEach _Flag do // Correct usage of forEach is "{code} forEach [array];", so /// {...} forEach _Flags; ["AmmoboxInit",[_this,true]] call BIS_fnc_arsenal; call setFlagAnimationPhase 0.1;}; // call expects {code}, setFlagAnimation expects OBJECT as left argument addAction["Raise Flag",{[_this, 1.0] remoteExec ["setflaganimationPhase",0,true];}]; // Error: addAction needs OBJET as left argument "OBJECT addAction ..." /// Error: _this is an array, you need the flag object which is first (0) param, so "_this select 0" addAction{"Lower Flag",{[_this, 0.1] remoteExec ["setflaganimationPhase",0,true];}]; // Error: Used "{" instead of "[" addAction["Half Staff",{[_this, 0.5] remoteExec ["setFlagAnimationPhase",0,true];}]; ];
  20. The LBSelChanged EH passes the control as a parameter. we can use that to get the display from which we can then get the map control again: params ["_ctrlList", "_index"]; // Somehow get position fron the entry... private _display = ctrlParent _ctrlList; private _ctrlMap = _display displayCtrl 900; _ctrlMap ctrlMapAnimAdd [0, 0.25, _pos]; _ctrlMap ctrlMapAnimCommit 0;
  21. You need to set up a UIEH "LBSelChanged" (https://community.bistudio.com/wiki/User_Interface_Event_Handlers) and inside of that event you can use ctrlMapAnimAdd
  22. 7erra

    Mine training range

    Read the addAction page on the BIKI carefully, you can't use an array (["eodtrainingsrange1.sqf"]) as second parameter. while {_counter < _minesCountInArea } do { for each _minePosition = [gerMarkerPos [_areaArray, true]; this is wrong, for each is not a command/structure, getMarkerPos has a typo and also does not take an array as right hand argument but a string. Have you read the Introduction to arma scripting on the BIKI yet? _this would also contain the arguments from the addAction in the _this variable and not the counts you apparently want
  23. 7erra

    Mine training range

    For the restart action you can use an addAction or the more modern BIS_fnc_holdActionAdd. Inside of that you can run code to create any missing mines. We just need a way to track which mines exploded and which do not need replacement. Instead of using markers you could also use invisible locations as you can use setVariable on them. place all of them in a separate eden layer named "trainingMineLocations". Now for the addAction code: { private _mine = _x getVariable ["mine", objNull]; if (!isNull _mine) then { continue; }; // No mine at location, create a new one private _mine = createMine ["classnameofmine", getPos _x, [], 0]; _x setVariable ["mine", _mine]; } forEach (getMissionLayerEntities "trainingMineLocations" select 0); Untested, not sure if ace mines are different.
  24. spawn creates a new scope which does not know about the variables you defined in the scope above. You have to pass the variables to the spawn: [_eachVeh, _x] spawn { params ["_eachVeh", "_x"]; // though it is bad practice to use magic variables as variable names // CODE... While { /* condition */ } { { if ( [_eachVeh, _x, VO_grdServiceRange] call THY_fnc_VO_checkStation ) then {
  25. THY_fnc_VO_checkServicability = { params ["_eachVeh"]; alive _eachVeh and abs speed _eachVeh < 2 and !underwater _eachVeh and getPos _eachVeh select 2 < 0.1 and !_serviceInProgress }; THY_fnc_VO_checkPlayerVehRepair = { params ["_eachVeh"]; _eachVeh call THY_fnc_VO_checkServicability AND (!isEngineOn _eachVeh) AND (damage _eachVeh > VO_minRepairService) }; THY_fnc_VO_checkPlayerVehRefuel = { params ["_eachVeh"]; _eachVeh call THY_fnc_VO_checkServicability AND (!isEngineOn _eachVeh) AND (fuel _eachVeh > VO_minRefuelService) }; THY_fnc_VO_checkPlayerVehRearm = { params ["_eachVeh"]; _eachVeh call THY_fnc_VO_checkServicability AND (({getNumber (configFile >> "CfgMagazines" >> _x select 0 >> "count") != _x select 1} count (magazinesAmmo _eachVeh)) > 0) }; There is rarerly, if ever, the need to copy code. You can move common checks into a separate function (works in this case because you are only using "and"). But there is an error in your function: _serviceInProgress is not defined. You might not get one because it is defined in the parent function but this is bad practice to rely on a non defined variable in your code. Also comparisions with boolean values is unneccessary, "true == _var" and "_var" are the same, just like "false == _var" and "!_var".
×