Click to visit: JoinUO free shard list
The Weapon Templates Object
7 posts
• Page 1 of 1
<Derrick> RunUO AI is kind of a functional prototype, which i have hacked into something resembling OSI behavior, but only by complitcating everything
|
|
<Derrick> RunUO AI is kind of a functional prototype, which i have hacked into something resembling OSI behavior, but only by complitcating everything
|
|
<Derrick> RunUO AI is kind of a functional prototype, which i have hacked into something resembling OSI behavior, but only by complitcating everything
|
|
Hi Batlin,
In the demo dat folder, there's a folder for weapons. It has files called stats.q, and weapon.x.q, where x goes from 0 to 300+. stats.q has data for every weapon, just once I believe. Each individual weapon file has stats for that one weapon. However, in the individual files, some weapons have two different files with two different sets of stats (for example, kryss and halberd are represented by #22 and #18, and #17 and #15). Are you able to tell from the demo code where it is pulling from when it creates a weapon? (whether it pulls from stats.q or from one of the individual files) If it pulls from the individual files, can you tell me if the game actually spawns both templates of kryss, or if it just spawns #22 or just spawns #18? This has some interesting implications for the stats we use on UOSA. Thanks! |
|
This is what I know:
The "stats.q" and "weapon_templates.q" files are not used in the demo. The weapons you see in the game come from the "weapon.X.q" files. I'll take the two krysses as an example, in "defines.q":
You have look in "templatestable.dat.q" also, you will find that both krysses can be bought by vendors but only the KRYSS with ID 5121 can be bought by players. Maybe KRYSS_2 is an older kryss which has been removed from the game? Sellable (by the vendor):
Buyable (by the vendor):
The question is, how do we arrive from the ID 5120/5121 to the weapon template number 18/22. To answer this question you have to use a tiledata.mul viewer. You can find a tool named "TilData Editor" here: Open the server side file "tiledata.mul.q" and go to object 0x1400. ID 5120 is decimal which equals 0x1400 in hexadecimal.
The Unknown0 field is the answer. This field is (partially) the internal weapon template number. I say partially because those programs were created by reversing the client. The reversers always believed it was a byte (8-bit) but this field is actually a word (16-bit) and therefor they don't display the data like the OSI servers would see the data. Based on this, I conclude (for now), the kryss with weapon template 18 is not used. Unless you can find a related weapon in the "tiledata.mul.q" file. Also, an interesting note. In "stats.q", weapon 18 is a kryss. weapon 22 is a viking sword. This conflicts with the "weapon.X.q" files and also conflicts with the "tiledata.mul.q" file. <Derrick> RunUO AI is kind of a functional prototype, which i have hacked into something resembling OSI behavior, but only by complitcating everything
|
|
Awesome, thanks so much for your time on this.
This helps me understand what's going on. In the numbered templates, there exists an entry for all weapons as of the demo (early-mid 1998) as well as all weapon templates that were "pre-patch" (before the Jan-1998 patch that greatly altered most weapon stats). So my guess is, the demo code allows both kryss' to be sold to NPC's because you may have a pre-patch kryss in April 1998 that you want to sell to an NPC. However, you can only buy the post-patch kryss from the vendor, because that's the new standard kryss. If there ever needed to be more proof that the demo was ripped straight from production code, this is it. It is not possible to have a #18 kryss on the demo, so why would vendors need to be able to buy one from you if you could never have one in the first place! When I match up both kryss possibilities with archive.org pages from Stratics, I concur that the stats of kryss #18 are indeed in line with the pre-patch kryss from before Jan-1998, and kryss #22 should be the new standard kryss as of the demo's time period. It's so much fun when it all fits together |
|
|
|
7 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest