Does a herbalism mod like this exist?

Post » Wed Mar 02, 2016 3:26 am

From a pickable lilypad mod -



http://i.imgur.com/S0h6sR2.png



As you can see, the ingredient I'm looking at is displaying its properties in real time. Is there a herbalism mod which:



Shows all vanilla/expansion ingredient properties in real time and instantly harvests them?



Thanks.

User avatar
Marcin Tomkow
 
Posts: 3399
Joined: Sun Aug 05, 2007 12:31 pm

Post » Wed Mar 02, 2016 12:47 pm

Just out of curiosity, which mod does that? (the pickable lilypad).

User avatar
Vicki Gunn
 
Posts: 3397
Joined: Thu Nov 23, 2006 9:59 am

Post » Tue Mar 01, 2016 11:34 pm

I don't remember this being a thing but it's most certainly possible to do.

User avatar
Aaron Clark
 
Posts: 3439
Joined: Fri Oct 26, 2007 2:23 pm

Post » Wed Mar 02, 2016 12:24 pm

I take it that you're using James Fraser's http://mw.modhistory.com/download-21-10817 mod which places the actual ingredient in situ rather than in a " plant shaped container" . Which means that with the normal game ingredients being contained with in a " container" , the tool tip would only show the containers details and not the contained ingredient.

User avatar
Nathan Hunter
 
Posts: 3464
Joined: Sun Apr 29, 2007 9:58 am

Post » Wed Mar 02, 2016 3:46 am


Only version 1.0B does this. It replaces all the lilypads with INGREDIENTS, not containers. The other 2 version (1.1 and 2.0) use a container, and therefore do not show all the properties.



To answer the main question: No, I do believe that there are other herbalism mods out there that will show the properties. Most herbalism mods utilize the container version of the plant, and then have a smaller representative ingredient that is picked.


For example:


1) Kwama egg containers are those cool orange egg pods found in eggmines. But when you "harvest" it, you get the whitish eggs.


2) Comberry bushes are a full bush structure, but all you want are the berries - not the whole bush.

User avatar
Rachel Hall
 
Posts: 3396
Joined: Thu Jun 22, 2006 3:41 pm

Post » Tue Mar 01, 2016 11:04 pm

Yes, and even if you were changing the ingredient meshes with the plant meshes, you'd have them everywhere the ingredients are placed in the game world, on tables, shelves, etc. and the same goes for dropping them on the ground. That is obviously not an option. Unless the plants would be changed into statics and the ingredients placed on them so they can be picked directly - would be relatively easy for egg sacks and comberries, I'd imagine, although of course this would require placing ingredients wherever the containers can be found. Quite a lot of work I'd imagine. And there would need to be a solution for making them respawn.

User avatar
Rozlyn Robinson
 
Posts: 3528
Joined: Wed Jun 21, 2006 1:25 am

Post » Wed Mar 02, 2016 7:51 am

There are a few herbalism mods which bypass the container aspect of the plant by using a script placed on the container to determine if (or how many) of the ingredients you should collect based upon various bits of info the moment you click on the container. Since the container is never actually used AS a container (the script has an "OnActivate" function which overrides the default OnActivate for the container which prevents it from opening), there's no reason the plant actually NEEDS to be a container.



So... an enterprising modder with an interest in making such a mod could simply start with one of those herbalism mods and then make a few changes (with permission from the original author assuming one intends to re-release it). The changes would be a bit tedious, but not at all difficult.



1) Pick a reagent - Note the mesh (or meshes) that correspond to the plant that the reagent comes from.


2) Create a NEW reagent (with a different ID) and assign it the same name, weight, value, and effects as the old one, but assign it to have the same mesh you found in step 1.


3) Assign the herbalism mod script associated with the plant/container to the new reagent.


4) Using the construction set, find a copy of this plant, making sure the mesh matches exactly for reagents that have more than one source (e.g. trama roots, various flowers, etc) and use the "search and replace" feature to replace every copy of that plant/container with the newly created plant/reagent. - just deselect the "selection only" and "current cell only" checkboxes to ensure EVERY copy in the gameworld is replaced. Each matching plant in the game world will be replaced with your new plant/reagent in the same x,y,z location with the same x,y,z rotations, and the same scale as the original.



e.g. Comberry - open the comberry ingredient (ingred_comberry_01) and rename it "Ingred_comberry_01_bush". A window pops up and says "you've changed the object ID. Create a new object?" tell it yes. Now, edit the new object and change the art file from n\ingred_comberry_01.nif to f\flora_comberry_01.nif (the mesh of the bush the reagent comes from). Assign the same script to this new reagent that was on the container flora_comberry_01 - Note that this does NOT normally have a script on it, which is why this requires that you start with an herbalism mod that places a script on the container which prevents the container from opening. Now, find a comberry bush anywhere in the gameworld, and using the edit menu "search and replace" function, tell it to replace every flora_comberry_01 with ingred_comberry_01_bush (make sure that "current cell only" and "selection only" are NOT checked). click ok.



5) Wash, Rinse, Repeat.



Now, the plants that used to be containers are actually reagents. When you do a mouseover, it will show the information for the reagent they provide because they literally ARE an exact copy of the reagent. Since the plant/reagent has the script on it which overrides the OnActivate function, clicking on it in the wild will NOT cause it to go into your inventory... instead, it will provide you with the same reagents that it would have when it was still a container. Also, since you only replaced the plant/containers and not the reagents themselves, copies of the reagent which actually exist in the gameworld won't be changed, nor will any in containers or NPC inventories. ONLY the plant/containers will be any different, and the only functional difference will be what they show on mouse-over.



Note that the mouse-over will only be correct for areas which are included as parent-masters for your mod. If you have mods which add new land regions, you will have to either include them in the load list when making your mod, or create patches for them... or not. If you don't, the plants in the new areas will still work fine, they just won't have the alchemy mouse-over information because they'll still be the original plant/containers instead of your newly created plant/reagents.

User avatar
Emma Copeland
 
Posts: 3383
Joined: Sat Jul 01, 2006 12:37 am

Post » Wed Mar 02, 2016 10:27 am

Why not just place it through a script on the container?

User avatar
Quick Draw III
 
Posts: 3372
Joined: Sat Oct 20, 2007 6:27 am

Post » Wed Mar 02, 2016 7:14 am

I'm not sure if scripts are able to display ingredient effects. At least, not from my understanding :/

User avatar
Astargoth Rockin' Design
 
Posts: 3450
Joined: Mon Apr 02, 2007 2:51 pm

Post » Wed Mar 02, 2016 10:06 am


I mean, put a script that places the ingredient version of the plant (PlaceAtMe) on the container version of the plant. That way it's 100% compatible with mods moving or adding the plants.

User avatar
Janeth Valenzuela Castelo
 
Posts: 3411
Joined: Wed Jun 21, 2006 3:03 am

Post » Wed Mar 02, 2016 3:04 pm


For one thing, the placeatme command doesn't currently copy the scale of the source onto the destination, so even though it would be able to place a copy of the plant/reagent at the same x,y,z location and x,y,z rotation, it wouldn't get the scale correct the way the CS search-and-replace function does. And since the only way I know of to get the scale from the original onto the copy is through a global variable, and given that every single plant in a cell would be trying to write to that global at the same time, I don't see how it could be done that way.



If you could convince Hrnchamd to edit the PlaceAtMe function to copy the scale of the source along with all the other information that it already duplicates, that would be a workable solution. I can't think of a situation where that change would cause a problem, and it would certainly make some other things easier, since the most common use of that function is direct substitutions of one object for another. Quite frankly, I never really understood why the scale was the only thing that it DOESN'T copy.



For another, the tutorial I posted was intended to keep the process fairly simple for someone that didn't have much experience modding. The method you suggested could work (assuming you know of a workaround so the script on the plant/container could transmit the correct scale to the plant/reagent), but it would require moving the original herbalism script from the plant/container onto the plant/reagent and then writing a new script for the plant/container to swap the items out. Admittedly, the new script would be mostly cut & paste, but it would have to be unique to each container, which would be a bit daunting to a novice modder. The method as I described it does require a certain amount of effort, but doesn't involve writing any new scripts. That was actually intentional.



If you don't think it would be too much trouble, feel free to spend a few hours making the mod for Ethetan. If not, then it might be better not to over-complicate the issue.



[edit] I have no experience with MWSE, so I cannot say whether or not that would offer a solution to the problem of PlaceAtMe not correctly copying the scale of the parent scripted item onto the child item. But if so, that might be a way to allow the objects to be correctly swapped out in-game instead of in the CS, which would definitely make things more compatible with mods that add new cells and/or add or remove vanilla plant containers.

User avatar
Ann Church
 
Posts: 3450
Joined: Sat Jul 29, 2006 7:41 pm

Post » Wed Mar 02, 2016 4:25 am

I only noticed this thread afterwards, but I've been working on a mod that does exactly this. It uses ManaUser's Graphic Herbalism as a base, and the method is similar to what Toccatta posted earlier. I have a working a proof of concept, but there are a few problems with it.


First is an issue with collision boxes. Any collision in the plant mesh is apparently ignored when it's used by an INGR type object. It's not an issue with everything since many Bethesda plant meshes don't have collision anyway, but for the ones that do--Hackle-Lo, for example: Flora_hackle-lo_01.nif and 02.nif--it looks a bit weird when actors can now walk through them.


The other major issue is compatibility with other mods. Take Tamriel Rebuilt--all the new harvestable flora it adds won't be affected and will continue to behave like normal containers. On top of that, any mod which changes ingredient effects will cause discrepancies between the tooltips on the worldspace objects and the actual ingredient items. I'm using BTB's alchemy, so the real ingredients have different effects to the ones that show on plants' tooltips.


If I were to release this as a working mod, it would need probably a dozen versions to account for combinations of alchemy and worldspace mods. If it was just for the original game, it would be little more than foundations, with the user having to do most of the work themselves to make it compatible with whichever mods they're using. Like Toccatta said, it's simple but incredibly tedious.


Anyway, you can download the test plugin I've made: http://ge.tt/29QQ8RY2


To try it out, open the console and enter "coc mu_gh_testcell", then check out the muckspunges on the right. They and the plants on either side of them have been modified. The way it works might be a bit confusing if you've not used Graphic Herbalism before, so I included the original readme with my notes added.

User avatar
Melanie
 
Posts: 3448
Joined: Tue Dec 26, 2006 4:54 pm

Post » Wed Mar 02, 2016 2:32 am

One thing that kind of bothers me about the graphic herbalism mods is that they attach scripts to every organic container. I haven't done any performance benchmarking, but it's scary to consider any time you go outside you're going to have thousands of independent scripts constantly running. Even if it's just a simple OnActivate script, there's anywhere from dozens to hundreds of plants in each cell and you're going to be loading nine cells worth of them. Every frame the game will have to evaluate whether you've activated each of the thousands of plants one at a time, and even if they're an entire cell and a half away or you have no interest in plant-picking - they're still all going to be processed.


If using MWSE, this could all be done in one single script. Simply detect if the player is targeting an organic container and if so detect if they activate it. Of course an MWSE script is always going to be slower than one using just vanilla functions, but one extended script compared against literal thousands of native scripts might actually be an improvement. Besides, if you're already using other MWSE mods then there's a very high chance you already have some target detection active, so it wouldn't be any additional strain at all.


Anyways, regarding the topic idea, I think it's a good one! Since its very straightforward in what it wants to do, it could likely be auto-generated with tes3cmd based on the players load list and thus be compatible with everything without tons of patches/effort.

User avatar
Amy Smith
 
Posts: 3339
Joined: Mon Feb 05, 2007 10:04 pm

Post » Wed Mar 02, 2016 12:43 pm

Sounds great! Can somebody please do that? ;)


Also, it would really be nice to know how it affects performance. I have never compared how my game runs with or without GH. Though as usual, the worst cells were those with many NPCs, not those with many plants. Also I really have no idea how scripts actually work, but I'd imagine it works the other way round... the game checks if the plant is activated, just as it would do anyway, and then instead of opening the container runs the script attached to it, not the script is running in the background and waits for the plant to be activated? Don't know but it makes sense to me. But then again you know so much more about scripts than I do.

User avatar
Kirsty Collins
 
Posts: 3441
Joined: Tue Sep 19, 2006 11:54 pm

Post » Wed Mar 02, 2016 1:42 pm

Can you show how to do this? I thought you couldn't detect the organic flag on containers. If this can be achieved, then almost all the work is done. I have previously used MWSE to place picked model directly without attaching any script to the object for my herbalism mod, but couldn't figure out how to differentiate between plants and other containers. I just have to dig through my HDD for the script though.

User avatar
Jaylene Brower
 
Posts: 3347
Joined: Tue Aug 15, 2006 12:24 pm

Post » Wed Mar 02, 2016 2:28 pm

Did a little bit of FPS testing with/without graphic herbalism, wasn't very thorough but there does seem to be a bit of an FPS hit involved:



Region | Vanilla | Herbalism
Azura's Coast | 154 | 133
Ascadian Isles | 139 | 124
Bitter Coast | 109 | 102
Grazelands | 122 | 81
West Gash | 144 | 119

These are just averaged from standing in place around the middle of each region with FPS uncapped. I didn't go out of my way to find cells with few or many plants. It stands to reason that the FPS differences would be most pronounced in areas with more plants though. I suspect CPU speeds would have a large impact here as well, since all the extra lag comes directly from scripts and MW only utilizes a single core.




Sure, send me a PM with what you've got so far. It'll require some tes3cmd usage, but perhaps the idea from the OP could be implemented as well.

User avatar
Dustin Brown
 
Posts: 3307
Joined: Sun Sep 30, 2007 6:55 am


Return to III - Morrowind