Jump to content

Making a harvestable plant


BanjoOz

Recommended Posts

How would I go about making a new harvestable plant? Let's say, for example, I wanted to make an activator copy of the daffodil static (already in the game) so it could be "pickable"... what work do I need to do besides the obvious in creating the activator?

 

I can make a new "harvestable" plant in the GECK just fine, but obviously the mesh doesn't change when you "pick" it (re-using edited versions of the existing harvest scripts gives you the harvest tiem and sets the plant to not give you another for a while).

 

Is this a GECK setting that needs to be changed on the activator (like destruction data... in fact, could I use this somehow as a workaround)? Or does this need to be done in nifskope (editing the existing mesh)? Or is the only way to do this with an edited or entirely new mesh?

 

I've poked around and saw that the existing FNV harvestables like maize_healthy01.nif actually have the "fruit" as a separate model part that's named "On/Off", leading me to think that the GECK somehow knows to remove (or make invisible?) that part somehow. What I can't find is what triggers that (unless it's simply being set to "destroyed") or how that part of the nif differs specially (I'm very much a rookie when it comes to nifskope and meshing, sorry!).

 

If anyone can help or even give me some pointers in the right direction, I'd appreciate it!

Edited by banjo_oz
Link to comment
Share on other sites

Look at \meshes\trees\barrel_cactus\nv_barrelcactus01.nif in Nifskope.

 

It's got animation/states, kind of like a door or magazine vending machine.

 

Thanks! But how do I "activate" these states in the GECK? It didn't seem like the script for the cacus did anything but "destroy" the object when picked unless I'm misreading it (sorry, I'm very much a beginner when it comes to GECK scripting).

 

Or - probably more apt in my case - how do I assign these states to an existing mesh so that the same script would cause the same effect on it... (when activated, the "fruit" disappears)?

 

I have the model resource, and the "fruit" part of it I want to make "picked" is already a separate element... but I have no idea how to edit it to "vanish" on cue.

Link to comment
Share on other sites

I don't know how to handle animations with the geck at all but maybe this page will help?: geck.bethsoft.com/index.php/PlayGroup

 

I don't know if that page is relevent at all. I mean to me it looks like it is relevent because I think you could put it into the plant's script to play some other animation "group" when a certain condition is satisfied (being activated). Or something. Hope this helps in anyway.

Link to comment
Share on other sites

I don't know how to handle animations with the geck at all but maybe this page will help?: geck.bethsoft.com/index.php/PlayGroup

 

I don't know if that page is relevent at all. I mean to me it looks like it is relevent because I think you could put it into the plant's script to play some other animation "group" when a certain condition is satisfied (being activated). Or something. Hope this helps in anyway.

Well spotted... that IS how it's done, it seems (harvestables are scripted so that "PlayGroup" changes the model's "animation stage" from fruited to picked).

 

Sad thing is, this means that in order to make a plant harvestable the way Obsidian did it, I'd need to modify the mesh in a way I have no understanding of (Blender is a nightmare enough just doing "fixed" models for me!).

 

Wonder if there's a "cheat" that could be scripted to use Destruction Data instead (since I do have picked and unpicked separate meshes)?

Link to comment
Share on other sites

Here's a simple workaround you can use that would give you the same result without having to mess with animations:

1. Create two separate models of the plant (NIF files): One which includes the pick-able fruit, and another without the fruit.
2. In the GECK, create two activators, each using one of the models. For the sake of convenience, I shall refer to them as 'CustomPlantRipe' and 'CustomPlantHarvested'.
3. Create a new script and use the following code, then attach it to the CustomPlantRipe activator:

scn CustomPlantRipeScript

begin OnActivate

	player.AddItem YourCustomFruit 1
	PlaceAtMe CustomPlantHarvested 1
	Disable
	MarkForDelete

end

 

4. Create a new script and use the following code, then attach it to the CustomPlantHarvested activator:

scn CustomPlantHarvestedScript

begin OnReset

	PlaceAtMe CustomPlantRipe 1
	Disable
	MarkForDelete

end

 

That's all. When you want to place the new plant in WorldSpace/Interior cells, only use the CustomPlantRipe activator.

Link to comment
Share on other sites

Thanks!!!

 

I haven't tried it yet but it sounds exactly like what I was hoping for and thought there HAD to be a way to accomplish (two activators, one that "changes" into the other).

 

Will give it a shot this weekend. Really, thanks heaps for the help... much appreciated!

Link to comment
Share on other sites

  • 2 years later...

Oh sweet, I'm making a couple harvestable items and was looking through the scripts trying to figure out how it was done but to be able to remove the whole plant (carrots and potatos) and you already solved the issue with a short simple script even I can understand lol. Thanks for sharing it.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...