Drearsword Posted May 21, 2020 Share Posted May 21, 2020 (edited) Been working on a new follower mod for new vegas, functionally speaking he works. He follows, the wheel works and all that. I have two questions, First I want to add a custom perk to the player when he's recruited (I already "Made" the perk since its basically a weaker version of another one) But Im not sure how to do that, tried adding it to his hieing script and doesn't seem to work The Second question was how do I ally him to a faction without that faction messing up his dialogue (Specifically the boomers). What I mean is that when I set him as their ally it overrides his base dialogue and makes him say generic stuff. I was also curious if theres a way to have is so You have to be liked by the boomers for him to be hireable (DONE) Any responses are appreciated as Im new to modding. EDIT: All Issues have been resolved thanks to Mongo and Dubious for the tips Ill be sure to mention you guys if I release the mod (Still needs alot of voice work) c: Edited May 24, 2020 by Drearsword Link to comment Share on other sites More sharing options...
madmongo Posted May 21, 2020 Share Posted May 21, 2020 That's three questions. :wink: 1. Adding the perk to his hiring script should work. I suspect that you either have something wrong in the perk definition itself or you have something wrong with the addperk command in your script. 2. Give the companion a custom voice type. 3. Use the GetReputation function as a condition for your hire dialog. Link to comment Share on other sites More sharing options...
Drearsword Posted May 21, 2020 Author Share Posted May 21, 2020 (edited) Thanks for the reply Madmongo Alright so I tested my perk and it works however Im unable to obtain it with the console, I know the base ID from hovering over it but for whatever reason it doesnt seem to be working when I try and have you gain it when you recruit him Alright So since he already has a custom voicetype I decided to just give him his own faction and make him allyed to the boomers, problem now is that even if Im villified by them he refuses to attack me. Even after I blow him up he doesnt aggro which seems weird. And thanks for letting me know about the getrep function as I said new to modding so thats helpful to know thats a thing. Edited May 22, 2020 by Drearsword Link to comment Share on other sites More sharing options...
dubiousintent Posted May 22, 2020 Share Posted May 22, 2020 Re: console. Not all commands work in the console the same as "in-game" because they lack the proper context provided by a script. See the 'GECK Form-ID, Base-ID, Ref-ID, and Editor-ID' section of the wiki "Getting started creating mods using GECK" article. Re: not aggroing. He's a follower/companion. They are part of your "Player" faction now, and not supposed to attack you. Suggest you take a look at how Boone is set up as relates to the NCR and the Legion. Also Cass for how she gets "fed up" by your "evil ways" and leaves. -Dubious- Link to comment Share on other sites More sharing options...
Drearsword Posted May 22, 2020 Author Share Posted May 22, 2020 Hmm So Im still not sure how to actually script the perk giving in the Geck, I used NVEDIT to obtain the baseid so I know thats correct. However every time I try and script the game to give me the perk it doesn't work. Is there a specific sequence I need to add to the script that Im missing? Because I thought simply adding player.addperk xxxxxxxx would work and its not. I also think I know how to fix the aggro problem, however im not sure how to implement it either, Basically Im thinking of simply removing him from the player faction when unhired and puting him back in when he is. Im concerned though that that might break the scripts I already wrote for him. Link to comment Share on other sites More sharing options...
dubiousintent Posted May 23, 2020 Share Posted May 23, 2020 (edited) Do you know and understand about the "mod index" of a reference? The first two characters of "xxxxxxxx"? (See the 'GECK Form-ID, Base-ID, Ref-ID, and Editor-ID' section of the wiki "Getting started creating mods using GECK" article.) That is dependent upon which mods are loaded into game memory at the time. If you did not load your entire "load order" into FNVEdit when you determined the Base-ID (or changed the LO since then), then you did not get the correct "mod index" used at "run time". This is the most likely explanation for why your "player.addperk" command is failing. (It's a common problem for new mod creators.) Absolutely you need to remove the follower from the "Player" faction when they are "unhired"; just as you need to add them upon hiring. (The proper place would be in those specific "hired/released" scripts.) If it should happen to break your scripts, it will be because you are not testing the "hired"/follower/companion status correctly. Better to find out now. -Dubious- Edited May 23, 2020 by dubiousintent Link to comment Share on other sites More sharing options...
Drearsword Posted May 23, 2020 Author Share Posted May 23, 2020 (edited) Welp now I feel like a fool :tongue: I forgot to load the DLC when I checked the base ID. I tested it and it works via console now, however Im still having trouble with the script as it wont compile when I add player.addperk This is the current hieing script Set MikaelREF.Waiting to 0Set MikaelREF.IsFollowingDefault to 1Set MikaelREF.IsFollowingLong to 0Set MikaelREF.CombatStyleRanged to 1Set MikaelREF.CombatStyleMelee to 0Set MikaelREF.HasBeenHired to 1SetPlayerTeammate 1SetIgnoreFriendlyHits 1MikaelREF.evp It works without the addperk command, however wherever I add it seems to break it Edited May 23, 2020 by Drearsword Link to comment Share on other sites More sharing options...
dubiousintent Posted May 24, 2020 Share Posted May 24, 2020 (edited) This is one of those differences between the console and scripts that points up the "context" I was speaking about. Go look again at the "AddPerk" function; the example in particular. The "PerkID:ref" parameter can be either an Editor-ID or a "mod indexed" record reference (built at run-time). The console needs a "mod indexed" record reference (because it doesn't have access to the Editor-IDs) while the script (which doesn't know such record-IDs or the "load order" at compile time) needs the Editor-ID (e.g. "LittleSlugger" in the example). Edit: I am reminded that the "Form-ID" is actually the last 6 characters (minus the "mod index") of the record reference. However, without the "mod index" it is (at least theoretically) possible that the Form-ID might be duplicated between mods. Don't worry/"feel like a fool" about this. Such are the lessons that will stick with you. You learn much more from your mistakes than the things you get right the first time (often by accident). For one thing, they are more memorable. -Dubious- Edited May 24, 2020 by dubiousintent Link to comment Share on other sites More sharing options...
Drearsword Posted May 24, 2020 Author Share Posted May 24, 2020 (edited) Yeah I ended up fixing the aggro issue (Without ruining any of my other script thank jeebuz) And now Im confused with how to imput my Ids into the script, since when loaded by itself the Id is 0100BCAB, however when dlc is loaded it becomes 0A00BCAB which then doesnt compile because the geck cant load more than one master file. So how do I work around this? Thanks for the help by the by EDIT: Im so mad at myself, I finnally got it working and I dont even know what I did uggggggh Edited May 24, 2020 by Drearsword Link to comment Share on other sites More sharing options...
dubiousintent Posted May 24, 2020 Share Posted May 24, 2020 See my reply just before yours (which apparently you missed). Short answer: Editor-ID. -Dubious- Link to comment Share on other sites More sharing options...
Recommended Posts