In the past, there have been many script changes which cause older scenarios to be broken. For example, the musket's id is now Blunderbuss, but all scenarios using Musket won't work anymore, unless they get updated. Or, the relaunch change breaks every scenario using Rule_Restart or Rule_BaseRespawn.
I propose creating a script file in System.ocg to maintain compatibility with such older scenarios. It would be sad loosing older content because of such changes; for the developer, it isn't so difficult to modify them, but for the player, this is just annoying. Often, scripts to maintain compatibility are not really difficult to write:
I propose creating a script file in System.ocg to maintain compatibility with such older scenarios. It would be sad loosing older content because of such changes; for the developer, it isn't so difficult to modify them, but for the player, this is just annoying. Often, scripts to maintain compatibility are not really difficult to write:
static const Rule_Restart = new Dummy {
Construction = func() {
GetRelaunchRule()->EnablePlayerRestart(); // Perhaps also setting the relaunch count depending on the game mode
return RemoveObject();
}
}
static const Musket = Blunderbuss;
Okay, could you (and everyone) also attach scenarios that don't work to this thread so that we could gather what we need scripts we need to add?
If it's that simple, I'd say go ahead and add it!
We can always remove old compatibility wrappers after some time.
We can always remove old compatibility wrappers after some time.
var Rule_BaseRespawn001 = CreateObject(Rule_BaseRespawn, 110, 106);
Rule_BaseRespawn001->SetFreeCrew(true);
Rule_BaseRespawn001->SetInventoryTransfer(true);
Does not work with this method.
Also there is no way to warn in the Musket case.
> Also there is no way to warn in the Musket case.
Hm?
static EmittedWarnings = {};
static func WarnOnce(string w) {
if (!EmittedWarnings[w]) { DebugLog(w); EmittedWarnings[w] = true; }
}
Or so?
That only solves the "warn only once" case.
The problem with the musket is that "Musket" would just be a static variable pointing to another variable. There's no place to put the warning. We don't have warnings whenever a variable is used.
The problem with the musket is that "Musket" would just be a static variable pointing to another variable. There's no place to put the warning. We don't have warnings whenever a variable is used.
After the discussions here and in IRC I am personally of the opinion we should abandon this effort for now, but should keep it in mind for after the 8.0 release. Then we can enforce it from the start.
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill