dmarkwick 261 Posted September 5, 2007 OK, so I know that my pitiful config abilities are well documented on these boards so I wonder if it's the config yet again that's tripping me up. I'm making basic viewblock objects, one set invisible and another set visible (for testing). In Oxygen I made the simplest model, a cube 4x4x4. I textured it with a simple white texture with 50% alpha. Saved the p3d and moved it (and the .paa) into my mod PBO. Then I tried to write a config for it, which looks like this (including other viewblock objects I did at the same time): <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class CfgVehicles { class Strategic; class DMViewBlock4Vis : Strategic { icon="DMSmokeEffects\DMViewBlockVis.paa"; displayName="DMViewBlock 4m (visible)"; vehicleClass="Misc"; armor=1000000; model="DMSmokeEffects\DMViewBlock4vis"; }; class DMViewBlock4Inv : DMViewBlock4Vis { displayName="DMViewBlock 4m (invisible)"; model="DMSmokeEffects\DMViewBlock4inv"; }; class DMViewBlock8Vis : DMViewBlock4Vis { displayName="DMViewBlock 8m (visible)"; model="DMSmokeEffects\DMViewBlock8vis"; }; class DMViewBlock8Inv : DMViewBlock4Vis { displayName="DMViewBlock 8m (invisible)"; model="DMSmokeEffects\DMViewBlock8inv"; }; }; Aside from not seeing the item in the editor (which I'm not too surprised at, I don't know the criteria to allow the editor to see it) using the model brings instant CTD to the game. Using the above config (I've tried a few ) I also get a message that says the .paa cannot be found in \data\mymodPBO but I don't know why this message should show, looking at the model p3d file in a hex editor does NOT show \data as part of the file's path. For the purpose of Oxygen I put the .paa files in the root folder, which gives me no texture file path(s) in the p3d file, just the texture name, which to my mind means the .paa file needs to be supplied in the same place within the PBO mod file. Which they are. Anyone have a simple answer to my CTD problem here? Share this post Link to post Share on other sites
W0lle 1052 Posted September 5, 2007 Not sure what the CTD is causing, but the vehicleclass is defined differently in ArmA now, I modified the config so you can see. Also added scope=public, this should let you see the Objects in the editor: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgVehicleClasses { class DM_Misc { displayName="Misc"; }; }; class CfgVehicles { class Strategic; class DMViewBlock4Vis : Strategic { icon="DMSmokeEffects\DMViewBlockVis.paa"; displayName="DMViewBlock 4m (visible)"; vehicleClass="DM_Misc"; armor=1000000; scope=public; model="DMSmokeEffects\DMViewBlock4vis"; }; class DMViewBlock4Inv : DMViewBlock4Vis { displayName="DMViewBlock 4m (invisible)"; model="DMSmokeEffects\DMViewBlock4inv"; }; class DMViewBlock8Vis : DMViewBlock4Vis { displayName="DMViewBlock 8m (visible)"; model="DMSmokeEffects\DMViewBlock8vis"; }; class DMViewBlock8Inv : DMViewBlock4Vis { displayName="DMViewBlock 8m (invisible)"; model="DMSmokeEffects\DMViewBlock8inv"; }; }; Note: Above config is only a slightly modified of yours, possible that more lines and sections needs to be added in order to make the model work, e.g. a class CfgModel etc. Share this post Link to post Share on other sites
dmarkwick 261 Posted September 5, 2007 Thanks for the help W0lle, it looks like I still know very little about configs (Is there such a thing as an authoritative document/paper detailing the procedure?) My expectation is that the model itself is causing the CTD not the config, but I guess that problem is down the road a bit. I will try out this new config and let you know Share this post Link to post Share on other sites
.kju 3245 Posted September 5, 2007 i think MAP_MISC has AI view block objects/models. you might wanna check it. Share this post Link to post Share on other sites
dmarkwick 261 Posted September 5, 2007 i think MAP_MISC has AI view block objects/models.you might wanna check it. Yeah I've seen them, when I found them I thought initially they were BIS game items. Because I want to use them in my own addon without dependency on other addons I thought I would try to make my own, also I don't need them to be very complex and decided that simple cubes would be ideal. Actually the viewblock test vids I put up uses the MAP_Misc viewblock items. Share this post Link to post Share on other sites
dmarkwick 261 Posted September 6, 2007 Bleah I'm still not seeing anything in the editor (which is not really that important in any case) but I am still getting CTD as soon as the object is spawned. I guess the question should be: what are the most common faults in models that cause CTDs? Share this post Link to post Share on other sites
.kju 3245 Posted September 6, 2007 well maybe you just post your addon/p3d and a screenshot of the different LODs for people having a look at it. Share this post Link to post Share on other sites
ricki 0 Posted September 6, 2007 is this your full config ? if i assume it is then there is a class cfgPatches missing if i am wrong, beat me e.g <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class CfgPatches { class DM_Stuff { units[] = { "DMViewBlock4Vis", "DMViewBlock4Inv", "DMViewBlock8Vis", "DMViewBlock8Inv" }; weapons[] = {}; requiredVersion = 1.000000; requiredAddons[] = {}; version = 1.08; }; }; if you got still problems with the textures open your model in oxygen (dont know which one you use) select your whole model in 0.000 or 1.000 LOD (at least all LODS where you added the textures) and press "E". in the popping dialog you can adjust your texture path. (texture should reside into your addon folder where your model is, or at least in any subfolder within) in case this doesnt help, try to remove all the textures from your model and put it in "naked". mfg rocko edit: btw. what are your texture measurements ? they are all power of two ? Share this post Link to post Share on other sites
dmarkwick 261 Posted September 6, 2007 is this your full config ?if i assume it is then there is a class cfgPatches missing if i am wrong, beat me No, the portion I posted is just the stuff related to the object, it's part of a larger config that does include cfgPatches info if you got still problems with the textures open your model in oxygen (dont know which one you use) select your whole model in 0.000 or 1.000 LOD (at least all LODS where you added the textures) and press "E". As it's a simple cube there are no LODs that I have dealt with. in the popping dialog you can adjust your texture path. (texture should reside into your addon folder where your model is, or at least in any subfolder within) The texture path is just the P: root, which as far as I can tell makes the texture in the same place as the model, as there is no path info in the p3d file just the texture name. edit: btw. what are your texture measurements ? they are all power of two ? As the texture is only white with Alpha it's only 8x8 pixels Share this post Link to post Share on other sites
dmarkwick 261 Posted September 6, 2007 what ? LOL, it's just something I do so I can edit with quotes more intuitively Share this post Link to post Share on other sites
ricki 0 Posted September 6, 2007 ah ok sorry i was referring to the old Oxygen. there you can see the texture path in the model. never tried the new one, as this P: drive sounds suspicious to me. have you checked yet how Mapfact did their viewblocks ? edit: and of course "E" works for the new one also Share this post Link to post Share on other sites
dmarkwick 261 Posted September 6, 2007 have you checked yet how Mapfact did their viewblocks ? No I haven't. I did look at their config but their class definition was buried too deep to be useful to me, I'd guess that their texture path will be similarly structured for their particular needs to be mostly irrelevant to me, but you're right I should check it out I suppose Share this post Link to post Share on other sites
dmarkwick 261 Posted September 6, 2007 OK I made a mod PBO directory structure in the P: root to emulate the final PBO, as looking at the MAP_Misc file showed me that the texture needs a file path starting at least from the addon PBO root. So I reapplied the textures and at least the game no longer CTDs. Still no object seen either in the editor or when spawned via script though. Share this post Link to post Share on other sites