I can't quite seem to get ahold of how to change the robe model of the currently equiped armor from a conversation. I would like to make an option for both previous, and next robe model. Help? Thanks.
Changing Robes
Débuté par
WhenTheNightComes
, juin 07 2013 07:19
#1
Posté 07 juin 2013 - 07:19
#2
Posté 07 juin 2013 - 10:21
CopyItemAndModify(oArmor,
ITEM_APPR_TYPE_ARMOR_MODEL,
ITEM_APPR_ARMOR_MODEL_ROBE,
nRobeType, TRUE);
BioWare uses the following values in its craft armor dialogue:
0: no robe
3: casual robe
4: formal robe
5: sleeveless wizard's robe
6: wizard's robe
EDIT: To get what the current robe model is use GetItemAppearance().
ITEM_APPR_TYPE_ARMOR_MODEL,
ITEM_APPR_ARMOR_MODEL_ROBE,
nRobeType, TRUE);
BioWare uses the following values in its craft armor dialogue:
0: no robe
3: casual robe
4: formal robe
5: sleeveless wizard's robe
6: wizard's robe
EDIT: To get what the current robe model is use GetItemAppearance().
Modifié par WhiZard, 07 juin 2013 - 10:39 .
#3
Posté 08 juin 2013 - 12:37
This is what I have so far..
void main()
{
object oPC = GetPCSpeaker();
object oArmor = GetItemInSlot(INVENTORY_SLOT_CHEST,oPC);
int nRobeType = GetItemAppearance(oArmor,ITEM_APPR_TYPE_ARMOR_MODEL,ITEM_APPR_ARMOR_MODEL_ROBE);
CopyItemAndModify(oArmor,ITEM_APPR_TYPE_ARMOR_MODEL,ITEM_APPR_ARMOR_MODEL_ROBE,nRobeType + 1, TRUE);
}
Doesn't seem to work! Tips?
void main()
{
object oPC = GetPCSpeaker();
object oArmor = GetItemInSlot(INVENTORY_SLOT_CHEST,oPC);
int nRobeType = GetItemAppearance(oArmor,ITEM_APPR_TYPE_ARMOR_MODEL,ITEM_APPR_ARMOR_MODEL_ROBE);
CopyItemAndModify(oArmor,ITEM_APPR_TYPE_ARMOR_MODEL,ITEM_APPR_ARMOR_MODEL_ROBE,nRobeType + 1, TRUE);
}
Doesn't seem to work! Tips?
#4
Posté 08 juin 2013 - 02:44
Robe types 1 and 2 are undefined (have the same appearance as the no robe appearance) so going from 0 up would take multiple iterations. Here's a quick change that will keep your return within the proper bounds.
void main()
{
object oPC = GetPCSpeaker();
object oArmor = GetItemInSlot(INVENTORY_SLOT_CHEST,oPC);
int nRobeType = GetItemAppearance(oArmor,ITEM_APPR_TYPE_ARMOR_MODEL,ITEM_APPR_ARMOR_MODEL_ROBE);
nRobeType++;
if(nRobeType < 4) nRobeType = 3;
if(nRobeType > 6) nRobeType = 0;
CopyItemAndModify(oArmor,ITEM_APPR_TYPE_ARMOR_MODEL,ITEM_APPR_ARMOR_MODEL_ROBE,nRobeType, TRUE);
}
void main()
{
object oPC = GetPCSpeaker();
object oArmor = GetItemInSlot(INVENTORY_SLOT_CHEST,oPC);
int nRobeType = GetItemAppearance(oArmor,ITEM_APPR_TYPE_ARMOR_MODEL,ITEM_APPR_ARMOR_MODEL_ROBE);
nRobeType++;
if(nRobeType < 4) nRobeType = 3;
if(nRobeType > 6) nRobeType = 0;
CopyItemAndModify(oArmor,ITEM_APPR_TYPE_ARMOR_MODEL,ITEM_APPR_ARMOR_MODEL_ROBE,nRobeType, TRUE);
}
Modifié par WhiZard, 08 juin 2013 - 02:45 .
#5
Posté 09 juin 2013 - 05:47
An additional way in which the issue might not be seen as working is if you are expecting the equipped item to change appearance itself. It is the copy that has the appearance change and the original item is best destroyed; allowing you to equip the replacement.
#6
Posté 10 juin 2013 - 03:24
A few years ago I put together a robe swapping conversation and set of scripts that does much more than you are asking for. I uploaded an erf of the conversation and scripts here:
http://social.biowar...t_file_id=14508
These files (in an ERF) are not set up for a novice. A skille scripter however could make good use of them.
What they do:
- in order to wear a particular robe or coat a PC must have them in their inventory
- when putting on a robe or coat, the underlying armor, if it uses a robe model (such as the DLA elven chain armor or many of the Project Q armors) for its appearance, will not be damaged. It saves the robe model for the underlying armor so that it can be restored when the player removes their coat/robe again.
- the coat when worn retains its own color, and displays properly. the armor underneath retains its color. if dye is applied while the coat is worn, it is applied properly. (Each robe gets its own mask values that a builder/scripter will have to define, and this mask determines how colors are applied and presented)
That is generally all the system does. I did have a few extra things in there, and more planned such as the ability to separate armors into pieces so that players could mix and match chain shirts with leather or padding etc... but never finished that code as it gets complicated with armors that have special properties/magical abilities.
Anyway, the upload/erf I have linked for you is for advanced users. Someday I may organize it to be an easy to implement system. At present however there is some assembly required. All are free to make use of it.
http://social.biowar...t_file_id=14508
These files (in an ERF) are not set up for a novice. A skille scripter however could make good use of them.
What they do:
- in order to wear a particular robe or coat a PC must have them in their inventory
- when putting on a robe or coat, the underlying armor, if it uses a robe model (such as the DLA elven chain armor or many of the Project Q armors) for its appearance, will not be damaged. It saves the robe model for the underlying armor so that it can be restored when the player removes their coat/robe again.
- the coat when worn retains its own color, and displays properly. the armor underneath retains its color. if dye is applied while the coat is worn, it is applied properly. (Each robe gets its own mask values that a builder/scripter will have to define, and this mask determines how colors are applied and presented)
That is generally all the system does. I did have a few extra things in there, and more planned such as the ability to separate armors into pieces so that players could mix and match chain shirts with leather or padding etc... but never finished that code as it gets complicated with armors that have special properties/magical abilities.
Anyway, the upload/erf I have linked for you is for advanced users. Someday I may organize it to be an easy to implement system. At present however there is some assembly required. All are free to make use of it.





Retour en haut






