-
Notifications
You must be signed in to change notification settings - Fork 82
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
Unable to load missions that contain reference to third-party mods #218
Comments
Liberation handles this by injecting mods into |
Alright, thanks. Will take a look. |
@DanAlbert Do you think it would be possible to make a generic loader? So mod slots at least can flow unmodified through a load-save operation? |
I seem to have pretty decent success using this abomination: if imp_unit["type"] not in planes.plane_map:
plane_type=type(imp_unit["type"], (PlaneType,), {})
plane_type.id=imp_unit["type"]
else:
plane_type = planes.plane_map[imp_unit["type"]]
# plane_type =
plane = Plane(
mission.terrain,
_id=imp_unit["unitId"],
name=self.get_name(mission, imp_unit["name"]),
_type=plane_type,
_country=_country)
plane.load_from_dict(imp_unit) |
IDR the interface off the top of my head, but if the Mission contains any references to the actual type and not just the ID it'd be hard to do. If we could generate the full type on the fly we wouldn't need all the data. The type hierarchy would need to change to differentiate between an ID-only aircraft and a full-day aircraft. If the only value in |
There was an attempt: #219 |
Perhaps introduce an UnknownPlane / UnknownHelicopter type that the on-the-fly type can inherit? |
This has become more relevant to me and the community I'm active in due to the release of the Swedish SAAB Sk60 trainer mod. But I've forgotten pretty much everything I did regarding this issue :D |
We use a setup on our training server were we run DCS Mission Buzzer every morning to generate a new mission with randomized (but realistic) weather and lots of other things. And I think we will soon want to use the Sk60 mod in this mission template, which requires pydcs to support third-party mods - preferrably transparently so it doesn't just break every time the mod version changes or a new mod is released. |
For example with a miz containing an A-4E-C:
I suppose there needs to be plane-agnostic handling of unknown modules?
The text was updated successfully, but these errors were encountered: