create npc at _place_

For all talk about quest development - creation, testing, and quest system.
Post Reply
User avatar
Yagiza
Posts: 120
Joined: Wed Jul 31, 2019 5:16 pm

create npc at _place_

Post by Yagiza »

Do anyone know, what this command should do and what it does in DFU?

User avatar
Jay_H
Posts: 4061
Joined: Tue Aug 25, 2015 1:54 am
Contact:

Re: create npc at _place_

Post 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

User avatar
Yagiza
Posts: 120
Joined: Wed Jul 31, 2019 5:16 pm

Re: create npc at _place_

Post 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?

User avatar
Jay_H
Posts: 4061
Joined: Tue Aug 25, 2015 1:54 am
Contact:

Re: create npc at _place_

Post 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.

User avatar
JorisVanEijden
Posts: 114
Joined: Mon Aug 12, 2019 5:02 pm

Re: create npc at _place_

Post 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.

User avatar
Jay_H
Posts: 4061
Joined: Tue Aug 25, 2015 1:54 am
Contact:

Re: create npc at _place_

Post 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.

User avatar
JorisVanEijden
Posts: 114
Joined: Mon Aug 12, 2019 5:02 pm

Re: create npc at _place_

Post 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.

User avatar
Yagiza
Posts: 120
Joined: Wed Jul 31, 2019 5:16 pm

Re: create npc at _place_

Post 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.

User avatar
JorisVanEijden
Posts: 114
Joined: Mon Aug 12, 2019 5:02 pm

Re: create npc at _place_

Post 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.

User avatar
Yagiza
Posts: 120
Joined: Wed Jul 31, 2019 5:16 pm

Re: create npc at _place_

Post 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.

Post Reply