Savage-Game-Design / Mike-Force

Mike Force is cooperative, capture-the-island style gamemode for the Arma 3: S.O.G. Prairie Fire CDLC.
Other
31 stars 32 forks source link

Vehicle asset ID assigning #137

Open Ridderrasmus opened 2 years ago

Ridderrasmus commented 2 years ago

Is your feature request related to a problem? Please describe. When assigning IDs the only check the function makes is whether the ID is in use and if it is, completely exits the function. So if I were to try to preemptively assign specific IDs to vehicles they are just overwritten and if I later want to assign an ID to a vehicle and it happens to be the same as an earlier one nothing happens.

Describe the solution you'd like It would make it easier if it would also check whether the vehicle being assigned an ID already has one and also rather than exiting when it sees the ID already being used instead tries to assign a higher number ID.

Describe alternatives you've considered The script I'm writing technically works without it but it would work best if I could simply just in the editor run the assign ID command on each vehicle in the init so that the IDs are gonna for certain stay the same every game. This would allow me to only need to use the ID to save and load rather than a full search for every vehicle.

Additional context The main reason I would like this done is because I'm currently making a script on top of Mike Force that saves as much about the vehicles assigned IDs in the vehicle asset system as possible and to be able to load it when starting Mike Force back up again later.

Alablm commented 2 years ago

Hey @Ridderrasmus sorry I've taken so long to get to this. Going to look into this within the next week or so hopefully. Would you be interested in submitting your save script to the project?

Ridderrasmus commented 2 years ago

Gladly! I'll get to work on it when you've got something on this. I might also write you on discord when I start, to check what is gonna be the best way to go about certain things, if that's okay.