Jump to content

Photo

Help needed for custom follower


  • Please log in to reply
10 replies to this topic

#1
Drearsword

Drearsword

    Stranger

  • Members
  • Pip
  • 8 posts

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 by Drearsword, 24 May 2020 - 02:39 PM.


#2
madmongo

madmongo

    Faithful poster

  • Members
  • PipPipPipPip
  • 1,089 posts

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.



#3
Drearsword

Drearsword

    Stranger

  • Members
  • Pip
  • 8 posts

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 by Drearsword, 22 May 2020 - 07:33 AM.


#4
dubiousintent

dubiousintent

    Resident poster

  • Premium Member
  • 7,881 posts

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-



#5
Drearsword

Drearsword

    Stranger

  • Members
  • Pip
  • 8 posts

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.



#6
dubiousintent

dubiousintent

    Resident poster

  • Premium Member
  • 7,881 posts

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 by dubiousintent, 23 May 2020 - 12:41 PM.


#7
Drearsword

Drearsword

    Stranger

  • Members
  • Pip
  • 8 posts

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 0
Set MikaelREF.IsFollowingDefault to 1
Set MikaelREF.IsFollowingLong to 0
Set MikaelREF.CombatStyleRanged to 1
Set MikaelREF.CombatStyleMelee to 0
Set MikaelREF.HasBeenHired to 1
SetPlayerTeammate 1
SetIgnoreFriendlyHits 1
MikaelREF.evp
 
It works without the addperk command, however wherever I add it seems to break it

Edited by Drearsword, 23 May 2020 - 09:39 PM.


#8
dubiousintent

dubiousintent

    Resident poster

  • Premium Member
  • 7,881 posts

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 by dubiousintent, 24 May 2020 - 01:19 PM.


#9
Drearsword

Drearsword

    Stranger

  • Members
  • Pip
  • 8 posts

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 by Drearsword, 24 May 2020 - 01:47 PM.


#10
dubiousintent

dubiousintent

    Resident poster

  • Premium Member
  • 7,881 posts

See my reply just before yours (which apparently you missed).  Short answer: Editor-ID.

 

-Dubious-






Page loaded in: 0.953 seconds