Vice City: Multiplayer

VC:MP Discussion => General Discussion => Topic started by: . on Mar 15, 2015, 12:21 AM

Title: ID limits after adding custom models.
Post by: . on Mar 15, 2015, 12:21 AM
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.
Title: Re: ID limits after adding custom models.
Post by: MacTavish on Mar 15, 2015, 04:36 AM
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
Title: Re: ID limits after adding custom models.
Post by: . on Mar 15, 2015, 10:16 AM
Quote from: sseebbyy on Oct 16, 2014, 09:43 PMNote: IDs of Custom Objects starts with 6000.
(<object id="23"> in .xml means 6023)
Title: Re: ID limits after adding custom models.
Post by: MacTavish on Mar 15, 2015, 10:23 AM
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
Title: Re: ID limits after adding custom models.
Post by: . on Mar 15, 2015, 10:28 AM
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.
Title: Re: ID limits after adding custom models.
Post by: Sebastian on Mar 15, 2015, 10:29 AM
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.
Title: Re: ID limits after adding custom models.
Post by: . on Mar 15, 2015, 10:36 AM
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.
Title: Re: ID limits after adding custom models.
Post by: Gudio on Mar 15, 2015, 10:37 AM
Custom objects:
1411851075 <Stormeus> Well there's also a maximum of 500 models because of internal Vice City restrictions
Title: Re: ID limits after adding custom models.
Post by: . on Mar 15, 2015, 11:06 AM
Well, here are some of the limits I've chosen for now:


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.
Title: Re: ID limits after adding custom models.
Post by: . on Mar 15, 2015, 11:50 AM
Oh well, I got them working for now but I still need to add some protection to avoid what I mentioned earlier.

(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Fs16.postimg.org%2Fibp77s4b5%2FUntitled.jpg&hash=d155e60bee400d5830d2b11def73fcbc455474a1) (http://postimg.org/image/ibp77s4b5/)
Title: Re: ID limits after adding custom models.
Post by: Finch on Mar 16, 2015, 01:36 PM
can we add vehicles in 0.4?
Title: Re: ID limits after adding custom models.
Post by: Thijn on Mar 16, 2015, 06:07 PM
Sure you can. Just not custom ones.
Title: Re: ID limits after adding custom models.
Post by: Finch on Mar 17, 2015, 02:02 AM
but there is no example of custom cars on wiki
Title: Re: ID limits after adding custom models.
Post by: MacTavish on Mar 17, 2015, 02:34 AM
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
Title: Re: ID limits after adding custom models.
Post by: Honey on Mar 19, 2015, 02:41 PM
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?




Title: Re: ID limits after adding custom models.
Post by: . on Mar 19, 2015, 03:34 PM
Quote from: Honey on Mar 19, 2015, 02:41 PMTell me, When did he specify the word Custom?

The title says custom and obviously you can add non-custom vehicles in the game. But he's going off-topic here and I should stop doing that as well. I'm still leaving the topic open because I still haven't got an official answer on that and I don't want to close the topic unanswered.
Title: Re: ID limits after adding custom models.
Post by: MacTavish on Mar 19, 2015, 06:11 PM
Quote from: Finch on Mar 17, 2015, 02:02 AMbut there is no example of custom cars on wiki

Sorry for off reply,  @Honey you missed an message where he specified the word Custom