Harvestable Plant Mesh?

Post » Mon Nov 19, 2012 8:40 pm

I wasn't sure where to post this, because technically it isn't a CK question, it's a NifSkope question.

I'm trying to figure out how to make a vanilla plant into a harvestable plant. After some aggravation I've managed to figure out that the difference is in the nif file being used. You can change everything else and it'll still be harvestable, but the nif files of regular plants are somehow different from the nif files of harvestables and for the life of me I can't tell why. I'm not experienced enough in Nifskope. Anyone better than I am who could tell me what I have to do to the fiddlehead fern mesh (meshes\landscape\plants\treeswordferncluster06) to make it harvestable? I have an ingredient model for the inventory, I just can't figure out how to make the plant itself harvestable.
User avatar
Kyra
 
Posts: 3365
Joined: Mon Jan 29, 2007 8:24 am

Post » Mon Nov 19, 2012 9:53 pm

The only difference I see is harvestable plants have collision and the swordferncluster06.nif does not.
You could export the NiTriShape of the swordferncluster as an .obj file, then import it into a similar shaped harvestable plant nif.
User avatar
Blackdrak
 
Posts: 3451
Joined: Thu May 17, 2007 11:40 pm

Post » Tue Nov 20, 2012 7:58 am

The only difference I see is harvestable plants have collision and the swordferncluster06.nif does not.
You could export the NiTriShape of the swordferncluster as an .obj file, then import it into a similar shaped harvestable plant nif.

How do I go about doing that?

When I look at the fern mesh in NifSkope, and highlight the line from the data tree that says NiTriShapeData, then try to export it, NifSkope says: No NiNode, NiTriShape, or NiTriStrips is selected. Entire scene will be exported. Which I assume is not what I want to do.

There is no NiTriShape on that mesh. Only a BSLODTriShape, and when I try exporting that I get the exact same error.

If the only difference between a harvestable plant and a static is collision, do I just need to add collision to the mesh? Is that what the export method is going to do? I can probably find a tutorial somewhere on adding collision to a mesh. I'm always willing to learn rather than having things handed to me, but meshes are a complicated topic and I didn't even know where to start.

Edit: Found one, but it seems adding collision is not simply a matter of a few clicks in NifSkope. Apparently I need to go download Blender and hope there's a "Complete Idiot's Guide to Collision" out there. :(
User avatar
Deon Knight
 
Posts: 3363
Joined: Thu Sep 13, 2007 1:44 am

Post » Tue Nov 20, 2012 7:17 am

Two hours later.

I can't even get to the part where Blender will import a nif file. I'm about to just give up on this, it should not be taking me several hours just to install a program!

I tried Gmax first, downloaded, installed. Downloaded the NifTools plugin, installed, didn't work. Downloaded a different version of the NifTools plugin, didn't work either. All I get when trying to open a NIF is "string too long" errors.

So I tried Blender. Downloaded the latest version, installed. Downloaded Nif Scripts plugin, the zip file version from SourceForge. Guess what, didn't work. Tried the other version since I wasn't sure what the difference was. Didn't work. Finally downloaded the exe installer for the Nif Scripts. The exe installer first told me I had to dl Blender again (apparently it was looking for an older version) so I did, because I couldn't make the zip file of the Nif scripts install properly so I was hoping desperately the exe version would work, and if it needed an older version of the software to work with, well, I don't have a choice. So I downloaded and installed the older Blender. Tried the exe installer again, and now it told me I needed PyFII for Python 2.6, but installing THAT throws errors because my Python is a newer version.

I've now installed two different versions of Blender itself, and four downloads and attempts at installing the Nif scripts.

Like I said. I've been at this for TWO HOURS. If anyone can direct me to exactly which files I need to install to make Blender open a nif file, for the love of god, please help me?
User avatar
Juan Cerda
 
Posts: 3426
Joined: Thu Jul 12, 2007 8:49 pm

Post » Tue Nov 20, 2012 7:17 am

Sorry, I was in a hurry when I first responded, I didn't check things closely. Installing a modeling program isn't going to help. NifScripts does not export collision anyway.

I'll look at it more closely and get back to you, unless someone else can come up with a solution sooner. :)
User avatar
Tha King o Geekz
 
Posts: 3556
Joined: Mon May 07, 2007 9:14 pm

Post » Mon Nov 19, 2012 7:28 pm

Alright, try it this way.

Open 2 windows of Nifskope.
In one - load meshes/landscape/plants/swordferncluster06.nif
In the other - load meshes/plants/canisroot01.nif

Working on swordferncluster06 first, convert it to a NiTriShape;
1. Right click anywhere in the Block List > Insert > NiTriShape
2. Highlight the root node BSLeafAnimNode and find Children in the Block Details. Expand with the arrow and change the node line number from 2 (the BSLODTriShape line) to 1 (the NiTriShape line) by double clicking in the value. That should now make the BSLODTriShape an orphan.
3. Highlight the NiTriShape line in block list. In the Block Details, change the Name by clicking on TXT, and select the same name the BSLODTriShape has.
4. Find the line 'Flags' and click on the flag icon. Change this to "continue" and click accept. Double click on the number in the value beside it and change it to 14.
5. Find the line 'Data' and double click the value. Add the line number of the existing NiTriShapeData (should be 3).
6. Scroll down to 'Properties' at the bottom, expand the arrow and double click the value of the first line. Change that to the line number of the BSShaderLightingProperty (should be 4). Double click the value of the 2nd property and change that to the line number of the NiAlphaProperty (should be 6).
7. Now if you expand the NiTriShape arrow it should be set up exactly like the previous BSLODTriShape. In the Block List, right click on the BSLODTriShape node, go to Block > Remove Branch.

You should now be able to export as .obj and import to canisroot01.nif. Clean up the nif by removing any NiMaterialProperty nodes and re-associate the BSLightingShaderProperty to the NiTriShape Properties. Save it with a new name and create a new World Object > Flora in the CK.

Hope this helps.
User avatar
Taylah Illies
 
Posts: 3369
Joined: Fri Feb 09, 2007 7:13 am

Post » Tue Nov 20, 2012 5:53 am

So far, so good... I made it though your instructions without a hitch. I'm just having issues trying to get the correct texture onto the new nif. I'm going to keep trying awhile longer before I give it up for the night and resume in the morning. I WILL make this work no matter what I have to do.

Thank you SO much for your help; I can't tell you how useful you've been. I even looked for a Paypal Donate button on your Nexus profile, but you haven't set one up!

I suppose I'd be pushing my luck if I asked how to figure out which texture the fern is using and how to get it onto the new nif?

Edit: Nevermind, I actually managed to find it on my own. Score! Now to get the whole thing into the CK without any further explosions... wish me luck.
User avatar
Austin England
 
Posts: 3528
Joined: Thu Oct 11, 2007 7:16 pm

Post » Tue Nov 20, 2012 2:31 am

:) Good luck!
User avatar
james tait
 
Posts: 3385
Joined: Fri Jun 22, 2007 6:26 pm

Post » Tue Nov 20, 2012 3:48 am

Well, after all those hours of hard work -- I've been at this since 8 this morning, so about 12 hours with a break for lunch -- I can FINALLY report...

That it doesn't work.

Nope. I succeeded brilliantly in getting the new mesh with the correct texture into the CK and into the game, and it looks exactly as it should. The problem is that it's not harvestable, just like all my previous efforts.

It appears that our original premise "the only difference between a harvestable plant mesh and a non-harvestable plant mesh is the collion data" is wrong. And I just don't know what else to try. I've compared meshes line-by-line in NifSkope and compared objects minutely in the CK. I cannot find a single difference.

If you take a vanilla harvestable plant mesh, say the canisroot01.nif, and rename it to testplant.nif, it still works. You can change its object ID, or create a new object entirely using that testplant.nif, and it works. You can change the ingredient it gives you when harvested, you can change the name of the plant to be This Is A Test Plant, and it still works.

What you CAN'T do is use a different mesh. Whenever you use a nonharvestable plant mesh, it simply shows up in game as a static object and sits there, not showing the activator or the Harvest "Plant Name" message on mouseover.

I'm just... really frustrated here. :( There is NO difference in the two meshes, and yet somehow, there is.

I was so hopeful when I finally got that mesh into the CK, too. I realized belatedly that I'd picked the wrong fiddlehead plant, and actually had to laugh at myself after all the hours of stressing out over this, heh. It's probably one of the other five treeswordferncluster nifs rather than the 06.

I have a save with my character standing right in front of the plant that I really wanted so I should be able to figure out which mesh it really is pretty easily. That's my plan for the morning, at least it'll give me some satisfaction to do something that I can succeed at before I plunge back into harvestable hell for another day. Or however long it takes before I make this work. I've put too much effort into it to toss the whole project now.
User avatar
SHAWNNA-KAY
 
Posts: 3444
Joined: Mon Dec 18, 2006 1:22 pm

Post » Mon Nov 19, 2012 11:23 pm

Okay, I may have had a breakthrough. I finally got the stupid F'ing fern mesh to let me harvest it, sorta. The catch is that apparently I had to have the cursor placed at a very, very specific spot before the Harvest activator message appeared. I'm thinking that's probably why I've been having so much trouble -- some of the previous attempts may well have worked, I just wasn't hitting the apparently teeny tiny sweet spot with the cursor so I never saw the option to harvest.

I'm going to go through the whole process you outlined again, but this time instead of the canis root I'll find a harvestable mesh that's considerably larger to start with, because I have no idea how to make the activatable spot on a mesh bigger.

I'm encouraged, anyway. It DID work, technically. That's more than I had before.
User avatar
Elizabeth Falvey
 
Posts: 3347
Joined: Fri Oct 26, 2007 1:37 am

Post » Mon Nov 19, 2012 5:21 pm

I feel your pain of trial and error delving into unknown territory but think of it this way... in the end you'll have learned something no one else has discovered yet and sharing this with many many modders. :) (consider writing a tutorial for the CK wiki).

I'm looking forward to the results.
User avatar
ChloƩ
 
Posts: 3351
Joined: Sun Apr 08, 2007 8:15 am

Post » Mon Nov 19, 2012 10:18 pm

So, five hours later.

I still haven't managed to do it. :( At one point I did get a harvestable fern with a decent sized activator area. Of course, it was invisible. Totally invisible. I could move my mouse over the location where I'd placed it, and see "Harvest G'd F'ing Fern" (forum won't let me post the words that were actually there; by then I was a wee bit frustrated, you might imagine). I could even click and harvest it. I just couldn't see it. I was clicking thin air and getting an ingredient.

That was a few hours ago. I've gone through three or four more attempts since then and gotten a few more invisible plants, a red exclamation point or two, and at least one that wasn't activatable at all.

A few minutes ago I deleted every single mesh and fern texture I've produced since yesterday morning, and a dozen things called "test mod" and various vulgar variations thereof. I'm going to try again from scratch. Suddenly the plant that I could see and harvest is looking pretty good, even if the activatable area was the size of a flea. If I can get back to the point where I have a working mesh with a tiny little activatable spot, I'll consider it a good place to be.
User avatar
Latino HeaT
 
Posts: 3402
Joined: Thu Nov 08, 2007 6:21 pm

Post » Mon Nov 19, 2012 9:05 pm

All right. I'm back at square one where I started. I have a visible harvestable fern. It has a tiny area you have to move the crosshair to before you can harvest it, but at this point, I'm willing to take it.

Here's the issue. You know how I said I'd picked the wrong mesh to start with, that it wasn't treeswordferncluster06? I was almost right. Turns out, it IS that mesh. I just had the wrong texture. I kept using it and my ferns weren't looking like the ones in my savegame so I couldn't figure out what was wrong, until I realized the ferns in my game look different because I have a flora overhaul texture mod installed. DUH.

When I grab that new fern texture out of the mod and try to use it on my harvestable fern mesh -- the one that works fine with the vanilla fern texture -- that's when I started getting invisible plants.

I need another pot of coffee and a protein bar. Check back later to hear the exciting story of how I've completely lost all semblance of sanity with this and deleted my entire Skyrim directory out of spite! Somewhere, the ferns are laughing at me. Oh yes. I can hear them laughing...
User avatar
helen buchan
 
Posts: 3464
Joined: Wed Sep 13, 2006 7:17 am

Post » Mon Nov 19, 2012 11:30 pm

All right. The coffee helped.

I've gotten to the point of having a working harvestable fiddlehead plant in the game. I'm going to attempt to see if I can change the mesh from the original plant to the new one and therefore in one fell swoop make every fiddlehead in the game harvestable. I have a feeling that isn't going to work and I'll need to spend a large part of tomorrow replacing approximately 423 plants one at a time, but at least that's a reachable goal.

What I'm worried about is the fact that the activatable area of the mesh is down at the bottom of the plant, and from what I've seen of the plants in-game, a lot of them are positioned partially buried so that half the stalk is underground and the plants aren't nearly as tall. That's going to be an issue because if I bury my plants the same way, the harvestable spot will be under the ground, but if I don't bury them, there will be literally hundreds of places where there's supposed to be a short plant and I've replaced it with a tall one, so who knows how weird that will look.

Do you know anything about what property in a mesh is the one that determines where and how large the activatable area is? Is that possible to tamper with?
User avatar
Janette Segura
 
Posts: 3512
Joined: Wed Aug 22, 2007 12:36 am

Post » Mon Nov 19, 2012 5:08 pm

(squeaks) IT WORKS IT WORKS IT WORKS
User avatar
sophie
 
Posts: 3482
Joined: Fri Apr 20, 2007 7:31 pm

Post » Tue Nov 20, 2012 1:13 am

Ah, you beat me to it. :lol: It was bugging me so much I had to http://i304.photobucket.com/albums/nn174/Wren823/fern01.jpg for myself. I copied the NiTriShape of the fern into floramushroom06. It was the equivalent size.
How'd you do it?
User avatar
Kayla Keizer
 
Posts: 3357
Joined: Tue Dec 12, 2006 4:31 pm

Post » Mon Nov 19, 2012 11:03 pm

How'd I make the clickable area bigger? I didn't, technically. I did the same thing you did; copied the fern over to a more suitable mesh. The canis root mesh is tiny and flat, whereas the fern plant is a lot bigger. That seems to be why the activator area was turning out so small. I used a lavender plant instead, the closest harvestable thing I could find to the general size and shape of the fern, and suddenly I no longer had to go pixel hunting to hit the right spot on the plant in-game.

I got the mesh working in the first place by copying over the NiTriShapeData and the BSLightingShaderProperty branches of my fern mesh over to the lavender mesh. I received a PM from Tamira with step by steps on how to do it, and somehow that worked when nothing else seemed to. A few kind people at the Nexus were helpful as well.

It's entirely possible that I'd somehow messed something up earlier during all my attempts, or just gotten confused as to which mesh was which and which texture I'd gotten from where. I'd renamed a lot of stuff as I tried various things over and over. At that point I had mesh and texture files of two different static ferns (the vanilla and the one from the flora overhaul mod), the canis root, lavender plant, thistle plant, and the spiky grass plant. I also had the files for a couple of single-flower meshes from before I realized that the thistle blossom and the thistle plant were two different meshes. All that was just the material I'd been working with; I counted half a dozen meshes named IHateFerns and such representing my various attempts.

It was pretty much an unorganized mess. At that point I'd had well over a dozen various nif and dds files floating around in three or four different folders within the Skyrim\Data directory. Finally I just went through all the folders I'd been sticking things into and deleted every single file I'd created or opened at any point, then extracted the original vanilla files from the BSAs and put those back. Started fresh from scratch so I could be sure I wouldn't have problems due to some leftover mistake.

Amazingly, replacing the mesh in the vanilla fern object actually did work. I never thought I'd be that lucky. Every fiddlehead fern in Skyrim is now harvestable, and I've moved on to making a model for the ingredient. I was trying to reskin a Spriggan taproot because the shape is similar to a fiddlehead, but I can't figure out how to get rid of the damn glow map it's got. I might just give up on that and use the vanilla taproot unchanged. It's better than nothing and I don't think my nerves can handle another two-day battle with meshes.
User avatar
Stefanny Cardona
 
Posts: 3352
Joined: Tue Dec 19, 2006 8:08 pm


Return to V - Skyrim