Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

Why are NPCs so awkward!?


Mysterious Mr. Bear
 Share

Recommended Posts

Ok, so I created two characters that inhabit a one-room shop. They eat together at six, then again at 8. During the day, the man runs the store, standing behind the desk from 8am to 8pm whilst the woman does various tasks like reading or bow training. However, from 12am to 4pm, she has the package to wander around near the male, intending to get the two characters to talk quite frequently.

They just DO NOT TALK!!!! :P Eating in the morning and night, no words! Wandering around for four hours, she spoke to him once! I have added them to a faction with a 100 disposition bonus, put them in similar factions so they have convosations to have, turned invisible so I don't distract them.... I tried swapping her wander package to a find package with him as the target, which of course led to one breif convosation followed by an hour of her staring at his head grinning.

This is a bit weird to watch as the characters are man and wife... it's like being cought in some kind of medivial domestic! Any ideas on getting them to interact more often? Thanks,

Mysterious Mr. Bear :D :D

Link to comment
Share on other sites

Have you tried making them both having a Wander package at the same time? And setting their Energy Level to 100 (what technically should cause them to wander around endlessly during these packages like having ants in the pants, increasing the probability of triggering a chat between them)?

If yes, then I can suggest only a scripted solution, like this:


scn nameofyourscript


short randomchance

float randomtimer


Begin GameMode


if ( getinsamecell player == 0 )

return

endif


if ( getcurrentpackage NameOfWanderPackage == 1 )

if ( randomtimer > 0 )

set randomtimer to ( randomtimer - getsecondspassed )

else

set randomtimer to 5

set randomchance to getrandompercent

if ( randomchance < 20 )

startconversation NameOfSecondNPC

set randomtimer to 60

endif

endif


End

If you will attach this script to the woman (after adding necessary REFs, of course), then there should be a 20% chance of starting a conversation with the man each 5 seconds. If they will start a conversation, then there will be a minute of recovery time before another possible conversation can be started (counting from the moment of forcing the woman to start the conversation). You can tweak this, if you like.

Link to comment
Share on other sites

Hi zu, I adapted your script for use with my characters, and indeed after 5 seconds she goes and seeks him out and talks to him... but after that, nothing :/

Here is my adaptation of your script I have been using whilst testing (where one is called Catface and the other is called Bear) any ideas why this is happening? she still seems to be following the wander package ("AAMBtalktobear") but will not engage in convosation after the first time.

Thanks,

Mysterious Mr. Bear :D :D

Link to comment
Share on other sites

Proper use of 'tabs' helps ensure you have the proper number of If to EndIf commands. :)

if ( getinsamecell player == 0 ) 
return
endif

if ( getcurrentpackage NameOfWanderPackage == 1 )
if ( randomtimer > 0 )
set randomtimer to ( randomtimer - getsecondspassed )
else
set randomtimer to 5
set randomchance to getrandompercent
if ( randomchance < 20 )
startconversation NameOfSecondNPC
set randomtimer to 60
endif
endif
???[/code]

Link to comment
Share on other sites

oops, did I forget to post my code then?? :bagged: Good god....

SCN AAMBcatfaceSCRIPT


short randomchance

float randomtimer


Begin GameMode


if ( getinsamecell player == 0 )

return

endif


if ( getcurrentpackage AAMBtalktoBear == 1 )

	if ( randomtimer > 0 )

	set randomtimer to ( randomtimer - getsecondspassed )

	else

	set randomtimer to 5

	set randomchance to getrandompercent

		if ( randomchance < 101 )

		startconversation AAMBBearref

		set randomtimer to 30

		endif

	endif

endif


End

And yeah, I allready fixed the ifs/endifs mismatch before testing.. it's actually pretty hard not to! :P :P

Any ideas why this script is broke then? a reminder of the symptoms: Within 1 game hour watching AI behaviour, the two people only talked ONCE, and that was after 5 seconds of the game loading. After that, nothing, despite the script being addapted to testing.

Thanks guys, appreciate the help so far

Mysterious Mr. Bear :D :D

Link to comment
Share on other sites

if ( randomchance < 101 )

The only valid numbers for a getrandompercent command are 0-99. "Randomchance < 20" means 20% percent. I have no idea what "< 101" means, but that certainly isn't correct. :D If you want 100% percent, then you just need to remove a few lines:

if ( getcurrentpackage AAMBtalktoBear == 1 )

        if ( randomtimer > 0 )

        set randomtimer to ( randomtimer - getsecondspassed )

        else

        startconversation AAMBBearref

        set randomtimer to 30

        endif

endif

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...