Better ExAd integration and general structure change

Reintal from scratch after this upgrade.
This commit is contained in:
NRZ7 2016-10-15 13:39:45 +02:00
parent 192ec3d1d3
commit 5285299791
8 changed files with 84 additions and 40 deletions

View File

@ -1,3 +1,14 @@
// **********************************************************************************************************
// * This project is licensed under Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
// * https://creativecommons.org/licenses/by-sa/4.0/
// **********************************************************************************************************
// @file Name: xm8modChecker.sqf
// @file Author: jmayr2000 (from exilemod.com)
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// DO NOT TOUCH UNDER THIS LINE IF DON'T KNOW WHAT ARE YOU DOING
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
private["_display","_message","_strTxt","_pos"];
try
@ -8,8 +19,6 @@ try
if(count _message == 0)exitWith{
throw "No server info provided";
};
if ((firstCheck == 0) && (errorLevel > 0)) then { player allowdamage false }; // God Mode ON to avoid die and close dialog only if ModCheckerDisplay is auto executed.
disableSerialization;
[
@ -22,16 +31,7 @@ disableSerialization;
8
] spawn BIS_fnc_dynamicText;
/////////////////////////////////////////////////////////////////////////////////////////////
// CUSTOMIZABLE PART HERE
// Remember to add-delete-modify the same mod variable names used in xm8modChecker.sqf
/////////////////////////////////////////////////////////////////////////////////////////////
#include "..\..\..\..\addons\modChecker\modCheckerDisplayConfig.hpp"
/////////////////////////////////////////////////////////////////////////////////////////////////////
// END OF CUSTOMIZABLE TEXT, DO NOT TOUCH UNDER THIS LINE IF YOU DON'T KWOW WHAT ARE YOU DOING
////////////////////////////////////////////////////////////////////////////////////////////////////
#include "..\..\..\..\addons\modChecker\modCheckerDisplay.hpp"
_display = uiNameSpace getVariable ["RscExileXM8", displayNull];
if(isNull _display)exitWith{

View File

@ -1,11 +1,17 @@
errorLevel = 0; // Do not touch. Set errors to 0 before run modChecker.sqf
#include "..\..\..\..\addons\modChecker\modCheckerConfig.hpp"
// **********************************************************************************************************
// * This project is licensed under Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
// * https://creativecommons.org/licenses/by-sa/4.0/
// **********************************************************************************************************
// @file Name: xm8modChecker.sqf
// @file Author: jmayr2000 and NRZ7 (www.standarol.com)
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// DO NOT TOUCH UNDER THIS LINE IF DON'T KNOW WHAT ARE YOU DOING
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
errorLevel = 0; // Do not touch. Set errors to 0 before run modChecker.sqf
#include "..\..\..\..\addons\modChecker\modChecker.hpp"
if (errorLevel > 0) then {
warnMessage = "<t color='#ff0000' size='1.3' shadow='1' shadowColor='#000000' align='center'>Some is WRONG with your MODS</t><br/>"; // General error message

View File

@ -14,6 +14,10 @@
Link: http://www.exilemod.com/topic/10375-advanced-server-rules-for-xm8/
*/
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// DO NOT TOUCH UNDER THIS LINE IF DON'T KNOW WHAT ARE YOU DOING
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if ((firstCheck == 0) && (errorLevel > 0)) then { player allowdamage false }; // God Mode ON to avoid die and close dialog only if ModCheckerDisplay is auto executed.
disableSerialization;
@ -35,16 +39,7 @@ _buttonSpoiler = _display displayctrl 2400;
_textSpoiler = _display displayctrl 1101;
_text2 = _display displayCtrl 1102;
/////////////////////////////////////////////////////////////////////////////////////////////
// CUSTOMIZABLE PART HERE
// Remember to add-delete-modify the same mod variable names used in modChecker.sqf
/////////////////////////////////////////////////////////////////////////////////////////////
#include "modCheckerDisplayConfig.hpp"
/////////////////////////////////////////////////////////////////////////////////////////////////////
// END OF CUSTOMIZABLE TEXT, DO NOT TOUCH UNDER THIS LINE IF YOU DON'T KWOW WHAT ARE YOU DOING
////////////////////////////////////////////////////////////////////////////////////////////////////
#include "..\modCheckerDisplay.hpp"
//Fill only the first text
_text1 ctrlSetStructuredText (parseText _message);

View File

@ -8,14 +8,13 @@
// You can configure requiered addons (error 99) or optional addons (error 1). If any required mod fails, the client load "You Loose" screen after close the dialog.
//
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// DO NOT TOUCH UNDER THIS LINE IF DON'T KNOW WHAT ARE YOU DOING
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
errorLevel = 0;
#include "modCheckerConfig.hpp"
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// DO NOT TOUCH UNDER THIS LINE IF DON'T KNOW WHAT ARE YOU DOING
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#include "..\modChecker.hpp"
if (errorLevel > 0) then {
warnMessage = "<t color='#ff0000' size='1.3' shadow='1' shadowColor='#000000' align='center'>Some is WRONG with your MODS</t><br/>";
@ -26,7 +25,7 @@ if (errorLevel > 0) then {
if ((errorLevel == 0) && (firstCheck == 0)) then {
firstCheck = 1 // Do nothing
} else {
execVM "addons\modChecker\modCheckerDisplay.sqf"
execVM "addons\modChecker\init\modCheckerDisplay.sqf"
};
// execVM "addons\modChecker\modCheckerDisplay.sqf"

View File

@ -1,8 +1,21 @@
// Exile_Client Example
// Change "Exile_Client" to name of the Cfg patche from desired mod
// **********************************************************************************************************
// * This project is licensed under Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
// * https://creativecommons.org/licenses/by-sa/4.0/
// **********************************************************************************************************
// @file Name: modChecker.sqf
// @file Author: NRZ7 (www.standarol.com)
// @description: This script check the mods loaded by the client. If any mod is not loaded, pop's a screen with detailed information and clickable community links (modCheckerDisplay.sqf).
// You can configure requiered addons (error 99) or optional addons (error 1). If any required mod fails, the client load "You Loose" screen after close the dialog.
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Exile_Client Example - READ TO UNDERSTAND - DO NOT TOUCH - READ - DO NOT TOUCH - READ - DO NOT TOUCH
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Change "Exile_Client" to name of the CfgPatches from desired mod.
// You can find under editor. ("Tools" - "Config Viewer" - "Configfile" - "CfgPatches")
if (isClass(configFile >> "CfgPatches" >> "Exile_Client")) then {
// Change checkExile to your desired mod variable name
// Change "Exile Mod is" to your mod string
// Change checkExile to your desired and unique mod variable name
// Change "Exile Mod is" to your mod string. For advanced users, can change size, color, allign, etc.
checkExile = "<t size='0.9' shadow='1' shadowColor='#000000' align='center'>Exile Mod is</t><t color='#2fd402' size='0.9' shadow='1' shadowColor='#000000' align='center'> found!</t><br/>";
} else {
// Change "Exile Mod is" to your mod string
@ -11,6 +24,10 @@ if (isClass(configFile >> "CfgPatches" >> "Exile_Client")) then {
errorLevel = errorLevel + 99
};
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// START OF MODS CONFIG - EDIT OR DELETE UNDER THIS LINE
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Esseker Example - DELETE OR MODIFY
if (isClass(configFile >> "CfgPatches" >> "Esseker")) then {
checkEsseker = "<t size='0.9' shadow='1' shadowColor='#000000' align='center'>Esseker Map is</t><t color='#2fd402' size='0.9' shadow='1' shadowColor='#000000' align='center'> found!</t><br/>";
@ -66,4 +83,17 @@ if (isClass(configFile >> "CfgPatches" >> "CBA_main")) then
} else {
checkCBA = "<t size='0.9' shadow='1' shadowColor='#000000' align='center'>CBA_A3 is</t><t color='#ff0000' size='0.9' shadow='1' shadowColor='#000000' align='center'> NOT FOUND!</t><br/>";
errorLevel = errorLevel + 1
};
};
// YOU CAN ADD MORE MODS, ADD FOR EACH SOME CODE LIKE THIS
/*
if (isClass(configFile >> "CfgPatches" >> "YOUR_MOD_CLASSNAME")) then
{
checkYOURMOD = "<t size='0.9' shadow='1' shadowColor='#000000' align='center'>YOUR MOD is</t><t color='#2fd402' size='0.9' shadow='1' shadowColor='#000000' align='center'> found!</t><br/>";
} else {
checkYOURMOD = "<t size='0.9' shadow='1' shadowColor='#000000' align='center'>YOUR MOD is</t><t color='#ff0000' size='0.9' shadow='1' shadowColor='#000000' align='center'> NOT FOUND!</t><br/>";
errorLevel = errorLevel + 1
};
*/

Binary file not shown.

View File

@ -1,3 +1,17 @@
// **********************************************************************************************************
// * This project is licensed under Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
// * https://creativecommons.org/licenses/by-sa/4.0/
// **********************************************************************************************************
// @file Name: modCheckerDisplay.sqf
// @file Author: NRZ7 (www.standarol.com) and Repentz
// @description: This script is a UI launched by modchecker.sqf. If any mod is not loaded, pop's a screen with detailed information and clickable community links (modCheckerDisplay.sqf).
// You can configure custom messages and links to your community guides.
/////////////////////////////////////////////////////////////////////////////////////////////
// CUSTOMIZABLE PART HERE
// Remember to add-delete-modify the same mod variable names used in modCheckerConfig.hpp
/////////////////////////////////////////////////////////////////////////////////////////////
// Display header
_message = "";
_message = _message + "<t align='center' size='2' shadow='0'></t><br />";
@ -20,4 +34,4 @@ _message = _message + checkCBA;
_message = _message + "<br />";
_message = _message + "If you get any error, please, read the following links<br /><br />";
_message = _message + "Download the mods from <a href= 'http://steamcommunity.com/sharedfiles/filedetails/?id=752130537' color='#ff9900'>Steam Workshop</a> Only click on Subscribe!<br />";
_message = _message + "<a href= 'http://standarol.com/index.php/topic,674.0.html' color='#ff9900'>Guía de lanzamiento e instalación de mods [ESPAÑOL]</a> </t><br /><br />";
_message = _message + "<a href= 'http://standarol.com/index.php/topic,674.0.html' color='#ff9900'>Guía de lanzamiento e instalación de mods [ESPAÑOL]</a> </t><br /><br />";

View File

@ -8,7 +8,7 @@ waitUntil {!isNull findDisplay 46 && !isNil 'ExileClientLoadedIn' && getPlayerUI
uiSleep 3;
firstCheck = 0;
execVM "addons\modChecker\modChecker.sqf";
execVM "addons\modChecker\init\modCheckerInit.sqf";
/*Note, if you have Exile ProtectionRemember.sqf, use this