Page 1 of 1

create npc at _place_

Posted: Thu Sep 12, 2019 4:38 pm
by Yagiza
Do anyone know, what this command should do and what it does in DFU?

Re: create npc at _place_

Posted: Thu Sep 12, 2019 5:00 pm
by Jay_H
It's superfluous. NPCs are created automatically at quest startup and placed at their spawnpoint, which is related to their NPC type.

Interkarma gave his knowledge and reasoning here: https://github.com/Interkarma/daggerfal ... cAt.cs#L21

Re: create npc at _place_

Posted: Thu Sep 12, 2019 5:06 pm
by Yagiza
Jay_H wrote: Thu Sep 12, 2019 5:00 pm Interkarma gave his knowledge and reasoning here: https://github.com/Interkarma/daggerfal ... cAt.cs#L21
So, you may say in DFU this command does nothing. 'Cause even if I won't use it, SiteLink will be created automatically, once I decide to place something somewhere, right?

Re: create npc at _place_

Posted: Thu Sep 12, 2019 7:42 pm
by Jay_H
Yep, just by defining an NPC it's created and placed. Using "place npc at" then moves it to a new place. Either way, the NPC will always exist in some form.

Re: create npc at _place_

Posted: Thu Sep 19, 2019 6:17 pm
by JorisVanEijden
Actually, this is not entirely true.

Npc's are automatically created at quest startup, and a home is created for them.
However, they are not placed there until create npc or place npc at is used.

Code: Select all

Quest: _T4
QRC:

QBN:
Person _target_ group Local_4.0
In this quest the npc _target_ will be nowhere. Other people in the world will also not know them.

Code: Select all

Quest: _T5
QRC:

QBN:
Person _target_ group Local_4.0
    create npc _target_
The npc can now be found at the auto-assigned location, and other people will be able to direct you to them.

Re: create npc at _place_

Posted: Thu Sep 19, 2019 6:31 pm
by Jay_H
Really? Even in DFU? Wow :geek:

I get the feeling I should leave these questions to the real experts :lol: Thanks for the correction Joris.

Re: create npc at _place_

Posted: Thu Sep 19, 2019 7:25 pm
by JorisVanEijden
Hell, I'm no expert. You've been doing this a lot longer than I have.
I just ran into this quirk when trying to recreate a person residence confusion bug.

Re: create npc at _place_

Posted: Fri Sep 20, 2019 7:52 pm
by Yagiza
Jay_H wrote: Thu Sep 19, 2019 6:31 pm Really? Even in DFU? Wow :geek:

I get the feeling I should leave these questions to the real experts :lol: Thanks for the correction Joris.
Yes, it is. But the problem is that you will not be able to reference its location. For example, you'll never put an item or place a foe in the location, where NPC is. Also, you'll be unable to do something, when PC enters the location or drops something there.
That's a great flaw of X-engine and maybe will be solved some day in DFU.

Re: create npc at _place_

Posted: Fri Sep 20, 2019 8:00 pm
by JorisVanEijden
DFU creates a symbol for the location too.
I have not tested it yet but you should be able to reference the home location of a "_target_" npc by using "_target_home_" iirc.

I'm not at my pc now so you'll have to get that yourself.

Re: create npc at _place_

Posted: Fri Sep 20, 2019 8:59 pm
by Yagiza
JorisVanEijden wrote: Fri Sep 20, 2019 8:00 pm DFU creates a symbol for the location too.
I have not tested it yet but you should be able to reference the home location of a "_target_" npc by using "_target_home_" iirc.

I'm not at my pc now so you'll have to get that yourself.
Thank, you! I'll try.
But I think using extra underscore for that __target (as in QRC block) would be a better idea.