Jump to content

Search the Community

Showing results for tags 'macros'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • BOHEMIA INTERACTIVE
    • BOHEMIA INTERACTIVE - NEWS
    • BOHEMIA INTERACTIVE - JOBS
    • BOHEMIA INTERACTIVE - GENERAL
  • FEATURED GAMES
    • Arma Reforger
    • Vigor
    • DAYZ
    • ARMA 3
    • ARMA 2
    • YLANDS
  • MOBILE GAMES
    • ARMA MOBILE OPS
    • MINIDAYZ
    • ARMA TACTICS
    • ARMA 2 FIRING RANGE
  • BI MILITARY GAMES FORUMS
  • BOHEMIA INCUBATOR
    • PROJECT LUCIE
  • OTHER BOHEMIA GAMES
    • ARGO
    • TAKE ON MARS
    • TAKE ON HELICOPTERS
    • CARRIER COMMAND: GAEA MISSION
    • ARMA: ARMED ASSAULT / COMBAT OPERATIONS
    • ARMA: COLD WAR ASSAULT / OPERATION FLASHPOINT
    • IRON FRONT: LIBERATION 1944
    • BACK CATALOGUE
  • OFFTOPIC
    • OFFTOPIC
  • Die Hard OFP Lovers' Club's Topics
  • ArmA Toolmakers's Releases
  • ArmA Toolmakers's General
  • Japan in Arma's Topics
  • Arma 3 Photography Club's Discussions
  • The Order Of the Wolfs- Unit's Topics
  • 4th Infantry Brigade's Recruitment
  • 11th Marine Expeditionary Unit OFFICIAL | 11th MEU(SOC)'s 11th MEU(SOC) Recruitment Status - OPEN
  • Legion latina semper fi's New Server Legion latina next wick
  • Legion latina semper fi's https://www.facebook.com/groups/legionlatinasemperfidelis/
  • Legion latina semper fi's Server VPN LEGION LATINA SEMPER FI
  • Team Nederland's Welkom bij ons club
  • Team Nederland's Facebook
  • [H.S.O.] Hellenic Special Operations's Infos
  • BI Forum Ravage Club's Forum Topics
  • Exilemod (Unofficial)'s General Discussion
  • Exilemod (Unofficial)'s Scripts
  • Exilemod (Unofficial)'s Addons
  • Exilemod (Unofficial)'s Problems & Bugs
  • Exilemod (Unofficial)'s Exilemod Tweaks
  • Exilemod (Unofficial)'s Promotion
  • Exilemod (Unofficial)'s Maps - Mission Files
  • TKO's Weferlingen
  • TKO's Green Sea
  • TKO's Rules
  • TKO's Changelog
  • TKO's Help
  • TKO's What we Need
  • TKO's Cam Lao Nam
  • MSOF A3 Wasteland's Server Game Play Features
  • MSOF A3 Wasteland's Problems & Bugs
  • MSOF A3 Wasteland's Maps in Rotation
  • SOS GAMING's Server
  • SOS GAMING's News on Server
  • SOS GAMING's Regeln / Rules
  • SOS GAMING's Ghost-Town-Team
  • SOS GAMING's Steuerung / Keys
  • SOS GAMING's Div. Infos
  • SOS GAMING's Small Talk
  • NAMC's Topics
  • NTC's New Members
  • NTC's Enlisted Members
  • The STATE's Topics
  • CREATEANDGENERATION's Intoduction
  • CREATEANDGENERATION's HAVEN EMPIRE (NEW CREATORS COMMUNITY)
  • HavenEmpire Gaming community's HavenEmpire Gaming community
  • Polska_Rodzina's Polska_Rodzina-ARGO
  • Carrier command tips and tricks's Tips and tricks
  • Carrier command tips and tricks's Talk about carrier command
  • ItzChaos's Community's Socials
  • Photography club of Arma 3's Epic photos
  • Photography club of Arma 3's Team pics
  • Photography club of Arma 3's Vehicle pics
  • Photography club of Arma 3's Other
  • Spartan Gamers DayZ's Baneados del Servidor
  • Warriors Waging War's Vigor
  • Tales of the Republic's Republic News
  • Operazioni Arma Italia's CHI SIAMO
  • [GER] HUSKY-GAMING.CC / Roleplay at its best!'s Starte deine Reise noch heute!
  • empire brotherhood occult +2349082603448's empire money +2349082603448
  • NET88's Twitter
  • Mercurious Brotherhood +2347063372861's +2347063372861>> I WANT TO JOIN OCCULT FOR MONEY RITUAL
  • 123betcasino01's Topics
  • TEORI BERITA's qqsuper99
  • QQSUPER99: Daftar Situs Slot Gacor Online Link Terbaru Gampang Menang's slot gacor
  • QQSUPER99: Daftar Situs Slot Gacor Online Link Terbaru Gampang Menang's slot gacor

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Yahoo


Jabber (xmpp)


Skype


Biography


Twitter


Google+


Youtube


Vimeo


Xfire


Steam url id


Raptr


MySpace


Linkedin


Tumblr


Flickr


XBOX Live


PlayStation PSN


Origin


PlayFire


SoundCloud


Pinterest


Reddit


Twitch.Tv


Ustream.Tv


Duxter


Instagram


Location


Interests


Interests


Occupation

Found 2 results

  1. Hello mission builders, scripters and developers, I like to introduce my project that is called a3-lib-checks on GitHub. I realy hope it useful for some of you. It is a kind of a BETA VERSION! Your tests in mission runtime envionment are very welcome 🙂. Link to Repository: https://github.com/DevMBeyer/a3-lib-checks Link to Unit tests: https://devmbeyer.github.io/a3-lib-checks/reports/index.html (supplement) TABLE OF CONTENT What these Libraries do The Usage of my libraries My Intension to write these libraries Why I used macro functions My research My conclusion Loops Conditions Lazy Evaluations Declarations Scopes Brackets Copy not everything How do I develop Unit Tests My Problems Test Cases Common Naming's Upload my Repository Website Entrypoint Bugs Feedback Apologizes CONTENT What these Libraries do This project contains several libraries with macro functions in it to enhanced data validation in Arma 3 scripts. The Macros are very system performance developed and should be easy to use. The functions in libraries are thematically and technically ordered. The aim of this project is to make data validation easier for other scripters and myself. Some Macros are a little confusing for you on how to work with them e.g. MB_IS_NIL( ARG ) which is nothing but isNil {ARG }. Nothing really useful but it has to be in the list of structure of macro functions for formality in my opinion. The Usage of libraries They are extremely useful for debugging a script or for conditions in mission runtime in my opinion. It should pull down the system performance in very little, so it is a good thing I guess. It depends on macro of course. My Intension to write these libraries While I was working on my SQF Scripts, I was often stuck with a bunch of errors. So I decided to developed a validation functions, which cost less system performance. As I said, it depends on the function of course. Why I used macro functions Macros must be imported from scripts, they can’t be present itself as script functions. But complex Macro functions are little faster as they are imported as code and not as a reference to the extern code. Later before the release, I will extract the string characters which are not functional like spaces between expressions. Therefor it runs little little little bit faster I hope. My research I tested with diag_performCode every single command or code construct I will work with, which is the fastest. My conclusion It is only my very personal conclusion below on the results of diag_performCode Loops I do not use for-, while- forEach-Loop. forEach loops brings more variables with them like _forEachIndex for example and decrease the system performance. In nearly all cases I don't need to use these variables, so findIf is the goal I found out. It only brings _x with it. It is really faster but it is really confusing because of the complexity. E.g. /* CODE */ \ private _copy = +ARR; \ ( ( _copy findIf { \ private _elem = ARR deleteAt 0; \ !( \ ( TYPES findIf { \ /* CONDITION */ \ } ) isEqualTo -1 \ ) \ } \ } ) isEqualTo -1 ) \ /* CODE */ \ Conditions The if-then-else should be slower than if-exitWith-expression. But both condition constructions do the same thing. // slower if ( CONDITION ) then { STATEMENT_1 } else { STATEMENT_2 }; // faster if ( CONDITION ) exitWith { STATEMENT_1 }; STATEMENT_2 Lazy Evaluations https://community.bistudio.com/wiki/Code_Optimisation#Lazy_evaluation The complex nested conditions are much faster than any other condition constructions like ifs, switch-cases. It depends on how to use them of course. false and true and true and true // slower false and { true and { true and { true } } } // faster Declarations I used as less declarations as possible and found out which the best performance is on declaration is – I guess. [] params [ [ "_foo", 0 ],[ "_bar", 0 ] ] // is little slower private _foo = 0; private _bar = 0; // is faster scopes The declaration private [ "_fnc" ]; _fnc = {}; is slowest as private _fnc = {} but if you declare this recursive function 10000 times, it is really useful and faster when you combine needed function scope to check n nested array as an argument. If the condition is matched in this function with the call 1000 times, the function just breaks out with the return and will not needto level up 1000 times to the first function call. But I am not sure of the results: private [ "_fnc" ]; scopeName "recursive"; _fnc = { /* CODE */ if( (CONDITION) call _fnc ) exitWith { true }; false breakout "recursive" }; ARG call _fnc; this function does not do anything but I hard coded to show what I means. Brackets I used brackets anywhere to enclose an expression like (_a+_b). The interpreter should like brackets, because he mustn’t search were the expression ends and prioritize which expression gets first. Again, it is my conclusion on the test results. ARR select 0 select 1 isEqualTo 0 // slower ( ( ( ARR select 0 ) select 1 ) isEqualTo 0 ) // faster Copy not everything I referenced not all Macro functions because they are sometimes dumplicates on commands in both functions so I must develop by foot e.g. MB_COMPARE_ARRAY_SIZE( ARR, 1 ) or { MB_COMPARE_ARRAY_SIZE( ARR, 2 ) } It is compact and more readable but both functions checks nil and array first, and that’s exaggerated. So I’ decided to solve this way on foot. !isNil{ARR} \ and { \ ( ARR isEqualType [] ) \ and { private _cnt = count ARR; \ (_cnt isEqualTo 1) \ or { _cnt isEqualTo 2 } \ } \ } \ I want only show what I mean. How do I develop I used my tag `MB` nearly everywhere in the code, therefore shouldn't be any name conflicts in the namespaces. I adopted BI Code Comments style in general with individualities I used K&R Code style My code should be well documented so far (if you leave out my grammar). Therefore the script comments should be understandable. Unit Tests I've written test cases and tested them with simple Unit Tests for every single macro function. Every Test Results from unit tests is generated as a report. You can see the reports of test results which were generated in html code. Unit test case arguments were changed, deleted, or expanded throughout the test by me. The reason: I have to correct individual test cases to show the differences in the individual test results. My Problems Test Cases I have optimized test cases and test arguments, while I tested each macro function to each test case. Meanwhile between past and now there are partly different and extended test arguments in unit test cases. It can be seen in the different unit test files and reports. I didn't write the test arguments to test the test arguments but to test the macro functions. So it is ok I think 👍. Common Naming's Partly it is very hard to choose the right name of each definition to show what the definition stands for regardless if function variables or constants. Upload my Repositorry I used Git of course for my project a3-lib-checks. when I started to upload there was an error occurred. Something with ssh I need to use and not TSL as the standard. So I Website Entrypoint I set the entrypoint of GitHub webpage. Nothing happes. I'm on to get thing done! Bugs As I said, the project is a BETA VERSION so there could bugs occurs, regardless of units tests! I’m just one person in the Project! Please email me or contact me in this thread or write a PN to me in this platform if there is any bug displayed with my macros if you include correctly of course 😉. Feedback Feedback is very welcome 🙂. It is useful for me to get feedback on my macros and my project. You can Criticism me, regardless if positive or negative. Every feedback is useful if the feedback is objective. Apologizes English is not my mother tongue. I hope, it can be understandable if someone reads my scrip comments I am just a Developer with amateur experience on Arma coding. I'm a greenhorn in https://github.com/. It is completely new to me. So I hope everything is clear by now 😬🙄 . Enjoy Coding 😊 Best regards MB
  2. Without going to much off topic I'll give a bit of background on why such question... I'm working on a clothes mod that creates new uniforms, helmets,etc. The scripts weren't much optimized and were pretty much copy+paste based. Worked but if I wanted to change a value of a type of vest then I had to change them all. So I started adapting the scripts to be based on inheritance so that all I had to change for the childs were textures. However I started to face some issues of many values not being inherited, particularly stats of uniforms which could be perhaps answered with the fact that some stats are present in subclasses which weren't declared in the children. However my vests children don't have subclasses declared and have the correct stats so I'm not sure. As I was doing some research looking for answers I've stumbled upon Macros which seems to be a replacement for my inheritance based system since it just copycats the parent and all I have to do is input the values into the parameters. Thus my question, which should have I used in the first place? May have I miswritten the inheritances? Or perhaps a mix of both? I haven't fixed the problem yet as I was looking for an answer on the best aproach towards the problem. It seems that backpacks, vests and helmets are working correctly but I'm not entirely sure since uniforms stats and some subclasses variables are missing/generating errors. This also brings me doubts wether or not Units are correcly setup despite at first glance they seem to have inherited correctly. Below I'll leave an example of my classes. (For the sake of simplicity for now I'll just take a segment from my vests. If it's due necessary later on I could post segments from the Units/Uniforms files.) //Also authors don't seem to inherit properly. (...) class cfgWeapons { class VestItem; class Vest_Camo_Base: ItemCore { class ItemInfo; }; #include "cfgVest.hpp" }; (...) class VEST_TAC_Desert: Vest_Camo_Base { author = "Example"; //vehicleClass = myVest; side = TWest; scope = 2; displayName = "TacticalVest Desert"; picture = "\A3\characters_f\Data\UI\icon_v_tacvest_blk_ca.paa"; model = "A3\Characters_F\Common\equip_tacticalvest.p3d"; hiddenSelections[] = {"Camo"}; hiddenSelectionsMaterials[] = {"A3\Characters_F\Common\Data\tacticalvest.rvmat"}; hiddenSelectionsTextures[] = {"forces\tex\vest\deserttactical.paa"}; class ItemInfo: VestItem { class HitpointsProtectionInfo { class Chest { HitpointName = "HitChest"; armor = 8; PassThrough = 0.3; }; class Diaphragm { HitpointName = "HitDiaphragm"; armor = 8; PassThrough = 0.3; }; class Abdomen { hitpointName = "HitAbdomen"; armor = 8; passThrough = 0.3; }; class Body { hitpointName = "HitBody"; passThrough = 0.3; }; }; uniformModel = "A3\Characters_F\Common\equip_tacticalvest.p3d"; containerClass = "Supply120"; mass = 80; hiddenSelections[] = {"camo"}; }; }; class VEST_TAC_WoodlandA: VEST_TAC_Desert { author = "Example"; displayName = "TacticalVest Woodland-A"; hiddenSelectionsTextures[] = {"forces\tex\vest\woodlandtactical.paa"}; };
×