Jump to content
Sign in to follow this  
Alwarren

Campaign Editing: Shared resources?

Recommended Posts

Hi.

I am getting a bit lost with a campaign I am trying to do. The campaign has a lot of shared resources - mostly my own functions, identities, some sounds, textures etc.

So far I have just duplicated them all in every mission folder, but this is getting annoyingly hard to maintain. I thought about an SVN repository to keep them in sync, but it all boils down to the fact that these resources should not be duplicated at all.

Unfortunately, it doesn't seem to work to just

#include "..\Lingor_Common\functions\functions.hpp"

in my description.ext in a mission, even though the path is correct ArmA 2 will CTD with a "file not found" preprocessor error.

I am at a loss really. How can I have a set of missions share a set of resources without having to duplicate them, or having to copy the missions into the campaign during development?

Thanks.

Share this post


Link to post
Share on other sites

Make your functions, scripts etc. as a separate addon (pbo).

For example Dynamic AI Creator has both a pbo and a script version. Unpbo it and you'll see how it's done.

Share this post


Link to post
Share on other sites
Make your functions, scripts etc. as a separate addon (pbo).

Good point, might have worked as well. I now made a directory for the (future) campaign and reference the files as \campaign\<my campaign name>\<filename>, that seems to work fine :)

Share this post


Link to post
Share on other sites

If it helps, when the game engine searches for a script to run, if it's not found in the immediate path, it will look in a folder called "scripts". You have to create this folder, and it depends on where you are running the mission/campaign from.

For example, if you are editing a mission, you can create scripts in this path (on Win7):

C:\Users\User_Name\Documents\ArmA 2\Scripts

Why do this? ALL missions that you edit will automatically look in that scripts folder. Just reference the script by name only.

If have finished building a campaign, and pbo it all together, Scripts will be a subfolder of the root campaign folder. In your path example above, it would be <my campaign name>\Scripts\. It's really convenient for mission editing because you don't need to specify any paths, and just copy your scripts over to the campaign folder when you're ready to pbo them.

If you're into making functions (with CfgFunctions class), there's also a trick that will get the BIS Functions module to compile them for you automatically, but I don't want to make this confusing :)

Share this post


Link to post
Share on other sites

Thanks, that might come in handy :)

I am using my own CfgFunctions, and use 'file=' in the description.ext to point out the absolute locations within my campaign structure, so that works for now. Since I also use snippets for CfgIdentities from a "global" repository this way too, I went with that approach (absolute reference within the campaign folder).

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  

×