WIP proposal on how to redesign the campaign loading: "New Campaign" menu -> list of menu items, loaded from directory "campaigns", one ini file describing each. In addition, the old campaign, since it is unlikely that we will finish porting it in time for a stable release. "Tutorial" menu -> list of menu items, loaded from directory "tutorials", one ini file describing each. (This is btw how challenges are implemented.)
Old (current) campaign is loaded using resource files as now. The ini files contain: [General] name = "Basic Tutorial" Difficulty = "Easy" Map = "data/base/wrf/tutorial/newtut.gam" Script = "script/tutorial/tutorial.js" Data = "data/base/wrf/tutorial/newtut.wrf" (using a wrf for Data or now -- but this should be changed to something else later) Everything else, including level transitions, is handled through scripts. When one script and level is done, it calls a level change function that specifies what level to load and how. The function can be almost like in wzscript: startMission(int type, string level); the type is passed into the game loading code, and level is the .gam file from which the data is to be loaded. That leaves data changes. This too can be handled through scripts. A new function loadData(string type, string name) can specify a data resource to load, using the resource system (but bypassing the WRF stuff). Example: loadData("SMSG", "multiplay.txt"); (In fact, this is example is taken from actual code now in master, used for the new AI loading.) Opinions? - Per _______________________________________________ Warzone-dev mailing list Warzone-dev@gna.org https://mail.gna.org/listinfo/warzone-dev