Jump to content

RomSteady

Members
  • Posts

    7
  • Joined

  • Last visited

Everything posted by RomSteady

  1. Would it be possible to release the object class IDs as well? It's the only part left to be able to handle Map::ReadObject.
  2. Does the model importer remove any bones that don't have vertex weights assigned to them? I added an attachment joint as a child of the right hand, but when I import the model, the bone doesn't exist. Here's a easiest case reproducible example file: crude-cube.zip. I created a cube and added a base joint to it. I assigned all vertex weights to the base joint. I then created a child joint called AttachmentJoint. If I open the .FBX in Visual Studio 2013, I can see the AttachmentJoint is properly a child of BaseJoint, but if I import the .FBX into Leadwerds, I only have BaseJoint. It's a bit difficult to programatically find a bone that doesn't exist, unfortunately.
  3. Is model attachment support in or planned? In several other 3D engines, I can create a skeletal attachment point to a model, then add other models to those attachment points. It's a good way to handle swappable weapons, armor attachments, etc., without having to just export another model with the stuff prebaked in. Three examples of where this would be useful: Quake III: Arena had two sets of animations: one animation for the melee weapon, and one animation for the two-handed weapons. The weapon would just be attached to the attachment point. This way, the same asset could be used across all the models. Bethesda's games (Elder Scrolls, Fallout) have it so that the weapons the enemies have, either in reserve or equipped, appear on the model. In the last game I shipped (SiN Episodes: Emergence), if an enemy was immune to head shots, we'd add a helmet to the enemy model. When the helmet got shot, we'd pop the helmet off so the enemy could get capped in a single headshot.
  4. My final solution was to recursively traverse my settings object and create a flattened key/value pair set. I prefixed each value with its type so I could properly reinflate it, and then used Get/SetProperty to save to the config file. http://romsteady.blogspot.com/2014/01/lua-in-leadwerks-1-settings-action-maps.html
  5. Well, that'll do it. Funny thing is that io.open/read/write still work. Ah, well. Thank you. As a side note, I hope he makes Get/SetProperty accept structured data instead of just strings.
  6. (Running Leadwerks Indie for Steam) I'm currently working on a settings module, and I'm running into a little bit of a problem. I'm keeping all user-definable settings in a single Lua table. I've got serialization code to quickly save out that single table to disk functioning just fine. The problem comes on load. I want to load the Settings object in a separate environment, and then iterate through and only pull over values that I recognize as safe, so no executable code, etc. in the settings file. However, there are some problems, specifically that setfenv() and getfenv() are causing the process to end. To demonstrate, I've got the following code: function Settings:ShowFailure() System:Print("Got here just fine...") System:Print("getfenv is: " .. type(getfenv)) local myEnvironment = getfenv() System:Print("Will never get here.") end If you call this code on launch, you'll get the following output: Got here just fine... getfenv is: function Process Complete. So you can see the code is executing and that getfenv is a recognized function, but as soon as getfenv() is called, the process ends. Any thoughts? If Leadwerks was using Lua 5.2, I'd just use load with a target environment as a parameter, but I'm having to do things the 5.1 way.
×
×
  • Create New...