six_ten 208 Posted April 18, 2014 Door works when house placed in editor but not when house is placed in map through TB. I have built a small outbuilding with one door, code based on the Samples_F example. When I place it in my terrain via the editor, the door works just fine. I tested 6 of them at once and had no problems. I then added a number of them in an object layer in Terrain Builder, processed it and ran the game. The map works fine, except none of the door icons appear and the doors won't operate. At the same time if I add one from the editor it also works, but not the ones that are built-in. How do I fix this? Share this post Link to post Share on other sites
bushlurker 46 Posted April 18, 2014 This is an issue with the binarize process... Can you give us a brief rundown of your "models pack" P:\ drive structure, plus your binarizing/packing procedure...? B Share this post Link to post Share on other sites
six_ten 208 Posted April 18, 2014 (edited) This is an issue with the binarize process...Can you give us a brief rundown of your "models pack" P:\ drive structure, plus your binarizing/packing procedure...? B Sure. OS (P:) a3 (fully extracted all pbos) ART (my project) .....a3 (just the configs) .....ART_Arch (contains general buildings config plus .hpps) ..........Magazine (one of the buildings based on Samples_F TestHouse plus the buildings model.cfg and config and p3d ..........Outbuilding (same as Magazine, different building) ..........Scripts contains Door_close.sqf etc .....ART_Character, etc I use pboProject to pack, Noisy Output, Strip Log, Full Build, Check Externals, SP Edited April 18, 2014 by Six_Ten Share this post Link to post Share on other sites
DerBiwi 10 Posted April 18, 2014 So, its: "P:\a3\ART" ? Share this post Link to post Share on other sites
six_ten 208 Posted April 18, 2014 So, its:"P:\a3\ART" ? The path to the outbuilding models for example is P:\ART\ART_Arch\Outbuilding Share this post Link to post Share on other sites
bushlurker 46 Posted April 18, 2014 Hi again... Okay! - looks like you know what you're doing... The most important concept to grasp here is that there's a difference between placing models ON a terrain (via the editor), and placing them IN a terrain ("built-in" via Terrain Builder). You're using Mikero's PboProject - that's always a good idea! I notice you have this... ".....a3 (just the configs)" Back in the BinPbo and Arma 2/OA days, it was necessary to have a "configs-only CA" folder at the Main Project Folder level for your terrain. This was so, when you packed the terrain, if there were any "CA buildings" with animations - doors, ladders, etc - BinPbo would "find" the appropriate config files for those CA assets - at the "directory level" it was looking at... If you had a "Custom Buildings Pack" and it included buildings with animations, then likewise - it was necessary to have a "configs-only folder for IT - also at that appropriate Main Project Folder level... I'm guessing from the fact you're including a "configs-only A3" folder at your Main Project Folder level that you understand this concept and the reasons behind it... Brilliant!, 'cause it's always a chore to explain... :) I can just move directly to the "With Mikeros PboProject, none of that is necessary anymore" part... With Mikeros PboProject, none of that is necessary anymore... :) There's no need to start making and including any of these "config-only" folders anywhere... However - you DO need to point PboProject to the location(s) of the configs of any model assets which have animations which you have included IN your terrain... Press the "Setup" button on the main PboProject window... The section titled "Used only when building islands"... You should have some preset paths here already - "P:\CA" and "P:\A3" probably... That covers the default stuff... You should also add the paths to any of your custom buildings packs which have animations... PboProject will "trawl" these locations and acquire any config info it needs as it examines each building you've included IN your terrain. The other thing to note here is the bit where it says... "Enter all paths to configs that declare "land_xxx classes..." This is the other vitally important part of models with animations which you want to use IN a terrain... For animations to work in a model placed IN a terrain, it MUST have... class Land_TestBuilding_1 and the model filename must match the classname exactly (apart from the "Land_" bit), eg: model="TestBuildingsPack\TestBuilding_1.p3d; *major-league cast-iron rule there.... For buildings with anims placed ON the terrain via the editor, different rules apply, so it's often the case that, if one or more of the elements above are incorrect, a model will behave OK in the editor, but not when part of a terrain... B Share this post Link to post Share on other sites
six_ten 208 Posted April 18, 2014 (edited) Just a quick note as I'm modifying in the way you suggest and am on a roll; more later (plus thanks) I see that I've removed the Land_ naming, so I'll start with that. My paths under pboProject Setup are now P:\a3,P:\ART\ART_Arch,P:\ART\ART_Arch\Magazine,P:\ART\ART_Arch\Outbuilding Edit: quick question -- if I change the filename of my buildings, will that break my terrain? If not, will I be able to substitute the renamed model for the old one without having to re-place all the 432 instances? ... edit: edited the library file and added land_ to each building. Testing now... Edited April 18, 2014 by Six_Ten Share this post Link to post Share on other sites
m1lkm8n 411 Posted April 19, 2014 If all those art_* are in the main root folder art all you need to do is point pboproject to p:\art and it will include all the subfolders automatically. And no you can't change the filenames without changing the instances in your configs. The names in the config following Land_ like bushlurker said much match exactly to the p3d name. Also another thing to keep in mind if your making models and changing names is that there can be only *one* Whatevername.p3d at any time. That's why it's so important to use your tag_ Because if you use house.p3d and somewhen else uses house.p3d you'll be in trouble as they will conflict. So using tags help eliminate that. Also in your pbos you got to make them all unique as well. So only one yourtag_house.p3d as well. So something like yourtag_house1.p3d, yourtag_house2.p3d and so forth. Share this post Link to post Share on other sites
six_ten 208 Posted April 19, 2014 Okay, so now the door icon appears when I am near the memory point, but the trigger doesn't open or close when I use it. In my model.cfg I have to add the prefix "Land_" but that also needs to match the name of my p3d. I' m a bit confused trying to reconcile the classname in the model.cfg with the main config as I think that's why it only partly works. Thanks to both of you for your help so far. I should mention here also that I've learned a lot from your past posts and examples over the years and really appreciate your examples. As for Mikero's pboProject, I can't say enough good things about it. Using it is like having a tutor for confiu4ration, I try something in my files, it checks and says yep that works or no fix this, fix that. It been great. I'm looking through some of the APLSA configs. General Store for example the model.cfg doesn't say Land, so I guess I can dispense with that, (now that I type this I bet I changed that but didn't fix the refence in the main file.... going to check that now. Share this post Link to post Share on other sites
m1lkm8n 411 Posted April 19, 2014 (edited) Post your model and main config so we can take a look. Use something like pastebin.com it's easier to read that way Also the land_ prefix only needs to go into the main config. However it should be said too that skeleton names in the model config should be unique as well as the same thing can happen as with in main config (they can override each other) So usually what I do is start my skeleton name with my tag_ So it should end up being for example tag_house_big_1 Edited April 19, 2014 by M1lkm8n Share this post Link to post Share on other sites
six_ten 208 Posted April 19, 2014 (edited) I removed the Land_ prefix from the entries in model.cfg and now the door works! It opens in instead of out, but it opens and closes. I think that's just a matter of changing the direction of rotation. I'm still trying to get damage models to show up and I think I really need help on that part, as even on my character models and uniforms and weapons, I can't seem to get that right. ---------- Post added at 17:45 ---------- Previous post was at 17:38 ---------- Here's the model.cfg Side note: I have removed the a3 confgs from my project folder, and changed the pboProject Setup to read P:\ART\ART_Arch Thanks for the tips. // Note: this model config is created with 4-space [tab] symbols. If you use different settings, the structure may not be as clear. class CfgSkeletons { class Default { isDiscrete = 1; skeletonInherit = ""; skeletonBones[] = {}; }; // Skeleton of undamaged variant of the house, containing doors and windows. Note that glass #3 is not a window but the glass pane of glass door (door #1). Therefore // (similar to door handles) it's bones need to be appropriately linked to bones of the door so that it moves along with it when the door is opened/closed. class US_Dairy_Blair_skeleton: Default { skeletonInherit = "Default"; skeletonBones[] = { // Pairs: 1st is newly defined bone, second is it's "parent" in the skeleton (bone hierarchy). "Door_1", "", }; }; // Skeleton of damaged variant of the house. It has no bones for windows (since all windows are destroyed); on the other hand it has bones for destroyable parts (Dam_#) and their rubble (Unhide_#). // Doors are bound to these destroyable parts of they are part of them, so that they are hidden together by one animation. class US_Dairy_Blair_dam_skeleton: Default { skeletonInherit = "Default"; skeletonBones[] = { "Dam_1", "", "Unhide_1", "", "Dam_2", "", "Unhide_2", "", "Door_1", "Dam_2", }; }; }; class CfgModels { class Default; class US_Dairy_Blair: Default // class name must be the same as name of p3d { skeletonName = "US_Dairy_Blair_skeleton"; // Set to use above defined skeleton. sections[] = { // Selections from the model that are used in config.cpp for switching textures and materials. "DamT_1", }; sectionsInherit = ""; class Animations { // Animation for rotating door #1 (without a door handle) class Door_1_rot { type = rotation; source = Door_1_source; // Controler defined in class AnimationSources in config.cpp. selection = Door_1; // Selection from p3d that also has to be defined as a bone in this model's skeleton. axis = Door_1_axis; // Axis of the rotation. memory = 1; minValue = 0; // Value of the controller at which the rotation will be angle0 maxValue = 1; // Value of the controller at which the rotation will be angle1 angle0 = 0; angle1 = (rad 110); // "rad" converts from degrees to radians }; }; }; // This class represents the damage version. It has the same door animations, misses the window animations and has class US_Dairy_Blair_dam: Default { skeletonName = "US_Dairy_Blair_dam_skeleton"; // Uses skeleton for damage version. sections[] = {}; // No sections are needed at this stage. sectionsInherit = ""; class Animations { // Animations for destructible parts. They are very similar to the glass animations above; only using different selections (= bones) and animation sources. class Hitzone_1_hide { type = hide; source = Hitzone_1_source; selection = Dam_1; minValue = 0; maxValue = 1; hideValue = 0.99999; }; class Hitzone_1_unhide: Hitzone_1_hide { selection = Unhide_1; hideValue = 0; unhideValue = 0.99999; }; class Hitzone_2_hide: Hitzone_1_hide { source = Hitzone_2_source; selection = Dam_2; }; class Hitzone_2_unhide: Hitzone_2_hide { selection = Unhide_2; hideValue = 0; unhideValue = 0.99999; }; // Door animations, same as for the undamaged version of the house defined above. class Door_1_rot { type = rotation; source = Door_1_source; selection = Door_1; axis = Door_1_axis; memory = 1; minValue = 0; maxValue = 1; angle0 = 0; angle1 = (rad 110); }; }; }; }; and the config.cpp /* This is a sample of a house with two stage destruction (a damaged version and a ruin), two destructible parts, five doors and eight windows */ #include "basicdefines_A3.hpp" class CfgPatches { class ART_Arch_Outbuilding { // requiredAddons[] = {"A3_Structures_F"}; requiredAddons[] = {"ART_Arch"}; requiredVersion = 0.1; units[] = { "Land_US_Dairy_Blair", "Land_US_Dairy_Blair_dam", "Land_US_Dairy_Blair_ruin" }; weapons[] = {}; }; }; #include "\ART\ART_Arch\config_macros_glass.hpp" class CfgVehicles { // Parent class declarations class House; class House_F: House { class DestructionEffects; }; class Ruins_F; // Class of the house in good state // class Land_Test_House_01_F: House_F class Land_US_Dairy_Blair: House_F { scope = 2; // 2 = public = shown in editor displayName = "Blair Dairy"; // Name in editor model = \ART\ART_Arch\Outbuilding\US_Dairy_Blair.p3d; // Path to model vehicleClass = Structures; // category in editor; "Structures" value is a class defined in CfgVehicleClasses mapSize = 5; // Scale of icon in editor cost = 10000; // Score penalty for destroying the house selectionDamage = DamT_1; // Selection which will have textures and materials switched (according to "class Damage definitions") based on total damage of the house replaceDamagedHitpoints[] = {Hitzone_1_hitpoint, Hitzone_2_hitpoint}; // Array of hitpoints (subclasses in "class Hitpoints") that can trigger switch to the damaged version when destroyed replaceDamaged = "US_Dairy_Blair_dam"; // Classname of the damaged version class DestructionEffects: DestructionEffects { class Ruin { simulation = ruin; type = \ART\ART_Arch\Outbuilding\US_Dairy_Blair_ruin.p3d; // Path to model of ruin used when total damage of the house reaches 1 position = ""; intensity = 1; interval = 1; lifeTime = 1; }; }; class HitPoints // Entities representing destructible subparts of the house { class Hitzone_1_hitpoint { armor = 10; material = -1; name = Dam_1; // Name of selection in Hit-points lod in p3d visual = DamT_1; // Name of selection in resolution lods in p3d that will have it's textures and materials switched (according to "class Damage definitions") based on damage of this hitpoint passThrough = 1.0; // Coefficient for how much damage done to this hitpoints is also done to total damage of the house radius = 0.375; // Radius of spheres around each vertex of this hitpoint in Hit-points lod. These spheres represent the volume from which this hitpoint takes damage convexComponent = Dam_2; explosionShielding = 50; // Multiplier for damage taken from explosives minimalHit = 0.001; // Minimal damage that can be dealt to the hitpoint. Any lower damage is ignored class DestructionEffects // { class Dust { simulation = particles; // Visual effect type = HousePartDust; // Class of this particular effect, defined in CfgCloudlets position = Dam_1_effects; // Point of origin for this effect, defined in Memory lod in p3d intensity = 1; interval = 1; lifeTime = 0.01; }; class Dust2: Dust { type = HousePartDustLong; }; class Walls: Dust { type = HousePartWall; }; class DamageAround { simulation = damageAround; // Effect dealing damage in a radius type = DamageAroundHousePart; // Class of this particular effect, defined in CfgDamageAround position = Dam_1_effects; intensity = 1; interval = 1; lifeTime = 1; }; }; }; class Hitzone_2_hitpoint: Hitzone_1_hitpoint { name = Dam_2; convexComponent = Dam_2; class DestructionEffects: DestructionEffects { class Dust: Dust { position = Dam_2_effects; }; class Dust2: Dust2 { position = Dam_2_effects; }; class Walls: Walls { position = Dam_2_effects; }; class DamageAround: DamageAround { position = Dam_2_effects; }; }; }; // Hitpoint of each window, defined using macros from config_macros_glass.hpp to avoid a giant wall of text due to having 14 particle effects each. // In practice they are defined in the same manner as the hitpoints above. These follow Glass_#_hitpoint naming trend. // First parameter being number id, second being a value for armor parameter and third being a value for radius parameter. BIG_GLASS_HITPOINT(1,0.01,0.175) BIG_GLASS_HITPOINT(2,0.01,0.175) DOOR_GLASS_HITPOINT(3,0.01,0.175) DOOR_GLASS_HITPOINT(4,0.01,0.175) DOOR_GLASS_HITPOINT(5,0.01,0.175) NORMAL_GLASS_HITPOINT(6,0.01,0.175) NORMAL_GLASS_HITPOINT(7,0.01,0.175) NORMAL_GLASS_HITPOINT(8,0.01,0.175) }; class Damage { // Texture pairs (below 0.5 health and 0.5+) for switching visuals (can also use generated) tex[] = { // Window textures "A3\Structures_F\Data\Windows\window_set_CA.paa", "A3\Structures_F\Data\Windows\destruct_half_window_set_CA.paa", // Grey color "#(argb,8,8,3)color(0.501961,0.501961,0.501961,1.0,co)", "#(argb,8,8,3)color(0.294118,0.294118,0.294118,1.0,co)", // Brown color "#(argb,8,8,3)color(0.501961,0.25098,0,1.0,co)", "#(argb,8,8,3)color(0.392157,0.196078,0,1.0,co)", // Yellow color "#(argb,8,8,3)color(1,1,0.501961,1.0,co)", "#(argb,8,8,3)color(0.513725,0.513725,0.203922,1.0,co)", // Light grey color "#(argb,8,8,3)color(0.752941,0.752941,0.752941,1.0,co)", "#(argb,8,8,3)color(0.478431,0.478431,0.478431,1.0,co)", // Red color "#(argb,8,8,3)color(1,0,0,1.0,co)", "#(argb,8,8,3)color(0.701961,0,0,1.0,co)" }; // Unlike textures, materials are not in pairs but in triplets (health: 0 - 0.49, 0.5 - 0.99, 1) mat[] = { "A3\Structures_F\Data\Windows\window_set.rvmat", "A3\Structures_F\Data\Windows\destruct_half_window_set.rvmat", "A3\Structures_F\Data\Windows\destruct_full_window_set.rvmat" }; }; class AnimationSources { // Animation sources for doors class Door_1_source { source = user; // "user" = custom source = not controlled by some engine value initPhase = 0; // Initial value of animations based on this source animPeriod = 1; // Coefficient for duration of change of this animation }; }; // This section defined custom actions for action menu. Each class defined here represent one action. Here we have Open+Close pairs of action for each door (1-5) class UserActions { class OpenDoor_1 { displayNameDefault = <img image='\A3\Ui_f\data\IGUI\Cfg\Actions\open_door_ca.paa' size='2.5' />; // This is displayed in the center of the screen just below crosshair. In this case it's an icon, not a text. displayName = "Open Door"; // Label of the action used in the action menu itself. position = Door_1_trigger; // Point in Memory lod in p3d around which the action is available. priority = 0.4; // Priority coefficient used for sorting action in the action menu. radius = 1.5; // Range around the above defined point in which you need to be to access the action. onlyForPlayer = false; // Defines if the action is available only to players or AI as well. condition = ((this animationPhase 'Door_1_rot') < 0.5) && ((this animationPhase 'Hitzone_2_hide') < 0.99999); // Condition for showing the action in action menu. In this case it checks if the door is closed and if the part of the house in which the door is located hasn't been destroyed yet). statement = ([this, 'Door_1_rot'] execVM "\ART\ART_Arch\Scripts\DoorNoHandle_open.sqf"); // Action taken when this action is selected in the action menu. In this case it runs a script that opens the door. }; class CloseDoor_1: OpenDoor_1 { displayName = "Close Door"; priority = 0.2; condition = ((this animationPhase 'Door_1_rot') >= 0.5) && ((this animationPhase 'Hitzone_2_hide') < 0.99999); // Checks if the door is currently open and not destroyed. statement = ([this, 'Door_1_rot'] execVM "\ART\ART_Arch\scripts\DoorNoHandle_close.sqf"); }; }; // Here are references binding specific positions in Path lod in p3d to specific actions from "class UserActions" for AI to know when to use which doors. The actionBegin# and ActionEnd# is a hardcoded naming system. actionBegin1 = OpenDoor_1; actionEnd1 = OpenDoor_1; // Amount of doors of this house; a parameter for easy processing of all doors on different houses by scripts. numberOfDoors = 1; }; // Damaged version of the house. It contains rather few changes compared to the undamaged house class; mostly just disabling features not needed on this variant anymore. class Land_US_Dairy_Blair_dam: Land_US_Dairy_Blair { scope = 1; // 1 = accessible by scripts but not shown in editor displayName = "Blair Dairy, Damaged)"; model = \ART\ART_Arch\Outbuilding\US_Dairy_Blair_dam.p3d; // Reset of object switching. replaceDamagedHitpoints[] = {}; replaceDamaged = ""; // Reset of texture and material switching. class Damage { tex[] = {}; mat[] = {}; }; class AnimationSources { // Adding animation sources for two destructible parts of the house. class Hitzone_1_source { source = Hit; hitpoint = Hitzone_1_hitpoint; raw = 1; }; class Hitzone_2_source: Hitzone_1_source { hitpoint = Hitzone_2_hitpoint; }; // Defining door animation sources again since this "class AnimationSources" is not inherited, it's rewritten (to get rid of animation sources for windows which are all destroyed in this stage). class Door_1_source { source = user; initPhase = 0; animPeriod = 1; }; }; }; // Simple class for ruins of the house. class Land_US_Dairy_Blair_ruin: Ruins_F { scope = 1; model = \ART\ART_Arch\Outbuilding\US_Dairy_Blair_ruin.p3d; }; }; Side note: I have removed the a3 confgs from my project folder, and changed the pboProject Setup to read P:\ART\ART_Arch Thanks for the tips. Edited April 19, 2014 by Six_Ten Share this post Link to post Share on other sites
m1lkm8n 411 Posted April 19, 2014 (edited) Hi six_ten. Took a look. Your doing good so far. I'm mobile so I can't throw these into notepad++ and fix them up for u just yet but one thing I noticed is that the last set of defined bones in your model config does not get a coma after it. So remove those. Only on the last pair. As soon as I can (prob tomorrow night) I'll sit down and write u up a new set of configs with the damage sections of ur house using a macro too. This way you don't end up with a mile long config because of all the damage sections. Then you'll see how to do it. It's simple enough edit well I was able to break away from the kids for a bit. and play with the configs for you. heres a link to download them. I added macros for the ruins and wall hitpoints. you can open them up and see how its done there. also I made a few comments in the config. for the ruin effects macro all u need to do is open that file and change the path from mine to how urs is. theres two paths that you need to change in that file and that's it..hopefully all works well for you. oh and just drop those macros and the cfgpatches directly in the folder with the models. ive been adding the cfgpatches via a hpp file because it cuts down on the amount of lines in the main config file https://www.dropbox.com/sh/6qo1c0dwezdm5zj/TFsW95ww8J M1lk Edited April 19, 2014 by M1lkm8n Share this post Link to post Share on other sites
six_ten 208 Posted April 19, 2014 Thanks! I really appreciate your help. I'm in the middle of trying to figure out how to get a brick shader built with the multishader; have been hitting a brick wall for 6 hours (except it doesn't look like brick!) I'll try out your configs now, a welcome break. Share this post Link to post Share on other sites