verdago7 Posted December 1, 2017 Share Posted December 1, 2017 (edited) Hello! I am new to the forums and to modding, but not to the game. I am developing a character mod and would love some help and guidance. I will give a little bit of information on what I am looking for in my character idea, what resources I am currently using, and what I could use help in. On top of that, please offer ANY AND ALL help you have to offer, as I am new to this and as they say, you don't know what you don't know! Wren is a peaceful, innocent young girl who loves nature and is appalled by anything destructive. She is attuned to animals and they can sense this. She doesn't scare them away and they can become befriended by her and follow her. This includes pig men, rabbit men (and rabbits), tall birds, etc. Does not include monsters, such as spiders, giants, bats, etc. She cannot bear the thought of killing another living thing, however, even monsters, and she suffers terrible mental and medical breakdowns if she does. She also cannot eat meat, for obvious reasons. She cannot wear clothes where animals were harmed, such as earmuffs, eyebrella, etc. There are some other slight add ons along this train of thought. Because of her naturally innocent look on the world, she loses sanity at half the normal rate, She also becomes overjoyed if she has at least 3 followers, and gains a slight ? (sanity, speed, ?) gain from this. (open to thoughts on this, looking for balance... is this too much? Is there a way to balance, such as having a very short time that pets stay with therefore needing constant feeding, or high cost, or... just get rid of? I don't like OP characters, I think the original characters for the most part are the type of balance I'm looking for) The resources I'm using are: Extended Sample Character Character Mod Satori (ideas for befriending animals, not using their buffs though, don't want that) Of course, using things like Notepad++ and whatnot to code. Need help with figuring out the abilities I talked about, specifically with the animals. Having a hard time figuring out the coding from Satori. Also, again, would love ideas on not only the balance perspective but the coding ideas for the slight buffs for animal friends. If you have any questions, please let me know! I am new so hopefully I provided enough to get some help. Thanks so much everyone! Edited December 1, 2017 by verdago7 Link to comment Share on other sites More sharing options...
verdago7 Posted December 1, 2017 Author Share Posted December 1, 2017 For example, I am looking at the coding for the Beefalo from Satori and from the description the Beefalo should assist in combat. I want to remove that function, but still allow the other functions of letting it follow when you befriend it. So looking at this portion of code... function BeefaloBrain:OnStart() if GetPlayer().prefab ~= "sat" then local root = PriorityNode( { WhileNode( function() return self.inst.components.health.takingfiredamage end, "OnFire", Panic(self.inst)), IfNode( function() return self.inst.components.combat.target ~= nil end, "hastarget", AttackWall(self.inst)), ChaseAndAttack(self.inst, MAX_CHASE_TIME), Follow(self.inst, function() return self.inst.components.follower and self.inst.components.follower.leader end, MIN_FOLLOW_DIST, TARGET_FOLLOW_DIST, MAX_FOLLOW_DIST, false), FaceEntity(self.inst, GetFaceTargetFn, KeepFaceTargetFn), Wander(self.inst, function() return self.inst.components.knownlocations:GetLocation("herd") end, GetWanderDistFn) }, .25) self.bt = BT(self.inst, root) else -- Behaviour with Satori ** TALK SENTENCES ARE IN PREFAB <-> MATING SEASON local root = PriorityNode( { WhileNode( function() return self.inst.components.health.takingfiredamage end, "OnFire", Panic(self.inst)), IfNode( function() return self.inst.components.combat.target ~= nil end, "hastarget", AttackWall(self.inst)), ChattyNode(self.inst,self.inst.talk_attack, ChaseAndAttack(self.inst, MAX_CHASE_TIME)), Follow(self.inst, function() return self.inst.components.follower and self.inst.components.follower.leader end, MIN_FOLLOW_DIST, TARGET_FOLLOW_DIST, MAX_FOLLOW_DIST, false), ChattyNode(self.inst,self.inst.talk_face , FaceEntity(self.inst, GetFaceTargetFn, KeepFaceTargetFn)), ChattyNode(self.inst,self.inst.talk_wander, Wander(self.inst, function() return self.inst.components.knownlocations:GetLocation("herd") end, GetWanderDistFn)) }, .25) self.bt = BT(self.inst, root) end Would I just remove the underlined portion? Link to comment Share on other sites More sharing options...
verdago7 Posted December 2, 2017 Author Share Posted December 2, 2017 I am working on getting the "can't hurt any creatures" code implemented and I'm thinking there MUST be an easier way... because I want this sanity/health penalty to apply to ALL creatures and monsters, even giants... she can't kill ANYTHING. She HAS to rely on an ally, or go total pacifist. Is there an easier way than adding in every single creature? Am I doing this part correctly? Link to comment Share on other sites More sharing options...
verdago7 Posted December 2, 2017 Author Share Posted December 2, 2017 Just had a thought.. maybe I could use that coding for things like rabbits and birds, since those could be murdered in inventory, and then use an inverse ruling of wigrids ability of gaining health upon kills? I'll try to find the code and see what I can make of it... hopefully some people who can help will chime in soon, I could use some help! Link to comment Share on other sites More sharing options...
verdago7 Posted December 2, 2017 Author Share Posted December 2, 2017 So I see here that when a valid target is killed, it triggers the command that would engage wigfrid's health and sanity ability. I have also found the component file that is used for both the health and sanity functions. However, since I want to change this ability from a percentage gain to a solid stationary loss of -15 each, I need to change some of that. So two things... what component should I use, and... I can't seem to see where it is linking to that component? Maybe I'm missing something... Link to comment Share on other sites More sharing options...
Lumina Posted December 2, 2017 Share Posted December 2, 2017 inst.components.sanity:DoDelta(-15) Something like this. Verify that it's "inst" and not something else (depending of your code), but you could search example in the game code based on this. Link to comment Share on other sites More sharing options...
verdago7 Posted December 2, 2017 Author Share Posted December 2, 2017 Thank you! And where would I insert that? Or would I replace a line or remove some of them? I'm wondering if I just remove lines 89 through 95 and then insert this in it's place? Link to comment Share on other sites More sharing options...
Lumina Posted December 2, 2017 Share Posted December 2, 2017 89 to 95 you'll have too many "end". Either you start one line later, or end one line sooner. I suggest you to do test and see if it's the behavior you want, then ask here for more help if you can't do what you want. Link to comment Share on other sites More sharing options...
verdago7 Posted December 2, 2017 Author Share Posted December 2, 2017 So that's what I've got now, and it doesn't crash the game but it also doesn't do anything when I kill things. Tried several creatures, including spiders (which I know would activate wigfrids ability). Thoughts? Link to comment Share on other sites More sharing options...
verdago7 Posted December 2, 2017 Author Share Posted December 2, 2017 In the meantime I've been working on the taming code and I've run into a bit of a bump with that as well... I'm going to load my current main and if anyone has any insight please share your thoughts, I'm starting to run out of ideas. I'll keep scouring the web, but would love some feedback. modmain.lua Link to comment Share on other sites More sharing options...
verdago7 Posted December 3, 2017 Author Share Posted December 3, 2017 I'm still not finding what anything in the coding that could be causing either of the problems with the sanity/health problem or the taming pets problem... anyone have more insignt into what coding I'm doing wrong? Link to comment Share on other sites More sharing options...
verdago7 Posted December 3, 2017 Author Share Posted December 3, 2017 I'm separating out my topics to make this easier, so I'll just focus on the taming issue on this thread and I'll get another going for the sanity/fighting thing. Sooo I've spent hours digging into bunnyman and pigman coding, looking at prefabs, brains, stategraphs... and I think I made some progress on all of those, but I could use a second pair of eyes. So my current project is to simplify the project to make sure I know what issues are happening to address one at a time, so currently I am ONLY focused on trying to tame rabbits. I have written brains, prefabs, etc for rabbits to be pets, going off of bunnyman and cross referencing both the pigman and rabbit coding to make sure I wasn't messing up. What I'm not confident on is the coding to allow the rabbit to be fed... I'm having trouble figuring out what parts go in my modmain, which go in the brain, and which go in the stategraphs. I tried putting it all in all 3, and that definitely did not work. I am loading the entire file (which is only the bare bones of the character unmodded, plus the rabbit pet coding in the pet folder and the mainmod edited) and the error log that I got. I know there are some really excellent modders out there, just waiting on some help! Wren.zip client_log.txt Link to comment Share on other sites More sharing options...
verdago7 Posted December 11, 2017 Author Share Posted December 11, 2017 PROGRESS!!! I've gotten past all the bugs in loading the brain and stategraphs and prefabs and have made rabbits not scared and given them the ability to be traded with (for carrots or cooked carrots) and I think correctly used the loyalty tuning for them to follow. My problem right now is that the game crashes AFTER giving a rabbit a carrot, namely due to the follower component. I tried adding the AddCompoment for follower, but this also created a problem. I'm getting close! I know I haven't really gotten any help or replies, but I'll keep trying... rabbit.lua rabbitbrain.lua Link to comment Share on other sites More sharing options...
verdago7 Posted December 11, 2017 Author Share Posted December 11, 2017 Here's what I get when I add in the line inst:AddComponent ("follower") Link to comment Share on other sites More sharing options...
verdago7 Posted December 13, 2017 Author Share Posted December 13, 2017 I've managed to resolve the crashes and can now load the game and give carrots to rabbits with them accepting the carrot. Progress!!! I believe I have the correct follower commands in the coding, however the rabbit will not follow upon receiving the carrot. I don't know if I have too many lines of code in causing a hole where the rabbit can accept the carrot but skip the follower action, or if I am missing something. It could also very well be something I am missing in the rabbitbrain.lua that I am missing. Still, progress is being made, just taking awhile on my own. If anyone wants to peak at the code and take a shot at it I'd greatly appreciate it. rabbitbrain.lua rabbit.lua Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now