Jump to content
h a w a i i a n

Flight Deck Crew Unit Addon WIP

Recommended Posts

How can i use ugv as a tow tractor?

This is a great place to ask that question (or search for your answer) http://forums.bistudio.com/showthread.php?166706-Preview-release-Nimitz-for-Arma3/page30&highlight=uss+nimitz. If you can't figure it out get back at me and I'll try to help you figure it out if want......

Share this post


Link to post
Share on other sites

Getting some errors with the Surgeon:

Error in expression <s;

Removeheadgear _this;

RemoveGoggles this; _this adduniform (_uniform select >

Error position: <this; _this adduniform (_uniform select >

Error Undefined variable in expression: this

File flight_deck_crew\FDC_Randoms_Medic.sqf, line 72

Error in expression <unt = count _headgear;

_gogglesCount = count_goggles;

_uniformCount = count _un>

Error position: <count_goggles;

_uniformCount = count _un>

Error Undefined variable in expression: count_goggles

File flight_deck_crew\FDC_Randoms_Medic.sqf, line 31

aswell as the others, example:

Error in expression <his assignItem _x} forEach _assitems;

};>

Error position: <};>

Error Missing {

File flight_deck_crew\FDC_Randoms_White.sqf, line 89

Error in expression <s;

Removeheadgear _this;

RemoveGoggles this; _this adduniform (_uniform select >

Error position: <this; _this adduniform (_uniform select >

Error Undefined variable in expression: this

File flight_deck_crew\FDC_Randoms_White.sqf, line 72

Error in expression <unt = count _headgear;

_gogglesCount = count_goggles;

_uniformCount = count _un>

Error position: <count_goggles;

_uniformCount = count _un>

Error Undefined variable in expression: count_goggles

File flight_deck_crew\FDC_Randoms_White.sqf, line 31

Edited by janus0104

Share this post


Link to post
Share on other sites

oh my, what kind of errors are these? could you be more specific to what you are doing to make that error?

Share this post


Link to post
Share on other sites

This happens when you start a mission with one of the 'prefab' units from the FDC addon. Works fine if you just give someone the uniforms of course, it's just the randomize script that's supposed to give the units some items.

Happens right at mission start, too.

Theory #1:

In your FDC_Randoms_<insert unit>.sqf:

_uniform = ["FDC_Uniform_Blue","FDC_Uni_Cam_Blue"];

_headgear = ["FDC_Helmet_Blue"];

_vest = ["FDC_Vest_Blue"];

_headCount = count _headgear;

_gogglesCount = count_goggles;

_uniformCount = count _uniform;

perhaps that should be

_gogglesCount = count _goggles;

That is, add a whitespace between count and _goggles.

Then again, _goggles is not defined anywhere either, so... That would just create another script error.

Not sure where you're going with that anyways, since you don't add any goggles in your mod and don't use that variable as far as I can see.

Also, where you have

RemoveGoggles this; _this adduniform (_uniform select _randomSeed1);

it should be

RemoveGoggles _this; _this adduniform (_uniform select _randomSeed1);

Did you test your mod without -showScriptErrors ? :D

Theory #2:

We have LHM Glasses mod, if this error doesn't occur without it, and occurs with it (assuming you want to test this theory)... Well, I'm going to remove that glasses mod from our modset anyways, so a "Known Issues: Throws errors in combination with LHM Glasses mod" would suffice for me.

Edited by janus0104

Share this post


Link to post
Share on other sites

*whew boy, I'll take a look at it later today. All I know is if I did not have these SQF's the units would spawn with random glasses on from within the game, that's one of the main reason I used this script, I just borrowed from another add-on, I wouldn't know where to begin to make a script like this. I did not test my mod with "-showScriptErrors", not sure what that actually is, I guess I'll have to do a little research. So it's conflicting with LHM you say? Have you disabled that mod and tried running the mission again and still having the above error? I don't use that mod and the only thing I've truly tested was the look of these guys in third and first person mode, and the quality of the textures. I haven't had time to play the game using these guys yet, I haven't even used these guys once to be honest lol. I can't promise anything but I'll try my hand at fixing it.....

Share this post


Link to post
Share on other sites

Well, one thing after another :)

1.) I suggest this for the FDC_Randoms_Blue.sqf. The others are analogue, just the static arrays at the top that set the uniform/headgear/vest need to be changed for each. Different colors and whatnot :)

I removed the parts that didn't make any sense while keeping the functionality intact. Also, a bit cleaned up :)

2.) -showScriptErrors: ArmA 3 has several startup parameters that allow you to specify certain things when starting up the game. You'd set these wherever you start your game from. If you start it via Steam, add the startup parameters to the "Start options" or whatever it is in english version of steam. If you start it via some sort of launcher, I'm sure it has an option for it. If you start it via doubleclicking the exe, make a shortcut to that exe and set the startup parameters in the shortcut's options.

The -showScriptErrors option makes it so that when something misbehaves it doesnt do so quietly in the background but rather shows it directly ingame on the screen in white text on black background, so you know you have to fix it. This is great when building missions or making mods to see when something doesn't work right and why. I suggest you look into how to get that option and use it whenever testing new scripts :)

Share this post


Link to post
Share on other sites

Wow, thank you so much for the fix! That really helps at the moment. About the -showScriptErrors, I got you on that thanks for that tip. I'll fix the arrays in the other SQFs when I get the chance. Could you help with the "Landing Signal Officer" not spawning with a rifle or any other weapon? I actually tried adding the remove weapons this in his SQF and some other lines which I can't remember on hand but they didn't work for shit. I'm aware folks could just use the removeweapons this in the init but I'm trying to make it so they don't need to do that :) ....Trying to be convenient as I can *shrugs.

Share this post


Link to post
Share on other sites

In the beginning of the script put either

1.) If you want to remove all weapons & ammo from the unit:

removeAllWeapons _this;

2.) To only remove the main weapon:

_weapon = primaryWeapon _this;

if (_weapon != "") then {

// Remove primary weapon

_this removeWeapon _weapon;

};

No guaranteee on correctness, but give it a try ;)

Or, you know... in your existing sqf just replace the

_this removeWeapon (primaryWeapon this);

by

_this removeWeapon (primaryWeapon _this);

As long as the main weapon exists it should work.

Basically do a search and replace in all your .sqf's and replace this by _this (and then __this by _this for all those that were correct and now have double underscore lol).

Edited by janus0104

Share this post


Link to post
Share on other sites

oh....my....gawd...becky look at this sheeyit.....

hory_shirt_by_dissizithawaii-d82br3a.jpg

I think I broke my addon lol, see how the dude spawns in his undies and when from a distance the undies and vest turn black!?! what is this shit!

FDC_Randoms_White.SQF

/*
   File: randomize_equipment.sqf
   Author: pettka, modified for a different purpose by "ante" ~cleaned by: janus0104

Description:

Randomizes a headgear form _headgear array and puts it to civilian's headgear slot upon startup of mission.

_rnd1 is used to have some civilians without any headgear  
_rnd2 is used to determine particular headgear from array

   Parameter(s):
   None

   Returns:
   Nothing
*/

_uniform = ["FDC_Uniform_White","FDC_Uni_Cam_White"];
_headgear = ["FDC_Helmet_White"];
_vest = ["FDC_Vest_White"];

_headCount = count _headgear;
_uniformCount = count _uniform;
_vestCount = count _vest;
/*_gogglesCount = count _goggles;*/

if (isServer) then {
   BIS_randomSeed1 = [];

       BIS_randomSeed2 = [];

       _rnd1 = floor random _uniformCount;    
       _this setVariable ["BIS_randomSeed1", _rnd1, TRUE];

       _rnd2 = floor random _headCount;
       _this setVariable ["BIS_randomSeed2", _rnd2, TRUE];
};


waitUntil {!(isNil {_this getVariable "BIS_randomSeed1"})};
waitUntil {!(isNil {_this getVariable "BIS_randomSeed2"})};

_randomSeed1 = _this getVariable "BIS_randomSeed1";
_randomSeed2 = _this getVariable "BIS_randomSeed2";

// Anything magazine based, ammo and such
_magazines = magazines _this;
// Medkits, ToolKits etc.
_items = items _this;
// NVG's, GPS etc.
_assitems = assignedItems _this;

// Make him naked
Removeuniform _this;
// Remove helmets and such
Removeheadgear _this;
// Remove glasses and such
RemoveGoggles _this;

// Add uniform
_this adduniform (_uniform select _randomSeed1);
// Add helmet
_this addheadgear (_headgear select _randomSeed2);  
// Add vest
_this addvest (_vest select (((_randomSeed1 + _randomSeed2) % (_vestCount - 1)) * (floor random _vestCount) % (_vestCount + 1 )));

{_this addItem _x} forEach _items;
{_this addMagazine _x} forEach _magazines;
{_this addItem _x} forEach _assitems;
{_this assignItem _x} forEach _assitems;

what's in the configgy:

class FDC_White: B_Soldier_unarmed_F {
	_generalMacro = "FDC_White";
	scope = 2;
	displayName = "White Jersey";
	author = "Hazel&BGirlTray";
	faction = "FDC_Units";
	vehicleClass = "US_FDC";
	nakedUniform = "U_BasicBody";
	uniformClass = "FDC_Uniform_White";
	hiddenSelections[] = {"Camo"};
	hiddenSelectionsTextures[] = {"flight_deck_crew\data\fdc_uniform_wht_co.paa"};
	linkedItems[] = {"FDC_Vest_White", "FDC_Helmet_White", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio"};
	respawnLinkedItems[] = {"FDC_Vest_White", "FDC_Helmet_White", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio"};


class EventHandlers {
		init = "(_this select 0) execVM '\flight_deck_crew\FDC_Randoms_White.sqf'";
};
};;

class FDC_Dummy_White: B_Soldier_unarmed_F {
	_generalMacro = "FDC_Dummy_White";
	scope = 2;
	displayName = "White Jersey [Cam]";
	author = "Hazel&BGirlTray";
	faction = "";
	vehicleClass = "US_FDC";
	nakedUniform = "U_BasicBody";
	uniformClass = "FDC_Uni_Cam_White";
	hiddenSelections[] = {"Camo"};
	hiddenSelectionsTextures[] = {"flight_deck_crew\data\fdc_unicam_wht_co.paa"};
	linkedItems[] = {"FDC_Vest_White", "FDC_Helmet_White", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio"};
	respawnLinkedItems[] = {"FDC_Vest_White", "FDC_Helmet_White", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio"};
};

I don't see an error or typo does anyone else??

Share this post


Link to post
Share on other sites

Did you change something in the config or only the sqf?

I'll try it out in a short while.

Also, there are two ";;"s before class FDC_Dummy_White, but that shouldn't matter?

Share this post


Link to post
Share on other sites

only the sqf, but than i changed it back to what it was before and still same result. hmm, not sure about the ;;, i'll check that

---------- Post added at 23:56 ---------- Previous post was at 23:29 ----------

Okay everything works fine including the LSOs not having weapons, that "_this removeWeapon (primaryWeapon _this);" worked great. I mistook the Medic unit as the White Jersey unit and I fixed it all is working fine,well for me anyway. Thanks for all your help and time Janus, highly appreciated will update my mod when I get the chance.

Share this post


Link to post
Share on other sites

Okay, taking a look at the moment. I believe I have fixed it for blue, now trying the same solution for the others, see where that takes me.

While I do this, could you fix the FDCHelmet.p3d / .rvmats? They're binarized so I can't do much with it (without crossing a certain boundary, that is).

The problem is the paths:

Warning Message: Cannot load texture us_rangers\rv\goggleframe_nohq.paa.

Warning Message: Cannot load texture us_rangers\rv\goggleframe_dt.paa.

Warning Message: Cannot load texture us_rangers\rv\goggleframe_smdi.paa.

Warning Message: Cannot load texture us_rangers\rv\env_land_co.paa.

You'll have to change those paths to flight_deck_crew\rv\<filename>.paa

EDIT: Okay, glad it works :) I'll still perform my final script changes here since, well, most of the script is redundant :) Will make it available to you in ... under 20 minutes?

Share this post


Link to post
Share on other sites

I'll cancel my upload on Mediafire, but when we get this done and I pack everything up again, could you take the time to test it out please?

Share this post


Link to post
Share on other sites

MOD Update:

Thanks to janus0104 we managed to dumb down the file size to 27 MB instead of the whopping 111 MB

fixed rvmat paths to the right path

fixed the Landing Signal Officer by having him spawn without weapons

added a few more variation of glasses for the LSO

cleaned the SQFs for all the units

made the uniform texture to 2048x2048

all this thanks to janus0104

dl link on the 1st page of this thread

Edited by Hawaii_Based

Share this post


Link to post
Share on other sites
Guest

Thanks for sending us the newest release :cool:

Release frontpaged on the Armaholic homepage.

================================================

We have also "connected" these pages to your account on Armaholic.

This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites

I feel like updating this to real/modern looking flight deck crew....think I "might" re-visit this idea after I'm done with the Rangers....

  • Like 1

Share this post


Link to post
Share on other sites

We'll see how I feel after my Rangers addon, I have a bunch of ideas for units/equipment, vehicles i'm not about to journey into that nightmare ,pretty much ever lol. I'm just a unit guy, I'm not interested in porting any vehicles, besides aren't there vehicles already!? I swore I seen a deck tractor on Armaholic.....

Share this post


Link to post
Share on other sites

Loving it.. just now starting to get my wings & it turns out I love flying jets.. Any chance u might have or have come across any animation scripts for these guys? just to make the flight deck a little more alive..

Share this post


Link to post
Share on other sites

The animations for the flight deck crew are all available in vanilla and can be seen via the animation viewer. We use these animations for the launch Module of the Nimitz, feel free to test it out.

  • Like 1

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

×