Jump to content

tofarley

Member
  • Content Count

    10
  • Joined

  • Last visited

  • Medals

Community Reputation

10 Good

About tofarley

  • Rank
    Private

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. So, I decided to try making the Interior (building) a subclass of ReammoBox_F (and eventually I changed to ThingX, which is the parent of ReammoBox_F). This seems to work out pretty well. Everything seems to be working. My Memory LOD, my collision... Everything is good, except I'd like to be able to remove the "Inventory" option that comes from ThingX. Anyone have any ideas on how to remove a built-in "Action"?
  2. Hey all. I am having trouble implementing the UserActions class for any type of Building Object. I have it working just fine for other types of items. For example, this works just fine if I put the following UserActions class inside in my CfgVehicles class while extending ReammoBox_F: class ReammoBox_F; class TransportStation: ReammoBox_F { scope = 2; displayName = "Transport Station"; model = "transport\model.p3d"; picture = "transport\data\picture.paa"; icon = "transport\data\icon.paa"; class UserActions { class EnterTransportStation { displayName = "Enter Transport Station"; displayNameDefault = "Enter Transport Station"; priority = 3; radius = 5; position = "action"; showWindow = 0; onlyForPlayer = 1; shortcut = "reloadMagazine"; condition = "(alive this)"; statement = "this execVM ""transport\enter_transport.sqf"";"; }; }; class EventHandlers { init = "this allowDamage false;"; }; Now, noting that in the above I used position "action", which appears to be a default position and works just fine for small objects. I have attempted to use the action point in a building, BUT my model also has a Memory LOD with two points defined, "door_point" and "console_point". The Transport is actually a building. "Entering" the transport teleports the player to it's location on the map. From there I want the player to be able to walk around the building and select various destinations from the console actions. The exit action will return the player to the new location of the transport. The following does not work: // I have tried extending Static, Building, NonStrategic, HouseBase, and House. class Static; class TransportInterior: Static { model = "transport\transport_interior.p3d"; armor = 2000; scope = 2; vehicleClass = "Objects"; displayName = "Transport Interior"; class UserActions { class ExitTransport { displayName = "Exit Transport"; displayNameDefault = "Exit Transport"; priority = 3; radius = 200; position = "door_point"; // door_point is defined in Memory LOD showWindow = 0; onlyForPlayer = 1; shortcut = "reloadMagazine"; condition = "(alive this)"; statement = "this execVM ""transport\exit.sqf"";"; }; }; // There are other actions to be added, but in the interest of keeping this post simple... class EventHandlers { init = "this allowDamage false;"; }; }; So you can see, it is effectively the same usage (I have even tried copying/pasting the EXACT same usage) but it just own't work for buildings?!
  3. That looks perfect. I thought I had combed the depths of the scripting reference. Thanks!
  4. That sounds like it might do the trick. Any tips on how to accomplish that? I haven't seen anything about changing the rvmat through scripting or anything.
  5. Thanks for the reply WarLord554, but since the rvmat is specified by model, is there any way to actually adjust those settings in-game in real-time? Thanks.
  6. Hey all. I was wondering if it is possible to update the rvmat at runtime, or if there is another trick that would allow me to adjust the transparency of a model on the fly. I've successfully imported my custom model into A3 (thanks to Al's Blender Toolbox, Maczer's Rig script, and BI's reference files) but I'd like for this particular model to "fade out", rather than simply disappear when de-spawned. It seems that the way lighting is interpreted is handled in the rvmats, so if I could access those properties during runtime, I could achieve this effect. A friend of mine recommended "swapping out" the models with another model in a various state of transparency, but in addition to sounding terribly clunky and resource intensive, I'm not even sure the engine would swap the models fast enough to create the illusion of something fading out of existence. Thanks for any help you can provide.
  7. Thanks for the response, Alwarren! I've downgraded to 2.72. I've had some success, but I have another issue when trying to export empty LODs that may or may not be an issue with the Arma Toolbox for Blender: Issue: Exception when exporting an empty LOD (object with no vertices). When I import a model in p3d format which contains empty Pilot and/or Geometry LODs, they import as I would expect. That is, the layers contain an object who's origin is 0,0,0, but contains no vertices. However I am unable to export this same configuration. Attempting to export gives the error: Traceback (most recent call last): File "C:\Users\<username>\AppData\Roaming\Blender Foundation\Blender\2.72\script s\addons\ArmaToolbox\__init__.py", line 813, in execute exportMDL(filePtr, self.selectionOnly); File "C:\Users\<username>\AppData\Roaming\Blender Foundation\Blender\2.72\script s\addons\ArmaToolbox\..\ArmaToolbox\MDLexporter.py", line 321, in exportMDL export_lod(filePtr, obj, wm, idx) File "C:\Users\<username\AppData\Roaming\Blender Foundation\Blender\2.72\script s\addons\ArmaToolbox\..\ArmaToolbox\MDLexporter.py", line 241, in export_lod writeNormals(filePtr, mesh) File "C:\Users\<username>\AppData\Roaming\Blender Foundation\Blender\2.72\script s\addons\ArmaToolbox\..\ArmaToolbox\MDLexporter.py", line 89, in writeNormals return v UnboundLocalError: local variable 'v' referenced before assignment location: <unknown location>:-1 location: <unknown location>:-1 Looking at the code, it's clear why this happens. The code is attempting to loop through mesh.vertices, of which there are none. What is the proper method to export an empty LOD? Is there a known workaround for this issue? I have not been able to recreate a"Geometry LOD" that matches the original A3_headgear_example.p3d without causing all of the other LODs to "move around" when viewed in-game. Steps to reproduce: Option 1 (Using BI Official Examples): Download the BI Tools Arma 3 sample models: https://community.bistudio.com/wikidata/images/a/a7/A3_Character_Examples_1.1.zip Unzip the file. Import \A3_Character_Examples_1.1\A3_headgear_example.p3d into Blender 2.72 or 2.73. Export as P3D to the directory of your choice. Check the console for errors. Option 2 (Using a custom model): Start a new Blender project using Blender 2.72 or 2.73 If your scene does not contain a default cube, create one (Shift-A -> Mesh -> Cube). Duplicate the cube onto another layer (Shift-D -> Esc -> M -> Select a layer) Select the cube on one layer and bring up the properties panel (N). Enable "Arma Object Properties". Select an LOD Preset of Custom and a custom distance of 1.00. Change layers and select the cube on the new layer. Enable "Arma Object Properties". Select an LOD Preset of Custom and a custom distance of 1.00. Set a new "Named Property" with name = autocenter and value = 0. Enter edit mode (TAB) and delete all vertices. Leave the origin point at 0,0,0. Return to object mode (TAB). Export to the file of your choice. Check the console for errors. EDIT: For conciseness. I am nothing if not verbose. UPDATE: I've been doing a little tinkering and I may have found a solution... The original error from the previous post states "local variable 'v' referenced before assignment" in the writeNormals function of MDLexporter.py: def writeNormals(filePtr, mesh): for v in mesh.vertices: writeFloat(filePtr, 0) writeFloat(filePtr, 1) writeFloat(filePtr, 0) return v Clearly in my example mesh.vertices is an empty list. I looked through the rest of the code and realized that you only call writeNormals one time (also in MDLexporter.py) and you do not use that return value for anything... So I removed it. This lead to another error in the writeMass function: perVertMass = totalMass / totalVerts A division by 0 error... fair enough. I changed it to: if totalVerts > 0: perVertMass = totalMass / totalVerts else: perVertMass = totalMass This seems to work great. I can import and immediately export the sample model from BI, package up my mod and everything works as expected! Huzzah! My only question is, do you think I will find any negative impact on most models? My guess is that any model that can suffice without a geometry LOD at all is probably also not very dependent on mass, and this should not cause any unexpected issues. Thoughts?
  8. So, I used the config.cpp and model.cfg files from this post by Davids: http://forums.bistudio.com/archive/index.php/t-152649.html I left his files entirely untouched and made my own "\my_helmet\headgear_b_myhelmet" in Blender (Right now it's really just a blue cube). It totally worked. I still have no idea why the default examples didn't work, or what black magics of config.cpp made this new one work, but I am pleased to have imported *something* into a running instance of Arma 3. If anyone can point out what I'm doing wrong in the first post, I'm sure it would still be very useful for me, but I can move forward with what I have now. Thanks again!
  9. Hey all. I hope this is the right place to post something like this. I'm trying to get started in Arma 3 Modding. I've downloaded the Arma Tools through Steam and configured my P: drive with DevP. I've installed Al's Blender tools and all that good stuff... I decided to try building some of the sample files included with Arma Tools just so that I could see something working in game. Unfortunately that is not happening for me. When I load a mission with the objects from the sample files, it says "Cannot open <modelname>". I'm really new to this, so I'm not sure if I'm doing something wrong, or if there's something funky with the sample files... Steps to reproduce: Run Addon Builder. Source directory - P:\Samples_F\Test_Character_01 Destination directory - P:\A3_Retail\@test\addons Clear Temp folder checked. Not binarized (I have tried it both ways). I generate the file successfully and load the mod. I know the mod is loading because when I launch arma it complains "No entry for 'config.bin/CfgWeapons.Test_Weapon_01_holo_pointer_F'". This is okay because I haven't tried to use the holo pointer yet, and at least this error tells me that the mod has loaded. I go to the Editor. I choose Stratis for a map. I drop a "player" on the map. I drop an "Empty" backpack item in front of the player. In the initialization parameters for the backpack I put: this additemcargo ["H_Test_Headgear", 2]; H_Test_Headgear is the class name defined in cfgHeadgear.hpp. I click "Preview" for the mission. When the mission loads, it complains: "Cannot open object samples_f\test_character_01\a3_headgear_example.p3d" Well that sort of makes sense... When I decompress the pbo I built, that directory structure doesn't exist... The pbo is a flat structure with all files in one directory. So I tried creating that directory structure inside the pbo... But got the same result. I tried modifying cfgHeadgear.hpp to reference "\a3_headgear_example.p3d" rather than "\samples_f\test_character_01\a3_headgear_example.p3d" and I get the slightly different error, "Cannot open object a3_headgear_example.p3d" which at least tells me that it's actually recognizing my changes to the hpp file. Troubleshooting steps done: I tried binarizing the pbo. I tried *not* binarizing the pbo. I tried using PBO Manager instead of Addon Manager to pack the files. I tried creating my own simple object in Blender and exporting it as a3_headgear_example.p3d in case the included example model was corrupt. I tried creating the directory structure referenced in cfgHeadgear.hpp (samples_f\test_character_01\) inside the pbo and putting a3_headgear_example.p3d in that directory. I tried changing the directory referenced in the hpp file replacing samples_f\test_character_01\a3_headgear_example.p3d with \a3_headgear_example.p3d. I tried verifying my steam cache. Can someone see any obvious errors I'm making, or try to recreate my steps to see if I'm missing something? Any help is *greatly* appreciated! Thanks for reading! Tim
  10. Please excuse this post. I am trying to file a bug report and the forums won't let me post links to the relevant discussions until I have made at least one previous forum post... ---------- Post added at 22:47 ---------- Previous post was at 22:46 ---------- I'm not sure if this is the right place to file a bug report, but I believe there is an issue with Blender 2.73 due to an underlying change in Blender. When attempting to create an Arma 3 proxy, blender throws the following exception: Traceback (most recent call last): File "C:\Users\<username>\AppData\Roaming\Blender Foundation\Blender\2.73\script s\addons\ArmaToolbox\__init__.py", line 976, in execute bm.faces.new([bm.verts for i in f_idx]) File "C:\Users\<username>\AppData\Roaming\Blender Foundation\Blender\2.73\script s\addons\ArmaToolbox\__init__.py", line 976, in <listcomp> bm.faces.new([bm.verts for i in f_idx]) IndexError: BMElemSeq[index]: outdated internal index table, run ensure_lookup_t able() first It looks like Blender underwent a change to the underlying bmesh/bmvert api that may require some tweaks to your code. blender announcement in release notes (bottom of the page, includes solution): http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.73/Addons github issue: https://github.com/nortikin/sverchok/issues/474 discussion: http://blenderartists.org/forum/showthread.php?354412-Is-2-73-going-to-break-all-exporting-add-ons Steps to reproduce: Using Blender 2.73: Add an Armay Proxy Shift-A -> Mesh -> Arma Proxy Check console for error messages
×