MWIF code modules

World in Flames is the computer version of Australian Design Group classic board game. World In Flames is a highly detailed game covering the both Europe and Pacific Theaters of Operations during World War II. If you want grand strategy this game is for you.

Moderator: Shannon V. OKeets

Shannon V. OKeets
Posts: 22165
Joined: Wed May 18, 2005 11:51 pm
Location: Honolulu, Hawaii
Contact:

RE: MWIF code modules

Post by Shannon V. OKeets »

ORIGINAL: Froonp
Hmmm, maybe I could display on the DOW form a simple count of USA chits in the 4 pools. Not what the chits are, just how many there are in each pool. I could also make a popup informative message appear when the player places the cursor over those 4 counts. This visual could serve as a reminder without being too invasive. It might also be of assistence to the Axis players.
Good idea.
You might also list the US Entry cost beside the country's name in the DoW and alignement forms, so that the player is fully aware of the risks.
Yes. Even better.
Steve

Perfection is an elusive goal.
Shannon V. OKeets
Posts: 22165
Joined: Wed May 18, 2005 11:51 pm
Location: Honolulu, Hawaii
Contact:

RE: MWIF code modules

Post by Shannon V. OKeets »

In the process of rewriting the code for Declarations of War, I have finalized the subphases within the DOW phase. Here are the current DOW subphases.

I am still working on the code for the newest addition (Choosing which major power aligns an attacked minor country). Also remaining for conversion from old CWIF code is processing Claims, though that should only take an hour or so to convert. The task there is to write all Claims out to the Game Record Log so they will be sent over the Internet.

===============

∙ DspDOWMajor
Major powers on the phasing side may declare war on other major powers. There is a separate form just for making this decision. When the player closes the form, the phase is completed for his current major power. If it is not possible for one or more of the phasing major powers to DOW on another major power, then that/those phasing major powers are not be asked to make any decisions during this subphase. For instance, that is the case in the Barbarossa and Guadalcanal scenarios as well as scenarios that start after all major powers are already at war with each other. If the USA DOWs Germany, Italy, or Japan, the roll for success/failure is immediately made and all players informed of the result.

∙ DspDOWMinor
Major powers on the phasing side may declare war on minor countries. This is similar to the previous phase but the targets of the DOWs are exclusively minor countries. It has it own form and when the player closes the form, the phase is completed for his current major power. Major powers can choose to execute claims during this subphase since if the claim (e.g., Bessarabia, Finnish Borderlands) is denied, then a DOW on the minor country is automatic.

∙ DspUSEntry
Once the previous two subphases have been completed by all major powers on the phasing side, die rolls and other events take place in this subphase related to US Entry Actions.. Those include drawing, placing, moving, and removing US Entry markers. The results of this phase are displayed to the players for their information. No player input is necessary for this subphase and MasterMWIF completes it automatically and advances to the next subphase.

∙ DspNeutralityPacts
A major power on the phasing side may propose to create a new or re-confirm an existing neutrality pact with a major power on the non-phasing side. This subphase has its own form. When the player closes the form, the phase is completed for his current major power.

∙ DspReserves
If a country that DOWs another, or was the target of a DOW, has reserve units, it is given the option to call them out and place them on the map at this time.

∙ DspChooseAligner
If a minor country was the target of a DOW, then the non-phasing side decides which major power will align/control the minor country. This question is posed for each minor attacked and the first choice is given to the major power (which must currently be at war with another major power) whose capital is closest to the attacked minor country’s capital. If the option to align to the minor country is denied, then the question is posed to the next closest major power on the non-phasing side. If no major power chooses to align the minor country, then it surrenders immediately. For Poland, only the CW may align it. For minor countries in the Americas, only the USA may choose to align them.

∙ DspSetupAttackedMinor
If a minor country that was the target of a DOW has been aligned by the non-phasing side, then the aligning major power sets up and the minor country’s units.

∙ DspAlignMinor
Major powers on the phasing side may voluntarily align minor countries. A separate form is used for this subphase. When the player closes the form, the phase is completed for his current major power.

∙ DspSetupAlignedMinor
If a minor country was voluntarily aligned, then its units are placed on the map by the controlling major power.

∙ DspDone
Once the subphase has advanced to here, the phase is terminated and the game advances to the Choose Action phase.
====================
Steve

Perfection is an elusive goal.
User avatar
Froonp
Posts: 7998
Joined: Tue Oct 21, 2003 8:23 pm
Location: Marseilles, France
Contact:

RE: MWIF code modules

Post by Froonp »

∙ DspReserves
If a country that DOWs another, or was the target of a DOW, has reserve units, it is given the option to call them out and place them on the map at this time.
You need also to propose to call reserve units and place them on the map to any country that is still at war, and has not called all of its reserves. This has been clarified by Harry recently :

*****************************************
Q039 :
If you do not call out all your Reserves, what happens to the rest?
- Are they placed in your Force Pools?
- Are they available in any subsequent reinforcement phase?
- Are they available during any subsequent DOW phase?
- Are they available at ANY time subsequent to the DOW (even during an opponents impulse)?
- Are they only available upon a subsequent DOW?

A039 :
They are available to be called out in any subsequent DOW phase (provided, of course, that you are still at war). Date 19/07/2007
*****************************************
User avatar
Froonp
Posts: 7998
Joined: Tue Oct 21, 2003 8:23 pm
Location: Marseilles, France
Contact:

RE: MWIF code modules

Post by Froonp »

∙ DspDOWMinor
Major powers on the phasing side may declare war on minor countries. This is similar to the previous phase but the targets of the DOWs are exclusively minor countries. It has it own form and when the player closes the form, the phase is completed for his current major power. Major powers can choose to execute claims during this subphase since if the claim (e.g., Bessarabia, Finnish Borderlands) is denied, then a DOW on the minor country is automatic.
I would also like to point to you that Neutral Territories should also be included in the list of Minor Countries, as DoW on Neutral Territories is alike DoW on Minor Countries (example, Crete after Greece was conquered, The Azores after Portugal was conquered, etc...).
************************************
13.7.1 Conquest
(...)
Each neutral territory may subsequently be declared war on as if it were a minor country.
************************************
Shannon V. OKeets
Posts: 22165
Joined: Wed May 18, 2005 11:51 pm
Location: Honolulu, Hawaii
Contact:

RE: MWIF code modules

Post by Shannon V. OKeets »

ORIGINAL: Froonp
∙ DspReserves
If a country that DOWs another, or was the target of a DOW, has reserve units, it is given the option to call them out and place them on the map at this time.
You need also to propose to call reserve units and place them on the map to any country that is still at war, and has not called all of its reserves. This has been clarified by Harry recently :

*****************************************
Q039 :
If you do not call out all your Reserves, what happens to the rest?
- Are they placed in your Force Pools?
- Are they available in any subsequent reinforcement phase?
- Are they available during any subsequent DOW phase?
- Are they available at ANY time subsequent to the DOW (even during an opponents impulse)?
- Are they only available upon a subsequent DOW?

A039 :
They are available to be called out in any subsequent DOW phase (provided, of course, that you are still at war). Date 19/07/2007
*****************************************
The way this is handled is that a player can call up the Pool Form to see which of his units are in which pools. Undeployed reserve units are in the Reserve Pool. If the player chooses to deploy them, they come in during the next reinforcement phase. (I believe they are disorganized on entry, but I will have to check).

In other words, the player is neither reminded nor forced to make a decision during each DOW phase. Instead, he can call out his reserves whenever he likes - they just come in at the beginning of the next turn.
Steve

Perfection is an elusive goal.
User avatar
Froonp
Posts: 7998
Joined: Tue Oct 21, 2003 8:23 pm
Location: Marseilles, France
Contact:

RE: MWIF code modules

Post by Froonp »

ORIGINAL: Shannon V. OKeets
ORIGINAL: Froonp
*****************************************
Q039 :
If you do not call out all your Reserves, what happens to the rest?
- Are they placed in your Force Pools?
- Are they available in any subsequent reinforcement phase?
- Are they available during any subsequent DOW phase?
- Are they available at ANY time subsequent to the DOW (even during an opponents impulse)?
- Are they only available upon a subsequent DOW?

A039 :
They are available to be called out in any subsequent DOW phase (provided, of course, that you are still at war). Date 19/07/2007
*****************************************
The way this is handled is that a player can call up the Pool Form to see which of his units are in which pools. Undeployed reserve units are in the Reserve Pool. If the player chooses to deploy them, they come in during the next reinforcement phase. (I believe they are disorganized on entry, but I will have to check).

In other words, the player is neither reminded nor forced to make a decision during each DOW phase. Instead, he can call out his reserves whenever he likes - they just come in at the beginning of the next turn.
Which is not how Harry clarified it to be working in WiF in the quote above (Q039).
Shannon V. OKeets
Posts: 22165
Joined: Wed May 18, 2005 11:51 pm
Location: Honolulu, Hawaii
Contact:

RE: MWIF code modules

Post by Shannon V. OKeets »

ORIGINAL: Froonp
∙ DspDOWMinor
Major powers on the phasing side may declare war on minor countries. This is similar to the previous phase but the targets of the DOWs are exclusively minor countries. It has it own form and when the player closes the form, the phase is completed for his current major power. Major powers can choose to execute claims during this subphase since if the claim (e.g., Bessarabia, Finnish Borderlands) is denied, then a DOW on the minor country is automatic.
I would also like to point to you that Neutral Territories should also be included in the list of Minor Countries, as DoW on Neutral Territories is alike DoW on Minor Countries (example, Crete after Greece was conquered, The Azores after Portugal was conquered, etc...).
************************************
13.7.1 Conquest
(...)
Each neutral territory may subsequently be declared war on as if it were a minor country.
************************************
I haven't looked at the code to check for this specifically, but I will.
Steve

Perfection is an elusive goal.
Shannon V. OKeets
Posts: 22165
Joined: Wed May 18, 2005 11:51 pm
Location: Honolulu, Hawaii
Contact:

RE: MWIF code modules

Post by Shannon V. OKeets »

ORIGINAL: Froonp
ORIGINAL: Shannon V. OKeets
ORIGINAL: Froonp
*****************************************
Q039 :
If you do not call out all your Reserves, what happens to the rest?
- Are they placed in your Force Pools?
- Are they available in any subsequent reinforcement phase?
- Are they available during any subsequent DOW phase?
- Are they available at ANY time subsequent to the DOW (even during an opponents impulse)?
- Are they only available upon a subsequent DOW?

A039 :
They are available to be called out in any subsequent DOW phase (provided, of course, that you are still at war). Date 19/07/2007
*****************************************
The way this is handled is that a player can call up the Pool Form to see which of his units are in which pools. Undeployed reserve units are in the Reserve Pool. If the player chooses to deploy them, they come in during the next reinforcement phase. (I believe they are disorganized on entry, but I will have to check).

In other words, the player is neither reminded nor forced to make a decision during each DOW phase. Instead, he can call out his reserves whenever he likes - they just come in at the beginning of the next turn.
Which is not how Harry clarified it to be working in WiF in the quote above (Q039).
There is no effective difference in game play, since in both situations the units are placed on the map at the start of the turn before any units move. As coded, the decision can be made at any time (in advance as it were) and this removes the repeated questioning of "do you want the rest of your resreves now?" every turn.

I expect this to be rarely used, since most players call out all their reserves immediately. The USSR being the only exception that I can think of - and even then only under unusual circumstances.
Steve

Perfection is an elusive goal.
User avatar
Froonp
Posts: 7998
Joined: Tue Oct 21, 2003 8:23 pm
Location: Marseilles, France
Contact:

RE: MWIF code modules

Post by Froonp »

ORIGINAL: Shannon V. OKeets
ORIGINAL: Froonp
ORIGINAL: Shannon V. OKeets
The way this is handled is that a player can call up the Pool Form to see which of his units are in which pools. Undeployed reserve units are in the Reserve Pool. If the player chooses to deploy them, they come in during the next reinforcement phase. (I believe they are disorganized on entry, but I will have to check).

In other words, the player is neither reminded nor forced to make a decision during each DOW phase. Instead, he can call out his reserves whenever he likes - they just come in at the beginning of the next turn.
Which is not how Harry clarified it to be working in WiF in the quote above (Q039).
There is no effective difference in game play, since in both situations the units are placed on the map at the start of the turn before any units move. As coded, the decision can be made at any time (in advance as it were) and this removes the repeated questioning of "do you want the rest of your resreves now?" every turn.

I expect this to be rarely used, since most players call out all their reserves immediately. The USSR being the only exception that I can think of - and even then only under unusual circumstances.
There is a difference in that RAW says that the uncalled reserves "are available to be called out in any subsequent DOW phase". This mean that those troops can arrive during each impulse, even the enemy's ones, face-down, not only at the start of the turn face-up.
Shannon V. OKeets
Posts: 22165
Joined: Wed May 18, 2005 11:51 pm
Location: Honolulu, Hawaii
Contact:

RE: MWIF code modules

Post by Shannon V. OKeets »

ORIGINAL: Froonp
ORIGINAL: Shannon V. OKeets
ORIGINAL: Froonp

Which is not how Harry clarified it to be working in WiF in the quote above (Q039).
There is no effective difference in game play, since in both situations the units are placed on the map at the start of the turn before any units move. As coded, the decision can be made at any time (in advance as it were) and this removes the repeated questioning of "do you want the rest of your resreves now?" every turn.

I expect this to be rarely used, since most players call out all their reserves immediately. The USSR being the only exception that I can think of - and even then only under unusual circumstances.
There is a difference in that RAW says that the uncalled reserves "are available to be called out in any subsequent DOW phase". This mean that those troops can arrive during each impulse, even the enemy's ones, face-down, not only at the start of the turn face-up.
My mistake. I shouldn't write posts when barely awake.

I will still leave the decision to call out reserves, that were not called out when the opportunity first arose, in the Pool Form. But I will have the Pool Form set a flag if the player calls them out later. The flag will be used when the DOW subphase for setting up reserves next comes around. Then the player will be given the ability to position them on the map.

The setting up reserves subphase is always open to players on both sides (potentially) so the logic is already in place to handle having both phasing and non-phasing major powers set up reserve units.

In general, I dislike having the program 'nag' a player about some decision he has already made. "Do you wanna? Do you wanna? Do you wanna?" Instead, I prefer to accept the player's first decision and leave that as the on-going choice until the player proactively changes it.
Steve

Perfection is an elusive goal.
User avatar
dale1066
Posts: 108
Joined: Sat Jun 23, 2007 7:49 am

RE: MWIF code modules

Post by dale1066 »

Steve

not sure if this is the correct place for this but I've been messing with Cwif, again[:)], and have found what I believe is a bug in the game save routine or save production window code. I know you intend to re-use the Cwif code and this may have already been flagged or fixed if so apols if so as this is a bit of a long post.

It manifests itself in that games saved after doing this particular, admitedly rare and perhaps needless move, cannot be read in again. which I suspect is quite a critical bug, well it did annoy me. [:)]

Game situation is its May/June 1940 and France having been lent loads of resources by the CW now has too many BPs to use (poor play I know) While in the production window, see screen shot, she built 4 inf up to gearing limits then with 6 BPs left decided to destroy them rather than possibly let them fall into german hands.

With the 6 BP still not used I click OK on the production window and get the question dialog "You still have 6 unused build points. Continue anyway?" I Click yes and get the save build points dialog. At his point I save a bp in bordeaux then destroy it save the next then destroy it etc. using the buttons provided, doing this for all 6 BPs. I get the same question dialog back again and click yes and everything seems fine and I continued with the Chinese, then axis production but as mentioned above the save games after this point well as far as a few impulses into the next turn all cannot be loaded.

I've tried to save then destroy 4 and then 2 in another place and this gets the same result, I restarted the game and tried to load the Production save game with no joy and then successfully loaded the previous stages save game "break down corps ".

I believe there is a simple workaround and that is to not to place the BPs and not to then then try to destroy them but at the save build points dialog just click ok. and click then yes at the question dialog, this seems to then ignore the excess buildpoints and the games seem to save ok.

If you want any other info, more clarification, the corrupt save file, or me to check something else please let me know

Cheers

Dale
Attachments
production_window.jpg
production_window.jpg (69.34 KiB) Viewed 423 times
We're here for a good time not a long time!
Shannon V. OKeets
Posts: 22165
Joined: Wed May 18, 2005 11:51 pm
Location: Honolulu, Hawaii
Contact:

RE: MWIF code modules

Post by Shannon V. OKeets »

ORIGINAL: dale1066

Steve

not sure if this is the correct place for this but I've been messing with Cwif, again[:)], and have found what I believe is a bug in the game save routine or save production window code. I know you intend to re-use the Cwif code and this may have already been flagged or fixed if so apols if so as this is a bit of a long post.

It manifests itself in that games saved after doing this particular, admitedly rare and perhaps needless move, cannot be read in again. which I suspect is quite a critical bug, well it did annoy me. [:)]

Game situation is its May/June 1940 and France having been lent loads of resources by the CW now has too many BPs to use (poor play I know) While in the production window, see screen shot, she built 4 inf up to gearing limits then with 6 BPs left decided to destroy them rather than possibly let them fall into german hands.

With the 6 BP still not used I click OK on the production window and get the question dialog "You still have 6 unused build points. Continue anyway?" I Click yes and get the save build points dialog. At his point I save a bp in bordeaux then destroy it save the next then destroy it etc. using the buttons provided, doing this for all 6 BPs. I get the same question dialog back again and click yes and everything seems fine and I continued with the Chinese, then axis production but as mentioned above the save games after this point well as far as a few impulses into the next turn all cannot be loaded.

I've tried to save then destroy 4 and then 2 in another place and this gets the same result, I restarted the game and tried to load the Production save game with no joy and then successfully loaded the previous stages save game "break down corps ".

I believe there is a simple workaround and that is to not to place the BPs and not to then then try to destroy them but at the save build points dialog just click ok. and click then yes at the question dialog, this seems to then ignore the excess buildpoints and the games seem to save ok.

If you want any other info, more clarification, the corrupt save file, or me to check something else please let me know

Cheers

Dale
Thanks. I'll add a cleaner way to destroy build points during production.
Steve

Perfection is an elusive goal.
Shannon V. OKeets
Posts: 22165
Joined: Wed May 18, 2005 11:51 pm
Location: Honolulu, Hawaii
Contact:

RE: MWIF code modules

Post by Shannon V. OKeets »

It has been 10 months since I updated my list of the table of contents for the project manuals I maintain. They were so out of date, they were losing their usefulness as a way for me to find a printout when I wanted it.

So, I took a couple of hours to review, revise, and document the different binders I have for MWIF.

The Summary page lists the binders by name and the number of lines of code in each. There are 9 large three inch binders, and 8 smaller binders of varying sizes. Of course there is other stuff too, though these make up the vast majority of the printed material.

Compared to the last time I did this, I calculate I am averaging close to 100 new lines of code per day.
====================
MWIF Listing Index for Printed Program Modules
(as September 23, 2007)

Summary

Main Module and Beginning & End of Turn (21,150)
NetPlay & PBEM (1,100)

MWIF Control (19,350)
Loading MWIF & Saved Games (7,700)
Game Record Logs (31,550)

Player Interface, Information Forms, Messages, Tutorials & Filters (21,350)

Beginning Processing Sequence (24,150)

Movement & Combat (30,000)
Supply (1,100)

Maps, Resources, Factories, Production, & Trade (23,300)
Units (28,150)

AI Opponent (2,400)
AI Strategic Plans (196 pages)
Variables & Strings (4,550)
WIFCustom (3,800)

WIFCustom External Procedures (6,500)
Tools (10,000)

Total = 236,300 lines of code
=========================
Main Module and Beginning & End of Turn (21,150)

Main (11,100)
PhaseObject (50)
PhaseReinforcements (650)
PhaseLending (150)
Lending (300)
Initiative (500)
MoveFirst (100)
WIFWeather (300)
WeatherReport (150)
WeatherChances (100)
PhaseDOW (1400)
DOWMajors (350)
DOWMinors (450)
WIFUSEntryAction (750)
Pact (1200)
PactOD (50)
PactMarkerMove (450)
PactMarkers (100)
Reserves (200)
AddMinorUnits (100)
DOWAlign (200)
PhaseChooseAction (150)
Action (700)
ActionLimits (150)
PhasePortAttack (800)
USWar (200)
Partisans (300)
UseOil (1000)
Broken (100)
Reform (200)
Split (50)
Conquest (500)
Vichy (750)
Loan (100)
UnitDialog (500)

NetPlay & PBEM (1,100)

Chat (450)
NewMessage (150)
NetData (200)
SendTo (200)
WIFMessage (100)

MWIF Control (19,350)

CentralControls (350)
WhoNeedsToDecide (700)
GameInProgress (5300)
GameControls (1600)
MessageControl (150)
Password (50)
PhaseControlProcs (3200)
SeqOfPlay (150)
SimControl (6300)
SwitchPlayer (50)
WIFMessageID (1500)

Loading MWIF & Saved Games (7,700)

BitmapProcs (250)
Cursors (50)
LoadStatus (100)
MWIFLoadBitmaps (1,000)
SaveSetup (50)
GameSaveRestore (6,300)
SavedGame (1600) - CWIF, reference only

Game Record Logs (31,550)

RecordLogIDs (500)
RecordLogVar (500)
RecordLogRecords (4700)
RecordLogIn (6350)
RecordLogOut (5900)
RecordLogPrep (400)
RecordLogSetVar (150)
RecordLogSet (6200)
RecordLogUse (5800)
UseGRLProcs (950)

Player Interface, Information Forms, Messages, Tutorials & Filters (21,350)

PlayerInterfaceControl (200)
MapCreateDestroy (50)
MapDisplayControls (50)
MapVList (450)
MouseCommands (2100)
Note (150)
ScreenLayout (2400)
ScreenLList (400)
Undo (300)
UnitMenuProcs (1400)
UnitResolution (50)
ActiveForms (50)
AirReserves (250)
CntList (750)
ConvoyInfo (350)
Dice (150)
DiceProcs (400)
GameAbout (50)
GameOptions (150)
Place (1600)
ProcessForms (1100)
Pool (700)
Relations (450)
UnitPanel (200)
Victory (500)
ViewUnits (550)
WIFUSEntry (1200)
HelpMessage (300)
MessageNoYes (50)
MessageOK (50)
MessageYesNoCancel (50)
WIFMessageForm (100)
IntroTutorials (250)
IntroTut (100)
Tutorials (100)
SimpleMessage (50)
WIFMessageJointForm (50)
HexFilter (100)
LoadFilter (150)
PFilter (50)
SaveFilter (100)
UFilter (3400)
UnitDataSelFilter (50)
UnitViewerFilter (900)

Beginning Processing Sequence (24,150)

OpeningScreen (350)
Start (1600)
Scenario (250)
OptionalRules (500)
OptionalRulesDescriptions (2600)
Player (950)
Bid (500)
GameData (2550)
Alternate (150)
ChangeControl (550)
InitGameVar (150)
TimeDate (150)
Politics (600)
SetupData (5200)
SetupGroups (400)
SetupUnitTypes (1300)
USEntryPool (850)
Scrap (2000)
Setup (2800)
StartChits (100)
FortHexside (200)
BreakDown (300)
SpecialSetupRules (100)

Movement & Combat (30,000)

AirDistance (200)
AirTransportLand (100)
CAP (200)
ChooseCarrier (550)
DetermineSupply (1200)
Distance (250)
DropOff (250)
OverStacked (250)
PickHQ (250)
PickSeaArea (100)
PlaneRole (200)
Reorganize (450)
SBLosses (250)
Section (500)
SelectUnits (850)
MoveStack (6650)
Stack (3550)
StackProcs (100)
Supply (200)
CVPClasses (150))
AirAttack (1050)
AirCombat (2100)
AntiAir (400)
AntiAirCombat (550)
ChartLandCombat (250)
CommitSubs (150)
DestroyFactory (100)
DestroyUnits (1300)
IgnoreNotional (100)
LandCombat (2700)
NavalCombat (950)
NavalCombatIncludeType (550)
NavalCombatResults (1600)
NavalInterception (300)
Surprise (100)
SurprisePoints (1200)
TwoD10 (200)
USNavalCombat (150)

Supply (1,100)

SupplyLinks (900)
SupplySearches (200)

Maps, Resources, Factories, Production, & Trade (23,300)

Coast (150)
GlobalMap (1800)
GlobeLegend (200)
HexList (1100)
HexListProcs (100)
MapCSV (1900)
Maps (3700)
MapTable (800)
SeaArea (1300)
SeaBoxes (50)
BuildPoint (50)
Captured (200)
Factory (1050)
NewTrade (200)
Production (2350)
ProductionData (50)
ProductionUndo (100)
Resource (1650)
ResourceProduction (3400)
ResourceTrace (50)
SaveBuild (350)
SaveOil (300)
Site (750)
Trade (1450)
TradeResource (250)

Units (28,200)

Air (3000)
Land (2400)
Naval (2150)
WIFUnits (7600)
UnitTable (2350)
Special (600)
MajorCountry (150)
MPGroup (250)
Leader (200) - MWIF Product 2
Commitment (50)
Country (9450)

AI Opponent (2,400)

AIMajorPower (350)
AIDecisionMaker (450)
AIGrandStrategist (100)
AIManufacturingCouncil (150)
AICommanderInChief (200)
AIForeignLiaison (100)
AIJointChiefs (150)
AIAdmiralty (300)
AIAirMarshal (200)
AIFieldMarshal (400)

AI Strategic Plans (196 pages)

China (4 pages)
Commonwealth (47 pages)
France (18 pages)
Germany (36 pages)
Italy (29 pages)
japan (15 pages)
USA (24 pages)
USSR (23 pages)

Variables & Strings (4,550)

BitmapVar (200)
DynamicVar (50)
InProgressVar (250)
InterfaceVar (50)
PackageVar (150)
RigidVar (1100)
SetupVar (50)
StaticVar (500)
UnitDrawVar (600)
WIFGlobals (150)
ResStrings (1400)
AIVar (50)

WIFCustom (3,800)
MapArea (350)
HexArea (2200)
UnitStackViewer (600)
UnitDataDef (550)
UnitPicture (100)

WIFCustom External Procedures (6,500)

UnitDataProcs (1250)
UnitPictureProcs (50)
GameMap (100)
WIFMap (300)
GameMapArea (3150)
GameStackViewer (1000)
RailLines (400)
MapLabel (250)

Tools (10,000)

Arrow (300)
CustDlg (50)
Dialog (100)
DirDlg (100)
DispGrid (100)
DragList (600)
EVerify (550)
FixedCheckListBox (100)
FixedListView (100)
KbdCtrl (100)
LastUsed (600)
ListDlg (400)
MesgDlg (100)
Name (150)
NumDlg (150)
Popup (100)
Random (150)
RealDlg (150)
Search (50)
SimpleGrid (550)
SingInst (50)
Sort (50)
Stored (1850)
StrDlg (150)
StrList (50)
Table (2100)
TableCmn (800)
TBox (200)
TxtDsp (100)
WaitDlg (150)
Steve

Perfection is an elusive goal.
User avatar
lomyrin
Posts: 3741
Joined: Wed Dec 21, 2005 7:17 pm
Location: San Diego

RE: MWIF code modules

Post by lomyrin »

ORIGINAL: Shannon V. OKeets

ORIGINAL: dale1066

Steve

not sure if this is the correct place for this but I've been messing with Cwif, again[:)], and have found what I believe is a bug in the game save routine or save production window code. I know you intend to re-use the Cwif code and this may have already been flagged or fixed if so apols if so as this is a bit of a long post.

It manifests itself in that games saved after doing this particular, admitedly rare and perhaps needless move, cannot be read in again. which I suspect is quite a critical bug, well it did annoy me. [:)]

Game situation is its May/June 1940 and France having been lent loads of resources by the CW now has too many BPs to use (poor play I know) While in the production window, see screen shot, she built 4 inf up to gearing limits then with 6 BPs left decided to destroy them rather than possibly let them fall into german hands.

With the 6 BP still not used I click OK on the production window and get the question dialog "You still have 6 unused build points. Continue anyway?" I Click yes and get the save build points dialog. At his point I save a bp in bordeaux then destroy it save the next then destroy it etc. using the buttons provided, doing this for all 6 BPs. I get the same question dialog back again and click yes and everything seems fine and I continued with the Chinese, then axis production but as mentioned above the save games after this point well as far as a few impulses into the next turn all cannot be loaded.

I've tried to save then destroy 4 and then 2 in another place and this gets the same result, I restarted the game and tried to load the Production save game with no joy and then successfully loaded the previous stages save game "break down corps ".

I believe there is a simple workaround and that is to not to place the BPs and not to then then try to destroy them but at the save build points dialog just click ok. and click then yes at the question dialog, this seems to then ignore the excess buildpoints and the games seem to save ok.

If you want any other info, more clarification, the corrupt save file, or me to check something else please let me know

Cheers

Dale
Thanks. I'll add a cleaner way to destroy build points during production.


In CWiF after you click on 'continue anyway' when you have unused BP's the next screen that pops in is where to save the BP's. Do not choose any city at all, just click on 'continue' again and the BP's disappear never to appear again. It works with other words.

Lars

Post Reply

Return to “World in Flames”