Question about Types

So, I have a concept in mind... kinda.
Also not sure how to articulate it.

Is it possible to make layers of types to override specific attributes?

An example and the reason why I am asking:
I have NPCs in my project. They are hostile, neutral, or allied.
At the moment all of them have a type called 'npc_type'.
Can I create a type like let's say 'npc_hostile_type' with some specific attributes which will override some of the 'npc_type' attributes?


Yes. You would just make npc_hostile_type inherit npc_type; in the same way you would make an object inherit it directly.


Oh, I see... I didn't recognize this section on the type object.


Dammit, I fucked it up somehow.
Earlier this day I created a 'npc_hostile_type' but got an emergency call. I closed Quest without saving just after naming the type. The new type isn't there like expected but when I try to create a new 'npc_hostle_type' I get an error saying, this type already exists. But it's nowhere in the GUI. Then I opened the code view and searched for the type but without any result. Where does Quest store the information about the type?


I opened the Core Types.aslx file
and found my previously created but unsaved type. Is it safe to delete it here? I never opened any of the core files before.


  <type name="npc_hostile_type">
    <displayverbs type="simplestringlist">[LookAt];[SpeakTo]</displayverbs>
    <not_all type="boolean">true</not_all>
  </type>

  <type name="plural_npc_hostile_type">
    <inherit name="npc_hostile_type" />
    <displayverbs type="simplestringlist">[LookAt];[SpeakTo]</displayverbs>
  </type>

I also haven't created the 'plural_npc_hostile_type'. I get that Quest did this automatically but I'm what happened here.


Oh, I'm getting really confused.
I find in this file many snippets of <inherit name="npc_type" />
which I never applied ... What going on in Quest's background by creating new types?


It looks like the built-in types npc_type and plural_npc_type have somehow been renamed to npc_hostile_type and plural_npc_hostile_type.

Check if npc_type is still in that file. If not, I'd recommend renaming it back.

Your hostile type, in your own game file, should look something like:

<type name="npc_hostile_type">
  <inherit name="npc_type" />
</type>

Plus all the attributes which are different from the base npc_type.


'npc_type' is a default type?!


Your hostile type, in your own game file, should look something like:

<type name="npc_hostile_type">
  <inherit name="npc_type" />
</type>

Plus all the attributes which are different from the base npc_type.

Yeah, I never came that far to let the 'npc_hostile_type' inherit the 'npc_type'.


But shouldn't it be:

<type name="npc_type">
  <inherit name="npc_hostile_type" />
</type>

?


Check if npc_type is still in that file. If not, I'd recommend renaming it back.

Nope, all created 'npc_types' are still there along with fresh unsaved 'npc_hostile_types'.

I am just curious why there are also many snippets of <inherit name="npc_type" /> which I never applied actively.

And also, can I delete the 'npc_hostile_type' from the ''Core Tyes.aslx'' file(without breaking my project)? Because this type isn't shown in the GUI and I can't create them again because Quest says, it already exists.


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums