Jump to content
Sign in to follow this  
berno

$PBOPREFIX$ Development setup issues

Recommended Posts

Hi guys,

I am trying to get started in mod development. I have been poking around in mission scripts and having some fun but then started looking at other peoples mods as a way to learn. As a computer programmer I picked up a lot quite quickly but the way I was testing was tedious. Change some code, create PBO and start game, then test. Very slow.

So I read that $PBOPREFIX$ is what I'm after so that I can run against unpacked code and make changes without having to restart the whole game.

Have followed this:

http://community.bistudio.com/wiki/CMA:DevelopmentSetup#Develop_with_unpacked_data

Trawled the forums, and tried a million things generally going insane and chipping away at all confidence I have in my problem solving abilities that 10 years in dev have given me :mad:

I have been testing with Combined Ops but have wound back to the most basic arma 2 setup to trouble shoot.

So when I build my PBO and add my module to a map it says hello world as expected. When I build with the $PBOPREFIX$ I get a message saying it cant find the script. Have tried many variations.

My mod folder is in this zip file:

http://web.aanet.com.au/Berno/@myMod.zip

It resides in this folder:

"D:\Games\Steam\steamapps\common\arma 2"

Have tried pointing to various places on the P: drive to no avail! :(

If someone in the know can fix this I would be eternally grateful!

Perhaps it can be uploaded as a template to prevent further newbie torture?

Berno

Share this post


Link to post
Share on other sites

Have you seen this thread already? :)

  • make sure you have a functional minimum development environment (BIS tools); that is you have you're drive P: and - in case you're doing addons - the core packages/addons extracted there (all the \CA\... stuff).
  • grab/register yourself a ofpec-tag
  • depending on what you're up to, you create the file-structure on P:. For a simple addon you could use P:\YOUR_TAG\, then your PBOPREFIX should be YOUR_TAG and you should pack/pbo it from there.
    Currently your PBOPREFIX is: `@myMod\addons\myPboName` which would correspond to the physical structure: P:\myMod\addons\myPboName. (and for file patching you'd put a symlink/junction from P:\myMod to ARMA_GAME_DIR\myMod)

As a computer programmer I picked up a lot quite quickly but the way I was testing was tedious. Change some code, create PBO and start game, then test. Very slow.

Take a look at Mikeros tools and use them in conjunction with your favorite build tool (apache ant for example) to automate the build process. This will save you a lot of time already, once setup.

So I read that $PBOPREFIX$ is what I'm after so that I can run against unpacked code and make changes without having to restart the whole game.

Yeah, that's the deal (though you still need to restart if you've changed the config and even repack/repbo if you've added some files...).

Share this post


Link to post
Share on other sites

# your setup looks good

# please post your startup line

# you can use procMon to check what arma is loading (on startup/later)

# what pbo tool do you use - the pboprefix is not an arma standard, only some tools like mikero's and cpbo use it

These might be helpful too:

http://community.bistudio.com/wiki/CMB:SimplifyTesting

http://dev-heaven.net/projects/cmb/wiki

You may want to join the Skype group chat of developers.

Share this post


Link to post
Share on other sites

Thanks a lot for the support guys!

Seems like a helpful community! ;)

ruebe:

I have run thru the BIS tools setup and ran some tool to extract everything. Although from what I understand the unpacked data is more for the island builders right? Regardless its been done.

I havent put a link from P: to my mod yet. From what I understand I can still run it all from the arma 2 game dir if I want? I ended up trying to recreate the scenario described here to rule out any other setup problems I might have:

http://forums.bistudio.com/showthread.php?t=85642&highlight=%24PBOPREFIX%24

PvPscene:

I am using ArmA II Launcher to avoid steam. For the @MyMod setup the line is:

"-mod=@mymod" -nosplash -window -noPause -world=Utes -showScriptErrors -cpuCount=2

procMon has revealed something interesting:

10:19:17.2107973 AM arma2.exe 2684 CreateFile D:\Games\Steam\steamapps\common\arma 2\myPboName\MyModule.sqf PATH NOT FOUND Desired Access: Generic Read, Disposition: Open, Options: No Buffering, Non-Directory File, Attributes: N, ShareMode: Read, AllocationSize: n/a

Any clue as to why @MyMod\AddOns has been dropped from the path?

To build the pbo I right click click and select create PBO, according to my registry this is going thru cpbo.

If you have any ideas why the path has been dropped I'd appreciate the help. I will look at trying to run the mod from the P: drive again and adding a link to the game dir.

Thanks again lads :)

Share this post


Link to post
Share on other sites

Thanks for the support guys.

ruebe

Yep I've been thru every thread regarding PBOPREFIX. No joy.

I have run thru BIS tools setup and have a P: drive with extracted packages in it.

Have you dropped the @ in this statement on purpose or just a typo?

Currently your PBOPREFIX is: `@myMod\addons\myPboName` which would correspond to the physical structure: P:\myMod\addons\myPboName. (and for file patching you'd put a symlink/junction from P:\myMod to ARMA_GAME_DIR\myMod)

So my unpacked data should be in ARMA_GAME_DIR\myMod with a symlink pointing to it from P:\myMod? I will set this up and see how I go.

PvPscene

I am using Arma II Launcher to avoid steam, the command line to test @MyMod was:

"-mod=@mymod" -nosplash -window -noPause -world=Utes -showScriptErrors -cpuCount=2

procMon found something interesting:

11:19:47.1876242 AM arma2.exe 4816 CreateFile D:\Games\Steam\steamapps\common\arma 2\myPboName\MyModule.sqf PATH NOT FOUND Desired Access: Generic Read, Disposition: Open, Options: No Buffering, Non-Directory File, Attributes: N, ShareMode: Read, AllocationSize: n/a

Any idea why @mymod\addons has been dropped from the path?

Im using cpbo to pack and unpack.

Thanks again for the help guys. I will try again with a link from P: drive.

Berno

---------- Post added at 11:51 AM ---------- Previous post was at 11:28 AM ----------

Ugh.

Seems all my troubles were based on a false understanding of where the unpacked files should reside.

If you follow my path of investigation I started at the armaholic newbie faq how to make your own modules.

http://forums.bistudio.com/showthread.php?t=98880

within this is a link regarding pboprefix

I came upon the following statement:

1) current folder structure = arma 2\@i44sounds\addons\i44sounds

2) we added the $PBOPREFIX$ file inside arma 2\@i44sounds\addons\i44sounds

3) the line inside $PBOPREFIX$ = @i44sounds\addons\i44sounds

This and I'm not being harsh but the info at

is just confusing.

I thought I could have

@MyMod\AddOns\

containing MyPbo.pbo and the folder MyPbo

inside MyPbo the unpacked data.

I had been changing my source right clicking and building then starting arma. Tedious of course.

So I thought adding a $PBOPREFIX$ would allow me to change the unpacked data in @MyMod\AddOns\MyPbo

However the unpacked data has to be in Arma2\"CONTENTS OF $PBOPREFIX$"

Thanks a lot guys I got there in the end :)

Share this post


Link to post
Share on other sites

Sorry I dont get it. What did you have before and what did you change to get it to work?

This should work:

1) Folder structure = .\arma2\@MyMod\addons\MyPbo

2) $PBOPREFIX$ file location = \arma2\@MyMod\addons\MyPbo\$PBOPREFIX$

3) $PBOPREFIX$ contains = @MyMod\addons\MyPbo

4) Start with: -mod=@MyMod

This way you can modify the existing files in .\arma2\@MyMod\addons\MyPbo\*

while the game is running. For config files or to add new files, you need to restart the game.

Share this post


Link to post
Share on other sites

This is indeed strange mate, it just does not work for me with this setup.

I'll break it right down:

Directory of D:\Games\Steam\steamapps\common\arma 2\@MyMod\addons\MyPbo

$PBOPREFIX$

@MyMod\addons\MyPbo

Config.cpp

class CfgPatches {

class MyLogic {

units[] = {};

weapons[] = {};

requiredVersion = 0.1;

requiredAddons[] = {"ca_modules"};

};

};

class CfgVehicles {

class Logic;

class MyLogic : Logic {

displayName = "0MyModuleTestLogic";

icon = "\ca\ui\data\icon_functions_ca.paa";

picture = "\ca\ui\data\icon_functions_ca.paa";

vehicleClass = "Modules";

class EventHandlers {

init = "nul = _this execVM '\myPbo\MyModule.sqf' ";

};

};

};

MyModule.sqf

hint "Hello World from my module";

Directory of D:\Games\Steam\steamapps\common\arma 2\@MyMod\addons

<DIR> MyPbo

659 MyPbo.pbo

Run command: D:\Games\Steam\steamapps\common\arma 2>arma2 -mod=@MyMod

I go to single player->Editor->Utes then place a unit and the module 0MyModuleTestLogic.

Hit Preview.

I get the following message "Script myPbo\MyModule.sqf Not found"

Process Monitor reveals the attempted file access as:

12:46:59.9329081 PM arma2.exe 5020 CreateFile D:\Games\Steam\steamapps\common\arma 2\myPbo\MyModule.sqf PATH NOT FOUND Desired Access: Generic Read, Disposition: Open, Options: No Buffering, Non-Directory File, Attributes: N, ShareMode: Read, AllocationSize: n/a

All I am doing to be able to build and test mods is simply have the unpacked data in "arma 2\MyPbo"

I know this is not ideal but I'm glad you mentioned ProcMon so that I could at least move forward.

Just a weird bug on my system?

or can you reproduce this on your setup?

Thanks

Berno

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  

×