Keyring Discussion Question

For ideas on how to make Second Age a better shard. Can it get any better? Maybe.
Forum rules
Posts in this forum are expected to be constructive, realistic and civil. Inflamatory or off topic posts will be removed.
User avatar
Mens Rea
UOSA Subscriber!
UOSA Subscriber!
Posts: 2952
Joined: Mon Jul 14, 2008 6:59 am

Re: Keyring Discussion Question

Post by Mens Rea »

Mens Rea wrote:Hmm I logged into the UOSA tutorial server and purchased some blank keys, I tried copying the keys and got the same message when the key I was copying was in my pack as when it was on the floor. Is the demo server not the demo?
Furthermore, on current UOSA you can copy a non-locked down key without it being in your pack. I just tried it.

So unless something has changed between the demo and UOSA then I think you may be mistaken on this issue Kaivan.

So, if you can copy a key which is not in your pack then you should be able to copy a key which is locked down. At the moment you get a "This is not accessible" which due to recent discussions may not be era accurate.

Kaivan
UOSA Donor!!
UOSA Donor!!
Posts: 2923
Joined: Wed Aug 13, 2008 11:07 pm

Re: Keyring Discussion Question

Post by Kaivan »

Mens Rea wrote:Hmm I logged into the UOSA tutorial server and purchased some blank keys, I tried copying the keys and got the same message when the key I was copying was in my pack as when it was on the floor. Is the demo server not the demo?
Our demo server is a an experiment in getting RunUO scripts to run on an actual demo server. This means that any error in our scripts will appear on both the demo server and the live server.
Mens Rea wrote:Furthermore, on current UOSA you can copy a non-locked down key without it being in your pack. I just tried it.

So unless something has changed between the demo and UOSA then I think you may be mistaken on this issue Kaivan.

So, if you can copy a key which is not in your pack then you should be able to copy a key which is locked down. At the moment you get a "This is not accessible" which due to recent discussions may not be era accurate.
I think the above answer covers these issues as well.

My best suggestion is that if you want to see how something worked in the demo, its best to actually fire up the demo or look at the code.

In that regard, for reference, here is the code in the demo that shows that you cannot copy a key that is not in your pack:

First, this piece of code is run when you first attempt to use a key:

Code: Select all

#on use(object user)
{
  if(!Q4CD(this, user))
  {
    return(0x00);
  }
The referenced function, Q4CD contains the following code:

Code: Select all

integer Q4CD(object it, object user)
{
  object Q4WD = getTopmostContainer(it);
  if(Q4WD != user)
  {
    systemMessage(user, "That key is unreachable.");
    return(0x00);
  }
  return(0x01);
}
Basically, this means that when you use a key it will check to see what the outermost container that is holding it is. Since players count as containers, if it is being held by a player, then the player becomes the outermost container. Once the outermost container has been determined, it compares that object (containers are objects) to the object that used the key. If the user of the key doesn't match the outermost container for the key, then it prevents you from attempting to use the key at all.

When attempting to copy a key, this piece of code is checked first:

Code: Select all

  integer Q65M = 0x01;
  if(hasObjVar(this, "whatIUnlock"))
  {
    barkTo(this, user, "What shall I use this key on?");
    Q65M = 0x00;
  }
  else
  {
    barkTo(this, user, "This is a key blank.  Which key would you like to make a copy of?");
    Q65M = 0x01;
  }
  targetObj(user, this);
  return(0x00);
}
This code checks to see if the key actually unlocks anything yet. If so, a flag is set (Q65M) to indicate that it does indeed unlock something. Otherwise, the flag is set differently. Finally, the keyholder is given a target cursor to target the object to unlock or copy.

Upon targeting the object, this piece of code is executed:

Code: Select all

#on targetobj(object user, object usedon)
{
  if(!Q4CD(this, user))
  {
    return(0x00);
  }
The above code is identical to that which is executed when the key is first used. Thus, if the target key is also not in the pack of the player who is attempting to copy it, the same message is given.

Finally, extending forward from the demo, no recorded changes exist (that I could find) that shows any difference in the way that key copying or use worked during T2A. I hope this clarifies the issue.
UOSA Historian and former staff member: August 11, 2008 - June 19, 2016

Useful links for researching T2A Mechanics

Stratics - UO Latest Updates - Newsgroup 1 - Noctalis - UO98.org

User avatar
Mens Rea
UOSA Subscriber!
UOSA Subscriber!
Posts: 2952
Joined: Mon Jul 14, 2008 6:59 am

Re: Keyring Discussion Question

Post by Mens Rea »

Okay then UOSA is inaccurate because you can copy keys which are not in your pack. Glad I could help.

Hicha
UOSA Donor!!
UOSA Donor!!
Posts: 2264
Joined: Tue May 05, 2009 10:03 am
Location: out selling permits

Re: Keyring Discussion Question

Post by Hicha »

Kaivan, how might one acquire a decompiled version of UO?
Image
"I consider most of you NPC's that inhabit the single player game that I am here to enjoy." - MatronDeWinter

User avatar
Mens Rea
UOSA Subscriber!
UOSA Subscriber!
Posts: 2952
Joined: Mon Jul 14, 2008 6:59 am

Re: Keyring Discussion Question

Post by Mens Rea »

Hicha wrote:Kaivan, how might one acquire a decompiled version of UO?
smelt it!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! whenever i delete i file i say smelt it

User avatar
Blaise
UOSA Donor!!
UOSA Donor!!
Posts: 2466
Joined: Mon Feb 14, 2011 12:13 am
Location: Trammel

Re: Keyring Discussion Question

Post by Blaise »

Mens Rea wrote:
Hicha wrote:Kaivan, how might one acquire a decompiled version of UO?
smelt it!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! whenever i delete i file i say smelt it
Quick, someone draft me up an MSI that I can push out on the network.
I need it to change all Recycle Bins to small forges (icon included) and all dialogue references for 'delete' to be changed to 'smelt'.
Est Sularus oth Mithas

User avatar
Mens Rea
UOSA Subscriber!
UOSA Subscriber!
Posts: 2952
Joined: Mon Jul 14, 2008 6:59 am

Re: Keyring Discussion Question

Post by Mens Rea »

me too plz

Kaivan
UOSA Donor!!
UOSA Donor!!
Posts: 2923
Joined: Wed Aug 13, 2008 11:07 pm

Re: Keyring Discussion Question

Post by Kaivan »

Hicha wrote:Kaivan, how might one acquire a decompiled version of UO?
In order to decompile the demo, you'll need the following resources:

First, download the UO Demo.
Second, download the uodemo.dat extractor.
Finally, download the Mass M Decompiler

Extract the demo to any directory (preferably it's own). You can install the demo if you wish, but we don't need to in order to decompile it. Second, unzip the uodemo.dat extractor to the same directory that you stored the demo files in. The demo extractor is a command line program that allows you to decrypt and dump the files stored in the uodemo.dat file. Fire up the extractor and extract the contents of the uodemo.dat file to the directory that you're currently working in. The result should be a folder labeled .rundir that contains all of the files from the .dat file. Finally, extract the Mass M Decompiler and open the .exe file (it will be located in Mass M Decompiler (Publish 7)\Mass M Decompiler\bin\Release). Point the program to the folder that contains all of the scripts for the demo. That folder will be located in the .rundir folder produced by the .dat extractor. Click Mass Decompile, wait for the program to finish decompiling all of the scripts, and then click Dump All. This will create a folder inside the .rundir directory called scripts.c where all of the decompiled script files are contained. From here you can open the .c files with your program of choice and read the scripts themselves.

Note: The scripts themselves are written in a custom scripting language built for UO, and they also suffer from obfuscation as well, so it may be difficult to read at first. Second, the extracted scripts will likely look different from the example sections that I posted because the decompiling method for the scripts has changed over time from when I decompiled mine, but the raw information is the same. Finally, it is important to note that this decompilation only includes the scripts. All other information is either readable without any extra work, or is stored in the hidden server .exe that runs when the demo is running. The information contained therein is much more difficult to ascertain and is an area where Batlin is putting in a great deal of work.
UOSA Historian and former staff member: August 11, 2008 - June 19, 2016

Useful links for researching T2A Mechanics

Stratics - UO Latest Updates - Newsgroup 1 - Noctalis - UO98.org

GuardianKnight
UOSA Donor!!
UOSA Donor!!
Posts: 5120
Joined: Tue Jun 30, 2009 7:00 pm

Re: Keyring Discussion Question

Post by GuardianKnight »

I chopped my own wooden house door off in t2a. Let's add that.
"I used to be with it, but then they changed what it was. Now what I'm with isn't it, and what's it seems weird and scary to me, and it'll happen to you, too." Grandpa Simpson

Post Reply