ID limits after adding custom models.

Started by ., Mar 15, 2015, 12:21 AM

Previous topic - Next topic

.

What is the limit of Weapon-ID, Object/Pickup-Model-ID, Skin-ID, Vehicle-Model-ID etc. What I mean by that is, when you add new custom models and things. Does that ID change? If so, what's the maximum (realistic) ID value/number that they could reach.

Or, the custom models actually replace existing ones and there's no change in the IDs. I'll look for this my self but I'll just leave this here in case anyone has a better number to give.
.

MacTavish

Maybe you mean this
Limitations
MAX_PLAYERS 100
MAX_VEHICLES 1000
MAX_OBJECTS 3000
MAX_PICKUPS 2000
MAX_SPRITES 128
MAX_TEXTDRAWS 256

And afaik the id wont replaced by orignal one

Grand Hunting Project
Join #SLC, #KAKAN, #Doom, #GHP @LUnet

Retired VC:MP Player/Scripter :P

.

Quote from: sseebbyy on Oct 16, 2014, 09:43 PMNote: IDs of Custom Objects starts with 6000.
(<object id="23"> in .xml means 6023)
.

MacTavish

#3
In xml (1 - 99 ) In game ( 6001 - 6099 )
In xml ( 100 ) in game (6100)

You can add max object in xml as limit of 3000

In xml 3000 and in game 9000




In game 1 to 5999 are vice city models

Grand Hunting Project
Join #SLC, #KAKAN, #Doom, #GHP @LUnet

Retired VC:MP Player/Scripter :P

.

Quote from: Beztone on Mar 15, 2015, 10:23 AMIn game 1 to 5999 are vice city models

My point exactly! I wasn't referring to the IDs of instances. I was referring to the IDs of models.
.

Sebastian

Quote from: stormeus on Jan 28, 2015, 03:58 PMThe server is blind to objects created by XML files. They also don't contribute to object limits.

.

Quote from: stormeus on Jan 28, 2015, 03:58 PMThe server is blind to objects created by XML files. They also don't contribute to object limits.

I don't meant object instances. I mean the IDs of their models. What I mean by that is if it's possible for someone to add a ton of models and one of those models would be assigned and ID higher than ##. I mean large values like 100,000 and so on.

One more time. I don't need their instance ID. I need their model ID.
.

Gudio

Custom objects:
1411851075 <Stormeus> Well there's also a maximum of 500 models because of internal Vice City restrictions

.

Well, here are some of the limits I've chosen for now:

  • Weapon Model IDs: Range from 0 - 70. I'll cap these at 256.
  • Vehicle Model IDs: Range from 130 - 237. I'll cap these at 512.
  • Player Skin IDs: Range from 0 - 160. I'll cap these at 256.
  • Object/Pickup Model IDs: Range from 258 - 638. I'll cap these at 2048.

Object/Pickup Model IDs limit may vary since I'm not sure how accurate my list is and how big is the actual number that it can be reached by an ID.



I feel I haven't been honest with you and why do I need to have an idea of these. So let me explain. In my Squirrel plugin, I want to be able to associate a custom slot for any of these IDs. In that custom slot/place etc. I can store whatever data I want. A number, a bool, an array or a table with many other data, anything I want.

The reason I want to implement that is to avoid having global arrays for every small thing in the script. Let's say that you want to have a certain price on a weapon. You just put that number into the custom user data slot associated with that ID and that's it. Later you can read it back from wherever you want.


I am storing these in an std::vector<...> and the IDs of a model also represent the index where their data can be found. The vector is automatically scaled when that ID is higher than it's current capacity. I wanted to allow a dynamic size since you can add custom models and their IDs may vary.

But I also want to have a static limit to be sure the user isn't stupid enough to ask for an ID which is too high to begin with. Would be easy to make the mistake and have a weapon with the ID 1,672,395,634. At which point that vector will have to scale up and will end up eating a ton of memory.

So that's why I need to have a realistic number for these which I can use it as a final limit that cannot be exceeded.
.

.

#9
Oh well, I got them working for now but I still need to add some protection to avoid what I mentioned earlier.

.

Finch

Beztone is a scripter but he is too stupid

Thijn

Sure you can. Just not custom ones.

Finch

but there is no example of custom cars on wiki
Beztone is a scripter but he is too stupid

MacTavish

Quote from: Thijn on Mar 16, 2015, 06:07 PMJust not custom ones.

Mind reading? Did you cant understand what did he said No Custom Vehicles

Grand Hunting Project
Join #SLC, #KAKAN, #Doom, #GHP @LUnet

Retired VC:MP Player/Scripter :P

Honey

Quote from: Beztone on Mar 17, 2015, 02:34 AMMind reading? Did you cant understand what did he said No Custom Vehicles

Tell me, When did he specify the word Custom?

Quote from: Finchcan we add vehicles in 0.4?