Jump to content

shinkicker

Member
  • Content Count

    218
  • Joined

  • Last visited

  • Medals

  • Medals

Posts posted by shinkicker


  1. For addons you should have a file called PboPrefix.txt (Note PboPrefix.txt is a replacement for the file $PBOPREFIX$) in with your config.cpp / config.bin / whatever if not you need to create it.

    BINpbo and eliteness automatically create PBOPREFIX which is what I have been using (as well as tweaking and creating my own). It currently has 'MyMod' in it.

    ---------- Post added at 13:17 ---------- Previous post was at 13:15 ----------

    nul = [] execVM "\MyMod\MyScript.sqf";

    "MyMod" <-- That part has to be the exact name of your pbo-file, NOT the name of the mod-folder.

    Modfolders can always be renamed or you could put the pbo directly under "addons", it doesn't matter. Only the name of the PBO matters, as that will be the path to your files ingame.

    For now I am using MyMod everywhere, so the PBO is called MyMod.pbo, dir='MyMod' under cfgMod, everywhere from what I can see.


  2. If you want to call a script from an addon:

    execVM 	"\@Addon\addons\server\server.sqf";

    This is also very useful if you want to keep server code on the server and prevent clients from copying stuff from your addon (as long as the server files are not publically available)

    In your case, you almost got the right variant. I highlighted the important slash.Try this:

    execVM "[size=5][b]\[/b][/size]@MyMod\Addons\MyMod\MyScript.sqf";

    Thanks for replying, but alas its not that simple. I think yours was one of the other ones I tried and forgot to list

    KmlyVHC.png


  3. Neither of these work very well for placing weapons or items onto the ground. They have either appear elevated 2 foot in the air or sunk underground.

    I am doing the following:

    _Object = createVehicle ["WeaponHolderSimulated", [0,0,0], [], 0, "CAN_COLLIDE"];
    _Object addWeaponCargoGlobal [_shop_items,1];
    _Object setPos (_x buildingPos _pos);

    8AdQqEU.jpg

    VJoeSvf.jpg

    The other option would be to map everything out with worldToModel, but that's a lot of work, and I am lazy, so I thought I would check if there is a way around this. Also I think its been like this since A2?


  4. Unfortunately not. Config changes have to be done on game start.

    As I thought :-(

    Perhaps they could have a -devMode flag, which would allow runtime injection of variables etc and a warning prompt pop up for when its used in MP. But then again I don't have a clue about the inner workings, so it might not be that simple / be a shit ton of work for BI to implement.

    I wonder if its worth us reaching out to the ace team for who they do this. I caught rocket on reddit, but he may not have seen the message.


  5. I'd like to find out the answer to this question as well.

    I can init a script on the client/server with ease when using the excellent cba mod, but the method for doing it in vanilla Arma has eluded me.

    @ Shinkicker - the \z\addons.... structure Rocket used for DayZ is useful when packing models into an addon (ACE uses the same structure - they use \x\addons...). It means you can integrate and binarize new models/pack new data without having to repack and repath the whole mod. (If I understand it correctly).

    If you want to get it running and don't mind using cba, then try something like this:

    class CfgPatches
    {
    class madeUpName
    {
    	units[] = {};
    	weapons[] = {};
    	requiredVersion = 0.1;
    	requiredAddons[] = {"Extended_EventHandlers","CBA_main"};
    };
    };
    
    class Extended_EventHandlers;   	// External class reference
    class Extended_PostInit_EventHandlers
    {
    class madeUpName
    {
    	clientInit = "call compile preprocessFileLineNumbers '\NameOfYourModFolderInTheRootOfTheP_Drive\init.sqf';";
    };
    };

    Thanks for the reply!

    "and don't mind using cba"
    - don't get me wrong, CBA is a wonderful thing, but I want to avoid using stuff if I don't need to. But it would bring a lot to the table for me.
    "@ Shinkicker - the \z\addons.... structure Rocket used for DayZ is useful when packing models into an addon (ACE uses the same structure - they use \x\addons...). It means you can integrate and binarize new models/pack new data without having to repack and repath the whole mod. (If I understand it correctly)."
    - does that mean you can make a change, rebinanrise while running hot (no need to shut the game down and up again?)
    I'd like to find out the answer to this question as well.

    Let's hope this thread brings something to light.


  6. Some examples:

    P:\MyMod

    P:\MyMod\MyScript.sqf

    P:\MyMod\config.cpp

    extract from config.cpp....

    class CfgPatches {
    class MyMod {
    	units[] = {};
    	weapons[] = {};
    	requiredVersion = 0.1;
    	requiredAddons[] = {};
    };
    };
    
    class CfgMods
    {
    class MyMod
    {
    	dir = "MyMod";
    	name = "My Mod";
    	hidePicture = 0;
    	hideName = 0;
    	action = "http://www.mymod.com";
    	version = "1.0";
    };
    };

    In the A3 folder...

    @MyMod\Addons\MyMod.pbo (containing the above config.cpp / MyScript.sqf)

    in the MpMissions folder on a dedicated server..

    MpMissions\MyMod.pbo

    And in there.....

    MpMissions\MyMod\init.sqf

    Now what I want to do is execVM "MyMod\MyScript.sqf" on the client during mission loading.

    So far I have tried everything I can think of (including using variations of !isServer and !isDedicated)...

    execVM "\MyMod\MyScript.sqf";

    execVM "MyMod\MyScript.sqf";

    execVM "@MyMod\MyScript.sqf";

    execVM "Addons\MyMod\MyScript.sqf";

    execVM "MyMod\Addons\MyMod\MyScript.sqf";

    execVM "@MyMod\Addons\MyMod\MyScript.sqf";

    I pretty sure there are a few more I have missed.

    I have also been messing around with PBOPREFIX, no luck there as well.

    I had another look at a mod which does something similar (DayZ) and I can see this in the server init.sqf....

    call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf";

    I have no idea what 'z' refers too? Is this the drive map named rocket used? Is it some sort of reserved variable?

    I would really like to get this going as I am developing and new MP mod which is content heavy and so I would prefer clients download from an off server site.

    If anyone has an example which can be recreated real world they could share, that would be great!

    EDIT: I should note, that perhaps this requires @MyMod on the server side too? If so I am even more confused as I want the script to run on the client?


  7. Hmm...this might be to early a stage for you (if you're about to model a humvee), but I have a guide on setting up a P drive, blender and then importing to O2. This is for Arma 2 and was in the dayz community, but most of it still stands for A3 as well.

    Not sure if I can link to another forum in here, but if you Google for 'shins arma 2 modeling tutorial' you will see all four parts.


  8. Well it seems the command works fine in a script all by itself and inside a units init box in the editor no problem. Maybe its just the way people are using it thats worng... Would be awesome to have a dev come and sort this out... Regardless it should never be crashing the game back to the desktop... I'm also running on dev build... soooo

    How do you mean by itself?

    Are you running locally or server side?


  9. Have you got a gamelogic called server

    Checked, and it is there:

    class Groups
    {
    	items=1;
    	class Item0
    	{
    		side="CIV";
    		class Vehicles
    		{
    			items=1;
    			class Item0
    			{
    				position[]={3216.4248,2.0353706,12865.922};
    				id=0;
    				side="CIV";
    				vehicle="C_man_1";
    				player="PLAYER COMMANDER";
    				leader=1;
    				skill=0.60000002;
    			};
    		};
    	};
    	class Item1
    		{
    			side="LOGIC";
    			class Vehicles
    			{
    				items=1;
    				class Item0
    				{
    					position[]={10382.313,51.145489,16534.664};
    					id=1;
    					side="LOGIC";
    					vehicle="Logic";
    					leader=1;
    					skill=0.60000002;
    					text="server";
    				};
    			};
    		};
    	};


  10. This is on the dev branch, so don't expect a fix right away, but posting in case it gives you some lead time if it stays as it is for the main release in a couple of weeks:

    Error in expression < select 3} else {false};
    
    {
    _eosMarkers=server getvariable "EOSmarkers";
    if (isn>
     Error position: <server getvariable "EOSmarkers";
    if (isn>
     Error Undefined variable in expression: server
    File mpmissions\__cur_mp.Altis\eos\eos_GearBox.sqf, line 9
    Error in expression <r_mp.Altis\eos\eos_JIP.sqf"
    _eosMarkers=server getvariable "EOSmarkers";
    
    {_x se>
     Error position: <server getvariable "EOSmarkers";
    
    {_x se>
     Error Undefined variable in expression: server
    File mpmissions\__cur_mp.Altis\eos\eos_JIP.sqf, line 1
    Error in expression <r_mp.Altis\eos\eos_JIP.sqf"
    _eosMarkers=server getvariable "EOSmarkers";
    
    {_x se>
     Error position: <server getvariable "EOSmarkers";
    
    {_x se>
     Error Undefined variable in expression: server
    File mpmissions\__cur_mp.Altis\eos\eos_JIP.sqf, line 1

    Looking into it as well, but not sussed anything out yet.


  11. Oh I get what you mean. I didn't know you were using Maya with a proper skeleton rig

    Confusion over the term came about from this part of the O2 Manual:

    What are you using to export .rtms from Maya anyway? teaCup's plugin? I could never get that tow work as RtmBin2.exe would always crash trying to open a .rtm

    Yes, teacups scripts. I never import .rtm's which i why I would not have seen you're issue. I am only exporting.


  12. I am not yet sure if this is possible. I carried out some searches and it seems this was not possible in A2, but I am not yet sure about A3.

    All I want to do is change a players side during a MP mission, for example go from CIV to OPFOR (making BLUFOR hostile to the former civilian who is now OPFOR), and when I call 'side player' it returns the newly assigned side?

    I know about setFriend, addRating etc but would like to know if this has changed for A3?

×