Jump to content
Sign in to follow this  
Grester

[SOLVED]Info on how to create a gameplay changing script/mod?

Recommended Posts

I'm almost sure that there's information about this somewhere but so far I haven't been able to find it. I'll try to explain myself better what I'm looking for and perhaps someone could help me clarify what I might actualy need.

 

Right now I'm making a items based mod that adds new clothes and it works perfectly. I have a single .pbo with the config.cpp that has the classes that add the new content to the game. However right now I wanted to add to that mod some game changing scripts that involve some kind of commands that don't seem to fit the .cpp/.hpp files.

 

I'm not gonna try to guess what I need but here's the kind of command that I wanted to integrate in my mod: "player addEventHandler..."

 

I've found similar commands like this in .sqf files from missions, however I don't want to design a script that only works for a single mission, I was looking for information on how to do something that integrates globally like ACE3. Perhaps I'm not entirely aware of the possibilities of a config.cpp file but right now I'm having touble finding information or I'm not sure what Im actually looking for. Perhaps create another .pbo just for these kind of scripts? I don't know...

 

I'd be much apreciated and perhaps some other curious people in the future on how to integrate game changing behaviours or multiple kinds of content to a mod.

 

UPDATE: I've been doing a bit more of research and found something about the init file that seems to be used to launch .sqf files. Could it work that way?

 

UPDATE 2: As I was reverse engeneering a mod I found a couple interesting classes that might just answer my prayers.

class DefaultEventhandlers; //gonna lookup in the wiki see what it actually does

class CfgFunctions{

/* From what I've analized this class looks for .sqf files in the func folder.
Each is then "initialized" by calling them.

file name: @mod\func\fn_test.sqf */

class test{}


UPDATE 3: Found it.

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  

×