Jump to content
Sign in to follow this  
zombiearg

Addon doesn't load

Recommended Posts

Hi!

Im new with arma2, after playing DayZ i want to make a mod to change some things i want.

During my self trainning on the arma engine i stopped in two questions/problems/doubts

DOUBT #1

After doing a litle test i can't figure out why my test mod is not loading, i do this:

1. in root game folder create a folder called MyMod

2. in my desktop created a folder called MyMod, inside i create a file called MyMod.sqf with this content:

diag_log ("This must be showed in the log"); 

and create another file called config.cpp with this content:

class CfgPatches 		{
class MyMod{
	units[] = {};
	weapons[] = {};
	requiredVersion = 0.1;
	requiredAddons[] = {};
};
};

3. I use BinBPO to generate the .pbo using as source the desktop folder and destination <ROOT_GAME>\MyMod\Addons

4. after generate the pbo i check the log and there isn't no errors at all

5. i include -mod=@Dayz;MyMod in the dedicated server startup

6. start the server

7. i check the RPT file related with the server but i don't see the "This must be showed in the log" string. So i suppose that the mod isn't loading.

I use this guide to guide me in the process:

http://community.bistudio.com/wiki/Mondkalb%27s_Addon_Tutorial

What can be the reason to not working/load the mod?

DOUBT #2

One of my goals is to make a live stats for my players, so i need to catch the event of onuserconnect, i tried to execute a sqf file from server.cfg but i have not success, i tried this combinations:

//onUserConnected = "[this] execVM MyModsqf\MyMod.sqf";					//
//onUserConnected = "[this] execVM ""MyModsqf\MyMod.sqf"";";					//
//onUserConnected = "[this] execVM ""MyModsqf\MyMod.sqf""";					//
//onUserConnected = "0 = [this] execVM ""MyModsqf\MyMod.sqf""";					//
//onUserConnected = "0 = [this] execVM ""MyModsqf\MyMod.sqf""";					//
//onUserConnected = "0 = [this] execVM ""MyModsqf\MyMod.sqf"";";					//
//onUserConnected = "diag_log(""******KK KILLINGFLOOR******"");";					//
//onUserConnected = "MyModPlayerID = _this select 0; diag_log(""******KK KILLINGFLOOR******"");";					//
//onUserConnected = "_MyModPlayerID = _this select 0; diag_log text ""******KK KILLINGFLOOR******"";";					//
//onUserConnected = "_MyModPlayerID = _this select 0; diag_log (""KK: "" + str(_MyModPlayerID));";					//
//onUserConnected = "_MyModPlayerID = _this select 0; _MyModPlayerID globalChat _MyModPlayerID";					//
//onUserConnected = "server globalChat _this select 0";					//
//onUserConnected = "[_this select 0] exec 'MyModsqf\MyMod.sqf'";					//
//onUserConnected = "";					//

So my question in the Second doubt is: It`s posible to execute a sqf from server.cfg for the event "onuserconnect"?

After tring a lot of combinations and failed too i start reading about event handlers here:

http://community.bistudio.com/wiki/ArmA_2:_Event_Handlers

But there isnt onuserconnect, so, How can i catch that event from a Mod?

Thanks a lot in advance for your help!

Share this post


Link to post
Share on other sites

Please bear in mind im very inexperienced (still learning myself :))

okay so my answer to the first question is that you need to put your mod in your priority game folder (arma 2 if youve got just arma 2 and OA if youve got combined ops) so it should be in this directory (for example) C:/program files/Arma 2/@MyMod

Then you activate your mod by going into the Arma 2.exe and typing -mod=@MyMod in the target and see if it works first by testing it.

As for making it work in the dedicated server you should have a server.cfg which will have the mods= line and you just enter your mods after this so for example mods=@MyMod (btw try to use lowercase where possible/specially if using linux)

As for the scripting.sqf you need to ensure you put it into the mission that you are planning to use, so in each mission you make you need to put this script with an event handler(I think)

Apart from all that I believe you should check out here (http://www.armaholic.com/) this will answer more questions and has much more qualified persons

Share this post


Link to post
Share on other sites
Please bear in mind im very inexperienced (still learning myself :))

okay so my answer to the first question is that you need to put your mod in your priority game folder (arma 2 if youve got just arma 2 and OA if youve got combined ops) so it should be in this directory (for example) C:/program files/Arma 2/@MyMod

Then you activate your mod by going into the Arma 2.exe and typing -mod=@MyMod in the target and see if it works first by testing it.

As for making it work in the dedicated server you should have a server.cfg which will have the mods= line and you just enter your mods after this so for example mods=@MyMod (btw try to use lowercase where possible/specially if using linux)

As for the scripting.sqf you need to ensure you put it into the mission that you are planning to use, so in each mission you make you need to put this script with an event handler(I think)

Apart from all that I believe you should check out here (http://www.armaholic.com/) this will answer more questions and has much more qualified persons

Thanks Dale!, i know how to configure the startup of the mod, my problem is more related with scripting and the process of making a mod from scratch.

I found an answer for one of my questions, in server.cfg the event OnUserConnected only can be assigned this one of the command listed here:

http://community.bistudio.com/wiki/server.cfg

When i started i thinked that loading a sqf file from that event is posible, but isn't.

Now, im reading and tring to understand the CBA helper mod and the sintaxis around, but, im don't have so cleary how the whole engine works.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×