Jump to content
z80cpu

Show Names of Bases, Towns, Areas, Etc. In System Chat Window/Area.

Recommended Posts

-- Show Names of Bases, Towns, Areas, Etc. In System Chat window/area.  Also shows time when player was there. --


This will allow the player to use the 'page up' feature of MP chat to see the time and name of an area they visited in the past.  Yes, it is a silly mod, but it can come in handy.  The length of time for this info to be present is not controlled by this mod.  This is controlled by Exile and/or ARMA.


Display will look like in system chat:  

Your Location:  [ Kavala ] - At Time:  17:19:22


Adds basically zero impact on anything as it is basically one line of code.

 

Directions below are crafted on a 'novice level' so all admins can hopefully add this if desired without any issues/questions!


I use this overwrite 'ExileClient_gui_hud_showSurvivalInfo.sqf' and my other overwrite 'ExileClient_util_world_getNearestLocationName.sqf' together with no issues.  Both posted here.


**************************************************************************


***  How To Install  ***


#1 - Un-PBO your mission file.  In your mission PBO, file and open the file called:  Config.CPP

 

 

 

#2 - Search/Find the section called:  class CfgExileCustomCode

Once found, it will look something like what is shown below:


class CfgExileCustomCode
{

 

---  Other items may be here already  ---


};

 

 

 

#3 - In that section, add/paste the following:

 

// Show Town/Base Info
ExileClient_gui_hud_showSurvivalInfo = "YOUR_OVERWRITE_PATH\FOLDER_NAME_YOU_CHOOSE_IF_WANTED\ExileClient_gui_hud_showSurvivalInfo.sqf";

 

 

 

#4 - When completed, the 'CfgExileCustomCode' section should look like:

 

class CfgExileCustomCode
{

 

---  Other items may be here alreay  ---

 

// Show Town/Base Info -
ExileClient_gui_hud_showSurvivalInfo = "YOUR_OVERWRITE_PATH\FOLDER_NAME_YOU_CHOOSE_IF_WANTED\ExileClient_gui_hud_showSurvivalInfo.sqf";

 

};

 

 

I personally use the folder name of 'overwrites' for all my overwrites and I used 'BaseNames' for this overwrite.

 

So my line in my Config.CPP looks like:  "overwrites\BaseNames\ExileClient_gui_hud_showSurvivalInfo.sqf";

 

The entire line in my Config.CPP is:
ExileClient_gui_hud_showSurvivalInfo = "overwrites\BaseNames\ExileClient_gui_hud_showSurvivalInfo.sqf";


Note:  Make SURE, that no other overwrite is using the same 'module'. I.E.; ExileClient_gui_hud_showSurvivalInfo
If so, you must combine the two overwrites.


I have only added/modified 4 lines (shown/marked below), so it will be extremely easy to 'merge' any like modules into one module.

 

Addition #1:  _GameTime = [daytime] call BIS_fnc_timeToString;  -  Creates a variable for usage.  The use of this variable in steps #1, #2, #3, were created for 'future use' if needed.  I could have just used 'daytime'.

 

Addition #2:  [(_GameTime), "align='left' size='0.7' font='PuristaMedium'"] - Changed 'daytime' to '_GameTime'.

 

Addition #3:  _tt = "Your Location:  " + "[ " + _locationName + " ]"  + " - At Time:  " + _GameTime;  -  Constructs message to be shown in system chat.

 

Addition #4:  systemchat _tt;  -  Show message crafted in #3 in system chat.

 

 

 

#5 - Save, Re-PBO the mission, Stop the server, Copy over new mission PBO, Re-Start server!

 

 

**************************************************************************

 


--  Put the following code below into a file called:  ExileClient_gui_hud_showSurvivalInfo.sqf

 

Make SURE you name it EXACTLY as above as well as the case of the letters, as it DOES MATTER!  a <> A, A = A

 

First 3 lines in the newly created ExileClient_gui_hud_showSurvivalInfo.sqf will be:

 

/**
 * ExileClient_gui_hud_showSurvivalInfo
 *

 

 


---------------------------------------------------------------------------

 

 

 

/**
 * ExileClient_gui_hud_showSurvivalInfo
 *
 * Exile Mod
 * www.exilemod.com
 * © 2015 Exile Mod Team
 *
 * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
 * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
 */
 
private["_showDaysSurvived", "_locationName", "_messages"];
_showDaysSurvived = _this;
_locationName = [(getPos player)] call ExileClient_util_world_getNearestLocationName;
if !(_locationName isEqualTo "") then
{


_GameTime = [daytime] call BIS_fnc_timeToString;  // Added/Modified Line - Addition #1

    _messages =
    [
            [(toUpper _locationName), "align='left' size='0.7' font='PuristaSemibold'"],
            ["","<br/>"],
            [(_GameTime), "align='left' size='0.7' font='PuristaMedium'"]   // Added/Modified Line - Addition #2  -  Original item where '_GameTime' was/is:  daytime    
    ];
    
    [_messages] spawn BIS_fnc_typeText2;
    _tt = "Your Location:  " + "[ " + _locationName + " ]"  + " - At Time:  " + _GameTime;  // Added/Modified Line - Addition #3
    systemchat _tt;  // Added/Modified Line - Addition #4

    
};
ExileClientLastLocation = _locationName;

Share this post


Link to post
Share on other sites

×