Jump to content
neofit

Best way to test an addon?

Recommended Posts

Hi,

How does one test an addon he's developing? I only know of the most obvious and noobish way:

* Edit the addon files

* generate the addon .pbo (BIS' AddonBuilder.exe can put it into the "@myAddon\addons\" folder, nice)

* start the Arma 3 launcher with @myAddon in the list of addons

* start a test mission I have created with only my dude on the Stratis map

* See that the addon needs work (to remain polite)

* exit Arma 3

* rinse, repeat

This constant restarting of Arma 3 is driving me crazy, it takes too long even on a fast SSD, there must be a faster way to test an addon, isn't there? Maybe from the editor, alt-tab to edit the addon, somehow make Eden refresh said add-on without restarting the whole game, then run a test mission from the editor to test it? I've tried playing with the loaded mods/addons list in the Arma3 main menu, thinking that maybe disabling-enabling an addon from there will make Arma3 reload it, but ever since BIS made that nice and very useful launcher with all the different environments for different scenarios, the Disable button in that addon list in the main menu is greyed out.
 

  • Like 1

Share this post


Link to post
Share on other sites

Welcome to Arma modding. Most if not all config values set by your mod is only read on startup and file gets locked once loaded. The best option you and all of us is to restart the game.

Again, welcome to Arma modding ;)

Share this post


Link to post
Share on other sites

Most if not all config values set by your mod is only read on startup and file gets locked once loaded. The best option you and all of us is to restart the game.

 

Seriously? I thought I was missing something obvious and was afraid to ask. So since OFP people are spending half their time making a mod in waiting for the huge main game .exe to load? I know the reason why SSDs were invented then.

Share this post


Link to post
Share on other sites

Depending on what your're doing, if your mod is more script based (no extra models, animations, etc.) you can easily just setup a test mission with all your functions in that mission folder, get it working the way you want to without having to restart the game, just resave the mission in the editor, and load it up again, then when it's all working the way you want just translate the functions from mission library to an addon library, pack it, and your're good to go. But obviously if you are messing with models and such, you would have to restart the game every time.

 

Definitely not conducive for a learning environment, but you have to learn quickly so you don't have to restart as often :P.

Share this post


Link to post
Share on other sites

It depends upon what you need to test out, but you can also use Bulldozer to view the model, it's textures and animations from within Object Builder.

This doesn't require building and is somewhat of a live viewer although rather clunky to use.

 

Arma3 Tools > Project Drive Management > Install Bulldozer

 

In Object Builder, select the LOD you want to view,

View > Viewers > Bulldozer > Start/Restart

- options to hide/show proxies, wireframes etc in that menu

- shortcut button in toolbar (red square thing)

 

Be aware that lighting in Bulldozer differs to the game.

 

Alt F4 to close Bulldozer!

 

But yeah, the build / run ArmA / load test mission routine is pretty familiar to modders.

Share this post


Link to post
Share on other sites

I'm messing around with scripting, not models. The idea about proofing the code inside the editor is nice.

 

Thanks folks.

Share this post


Link to post
Share on other sites

1. Make a DEV Folder with the soon-to-be-project (.pbo) Folder inside it.

DEV-MYPROJECT >> tag_myproject

 

2. Make 10 .sqf Files inside the DEV Folder you can call with a Radio Trigger (0.sqf - 9.sqf). Then setup 10 Radio Triggers to run/call each of those files. You can test all scripts and set variables with the Radio Triggers while still on the Mission Map without having to exit anything.

 

3. Test as needed. Set the Radio Triggers to repeating of course to just keep re-running the scripts. Setup Hints to display any and all data you need to monitor during testing. if (TAG_PROJECT_HINTS == 1) then { Hint format ["%1",_localVariable]; };

So I would set all Variables and run the main execVM file in the root project folder FROM the 0.sqf File when pressing Radio Trigger 0. For example pressing 0-0-0 would then run _nul = [] execVM "0.sqf"; (setup inside the Trigger) which would run the 0.sqf File, which then runs:

TAG_PROJECT_HINTS = 1;

execVM "tag_myproject\subfolder\tag_file.sqf";

 

You can break apart complex projects into separate sections and run them individually from any of the other Radio Triggers.

 

4. Setup your Addon Folder somewhere like just on your Desktop (or wherever) @TAG-PROJECT. Place a folder in there named Addons.

5. After you are ready to fully test the Addon, just pack the tag_myproject folder into the .pbo file. Place that pbo file into the Addons folder.

 

This is of course only HALF of the SETUP. To run/test the config stuff - make a description.ext file and setup the data there first. You will still have to restart the Dev Mission each time, but its better than restarting the entire Game. And yes, SSDs will expedite the startup. Its complicated and messy. Some stuff can only be set by a config.ccp file from what I understand. But if you are just setting Variables, you can do that manually with any of the 0-9.sqf files and just use Radio Triggers 0-9.

 

Everyone does it a tad differently I'm guessing. But if you setup a Dev-Workshop Mission for testing and development, then you can save some time and headache by using that template for each project.

 

Hope that at least points you in the right direction. That wasn't a full tutorial and I'm guessing you seem at least partially familiar with addon making. The main take-away is to setup a template and run Radio Triggers to run files, and set variables on-the-fly WITHOUT exiting the Mission/Map itself. You can also run stuff from within the debug console as-you-go too, but using a Text Editor like Notepad++ is easier to work from. You can make those changes and save the file all without ever leaving the (Editor Preview) gameplay.

 

Cheers.

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

×