Jump to content

(WIP) When Elvis met Johnny (feedback/help wanted)


bjornl

Recommended Posts

 

 

Another companion mod. This is to be my first public mod. I know companion mods are a dime a dozen and this won't compete with the elite companion mods; in part because it lacks pretty girls or handsome guys, but also some of the other companion creators are very gifted. I am not expecting lots of endorsements like Willow (or anything over a trivial fraction of that). I just hope that there are a few people interested in a couple of fun loving rascals to follow them around.

 

I decided to post this so I could get some feedback since I have several challenges left and I did a few non-standard things. What you see here is my idea. If it does or does not match your idea(s) please feel free to tell me. You do not have to be a modder (although comments from veteran modders are VERY welcome). I do not promise to implement any suggestion, but I promise to give equal weight to all comments and suggestions.

 

I have not done any modeling for them. Not because I can't model but because I don't like blender (prefer Lightwave & C4d).

When I started this I had very limited skills/knowledge with GECK, Niftools, etc so this has been a bit of a chore thus far. Not nearly as simple and easy as I thought.

 

If you have any ideas or any suggestions based on the below 'to-do' list, I'm all ears. I should warn you that I am Norwegian and so I am genetically quite stubborn. So don't be too cross if I don't immediately why your way is so much better. I prefer to bang my head in to the wall a while before I come around. :smile:

 

...... here's hoping I get some feedback which helps me move this along.

 

Requires current version of FNV as well as the old world blues DLC.

 

Done:
Basic functional creature NPCs with their own unique sub-race, working wheel, etc.
retexture (not replacers textures, but uniques)
Custom voice tools and method.
Personality
back story
approximately 600 lines of dialog (mostly nonsense and such to keep traveling with them fresh and interesting)
Nearly all of the basic scripting (excluding the quests)
Change from standard includes:
no nod to L38. No fire them to L38, no send them there, etc. not an oversight. I just think the focus on this place as a player home is overdone and boring. Instead I went with a movable 'home-marker'. Everything you normally would do with L38 you can do with this (including sending them to L38). How it works is you go where you want their home marker. Set it, and that is where they will go when you send them "home". If you want this to be L38, fine. Go to L38 and set it there.
Other 'new' things.
They will occasionally talk to each other. Thus far this is very limited as I am still working through it.
It will eventually be possible to position them some place and teleport back to them OR have them teleport to you. So place J at 'x' and E at 'y', teleport ot J and then summon E.
Upgrades (armor and weapon buff) with be able to be applied to either one.
A very high degree of programability to them. They are robots after all.
Unique personalities.... one is a hunter/killer the other a scout
Ability to see what current settings are before and after modifying them (not complete yet)
Custom voices / different for each so you can more clearly identify the speaker.
Work to be done:
Current dialogue menu (Top Level)
(greeting)
Hire/Fire
AI Programming
Inventory
Wait
Goodbye
Topic Title AI Programming (roughed in with sub-topics and choices, but not all are complete)
Personality
Aggression (4) (not related to passive/aggressive. Rename? suggestions?)
Bravery (5)
Maintenance Routines
Essential (2)
Healing (3)
perk effect (4)
Set HQ marker (2)
Show current settings
Combat Tactics (2)
Distance
Weapon type (Ranged v Melee)
self destruct
For now Personality & maintenance not implemented (everything lumped under AI programming) but it is a bit too long
test to see if moving top elements interferes with wheel input for some of those settings.
Add conditions for bots to auto adjust bravery/aggression. eg damage, KO'd, etc
perk effect (example)
P1 does waiting at home allow perk effect to work,
p2 waiting someplace else?,
p3 never use perk effect,
p4 always use perk effect (unless dead or fired)
build messages for each combination of the above so end user only gets 1 message
Method (due to lack of dynamic
if (1 && 2 && 3)
ShowMessage ()
set messageshown to 1
endif
if (messageshown != 1)
ShowMessage (Error settings not found, please report this as a bug)
endif
self destruct
Blow self up (detonate mini nuke)
script cleanup (wipe all trace of that bot)
disable bot or move it & home marker to custom cell. More or less set on the hidden cell method.
Add to Wait
Go home and wait
Guard this location
Talking to Elvis makes it possible to talk to Johnny.
Talking to Johnny makes it possible to hire Elvis.
Hiring Elvis makes it possible to Hire Johnny.
Add quest to find bots (NPC in Novac). If PC owns room, sent note to them via the store owner. In exchange for camping in the PC room, he offers a treasure map.
Keeping this quest simple
Build BSA for release (currently a bunch of loose files) mostly to aide install but also reduce disk fragmentation. patches then would only need to be a new esp.
test actor effect vs. NPC perks.
note that NPC seems to not get effects of actor effect.
NOTE:I would really appreciate any tips on this since I do not see the actor effect (armor buff) raising their DT.
Timer for random chatter (might or might not do this)
Learn how timers work and implement one for all random chatter.
consider increased interaction between J & E
consider reduced carry capacity when self-healing is enabled.
consider cheat settings to buff or nerf their combat effectiveness.
set conditions for some of their backstory to be revealed.
To do last since I have never made a quest before.
Quest to find object to upgrade armor. Can be used on either one.
Quest to find object to upgrade Weapon. Can be used on either one.
Quest to find object to allow remote summing. Can be used on either one.
Quest to find object to allow remote teleport to NPC. Can be used on either one.
Quest to complete original ELVIS task to hunt down and destroy rogue MT 'bot.
Link to comment
Share on other sites

I feel like I am going insane... and not in a happy, skipping through the tulips way.

 

I am having a dialogue issue which is driving me nuts. I heard once that the definition of insanity is to do the same thing and expect different results. Well what about when you do the same thing and you do get different results?

 

I have two NPCs in the same ESP. They have close to identical config scripts. (I'll post them at the bottom to avoid making this part too messy).

 

NPC1 after it is hired displays the following dialogue

GoodBye

Trade

Configuration

Talk

Wait

 

That is correct.

 

NPC2 displays

Trade

Tactics (not a top level topic)

Wait

Talk

Goodbye

 

Missing is Configuration (a top level topic) and instead there is Tactics. What is more the order/sequence on #2 is wrong. Absolutely everything is in the wrong position. but here is where I want to put dents in my monitor. If I run 'talk' (which for now is just a dummy topic) the re-loaded NPC2 dialog is correct both in which topics are displayed and which order they are in. But next time you talk it is the same as the first time (wrong).

 

Aaargh!

 

I have double and triple checked the script, variables, and so on. The topic choices are the same. The topic conditions are the same (except for which NPC is referenced).

 

Just in case it is a script goof, here are the scripts.

scn BL_ElvisScript

;_________________________________________________

; var declaration

short DoOnce
short InCombatStyleRanged
short InCombatStyleMelee
short IsFollowingDefault
short IsFollowingLong
short FollowerSwitchAggressive
short Waiting
short EverHired
short IsHired
short TalkCounter
short FavorLevel
short TacticsSet
short SelfHeal

;_________________________________________________

Begin GameMode
	If (DoOnce !=1)
		Set DoOnce to 1
		Set InCombatStyleRanged to 1
		Set InCombatStyleMelee to 0
		Set IsFollowingDefault to 0
		Set IsFollowingLong to 0
		Set FollowerSwitchAggressive to 0
		Set Waiting to 0
		Set EverHired to 0
		Set IsHired to 0
		Set TalkCounter to 0
		Set FavorLevel to 0
		Set TacticsSet to 0
		set SelfHeal to 1
	EndIf
End

;_________________________________________________

; end of combat auto-self-repair

begin OnCombatEND
	if ( GetPlayerTeammate == 1 && SelfHeal == 1 )
		resethealth
		restoreav perceptioncondition 100
		restoreav endurancecondition 100
		restoreav leftattackcondition 100
		restoreav leftmobilitycondition 100
		restoreav rightattackcondition 100
		restoreav rightmobilitycondition 100
	endif

end


;_________________________________________________

;For when Elvis is dead

begin OnDeath
	if ( IsHired == 1 )
		set IsHired to 0
		set Waiting to 0	
		set IsFollowingDefault to 0
		set IsFollowingLong to 0
		ShowMessage BLElvisDEAD
          player.removeperk BLBlitz
	endif
end

;_________________________________________________

scn BL_JohnnyScript

;_________________________________________________

; var declaration

short DoOnce
short InCombatStyleRanged
short InCombatStyleMelee
short IsFollowingDefault
short IsFollowingLong
short FollowerSwitchAggressive
short Waiting
short EverHired
short IsHired
short TalkCounter
short FavorLevel
short TacticsSet
short SelfHeal

;_________________________________________________

Begin GameMode
	If (DoOnce !=1)
		Set DoOnce to 1
		Set InCombatStyleRanged to 1
		Set InCombatStyleMelee to 0
		Set IsFollowingDefault to 0
		Set IsFollowingLong to 0
		Set FollowerSwitchAggressive to 0
		Set Waiting to 0
		Set EverHired to 0
		Set IsHired to 0
		Set TalkCounter to 0
		Set FavorLevel to 0
		Set TacticsSet to 0
		set SelfHeal to 1
	EndIf
End

;_________________________________________________

; end of combat auto-self-repair

begin OnCombatEND
	if ( GetPlayerTeammate == 1 && SelfHeal == 1 )
		resethealth
		restoreav perceptioncondition 100
		restoreav endurancecondition 100
		restoreav leftattackcondition 100
		restoreav leftmobilitycondition 100
		restoreav rightattackcondition 100
		restoreav rightmobilitycondition 100
	endif

end


;_________________________________________________

;For when Johnny is dead

begin OnDeath
	if ( IsHired == 1 )
		set IsHired to 0
		set Waiting to 0	
		set IsFollowingDefault to 0
		set IsFollowingLong to 0
		ShowMessage BLJohnnyDEAD
          player.removeperk BLScout
	endif
end

;_________________________________________________
ShowMessage BLJohnnyHIRED
Set BLJohnnyREF.Waiting to 0
Set BLJohnnyREF.IsHired to 1
Set BLJohnnyREF.EverHired to 1
Set BLJohnnyREF.IsFollowingDefault to 1
Set BLJohnnyREF.IsFollowingLong to 0
Set BLJohnnyREF.InCombatStyleRanged to 1
Set BLJohnnyREF.InCombatStyleMelee to 0
BLJohnnyREF.AddToFaction PlayerFaction 1
BLJohnnyREF.AddToFaction FollowerFaction 1
BLJohnnyREF.SetPlayerTeammate 1
BLJohnnyREF.SetIgnoreFriendlyHits 1
BLJohnnyREF.SetFactionRank TeammateFaction 1
Player.AddPerk BLScout


ShowMessage BLElvisHIRED
Set BLElvisREF.Waiting to 0
Set BLElvisREF.IsHired to 1
Set BLElvisREF.EverHired to 1
Set BLElvisREF.IsFollowingDefault to 1
Set BLElvisREF.IsFollowingLong to 0
Set BLElvisREF.InCombatStyleRanged to 1
Set BLElvisREF.InCombatStyleMelee to 0
BLElvisREF.AddToFaction PlayerFaction 1
BLElvisREF.AddToFaction FollowerFaction 1
BLElvisREF.SetPlayerTeammate 1
BLElvisREF.SetIgnoreFriendlyHits 1
BLElvisREF.SetFactionRank TeammateFaction 1
Player.AddPerk BLBlitz

Link to comment
Share on other sites

K, never mind.

 

Like most stupid problems there is a stupid answer. In going over the greetings conditions I found that several of the random greetings from NPC2 had some choices in the topics which it used rather then using the top level. No I don't remember doing that. But unless there are gremlins sneaking in to screw with me while I am away I'm gonna have to say "operator error".

 

So back to fiddling with stuff. Sure wish there were an actual editor like in most development environments... would be so cool to have a Visual Studio plugin instead of the GECK.

Link to comment
Share on other sites

As long as I am posting drivel that no one seems interested in reading, I'll add another which has stumped me.

 

In GECK on the NPC AI DATA tab there are a number of settings I would like to fiddle with. Most importantly would be aggression.

But my preliminary findings are that I can not adjust aggression. This is very disappointing.

 

I first checked Lily because she has this frenzy mode based on her medicine intake. I reasoned that the simplest way to implement this would be to have a timer which changed her aggression from unaggressive/aggressive to frenzied and then return to default once the timer expired. But instead they implemented a new unique state with a new variable. But this does not rule out the possibility of it being scriptable since in Fallout 3 there was a mesmotron which had a 30% chance to send anyone in to a frenzy.

 

I checked the available variables for get/setav on the wiki from here:

http://fallout.wikia.com/wiki/Gamebryo_console_commands

any skill (without space) 
any s.p.e.c.i.a.l attribute 
actionpoints 
carryweight 
inventoryweight 
Karma 
health 
healrate 
xp 
radresist 
damageresist 
damageThreshold 
fireresist 
poisonresist 
speedmult (percentage) 
ignorecrippledlimbs 
chameleon 
aggression 
meleedamage 
unarmeddamage 
critchance 
dehydration 
hunger 
sleepdeprevation

But I found one they left out (assistance). If they left out one, they may have left out others. Does anyone have any insight on how to change this behavior setting? (aggression on AI data).

Nice to know I can change assistance... maybe tie to to favor level or something....

 

 

Link to comment
Share on other sites

aggression

 

 

in your scripting you should be able to set the function

 

0 beuing unagressive

1 being aggressive

2 being frenzied

 

activate a switch when the target NPC reaches specified health?

 

NPCref.aggression to 1

NPCref.aggression to 2

NPCref.aggression to 0

 

i could be wrong on that though :X Figured id attempt to help.

Edited by scarface7454
Link to comment
Share on other sites

 

As long as I am posting drivel that no one seems interested in reading, I'll add another which has stumped me.

 

In GECK on the NPC AI DATA tab there are a number of settings I would like to fiddle with. Most importantly would be aggression.

But my preliminary findings are that I can not adjust aggression. This is very disappointing.

 

I first checked Lily because she has this frenzy mode based on her medicine intake. I reasoned that the simplest way to implement this would be to have a timer which changed her aggression from unaggressive/aggressive to frenzied and then return to default once the timer expired. But instead they implemented a new unique state with a new variable. But this does not rule out the possibility of it being scriptable since in Fallout 3 there was a mesmotron which had a 30% chance to send anyone in to a frenzy.

 

I checked the available variables for get/setav on the wiki from here:

http://fallout.wikia.com/wiki/Gamebryo_console_commands

 

But I found one they left out (assistance). If they left out one, they may have left out others. Does anyone have any insight on how to change this behavior setting? (aggression on AI data).

Nice to know I can change assistance... maybe tie to to favor level or something....

 

Yes, you can adjust Aggression and Confidence too. For your own NPC you can use SetAV.

 

Here are the value ranges from the wiki for Aggression, Assistance and Confidence.

 

I suggest you go do some tests to see what results you find worth pursuing (set their values in the console and see what they do).

Link to comment
Share on other sites

aggression

 

 

in your scripting you should be able to set the function

 

0 beuing unagressive

1 being aggressive

2 being frenzied

 

activate a switch when the target NPC reaches specified health?

 

NPCref.aggression to 1

NPCref.aggression to 2

NPCref.aggression to 0

 

i could be wrong on that though :X Figured id attempt to help.

Thanks alot. I appreciate the input. I think the AI data "aggression" must be referenced via a different variable.

 

I just tried several values and the setav aggression seems to be something else from the data AI aggression.

 

SetAV can be set from 0 to 3 but only 0 and 1 have any effect (aggressive or passive). SetAV aggression 3 does set the aggression but their behavior does not change.

Data AI also has 4 values (unaggressive, aggressive, very aggressive, frenzied). All 4 values change the NPC behavior.

Link to comment
Share on other sites

 

 

As long as I am posting drivel that no one seems interested in reading, I'll add another which has stumped me.

 

In GECK on the NPC AI DATA tab there are a number of settings I would like to fiddle with. Most importantly would be aggression.

But my preliminary findings are that I can not adjust aggression. This is very disappointing.

 

I first checked Lily because she has this frenzy mode based on her medicine intake. I reasoned that the simplest way to implement this would be to have a timer which changed her aggression from unaggressive/aggressive to frenzied and then return to default once the timer expired. But instead they implemented a new unique state with a new variable. But this does not rule out the possibility of it being scriptable since in Fallout 3 there was a mesmotron which had a 30% chance to send anyone in to a frenzy.

 

I checked the available variables for get/setav on the wiki from here:

http://fallout.wikia.com/wiki/Gamebryo_console_commands

 

But I found one they left out (assistance). If they left out one, they may have left out others. Does anyone have any insight on how to change this behavior setting? (aggression on AI data).

Nice to know I can change assistance... maybe tie to to favor level or something....

 

Yes, you can adjust Aggression and Confidence too. For your own NPC you can use SetAV.

 

Here are the value ranges from the wiki for Aggression, Assistance and Confidence.

 

I suggest you go do some tests to see what results you find worth pursuing (set their values in the console and see what they do).

 

Thank you for the info and the link. I had not seen that page (bookmarked now).

 

I found something amusing. I was doing it all along. The problem was this:

BLElvisREF.AddToFaction PlayerFaction 1
BLElvisREF.AddToFaction FollowerFaction 1
BLElvisREF.SetPlayerTeammate 1
BLElvisREF.SetIgnoreFriendlyHits 1
BLElvisREF.SetFactionRank TeammateFaction 1

something about the above is different from other very aggressive and frenzied NPCs I tested on. Because I changed Elvis to frenzied in GECK, used the console to stop the combat, added him as a follower and unlike my test case he was nice and polite to everyone. Hostiles where attacked (follows them until they are dead) but neutrals were ignored.

 

I appreciate yours and Scarface7454's input. You were both right. I had a flawed test methodology.

 

What is strange to know is that I can set an NPC to frenzied and it has no effect until the NPC is fired. Raises some amusing possibilities(what you dare to fire me??) but it seems I can't do what I was thinking about. A robot which accepts you as 'root' but has elected to follow the final solution (kill everything that is not the controller). Ah well.

 

Thanks again both of you.

 

 

Link to comment
Share on other sites

Timer question. I need a timer to run in an end of conversation script.

 

I used this example:

http://geck.bethsoft.com/index.php?title=GetSecondsPassed

float timer
begin gamemode
   if timer < 5
      set timer to timer + GetSecondsPassed
   else
      ;5 seconds have passed, do something special
      set timer to 0
   endif
end

I created a custom item to act as a trigger (OnAdd), a object script, and add the trigger item to the NPC inventory in the result script. This only partially works.

The item is added.

The script is triggered.

But the timer fails.

scn BLBoomScript
float timer
begin onadd
      PlaySound blboom
      if timer < 19
            set timer to timer + GetSecondsPassed
      else
            BLElvisREF.placeatme FatManNukeExplosion 1
	    PlaySound WPNEuclidFireImpact
            set timer to 0
      endif
end

The first sound plays, the 2nd (which is there as a test) does not because the timer does not work.

 

According to http://www.cipscis.com/fallout/utilities/validator.aspx getseconds past should not be used in this sort of Begin since this type of script does not run continuously. But I only want this to run when the item is equipped (or alternately only run in the results script in the dialogue). All I am trying to do is add a delay between when the script starts and when it completes. I would like it to run between 19 and 19.5 seconds.

 

Any ideas?

Link to comment
Share on other sites

So I tried the obvious. I changed the begin block a GameMode. This fixed the GetSecondsPassed but broke everything else.

The sound file was garbled. The script detonated as it should and then in 19 seconds it did it again, and so on..

Since this is an object script, I tried to remove the trigger object (BLElvisRef.removeitem ElvisTrigger 1) and that results in a CTD.

Similarly disabling BLElvisRef also results in a CTD.

 

What I am trying to do seems very simple.

saying something in a results script

wait until that sound file is complete

do something

disable the NPC (or move them to a hidden cell if disabling is a problem)

 

I assumed the items in the results script ran consecutively. It seems they run concurrently. Which lead me to look for a pause (to allow the audio file to complete).

 

Putting the sound as the reply spoken by the robot does not work. You will not be able to flee while listening to the count down.

 

sigh.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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