Customize item button options

Forum Archive - from http://theuniversal.net
Locked
User avatar
flametard
Posts: 1245
Joined: Sun Apr 01, 2007 2:05 am
Location: Join NR! faction name: 'NR new recruits' password: 'Truth'
Contact:

Customize item button options

Post by flametard »

how does one change the name of the "use item" button when clicking on an item, such as when you can "mount" the horse. Oh, i see you can feed it too. thats 2 custom buttons.

also, how do you edit the "details" button for items?

thanks
User avatar
Mit
Staff
Staff
Posts: 3551
Joined: Sun Sep 21, 2003 10:14 pm
Location: Unknown

Post by Mit »

Code: Select all

*itemusetext [ItemNum] [Text]
sets the text to replace 'Use Item'.

Code: Select all

*itemdetailstext [ItemNum] [Text]
replaces the 'details' button.

When doing the latter on an item, you then need to script the response to that button press in an "ItemDetails" event.

e.g. If your item 4 is water, you might do something like..

Code: Select all

*itemdetailstext 4 Sprinkle
then to your script add

Code: Select all

Event( "ItemDetails", "Water" )
{
    *msg %PLAYER% You sprinkled the water on the ground
    *grantitem %PLAYER% -1 Water
}
For more details see the thread here :
http://theuniversal.net/forum/viewtopic.php?t=9279
User avatar
flametard
Posts: 1245
Joined: Sun Apr 01, 2007 2:05 am
Location: Join NR! faction name: 'NR new recruits' password: 'Truth'
Contact:

Post by flametard »

The event
Event("ItemDetails","Clay")
{
*msg %player% Take this clay to a ceramics studio so it can be fired into bricks or bottles.
}
doesn't appear to do anything when i go in the game and click on the details button.
User avatar
flametard
Posts: 1245
Joined: Sun Apr 01, 2007 2:05 am
Location: Join NR! faction name: 'NR new recruits' password: 'Truth'
Contact:

Post by flametard »

also, I noticed that the buttons I renamed (like use item, and itemdetails) have all reverted into their default button name. perhaps this could be a clue? I'm pretty sure I always run things as administrator. it happened after the galaxy went offline last night... (lemme check n see if there's an update)

nope, no update. well I'm stumped.
User avatar
flametard
Posts: 1245
Joined: Sun Apr 01, 2007 2:05 am
Location: Join NR! faction name: 'NR new recruits' password: 'Truth'
Contact:

Post by flametard »

Still trying to figure out whats going wrong.

Checked my namesfile and it shows all the changes I made to the itembuttons, yet they still don't register in game. funny thing was, it worked for a few days, through server restarts and everything. but mysteriously stopped working.

Here's a sample of some of the text in my names file:
(null),234= Weild
(null),235= Party
(null),236= Unveil
(null),237= Unveil
(null),238= Unveil
(null),239= Unveil
(null),241= Read Map
(null),242= Drink
(null),243= Read Map
(null),244= Weild
(null),245= Read Map
(null),246= Read Map
(null),247= Pray
(null),253= Eat
(null),58= Dress
(null),59= Dress
(null),60= Dress
(null),61= Dress
(null),62= Weild
User avatar
zaroba
World Owner
World Owner
Posts: 7257
Joined: Fri Oct 10, 2003 11:06 pm
Location: Hereford, PA
Contact:

Post by zaroba »

is that (null) supposed to be there?
I haven't tried messing with it yet, but it doesn't look right to me.
User avatar
flametard
Posts: 1245
Joined: Sun Apr 01, 2007 2:05 am
Location: Join NR! faction name: 'NR new recruits' password: 'Truth'
Contact:

Post by flametard »

Ah hell, looking in the namesfile again, and all that null stuff is gone, and it appears to be taking new stuff so illl imput all the info in again.. sigh
User avatar
flametard
Posts: 1245
Joined: Sun Apr 01, 2007 2:05 am
Location: Join NR! faction name: 'NR new recruits' password: 'Truth'
Contact:

Post by flametard »

I reset all the info, ao I'm hoping it sticks this time.

Tried to edit itemdetails again, still nothing.
User avatar
zaroba
World Owner
World Owner
Posts: 7257
Joined: Fri Oct 10, 2003 11:06 pm
Location: Hereford, PA
Contact:

Post by zaroba »

you wouldn't happen to have 2 different server EXEs in the folder, do you?
If so, maybe the wrong one is being opened and breaking it.
User avatar
flametard
Posts: 1245
Joined: Sun Apr 01, 2007 2:05 am
Location: Join NR! faction name: 'NR new recruits' password: 'Truth'
Contact:

Post by flametard »

I have world exe and universal world exe in my universal folder
User avatar
flametard
Posts: 1245
Joined: Sun Apr 01, 2007 2:05 am
Location: Join NR! faction name: 'NR new recruits' password: 'Truth'
Contact:

Post by flametard »

Ok, so after some testing, i discovered that if you dont set the command *itemdetailstext, it wont acknowledge the itemdetails event in the script.

the only thing i dont understand is why my namesfile lost the information i set. but I am continuing forward. :)
User avatar
flametard
Posts: 1245
Joined: Sun Apr 01, 2007 2:05 am
Location: Join NR! faction name: 'NR new recruits' password: 'Truth'
Contact:

Post by flametard »

Bad news: Namesfile mysteriously got chopped again.

good news: I have a backup saved this time. :)



Anyone have any clues as to whats happening?
User avatar
flametard
Posts: 1245
Joined: Sun Apr 01, 2007 2:05 am
Location: Join NR! faction name: 'NR new recruits' password: 'Truth'
Contact:

Post by flametard »

see below! vv
Last edited by flametard on Fri Jan 11, 2013 4:03 pm, edited 1 time in total.
User avatar
flametard
Posts: 1245
Joined: Sun Apr 01, 2007 2:05 am
Location: Join NR! faction name: 'NR new recruits' password: 'Truth'
Contact:

Post by flametard »

solving problems to myself. most current one below -V-
Last edited by flametard on Fri Jan 11, 2013 4:04 pm, edited 1 time in total.
User avatar
flametard
Posts: 1245
Joined: Sun Apr 01, 2007 2:05 am
Location: Join NR! faction name: 'NR new recruits' password: 'Truth'
Contact:

Post by flametard »

I think there's a problem with the buildings editor. When i open the buildings editor, I get an error. then i try again, it opens. then i restart my server, itemslist chopped.
User avatar
zaroba
World Owner
World Owner
Posts: 7257
Joined: Fri Oct 10, 2003 11:06 pm
Location: Hereford, PA
Contact:

Post by zaroba »

using the 63.2 buildings editor?

I just opened zoric's bdat and saved it and the namesfile still reflects the changes I made when testing the stuff earlier.
User avatar
flametard
Posts: 1245
Joined: Sun Apr 01, 2007 2:05 am
Location: Join NR! faction name: 'NR new recruits' password: 'Truth'
Contact:

Post by flametard »

ah. 62.7 :\ MY BAD! :oops:
Locked