Shannon V. OKeets
Posts: 22095
Joined: 5/19/2005 From: Honolulu, Hawaii Status: offline
|
quote:
ORIGINAL: Larac quote:
ORIGINAL: Shannon V. OKeets quote:
ORIGINAL: Blind Sniper Thanks Greyshaft, I will look closely at it. Is possible rename the counters? Yes. There are a few that cannot be renamed because of their special capabilities (e.g., Stilwell). Also, renaming units would have to be done for each new game, since determining which units are to be setup (and where) requires many units to not have their names changed. For example, all the capital ships are referenced by name for which ones set up where (and the same for HQ units). A more elaborate system could be developed, but that falls into my category of WIF design kit - not part of MWIF product 1. Would it not be better to assign each Unit a Number or Code, and leave the name for display only? Lee The data file has both a number and two names: (1) for reference internally in the setup lists and (2) for display on the screen (i.e., the counter). Many units are generated as the game progresses (partisans, convoys, divisions), so absolute unit numbers are open ended. Relying on assigned numbers is fooolish anyway, since the addition or removal of a unit could mess everyting up. It is hard enough to do the setup just using the names. Here is a sample of the code for setup (one of the two small scenarios):
// ****************************************************************************
// Second scenario
// ****************************************************************************
scGuadalcanal:
begin
case MCIndex of
mcCommonwealth: // Guadalcanal
begin
AddGroupCountry(['South Africa'], ['[South Africa]', 'MI 1',
'TE 1', '[United Kingdom]', 'CN 1', 'CN 1']);
AddGroupCountry(['Italian Somaliland'], ['[United Kingdom]',
'IN 1', 'CN 1']);
AddGroupCountry(['Australia'], ['[Australia]', 'MO 1', 'IN 1',
'MI 1', 'TE 1', '[United Kingdom]', 'CN 1', '[Commonwealth]',
'OI 1']);
AddGroupCountry(['Burma', 'India', 'Ceylon'],
['[India]', 'IN 1', 'MI 1', 'GA 1', 'TE 2',
'[United Kingdom]', 'HQ Wavell', 'IN 1', 'AT 1',
'CS Formidable', 'CS Illustrious', 'CS Indomitable',
'CS Resolution', 'CS Revenge', 'CS Warspite', 'CS Ramillies',
'CS Renown', 'CS Royal Sovereign', 'CS Hawkins', 'CS Birmingham',
'CS Devonshire', 'CS Frobisher', 'CS Glasgow', 'CS Mauritius',
'CL Ceres', 'CL Danae', 'CL Emerald', 'CL Caledon', 'CL Capetown',
'CL Dragon', 'CL Enterprise', 'CL Phoebe', 'NT 1',
'CN 1', 'CP 5/3',
'[Australia]', 'CS Australia', 'CS Canberra', 'CL Adelaide',
'CL Hobart',
'[New Zealand]', 'CS Gambia', 'CL Achilles', 'CL Leander',
'[Netherlands]', 'CS Sumatra', 'CL Jacob van Heemskerck',
'CL Tromp',
'[Commonwealth]', 'ASW 1', 'OI 1']);
AddGroupProduction(tJulAug, 1942, False, ['[United Kingdom]',
'F2 1', 'PI 1', 'CL Durban']);
AddGroupProduction(tSepOct, 1942, False, ['[United Kingdom]',
'CS Sussex', 'AM 1', 'SU 1']);
end;
mcJapan: // Guadalcanal
begin
FormosaMilitiaOK := True;
AddGroupCountry(['Japan'], ['IN 1', 'MI 2', '[Div]', 'AT 1', 'EN 1',
'N2 1', 'PI 1', 'OI 8']);
AddGroupCountry(['Siam'], ['[Siam]', 'MI 1']);
AddGroupCountry(['Burma'], ['HQ Yamashita', 'IN 1', 'F2 1',
'PI 1']);
AddGroupSimple(lPacificAsia, ['HQ Yamamoto', 'IN 2', 'MA 2',
'[Div]', 'AT 1', 'MA 1', 'F2 1/1', 'L3 1/1', 'N2 1/1',
'N3 1/1', 'A3 1', 'PI 5', 'CS Akagi', 'CS Hiryu', 'CS Junyo',
'CS Kaga', 'CS Ryujo', 'CS Shokaku', 'CS Soryu', 'CS Zuikaku',
'CS Fuso', 'CS Hiei', 'CS Ise', 'CS Kongo', 'CS Nagato',
'CS Yamato', 'CS Atago', 'CS Kako', 'CS Mogami', 'CS Myoko',
'CS Tone', 'CS Hosho', 'CS Shoho', 'CS Taiyo', 'CS Unyo',
'CS Zuiho', 'CS Haruna', 'CS Hyuga', 'CS Kirishima',
'CS Mutsu', 'CS Yamashiro', 'CS Aoba', 'CS Ashigara',
'CS Chikuma', 'CS Chokai', 'CS Furutaka', 'CS Haguro',
'CS Idzumo', 'CS Kinugasa', 'CS Kumano', 'CS Maya',
'CS Mikuma', 'CS Nachi', 'CS Suzuya', 'CS Takao', 'CL Katori',
'CL Natori', 'CL Oi', 'CL Sendai', 'CL Tenryu', 'CL Yura',
'CL Abukuma', 'CL Isuzu', 'CL Jintsu', 'CL Kashii', 'CL Kashima',
'CL Kinu', 'CL Kiso', 'CL Kitakami', 'CL Kuma', 'CL Nagara',
'CL Naka', 'CL Ping Hai', 'CL Tama', 'CL Tatsuta', 'CL Yubari',
'ASW 1', 'NT 3', 'AM 1', 'SU 4', 'CN 24', 'CP 17/12']);
AddGroupRepairPool(['CS Asama']);
AddGroupProduction(tJulAug, 1942, False, ['IN 1', 'F2 1', 'PI 1',
'CS Hiyo', 'CS Musashi', 'CP 1/1']);
AddGroupProduction(tSepOct, 1942, False, ['CL Agano', 'IN 1',
'N3 1', 'PI 1', 'CP 1/1']);
AddGroupProduction(tNovDec, 1942, False, ['IN 1', 'CS Chuyo',
'CS Ryuho', 'CN 1', 'CP 1']);
AddGroupProduction(tJanFeb, 1943, False, ['IN 1', 'CS Oyodo']);
end;
mcUnitedStates: // Guadalcanal
begin
AddGroupSimple(lUSAEastCoast, ['L3 1', 'PI 1', 'CS Hornet',
'CS Washington', 'CS North Carolina', 'CL Columbia']);
AddGroupSimple(lUSAWestCoast, ['MO 1', 'IN 1', 'MA 1', '[Div]',
'EN 1', 'CS Saratoga', 'CS Colorado', 'CS Louisville']);
AddGroupSimple(lPacificAmerica, ['HQ MacArthur', '[Div]', 'AT 1',
'MA 1', 'F2 2/1', 'L3 1', 'N3 1', 'PI 4', 'CP 6/4',
'OI 2', 'CS Lexington', 'CS Yorktown', 'CS Chicago',
'CS New Orleans', 'CS Portland', 'CS Salt Lake City',
'CS San Francisco', 'CS Vincennes', 'CL Brooklyn', 'CL Omaha',
'CL San Diego', 'CL Helena', 'CL Juneau', 'CL Marblehead',
'CL Phoenix', 'CL Raleigh', 'CL Richmond', 'ASW 1', 'NT 1',
'SU 1', 'CN 10']);
AddGroupCity('Honolulu', EmptyStr, ['HQ Nimitz',
'CP 2/1', 'CS Enterprise', 'CS Maryland', 'CS Mississippi',
'CS Pennsylvania', 'CS Pensacola', 'CS Idaho', 'CS New Mexico',
'CS Astoria', 'CS Chester', 'CS Indianapolis', 'CS Minneapolis',
'CS Northampton', 'CL Atlanta', 'CL St. Louis', 'CL Boise',
'CL Detroit', 'CL Honolulu', 'CL Nashville', 'CL San Juan',
'NT 1', 'SU 1']);
AddGroupRepairPool(['CS Tennessee', 'CS Nevada']);
AddGroupProduction(tJulAug, 1942, False, ['IN 1', 'N2 1', 'PI 1',
'CP 1/1']);
AddGroupProduction(tSepOct, 1942, False, ['L3 1', 'PI 1', 'AM 1',
'CL Denver', 'CL Montpellier', 'CP 1']);
AddGroupProduction(tNovDec, 1942, False, ['CS Essex', 'CP 1/1']);
AddGroupProduction(tJanFeb, 1943, False, ['CS Lexington II',
'CL Birmingham', 'CL Santa Fe']);
end;
end;
end;
And no, trying to do this using a spreadsheet style data format would be vastly harder.
_____________________________
Steve Perfection is an elusive goal.
|