Hello!
I work on Fallout D20 PW: http://falloutd20.blogspot.com
Now I'm stuck in Items' Durability System... I made that up... I have a variable (float) on Armors and Weapons - "if_durcur"... But I need it displayed at the end of Item's Description (when identified)... Smth like onhit event:
DESCRIPTION = DESCRIPTION - "description text + Durability = ... %" + if_durcur
Is smn can help and wright that scrip or function (and test it before sharing) - please help!
Need help with scrip wrighting
Débuté par
3stars
, févr. 20 2011 12:40
#1
Posté 20 février 2011 - 12:40
#2
Posté 20 février 2011 - 01:12
You may want to look modifing the gui screen to pull that variable and display it that way.
The issue I see is finding a script to apply your changes, short of writing a "i_tag_hc" script for every item. Looking through the toolset I could not find a global on hit script , though it still may be there. If there is one, similiar to the equip/unequip , you could modify that script to apply the duribility decrease, then it would still fire the apprioate tag based script.
You may want to send a pm to Lance Bottelle, I know he has created durability system for his campaign and could point you in the right direction.
The issue I see is finding a script to apply your changes, short of writing a "i_tag_hc" script for every item. Looking through the toolset I could not find a global on hit script , though it still may be there. If there is one, similiar to the equip/unequip , you could modify that script to apply the duribility decrease, then it would still fire the apprioate tag based script.
You may want to send a pm to Lance Bottelle, I know he has created durability system for his campaign and could point you in the right direction.
#3
Posté 20 février 2011 - 03:43
<UIText name="EXAMINE_DESCRIPTION_TEXT" width=PARENT_WIDTH height=DYNAMIC align=left valign=top color="3d3131" fontfamily="NWN1_Dialog" style="bold" />
Here is code from GUI, where EXAMINE_DESCRIPTION_TEXT seems to be a script... but i cant find it...
Here is code from GUI, where EXAMINE_DESCRIPTION_TEXT seems to be a script... but i cant find it...
#4
Posté 21 février 2011 - 12:28
If you do end up going the GUI route, read Lance Botelle's GUI tutorial. It'll help you figure out how to run a script when the examine screen is first opened*.
In the XML snippet above, the bit you refer to (<UIText name="..."/>) actually isn't a script name. It's the name of the UI element itself.
* You could actually do this from the context-menu instead (the right-click menu) so that you can change the description before the examine screen pops up.
However, I think you're going to want to do this from some sort of event instead. After all, the issue isn't just displaying the durability, you have to actually track it somewhere. Some people have created pseudo-OnStruck events to do this kind of thing.
In the XML snippet above, the bit you refer to (<UIText name="..."/>) actually isn't a script name. It's the name of the UI element itself.
* You could actually do this from the context-menu instead (the right-click menu) so that you can change the description before the examine screen pops up.
However, I think you're going to want to do this from some sort of event instead. After all, the issue isn't just displaying the durability, you have to actually track it somewhere. Some people have created pseudo-OnStruck events to do this kind of thing.
#5
Posté 21 février 2011 - 02:01
Here is the script and modified xml files for you to show durability using your variable name
http://dl.dropbox.co...entory_hook.zip
Only weapons and any DEFENSE items will show durability. This includes boots/rings/amulets/cloaks/hats/belts
There is a function in the gui that does the filtering, if you wish to omit anything just delete the line in the if condition, if you've questions feel free to ask.
http://dl.dropbox.co...entory_hook.zip
Only weapons and any DEFENSE items will show durability. This includes boots/rings/amulets/cloaks/hats/belts
There is a function in the gui that does the filtering, if you wish to omit anything just delete the line in the if condition, if you've questions feel free to ask.





Retour en haut






