Variables more unique and filenames intuitive

This commit is contained in:
NRZ7 2016-10-16 14:00:55 +02:00
parent 5285299791
commit 1e3dfde1b5
7 changed files with 137 additions and 120 deletions

View File

@ -31,7 +31,7 @@ disableSerialization;
8
] spawn BIS_fnc_dynamicText;
#include "..\..\..\..\addons\modChecker\modCheckerDisplay.hpp"
#include "..\..\..\..\addons\modChecker\displayConfig.hpp"
_display = uiNameSpace getVariable ["RscExileXM8", displayNull];
if(isNull _display)exitWith{

View File

@ -11,7 +11,7 @@
errorLevel = 0; // Do not touch. Set errors to 0 before run modChecker.sqf
#include "..\..\..\..\addons\modChecker\modChecker.hpp"
#include "..\..\..\..\addons\modChecker\modConfig.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

@ -2,36 +2,46 @@
// * 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 Name: modmodCheckerDisplay.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).
// @description: This script is a UI launched by modmodChecker.sqf. If any mod is not loaded, pop's a screen with detailed information and clickable community links (modmodCheckerDisplay.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
/////////////////////////////////////////////////////////////////////////////////////////////
// Display header
_message = "";
_message = _message + "<t align='center' size='2' shadow='0'></t><br />";
_message = _message + "<t align='center' size='2' shadow='0'>Welcome to Mod Checker</t><br />";
_message = _message + "<t align='center' size='2' shadow='0'>Welcome to Mod modChecker</t><br />";
_message = _message + "<t align='center'>______________________________________________________________________________________<br /><br />";
_message = _message + warnMessage;
_message = _message + "<t align='center'><br />";
//Mod variable names - MODIFY HERE
_message = _message + checkExile;
_message = _message + checkEsseker;
_message = _message + checkRyan;
_message = _message + checkWeapons;
_message = _message + checkVehicles;
_message = _message + checkUnits;
_message = _message + checkTerrain;
_message = _message + checkCBA;
/////////////////////////////////////////////////////////////////////////////////////////////
// MOD CONFIG PART HERE
// Remember to add-delete-modify the same mod variable names used in modmodCheckerConfig.hpp
/////////////////////////////////////////////////////////////////////////////////////////////
_message = _message + modCheckExile;
_message = _message + modCheckEsseker;
_message = _message + modCheckRyan;
_message = _message + modCheckWeapons;
_message = _message + modCheckVehicles;
_message = _message + modCheckUnits;
_message = _message + modCheckTerrain;
_message = _message + modCheckCBA;
//_message = message + modCheckYOURMOD;
/////////////////////////////////////////////////////////////////////////////////////////////
// Custom message with community links - MODIFY HERE
/////////////////////////////////////////////////////////////////////////////////////////////
_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 + "Easy add more lines like this";
// _message = _message + "You can easy add <a href= 'http://www.example.com' color='#ff9900'>ANY LINK!</a> And unlimited number of lines.<br />";

View File

@ -39,7 +39,7 @@ _buttonSpoiler = _display displayctrl 2400;
_textSpoiler = _display displayctrl 1101;
_text2 = _display displayCtrl 1102;
#include "..\modCheckerDisplay.hpp"
#include "..\displayConfig.hpp"
//Fill only the first text
_text1 ctrlSetStructuredText (parseText _message);

View File

@ -14,7 +14,7 @@
errorLevel = 0;
#include "..\modChecker.hpp"
#include "..\modConfig.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/>";

View File

@ -1,99 +0,0 @@
// **********************************************************************************************************
// * 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 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
checkExile = "<t size='0.9' shadow='1' shadowColor='#000000' align='center'>Exile Mod is</t><t color='#ff0000' size='0.9' shadow='1' shadowColor='#000000' align='center'> NOT FOUND!</t><br/>";
// Set 99 to Required, Set 1 to optional
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/>";
} else {
checkEsseker = "<t size='0.9' shadow='1' shadowColor='#000000' align='center'>Esseker Map is</t><t color='#ff0000' size='0.9' shadow='1' shadowColor='#000000' align='center'> NOT FOUND!</t><br/>";
errorLevel = errorLevel + 99
};
// Zombis & Demonds Example - DELETE OR MODIFY
if (isClass(configFile >> "CfgPatches" >> "Ryanzombies")) then {
checkRyan = "<t size='0.9' shadow='1' shadowColor='#000000' align='center'>Zombies and Demonds is</t><t color='#2fd402' size='0.9' shadow='1' shadowColor='#000000' align='center'> found!</t><br/>";
} else {
checkRyan = "<t size='0.9' shadow='1' shadowColor='#000000' align='center'>Zombies and Demonds is</t><t color='#ff0000' size='0.9' shadow='1' shadowColor='#000000' align='center'> NOT FOUND!</t><br/>";
errorLevel = errorLevel + 99
};
// CUP_Weapons Example - DELETE OR MODIFY
if (isClass(configFile >> "CfgPatches" >> "CUP_Weapons_WeaponsCore")) then {
checkWeapons = "<t size='0.9' shadow='1' shadowColor='#000000' align='center'>CUP Weapons is</t><t color='#2fd402' size='0.9' shadow='1' shadowColor='#000000' align='center'> found!</t><br/>";
} else {
checkWeapons = "<t size='0.9' shadow='1' shadowColor='#000000' align='center'>CUP Weapons is</t><t color='#ff0000' size='0.9' shadow='1' shadowColor='#000000' align='center'> NOT FOUND!</t><br/>";
errorLevel = errorLevel + 99
};
// CUP_Vehicles Example - DELETE OR MODIFY
if (isClass(configFile >> "CfgPatches" >> "CUP_Vehicles_Core")) then {
checkVehicles = "<t size='0.9' shadow='1' shadowColor='#000000' align='center'>CUP Vehicles is</t><t color='#2fd402' size='0.9' shadow='1' shadowColor='#000000' align='center'> found!</t><br/>";
} else {
checkVehicles = "<t size='0.9' shadow='1' shadowColor='#000000' align='center'>CUP Vehicles is</t><t color='#ff0000' size='0.9' shadow='1' shadowColor='#000000' align='center'> NOT FOUND!</t><br/>";
errorLevel = errorLevel + 99
};
// CUP_TerrainCore Example - DELETE OR MODIFY
if (isClass(configFile >> "CfgPatches" >> "CUP_Worlds")) then {
checkTerrain = "<t size='0.9' shadow='1' shadowColor='#000000' align='center'>CUP Terrain Core is</t><t color='#2fd402' size='0.9' shadow='1' shadowColor='#000000' align='center'> found!</t><br/>";
} else {
checkTerrain = "<t size='0.9' shadow='1' shadowColor='#000000' align='center'>CUP Terrain Core is</t><t color='#ff0000' size='0.9' shadow='1' shadowColor='#000000' align='center'> NOT FOUND!</t><br/>";
errorLevel = errorLevel + 1
};
// CUP_Units Example - DELETE OR MODIFY
if (isClass(configFile >> "CfgPatches" >> "CUP_Creatures_People_Core")) then {
checkUnits = "<t size='0.9' shadow='1' shadowColor='#000000' align='center'>CUP Units is</t><t color='#2fd402' size='0.9' shadow='1' shadowColor='#000000' align='center'> found!</t><br/>";
} else {
checkUnits = "<t size='0.9' shadow='1' shadowColor='#000000' align='center'>CUP Units is</t><t color='#ff0000' size='0.9' shadow='1' shadowColor='#000000' align='center'> NOT FOUND!</t><br/>";
errorLevel = errorLevel + 99
};
// Community Base Addon Example - DELETE OR MODIFY
if (isClass(configFile >> "CfgPatches" >> "CBA_main")) then
{
checkCBA = "<t size='0.9' shadow='1' shadowColor='#000000' align='center'>CBA_A3 is</t><t color='#2fd402' size='0.9' shadow='1' shadowColor='#000000' align='center'> found!</t><br/>";
} 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
};
*/

View File

@ -0,0 +1,106 @@
// **********************************************************************************************************
// * 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: modmodChecker.sqf
// @file Author: NRZ7 (www.standarol.com)
// @description: This script modCheck the mods loaded by the client. If any mod is not loaded, pop's a screen with detailed information and clickable community links (modmodCheckerDisplay.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 modCheckExile 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.
modCheckExile = "<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
modCheckExile = "<t size='0.9' shadow='1' shadowColor='#000000' align='center'>Exile Mod is</t><t color='#ff0000' size='0.9' shadow='1' shadowColor='#000000' align='center'> NOT FOUND!</t><br/>";
// Set 99 to Required, Set 1 to optional
errorLevel = errorLevel + 99
};
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// START OF MODS CONFIG - EDIT OR DELETE UNDER THIS LINE
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Esseker Example - DELETE OR MODIFY
if (isClass(configFile >> "CfgPatches" >> "Esseker")) then
{
modCheckEsseker = "<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/>";
} else {
modCheckEsseker = "<t size='0.9' shadow='1' shadowColor='#000000' align='center'>Esseker Map is</t><t color='#ff0000' size='0.9' shadow='1' shadowColor='#000000' align='center'> NOT FOUND!</t><br/>";
errorLevel = errorLevel + 99
};
// Zombis & Demonds Example - DELETE OR MODIFY
if (isClass(configFile >> "CfgPatches" >> "Ryanzombies")) then
{
modCheckRyan = "<t size='0.9' shadow='1' shadowColor='#000000' align='center'>Zombies and Demonds is</t><t color='#2fd402' size='0.9' shadow='1' shadowColor='#000000' align='center'> found!</t><br/>";
} else {
modCheckRyan = "<t size='0.9' shadow='1' shadowColor='#000000' align='center'>Zombies and Demonds is</t><t color='#ff0000' size='0.9' shadow='1' shadowColor='#000000' align='center'> NOT FOUND!</t><br/>";
errorLevel = errorLevel + 99
};
// CUP_Weapons Example - DELETE OR MODIFY
if (isClass(configFile >> "CfgPatches" >> "CUP_Weapons_WeaponsCore")) then
{
modCheckWeapons = "<t size='0.9' shadow='1' shadowColor='#000000' align='center'>CUP Weapons is</t><t color='#2fd402' size='0.9' shadow='1' shadowColor='#000000' align='center'> found!</t><br/>";
} else {
modCheckWeapons = "<t size='0.9' shadow='1' shadowColor='#000000' align='center'>CUP Weapons is</t><t color='#ff0000' size='0.9' shadow='1' shadowColor='#000000' align='center'> NOT FOUND!</t><br/>";
errorLevel = errorLevel + 99
};
// CUP_Vehicles Example - DELETE OR MODIFY
if (isClass(configFile >> "CfgPatches" >> "CUP_Vehicles_Core")) then
{
modCheckVehicles = "<t size='0.9' shadow='1' shadowColor='#000000' align='center'>CUP Vehicles is</t><t color='#2fd402' size='0.9' shadow='1' shadowColor='#000000' align='center'> found!</t><br/>";
} else {
modCheckVehicles = "<t size='0.9' shadow='1' shadowColor='#000000' align='center'>CUP Vehicles is</t><t color='#ff0000' size='0.9' shadow='1' shadowColor='#000000' align='center'> NOT FOUND!</t><br/>";
errorLevel = errorLevel + 99
};
// CUP_TerrainCore Example - DELETE OR MODIFY
if (isClass(configFile >> "CfgPatches" >> "CUP_Worlds")) then
{
modCheckTerrain = "<t size='0.9' shadow='1' shadowColor='#000000' align='center'>CUP Terrain Core is</t><t color='#2fd402' size='0.9' shadow='1' shadowColor='#000000' align='center'> found!</t><br/>";
} else {
modCheckTerrain = "<t size='0.9' shadow='1' shadowColor='#000000' align='center'>CUP Terrain Core is</t><t color='#ff0000' size='0.9' shadow='1' shadowColor='#000000' align='center'> NOT FOUND!</t><br/>";
errorLevel = errorLevel + 1
};
// CUP_Units Example - DELETE OR MODIFY
if (isClass(configFile >> "CfgPatches" >> "CUP_Creatures_People_Core")) then
{
modCheckUnits = "<t size='0.9' shadow='1' shadowColor='#000000' align='center'>CUP Units is</t><t color='#2fd402' size='0.9' shadow='1' shadowColor='#000000' align='center'> found!</t><br/>";
} else {
modCheckUnits = "<t size='0.9' shadow='1' shadowColor='#000000' align='center'>CUP Units is</t><t color='#ff0000' size='0.9' shadow='1' shadowColor='#000000' align='center'> NOT FOUND!</t><br/>";
errorLevel = errorLevel + 99
};
// Community Base Addon Example - DELETE OR MODIFY
if (isClass(configFile >> "CfgPatches" >> "CBA_main")) then
{
modCheckCBA = "<t size='0.9' shadow='1' shadowColor='#000000' align='center'>CBA_A3 is</t><t color='#2fd402' size='0.9' shadow='1' shadowColor='#000000' align='center'> found!</t><br/>";
} else {
modCheckCBA = "<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
{
modCheckYOURMOD = "<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 {
modCheckYOURMOD = "<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
};
*/