Jump to content

Livestock Farmer? (New Modder Here)


Recommended Posts

So as the title says I'm just starting out with modding FO4. What I have in mind is a mod that allows you to domesticate certain animals, keep them in your settlement and assign a settler to them so that the animal produces meat on a set schedule. So for instance, let's say you can go to the food resources tab in the workshop and place 6 brahmin down for 100 caps apiece. Then, like with any other food resource, you assign a settler to "farm" the brahmin herd, producing brahmin meat every 2-3 days that appears in your settlement workshop.

 

Is this simple/feasible? If so, would someone mind helping me out and pointing me in the right direction to make this? I know there's some creation kit tutorials on youtube and the like but nothing I found relating to the resources

Link to comment
Share on other sites

Well, yes, it is possible though it is not simple - especially not for a beginner.. It's not just joining some things together in the CK.

 

Besides the furniture (let's say brahmin station) which can be done in CK, you need to read and understand some system papyrus scripts. Next step would be to extend this scripts, so that they can handle you brahmin station. This means, that you have to know or learn the papyrus scripting language. If you want to add a customr mesh, this will complicate things even further.

All of this is very time consuming - Hence I'm afraid, i can't be very helpful.

Link to comment
Share on other sites

I'd first look at how existing implementations are achieved, and then attempt to carry that over to (for example) Brahmin. Brahmin can already be purchased from NPCs in random encounters, so you've got that sorted. You'd only need to change the animals in those random encounters to use the template of your (soon to be) assignable Brahmin that generates food.

 

I'd initially look at what allows guard posts or plants to be assignable. I'd look at another workshop object with the same form type (Furniture in the case of guard posts and Flora in the case of plants), and carry things over until you've nailed down what makes it tick. That is, what you need to do to make a new Furniture form an assignable resource. I'd primarily look at Keywords, ActorValues and scripts (specifically the workshopobjectscript). Carry those over until you get closer to what you want. Once you've got something working, I'd first back up the .ESP file and then remove as much as you can (from what you added) until you've just got the essential changes left. Not knowing how scripts work is likely going to be a problem, as I'd wager that the mentioned script plays an integral role in this system. This will be less of a problem when you're carrying this over to the same form type, and more of a problem when you're throwing animals into the mix (that is, adapting this to another form type, as you may need to make alterations to the script).

 

I just quickly threw all of the Keywords, ActorValues and the workshopobjectscript (with the same properties as the WorkshopGuardPostFurniture form) onto the Brahmin form to see what would happen. Now it's assignable, but I apparently don't have permission to assign people to the Brahmin. I also assigned it both Food and Safety ActorValues (of 2), which didn't show up. That's a better result than it not being assignable at all. To make testing easier I made the EncBrahminClarabell form use the WorkshopBrahmin form as a template for everything (which would be the form that the Brahmin use that you can purchase from random encounters). I didn't have a save with a Brahmin that I had purchased from a random encounter on-hand, so that saved me some time. If you do, you can skip that step. As I said, though, I'd first look at making some Furniture or Flora form that's already in the workshop assignable with resources first. Knowing what makes the system work in the first place will allow you to tell whether it's just not working.

 

That could definitely be the case. You could learn everything you needed and only have it tell you that it isn't possible. I'd say that what you're looking to do definitely could be possible, though, as plants are both assignable and produce food, which is what you want. The issue is the difference in form type (NPC_ versus Flora). You'd have to dig in the workshopobjectscript to see how much that controls. While this is a neat idea that would appeal to a number of people, it doesn't particularly appeal to me from a modders perspective. So, this is about as much as I'll be playing around with things. If you have more general questions, shoot, though.

 

Honestly, if you're starting out, I'd recommend something simpler. This could just require basic knowledge and a bit of playing around with things, but it could very well require a decent amount of scripting knowledge, and knowledge of what you could play around with in the first place. I started out playing with .ESP files in FO4Edit, and eventually learned how to script (though, I did have some basic knowledge is other programming languages going into that). There's no way that I would have attempted this when I was just starting. However, I usually learn a new thing by implementing it into a new project where I can lean on my existing knowledge for most of it. So, maybe I'm too results orientated to immediately jump in the deep end. If you're jumping in with no pre-existing knowledge, it could take weeks or months to see results.

Link to comment
Share on other sites

Okay, so I've been reading articles and watching videos about modding, Papyrus scripting, etc. and realize this is a significantly bigger undertaking than I had anticipated. So if it's alright with y'all, I'd like to break this down into a few simpler problems to try to piece together how to make this work one step at a time:

 

1. So Workshop Brahmin (which I believe to be the brahmin that can occasionally wander into your settlements) already have the workshopnpcscript attached to them. Looking at the values there shows that this script is responsible for, among other things, not being able to move brahmin to other settlements, assign them to caravan duty, or make them workers. What then controls why brahmin seek out feeding troughs? I even inspected the EncBrahminTemplate and found no answers there. Is this relevant code perhaps in the trough itself, making some kind of a "call" to nearby brahmin to move to its location?

2. Flora type objects have an Activate Text Override, which allows custom text to be displayed when hovering over them. NPCs obviously don't have this, since the assumption there is that you'd want to talk to them. Is there some way to control what happens on dialogue, possibly with a dialogue trigger function in Papyrus? For example, could I do something like (and this is just pseudocode):

OnDialogue() {
Kill()
Player.additem [BrahminMeat] [#]
} 

to butcher the brahmin and immediately add some amount of brahmin meat to the player's inventory? I know you can normally just give an NPC items for their inventory, but I'd like butchering to be different from just killing the brahmin normally (eventually I'd like to make a custom animation for it.) Is there a way to override the "Talk" text to have it display something else?

3. How could I accomplish assigning NPCs to milk brahmin? I've found this mod which allows the player to milk Brahmin, which I believe answers my question about about changing the "Talk" option, but would the Brahmin need to somehow be Furniture to allow an NPC to do that? Can furniture be animated, ie having a brahmin that stands in one place, but moves its head, etc while having a furniture marker for a settler to milk it?

4. Could the brahmin provide two types of resources? So if an NPC was assigned to it, the NPC would milk the brahmin, but if you interact with the brahmin you could butcher it for meat? Or if you interact with the udders you milk it, but the head you butcher it?

Sorry if this is a lot of questions, but I'm hoping this is something people could find valuable and I'm really interested in making this work. Also thank you KernalsEgg for the help above!

Edited by IAmTheClayman
Link to comment
Share on other sites

Wanted to start a new post here. Found something I think is useful regarding changing the interact prompt. I remembered that in the quest "Here Kitty, Kitty" the interact option for Ashes is "Send Home." In light of that, looking over Ashes's files in the CK revealed two things: there are perks detailing interaction with Ashes which check to see if you can send Ashes home, and a quest called V81_01 which details various quest stages, one of which awards the player the perk allowing them to interact with Ashes.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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