ffredyk 49 Posted August 13, 2019 Hello, so I spent last 4 days reverse engineering and studying the new contact functions and scripting systems. I have figured out almost everything and I will update this thread as I figure out rest of what's left unexplored. Spectrum Device / EM / Radios This one was really tough to solve. The internal system is quite big and chaotic a little bit. The most important functions tend to be descripted, but the rest of the system are "unorganized" chunks of codes. [string: Antenna ID,object: Owner,int: Antenna Type] call BIN_fnc_setAntenna; This function is easy to use. You just think of some unique ID for the antenna, object that will hold the antenna and you define the type of antenna (2 -> transceiver = both receives and transmits signal) Antenna ID is also looked up in the config for predefined values. Check CfgContact >> Antennas Example: ["AlienTracker",bin_drone,2] call BIN_fnc_setAntenna; [string: Antenna ID,string: Signal classname] call BIN_fnc_addSignal; This function is easy to use too. It gives the antenna sounds (signals) we want to play on it. The signals are defined in the config CfgContact >> Signals Signals can be looped. Example: ["AlienTracker","EM_Drone_01_Tracking_01"] call BIN_fnc_addSignal; [string: Antenna ID, string: Name] call BIN_fnc_setAntennaName; Set's the visible name of the antena ie. when used on squad, instead of "Unknown squad" displays the second param Example: ["AlienTracker","Ligma ET"] call BIN_fnc_setAntennaName; [object: UGV class UAV] spawn BIN_fnc_initUGV; This sets up all the EM functionality for UGVs UGVs emit UAV Telemetry signals and listens for jamming and hacking Hold action is added to the UGV for it's destruction. All UGVs set by this functions are on the same frequency, think of that when planning placements Example in editor init: [this] spawn BIN_fnc_initUGV; [object: unit, string: Company, string: Squad] spawn BIN_fnc_initAISquad; This one is the party popper. This is the one used on unit groups. It is initialized on any unit in the group Company is string in format "C0?" where ? stands for a number from 1 to 9 (but it really just reads entries from config CfgContact >> Antennas It is C-zero-one not C-O-one Squad is a single lowercase letter from "a" to "h" and "q" which is the base (not used in this function) This function looks for units that have a radio backpack on them in the whole group, uses them as target unit if found Example in editor init: [this, "C01", "a"] spawn BIN_fnc_initAISquad; The EM system for AI Base is created automaticaly from script initAISquad, which checks if the base is already ready or not. There are missionNamespace scripted eventHandlers for signal listening and custom scripting but I didn't test these enough to tell you about them properly. Alien Drone The small alien drone can be easily placed in editor (best practice as side east) and has two types of behaviour - Aggresive and Passive. You can read about the setup on the wiki https://community.bistudio.com/wiki?title=Arma_3_Alien_Entity_Behavior Official variable naming of the drone is bin_drone There are some uncovered script functions however (please note, I didn't yet properly test all behaviour branches so information I provide may be misleading anyhow) [object: Drone,int: Max signals,int: Jamming time,array: ?next puzzle?,int: number of repetitions] call bin_fnc_puzzle_mole; This function creates what is called a puzzle - numerous signals for player to jam with their signal detector. Max signals defines how many concurent signals are visible on the spectrum at the same time Jamming time defines how long it takes to jam one signal successfuly Next puzzle is something I didn't mess up with yet, so I can't provide much information Number of repetitions define how many times a new signal emerges when one is jammed There is a scripted eventHandler for you to listen, that fires when the puzzle is completed [missionNamespace, "puzzleCompleted",{/*codehere*/}] call bis_fnc_addScriptedEventHandler; There are other event handler (self-explanatory): puzzleReset, puzzleStepCompleted, puzzleTerminated There is a lot of functions puzzle-related.. I am messing with them now, so I will fill this list when I create more robust information Example: [bin_drone,1,1,[],3] call bin_fnc_puzzle_mole; [object: Drone,int: Radius m,int: Speed m/s,int: Delay] call bin_fnc_setGravityPulse; Shield's effect is made using light entity nad sound effect (when hit, PP is also used) Shield eats away stamina and stops the player for a second when near the source. Shield shakes the player's camera and creates deep sounds when felt from far. Speed is the speed, the gravity shield reaches the Radius distance from the drone Radius define the distance from the drone the shield will reach This one creates pulsing shield around the Drone once every Delay seconds Example: [bin_drone,300,100,3] call bin_fnc_setGravityPulse; [object: AFO] call BIN_fnc_initMothershipLights; Powers up the big AFO (it's lights) CBRN There are some CBRN functions not explained in the wiki (specialized on the chemical warfare), but are tagged as incomplete or "not robust" so I will be experimenting with them and when something is proved to be working I will list it here Other There are few useful scripts for unit enhancement, you can find more of these on the wiki: https://community.bistudio.com/wiki/Arma_3_CBRN But there are some hidden ones: [object: Unit, bool: Attach/detach] spawn bin_fnc_attachChemlight; Attaches a blue glowstick on the shoulder of the unit the same way as it is seen in campaign. Best practice is to mark only soldiers with radios that can be messed up with signal detector. Example: [this, true] spawn bin_fnc_attachChemlight; [object: Ball, int: Time to decompose] spawn BIN_fnc_matterBallEffects; Effects used for the matter balls (yellow blobs the alien leaves behind) Adds lights, refraction particles and animates the ball to decompose itself Example: [this, 100] spawn bin_fnc_matterBallEffects [object: Vehicle] call BIN_fnc_empVehicle; Tunes the vehicle so it's more post-EMP Can be reverted by setting second parameter bool (destruction of the engine) Example: [this] call BIN_fnc_empVehicle; [object: Unit, vector: Force] call BIN_fnc_setRagdoll; Ragdolls the unit with the directional force Example: [player,[0,100,0]] call BIN_fnc_setRagdoll; [classname: Vision type] spawn BIN_fnc_showVision; The hallucination effect from the campaign when player completed the drone's puzzles Takes the data from config CfgContact >> VisionSequences [bool: Shown] call BIN_fnc_showHorizontalCompass; Shows or hides the horizontal compass at the top of the screen Example: [true] call BIN_fnc_showHorizontalCompass; So that's it, at least for now.. I will update this thread as I discover and study more scripts and functions the Contact DLC has to offer. Trust me, there is a lot of unused things (chemical detector for example) and I've created a lot of custom scripts to complement these features. Just take a look at this sneak peak: If there is anyone that wants to study these things with me, you just need the Functions and Config viewers. I tried to take a peak inside campaign init files, but there are mostly empty or contains unrelevant logic. The hard-way is sometimes the only way, at least for now 😄 15 16 Share this post Link to post Share on other sites
Tankbuster 1746 Posted August 13, 2019 Good work. Must have been a chore digging through all of that code. Did you get to look at the horizontal compass? Share this post Link to post Share on other sites
ffredyk 49 Posted August 13, 2019 Thanks, I had a lot of fun figuring these out actually😄 I want to look into these smaller function later today. Namely the simple notification function (little bar in the top middle screen space) but from the fast lookup I had on it earlier it seems it won't support custom text sadly 😕 and the danger zone functions (they are somehow interconnected with acctime management function - namely bin_fnc_initAcctime), there are some acctime enhancement functions too (timemultiplier boosting) I will take a look at the compass too. And I need to figure out how the omni-directional antenna notifying player about ongoing signals around him works.. Share this post Link to post Share on other sites
NeoArmageddon 958 Posted August 13, 2019 Really nice list! Just started the compaign yesterday and I really like the scripted stuff and the storytelling that comes with it. I didn't had a look at the scripts myself yet, but did you stumbled on the shooting star effect one can see in the second missions intro? Would love to use it for a campaign I am working on. Share this post Link to post Share on other sites
ffredyk 49 Posted August 13, 2019 So I added the compass function which is fairly simple (just toggles the compass) 3 hours ago, NeoArmageddon said: Really nice list! Just started the compaign yesterday and I really like the scripted stuff and the storytelling that comes with it. I didn't had a look at the scripts myself yet, but did you stumbled on the shooting star effect one can see in the second missions intro? Would love to use it for a campaign I am working on. I didn't see any references to this shooting star effect in the functions.. Maybe it is dug deep somewhere, but I would rather assume it is created as a particle or via cutRsc somehow.. I will try to rip active scripts, entities and displays(controls) during the intro when this happens, it will take a few hours tho.. 1 Share this post Link to post Share on other sites
ramon_dexter 14 Posted August 13, 2019 Hi, I wanted to ask, if you have found out anything about the new task & note system? I have tried to use this, but looks like that scripting approach using BIS_fnc_taskCreate is little bit broken. I just cannot make it to show marker on map. The quest is listed in the list, the quest icon is shown on the compass, but no marker on the map. When I use 3den module, the marker is shown. But I need to use scripting, since I need to start several tasks from scripted conversations. The second thing is the note system. Obviously, createDiarySubject and createDiaryRecord dont work here. Did you found any trces of this new system? I would be happy to use this, but since the game files are .ebo, I dont even know how to open these. Share this post Link to post Share on other sites
NeoArmageddon 958 Posted August 13, 2019 3 hours ago, ffredyk said: I will try to rip active scripts, entities and displays(controls) during the intro when this happens, it will take a few hours tho.. No worries if this is not your top priority. Sooner or later I will tear the functions and scripts apart myself. Just need to get through the campaign first 😄 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4207 Posted August 13, 2019 Thank you very much ffredyk for sharing all these useful info ! 1 Share this post Link to post Share on other sites
1212PDMCDMPPM 200 Posted August 14, 2019 Thanks for sharing all these info !! Has anyone found out how the map was covered by a different picture in the first scenario ? Share this post Link to post Share on other sites
ffredyk 49 Posted August 16, 2019 On 8/13/2019 at 7:00 PM, ramon_dexter said: Hi, I wanted to ask, if you have found out anything about the new task & note system? I have tried to use this, but looks like that scripting approach using BIS_fnc_taskCreate is little bit broken. I just cannot make it to show marker on map. The quest is listed in the list, the quest icon is shown on the compass, but no marker on the map. When I use 3den module, the marker is shown. But I need to use scripting, since I need to start several tasks from scripted conversations. The second thing is the note system. Obviously, createDiarySubject and createDiaryRecord dont work here. Did you found any trces of this new system? I would be happy to use this, but since the game files are .ebo, I dont even know how to open these. I am actually trying to figure these out right now.. I am stuck at the diary records function, because it is completely undocumented and chaotic (code is branching into 2-3 separate logics and none of them works for me 😄 ) On 8/14/2019 at 4:57 PM, 1212PDMCDMPPM said: Thanks for sharing all these info !! Has anyone found out how the map was covered by a different picture in the first scenario ? There is a function bin_fnc_switchMap and similar one that enables/disables which modes are available to switch between. I will document them together with other functions I have ready.. I will update this thread with all new discoveries or research that I have made so far. But I don't know when I will have time to write them down, I have been kinda overwhelmed with the work lately. 1 Share this post Link to post Share on other sites
Vandeanson 1677 Posted September 17, 2019 Great work for the community, thanks! Share this post Link to post Share on other sites
Question Mark 0 Posted September 27, 2019 Thank you for this. So far I've managed to get all of the radio stuff to work including radio deception but I just can't work out how to use the "BIN_fnc_setAntennaName" script to work on a squad to change the name from Unknown Squad. I'm hoping it's something simple that I am missing and I'm just stupid. What I've tried is just "["C01_Squad","ALPHA"] call BIN_fnc_setAntennaName;" in the init.sqf file, and with "[this, "C01", "a"] spawn BIN_fnc_initAISquad;" on the radio operator unit in a group. I don't have much experience with scripting but everything else works. I just can't figure this out. Share this post Link to post Share on other sites
LSValmont 789 Posted September 27, 2019 This one does not work for me: [true] call BIN_fnc_showHorizontalCompass; Share this post Link to post Share on other sites
Tankbuster 1746 Posted September 27, 2019 1 hour ago, LSValmont said: This one does not work for me: [true] call BIN_fnc_showHorizontalCompass; It's never worked for me, either. Share this post Link to post Share on other sites
haleks 8212 Posted September 28, 2019 It's supposed to be true call BIN_fnc_showHorizontalCompass, iirc. Share this post Link to post Share on other sites
Tankbuster 1746 Posted September 28, 2019 14 hours ago, haleks said: It's supposed to be true call BIN_fnc_showHorizontalCompass, iirc. That doesn't work either. Share this post Link to post Share on other sites
lexx 1364 Posted October 4, 2019 true call BIN_fnc_showHorizontalCompass; ^ this is the right way. If that doesn't work, something else is missing. One thing to not is that most / all of these commands require Contact and won't work in "vanilla" A3. Share this post Link to post Share on other sites
LSValmont 789 Posted October 4, 2019 10 hours ago, lexx said: true call BIN_fnc_showHorizontalCompass; ^ this is the right way. If that doesn't work, something else is missing. One thing to not is that most / all of these commands require Contact and won't work in "vanilla" A3. I don't understand why would BI keep basic things such as the Horizontal Compass UI locked behind a DLC. And yet again there are so many bigger things I don't understand about why BI does things so... it comes at no surprise. Lets hope that for version 1.96 they "wise up" and move all of these into the main branch. Share this post Link to post Share on other sites
ramon_dexter 14 Posted October 4, 2019 Also, I'm hoping they will fix the half broken task system. I would love to make a mission using the contact assets. The radio stuff would be cool for a survival type mission, where player has to look for other survivora with the spcetrum device. But since the task system in contact is half broken and works only with editor modules, I cannot use it. I need to be able to create tasks from scripts, not from modules, because of indeedpete's dialog system. Share this post Link to post Share on other sites
haleks 8212 Posted October 4, 2019 1 hour ago, LSValmont said: I don't understand why would BI keep basic things such as the Horizontal Compass UI locked behind a DLC. And yet again there are so many bigger things I don't understand about why BI does things so... it comes at no surprise. Lets hope that for version 1.96 they "wise up" and move all of these into the main branch. Well, on the other hand, BIS moved so much stuff to the free platform that there isn't much left at this point to be kept as an exclusive for DLC owners, except for the aliens... Judging by the quasi complete absence of user-made missions involving said aliens, I think they went the wrong way as to what should be made available to everyone though. 1 Share this post Link to post Share on other sites
LSValmont 789 Posted October 4, 2019 3 hours ago, haleks said: Well, on the other hand, BIS moved so much stuff to the free platform that there isn't much left at this point to be kept as an exclusive for DLC owners, except for the aliens... Judging by the quasi complete absence of user-made missions involving said aliens, I think they went the wrong way as to what should be made available to everyone though. Well you have the Livonia Map locked hard behind the DLC and even thou they moved the weapons, uniforms and other stuff most of those cannot be used by NON DLC OWNERS anyway. The true winners behind these community splitting DLCs are mods such as CUP and RHS that everyone is using to make their missions instead of the official DLC content. Hell, even your amazing CONTACT mod's UFOs are surely used more than the CONTACT DLC Aliens will ever be used at this point. 1 Share this post Link to post Share on other sites
Orter 0 Posted November 20, 2019 Can anybody confirm they got this stuff to work in vanilla Eden editor? Or do you need to be in the other "Contact" client. Share this post Link to post Share on other sites
ricoarma 5 Posted December 9, 2019 Hi everyone; I try to put this other script in the init of a soldier / a UAV / or a UGV [this, true] spawn bin_fnc_attachChemlight; in the init of a soldier [this] spawn BIN_fnc_initUGV; in the init of a UGV [this] spawn BIN_fnc_initUAV; in the init of a UAV But nothing, I try to put them without brackette, but nothing. Somebody could help me pelase? Share this post Link to post Share on other sites
pierremgi 4886 Posted December 10, 2019 It seems that BIN (no comment) functions are for CONTACT context. As you can see, you make this choice at start: play Arma as usual or play Contact. After that, as usual, your code must return nothing in an init field of a soldier (or any object): so in contact, 0= [this, true] spawn bin_fnc_attachChemlight; will work. Share this post Link to post Share on other sites
jts_2009 96 Posted January 30, 2020 Anyone have the color correction from second mission? There is a blue night. Good visibility. Or, maybe, it's done other way..? 2 Share this post Link to post Share on other sites