Will this affect players?

lightwriter
I edited a default library (CoreTypes) to make it so anytime I create an object certain variables are assigned like price (I'm also using Pixie's Shop Library)
Anyhow, I know Pixie's will come with the game but what about the library I edited myself, will it matter if the attribute is a defaultobject type in my game due to me editing a default library.
If this is gonna be an issue, is there a conventient way for me to make it so anytime I create an object that is an object to have a variable. Just so it saves time and I don't accidentally forget.

The Pixie
How did you edit the library? Did you open the CoreTypes library in c:\program files (x86)\quest 5 or whatever and edit that? If so, you are in trouble.

If you did it the proper way, which is to make an editable copy through Quest itself, then you are fine. The replacement code will be part of your game. You can confirm that by going to Tools - Code View, then Edit - Find, and typing in some unique code or variable name, and searching for it. If it is there, then it is part of your game.

lightwriter
I edited it with notepad++

The Pixie
What is the full name of the file, including the path?

HegemonKhan
There's 'Object Types', which hold Attributes and other Object Types:

http://docs.textadventures.co.uk/quest/ ... /type.html
http://docs.textadventures.co.uk/quest/ ... types.html
http://docs.textadventures.co.uk/quest/ ... types.html
http://docs.textadventures.co.uk/quest/types.html

example:

<object name="orc_1">
<alias>orc</alias>
<attr name="strength" type="int">25</attr>
<attr name="endurance" type="int">25</attr>
<attr name="dexterity" type="int">25</attr>
<attr name="agility" type="int">25</attr>
<attr name="speed" type="int">25</attr>
<attr name="luck" type="int">25</attr>
<fight type="script">
// blah scripts
</fight>
<attr name="dead" type="boolean">false</attr>
</object>

<object name="orc_2">
<alias>orc</alias>
<attr name="strength" type="int">25</attr>
<attr name="endurance" type="int">25</attr>
<attr name="dexterity" type="int">25</attr>
<attr name="agility" type="int">25</attr>
<attr name="speed" type="int">25</attr>
<attr name="luck" type="int">25</attr>
<fight type="script">
// blah scripts
</fight>
<attr name="dead" type="boolean">false</attr>
</object>


VS

<object name="orc_1">
<inherit name="orc_object_type" />
</object>

<object name="orc_2">
<inherit name="orc_object_type" />
</object>

<type name="orc_object_type">
<alias>orc</alias>
<attr name="strength" type="int">25</attr>
<attr name="endurance" type="int">25</attr>
<attr name="dexterity" type="int">25</attr>
<attr name="agility" type="int">25</attr>
<attr name="speed" type="int">25</attr>
<attr name="luck" type="int">25</attr>
<fight type="script">
// blah scripts
</fight>
<attr name="dead" type="boolean">false</attr>
</type>


example 2:

<object name="sword">
<inherit name="equipment_object_type" />
<inherit name="weapon_object_type" />
<attr name="price" type="int">100</attr>
<attr name="weight" type="int">10</attr>
<attr name="physical_damage" type="int">50</attr>
<attr name="attack_rating" type="int">50</attr>
<object>

<object name="shield">
<inherit name="equipment_object_type" />
<inherit name="armor_object_type" />
<attr name="price" type="int">100</attr>
<attr name="weight" type="int">10</attr>
<attr name="physical_resistance" type="int">50</attr>
<attr name="armor_class" type="int">50</attr>
<object>

<type name="equipment_object_type">
<attr name="price" type="int">0</attr>
<attr name="equipable" type="boolean">true</attr>
<attr name="unequipable" type="boolean">true</attr>
<attr name="durability" type="int">100>/attr>
<attr name="weight" type="int">0</attr>
</type>

<type name="weapon_object_type">
<attr name="physical_damage" type="int">0</attr>
<attr name="fire_damage" type="int">0</attr>
<attr name="water_damage" type="int">0</attr>
<attr name="air_damage" type="int">0</attr>
<attr name="earth_damage" type="int">0</attr>
<attr name="attack_rating" type="int">0</attr>
</type>

<type name="armor_object_type">
<attr name="physical_resistance" type="int">0</attr>
<attr name="fire_resistance" type="int">0</attr>
<attr name="water_resistance" type="int">0</attr>
<attr name="air_resistance" type="int">0</attr>
<attr name="earth_resistance" type="int">0</attr>
<attr name="armor_class" type="int">0</attr>
</type>

jaynabonne
If you want to add new fields to *all* objects, you can edit the "defaultobject" type. (This is mentioned in the last link HK posted above.) But you need to do it properly (as The Pixie was saying), not by editing the core files. Otherwise, your changes will appear in all Quest games you make in the future.

To copy "defaultobject" into your game, do this:
1) Click on "Filter" in the bottom left of the Quest editor window. Click on "Show Library Elements". This will make all the internal Quest stuff show up.
2) At the very bottom of the list in the side panel now, open "Advanced" and search downward for "Object Types"
3) Under "Object Types" (open it if it's not open), find "defaultobject".
4) Click on "defaultobject" and then click the Copy button in the top right of the screen.

The defaultobject type is now in your game, and you can edit it either with the Quest editor (add attributes, etc) or manually, if you're comfortable with that. Any attributes you add to this type will exist in all objects, and with whatever default value you give it. Even the player and rooms will have any added fields.

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

Support

Forums