base id

sircapted

Well-Known Member
Mar 19, 2018
55
2
how can i asign a base id number to a new type? i am trying this on a runuo 2.6 version..... will eventually add to my servuo server though, if i can figure out ow to create a new base id...
 

sircapted

Well-Known Member
Mar 19, 2018
55
2
i am trying to add an item to a vendor
//Add(new GenericBuyInfo(typeof(OrcishKinMask), 5000, 5,0x8A4, 0));
0x8A4 is a ? not a mask... so i chcked cs file for mask and found its base id is same as orc mask 0x141B..and a label number.
orcishkinmask
public OrcishKinMask()
: this(0x8A4)
public OrcishKinMask(int hue)
: base(0x141B, hue)
and orcmask has
public OrcMask()
: base(0x141B)..

how can i asign a base id for this and a few other items i have and have created?
 

Lokai

Moderator
ServUO Developer
Dec 4, 2014
1,280
218
Western New York State
Shard Name
Test Center
Donate
Donate money to this user
0x8A4 is the Hue, not the item ID. 0x141B is the item ID.

So, you want something like this:
C#:
// Add new type ........type name...........price, Amt, ItemID, Hue
Add(new GenericBuyInfo(typeof(OrcishKinMask), 5000, 5, 0x141B, 0x8A4));
 

Falkor

Well-Known Member
Apr 11, 2018
173
63
wpshard.com
Shard Name
Whispering Pines
Note that the itemID and hue specified here will not change the actual item they're selling -- that will be a standard OrcishKinMask unless you script a different kind. This just defines what it looks like in their inventory list and how much it is sold for.

If you want to create AweseomeNewOrcMask you'll have to script one.
 
  • Like
Reactions: sircapted

sircapted

Well-Known Member
Mar 19, 2018
55
2
i need a new cs with a different baseid than the orc mask its based from... aye, i made a new one but had to use same orc base id with a hue difference..
i been using fiddler a lil bit, is that where i can create a new base id?
also cliloc numbers, a few lines call for those, like in the def scripts preset messages and labels... i need to create those as well?
 

Falkor

Well-Known Member
Apr 11, 2018
173
63
wpshard.com
Shard Name
Whispering Pines
Lots of items can share the same baseID -- that's just the graphic your item uses in-game, nothing more.

The most common way to get started scripting is to take an existing item and modify it some. Here I've copied the OrcishKinMask part of Hats.cs and put it in its own script named NiftyOrcMask.cs. Now that it's a new item you can tweak the resistances and hue, name, and whatever else you can think of. Once that's how you want it, you can add it to a vendor's inventory with

Code:
Add(new GenericBuyInfo(typeof(NiftyOrcMask), 5000, 5, 0x141B, 0x8A4));
If you change the mask's hue in the new cs file, be sure to change it in the vendor listing too so it'll appear correctly.

If you want to give the item another name (suggested, since my example is kind of silly), simply replace all instances of NiftyOrcMask within the script with your new one. That won't change the item's displayed name in-game but it will change how you refer to it on vendors or with the [add command.
 

Attachments

  • Like
Reactions: sircapted

sircapted

Well-Known Member
Mar 19, 2018
55
2
so base id is the address for that specific graphic... gotcha....
// Add new type ........type name...........price, Amt, ItemID, Hue
thanks 4 all yalls help.. i made an orc vendor that sells orc masks and orc stuff.../ an orcish smith/sborcsmith.. that only selss ringmail and axes....
working on an orcish runic hammer that only makes orc weps and armor...
 

Attachments

Milva

Admin
Moderator
Mar 3, 2013
4,341
513
Donate
Donate money to this user
You might consider those to release in Custom Releases so they don't get lost :)
 

sircapted

Well-Known Member
Mar 19, 2018
55
2
PERHAPS I AM when i finish the package;;;
i got this hammer im tryin make takes them nuggets and smelts to the next small,med,large then brick...

i get to
AddSubRes(typeof(GoldBrick), 1063489 , 95, 1044036, 1044269);
AddSubRes(typeof(SmallGoldNugget), 0x172A, 95, 1044036, 1044269);
AddSubRes(typeof(MediumGoldNugget), 1063489, 95, 1044036, 1044269);
AddSubRes(typeof(LargeGoldNugget), 1063489, 95, 1044036, 1044269);

1063489 is the cliloc i figure for that item.. least on the caraft gump i get a cliloc error for the 0x172A

where do i find the cliloc number for an item? the godnugget script had no cliloc numbers on it.. the gold brick did..crat label number?
i tried apostrophies and a lil number moving.. this is the numbe ri need for correct item id on my craft gump...
 

Falkor

Well-Known Member
Apr 11, 2018
173
63
wpshard.com
Shard Name
Whispering Pines
You can find cliloc entries using UOFiddler, under the Cliloc tab. You can search for a key word or by number. You're at the mercy of whatever strings are there by default or you can add your own but have to distribute the modified cliloc.enu file to your players. The whole thing is just a list of numbers and the words / phrases they correspond to. This is how the game is translated into other languages. To me, ServUO is maddeningly tied to cliloc usage for some systems. It's great for compatibility but sometimes you just want to be able to display text on the screen and you don't really care about other languages!

All of your ingredients are using the number 1063489 which is "Gold Bricks" You may be able to provide a string instead of a cliloc number in that spot, like this:

Code:
AddSubRes(typeof(SmallGoldNugget), "Small gold nugget", 95, 1044036, 1044269);
I can't directly compare as my resources are quite edited after implementing the custom woods / ores / leathers into my development shard.
 
  • Like
Reactions: sircapted