Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added VehicleModel definitions. #19

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

r4sheed
Copy link

@r4sheed r4sheed commented Sep 14, 2023

No description provided.

@CLAassistant
Copy link

CLAassistant commented Sep 14, 2023

CLA assistant check
All committers have signed the CLA.

@Y-Less
Copy link
Contributor

Y-Less commented Sep 19, 2023

OK, I'll replicate my comments from discord here just for completeness:

  1. While we like tags, vehicles weren't done originally because it seemed like an even more invasive change than weapons. Maybe that isn't the case, I don't now. As everyone who has read the documentation knows these extra checks can be disabled, but in terms of balance I don't know if this is too much. At least it is vehicle models, not vehicle ids.
    2). Speaking of documentation, check the design document.
  2. Don't add the tag to the short OPEN_MP_TAGS define, that's there for compatibility with old compilers that have a small limit on tag numbers.
  3. Some of the spacing is off.
  4. A few notes on the names, and missing variants:
  • I haven't checked every name, but "artic" is short for "articulated" not "article" (I've just realised "article" is wrong in sscanf as well. Clearly we used a similar list).
  • MR_WHOOPEE?
  • RC_BANDIT and other RC_ vehicles.
  • TOPFUN_VAN
  • PCJ_600, ZR_350, etc
  • COMBONE_HARVESTER
  • COMBINE*
  • DUNE
  • MAX is off by one

@r4sheed
Copy link
Author

r4sheed commented Sep 20, 2023

  1. While we like tags, vehicles weren't done originally because it seemed like an even more invasive change than weapons. Maybe that isn't the case, I don't now. As everyone who has read the documentation knows these extra checks can be disabled, but in terms of balance I don't know if this is too much. At least it is vehicle models, not vehicle ids.

I don't think vehicle models should be ignored. It should also be defined in the same way like weapons to achieve cleaner, more transparent code. It’s a pain to update game modes (and libraries) - but as you said it can be disabled so it’s optional.

2). Speaking of documentation, check the design document.

Can you be more specific what I did wrong?

  1. Don't add the tag to the short OPEN_MP_TAGS define, that's there for compatibility with old compilers that have a small limit on tag numbers.

I’ve removed it.

  1. Some of the spacing is off.

I think it’s fixed now.

  1. A few notes on the names, and missing variants:

The model definitions are based on the vehicle original entries from the .gxt files.
For example VEHICLE_MODEL_PCJ600 is PCJ600 which is PCJ-600, or VEHICLE_MODEL_PETROTR is PETROTR which is Petrol Truck. Some models don’t have original names like trailers, which you cannot enter in single player.
Also I’ve added some new variants that you mentioned above.

@Zorono
Copy link

Zorono commented Dec 12, 2023

this pr is a horrible addition... it will make a lot of issues with original syntax (tag mismatch)...
another reason for a headache!!!

@r4sheed
Copy link
Author

r4sheed commented Dec 12, 2023

this pr is a horrible addition... it will make a lot of issues with original syntax (tag mismatch)... another reason for a headache!!!

Do you know what is horrible? Search for 'samp vehicle models' then find a Sultan then type 560 instead just typing VEHICLE_SULTAN in your code.

@Zorono
Copy link

Zorono commented Dec 13, 2023

i am complaining about that change for modelid parameters' tag

@shierru
Copy link
Contributor

shierru commented Jan 1, 2024

I would leave the list of vehicles, but I think VEHICLE_MODEL:modelid is a very terrible solution.

As for the list of vehicles and the ability to use a certain constant name instead of a model, which already has a certain meaning, I consider it a good practice.

But it shouldn’t be mandatory, otherwise it will simply become useless if you have to “rigidly” adapt the code to it.

@Y-Less
Copy link
Contributor

Y-Less commented Feb 7, 2024

What we can do for now is use:

#define VEHICLE_MODEL: _:

Instead of the define as-is. This way we get the advantages of named constants and natives marked as requiring model IDs, but without actually having the tags yet. And further down the line switching this out becomes almost trivial.

The PR does still need the #define versions of the names still though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants