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 »

I am revising the code for the phase pReinforcements so it follows RAW more accurately. To do that I have created subphases for the reinforcement phase comparable to what I did for the DOW phase. There no longer is a separate phase for removing air units. Instead it is a subphase within pReinforcement that follows placing reinforcements on the map. If you compare the subphases below to RAW Section 4 Reinforcement Stage, you will see that I have omitted the Special Additions, since they do not occur during reinforcements, but instead depend on going to war or coming to peace.

Perhaps more importantly, I am having each scenario start with the lending phase, skipping the reinforcement phase. In actuality, the lending phase too is often skipped, because two major powers on the same side have to be at war at the start of the scenario before they can lend anything. That isn't true for Barbarossa and Global War, for example.

Most of the reinforcement phase is irrelevant during the first turn since there are no annual additions, scrapping units has already been done, and there are no reinforcements to be placed on the map. Perhaps there might be a replacement unit available in one of the later scenarios, but that is very small potatoes. The only impact I can see for skipping the reinforcement phase, is the point Patrice raised a while back where the French might want to remove the carrier air unit and recover the pilot so it can be available for the next turn. However, that can be handled during setup by simply placing the carrier air unit in Air Reserve as part of setup. The pilot will then be available next turn.
// ****************************************************************************
// DOW SubPhases
// ****************************************************************************
TDOWSubPhase = (DspDOWMajor, DspDOWMinor, DspUSEntry, DspNeutralityPacts,
DspReserves, DspSetupAttackedMinor, DspAlignMinor, DspSetupAlignedMinor,
DspJapaneseOccupation, DspNone);
// ****************************************************************************
// Reinforcement SubPhases
// ****************************************************************************
TReinforceSubPhase = (RspAnnualAdds, RspScrap, RspReplacements, RspPlaceUnits,
RspAirReserve, RspDone);


Image
Attachments
Seq52720072.jpg
Seq52720072.jpg (93.88 KiB) Viewed 384 times
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 »

The only impact I can see for skipping the reinforcement phase, is the point Patrice raised a while back where the French might want to remove the carrier air unit and recover the pilot so it can be available for the next turn. However, that can be handled during setup by simply placing the carrier air unit in Air Reserve as part of setup. The pilot will then be available next turn.
While reading your post, I was about to make this remark again.
If MWiF allows for setting up planes directly in the reserve pool, then fine.
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
The only impact I can see for skipping the reinforcement phase, is the point Patrice raised a while back where the French might want to remove the carrier air unit and recover the pilot so it can be available for the next turn. However, that can be handled during setup by simply placing the carrier air unit in Air Reserve as part of setup. The pilot will then be available next turn.
While reading your post, I was about to make this remark again.
If MWiF allows for setting up planes directly in the reserve pool, then fine.
I think this is a cleaner design. The player chooses which air units to give pilots to (e.g., 4 out of 7 fighters that cost 2 BPs) as part of the setup process. At the same time, he now also has the option of choosing fewer air units, thereby leaving pilots for the next turn. This comes up with the USSR too, since some of the air units they have in the force pool are really poor compared to others. The Germans can make use of this at the start of the Barbarossa scenario to not bring an F3 onto the map and instead save the pilot for another Stuka the next turn.

In general, this lets the player maintain a pilot reserve waiting for better air units to be built. In that regard it is a (somewhat) help in getting around the annoying rules that sometimes the carrier air units randomly selected will not fit on any of the current carriers. For example, drawnig carrier air units of class 5 when the highest class of carrier on the map is 4. Of course, you still have to build the additional carrier air units - and wait for their arrival.
Steve

Perfection is an elusive goal.
User avatar
c92nichj
Posts: 345
Joined: Fri Jan 14, 2005 1:15 pm
Contact:

RE: MWIF code modules

Post by c92nichj »

ORIGINAL: Shannon V. OKeets

8th and last in the series. This is a new page - I hadn't drawn it the last time I posted the sequence of play. I need to go over this in detail, tracking it through the code and comparing the diagram to what the code is actually doing. For example, I haven't listed any of the forms here because I am not sure exactly which ones appear when.

Image


At Naval/Air rebase you can potentially get into Naval combat, so you can add a pointer to VI.
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: c92nichj

ORIGINAL: Shannon V. OKeets

8th and last in the series. This is a new page - I hadn't drawn it the last time I posted the sequence of play. I need to go over this in detail, tracking it through the code and comparing the diagram to what the code is actually doing. For example, I haven't listed any of the forms here because I am not sure exactly which ones appear when.

Image


At Naval/Air rebase you can potentially get into Naval combat, so you can add a pointer to VI.
Yes. Thank you.
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 »

Continuing work on the pReinforcement phase, I have modified the subphases to make assigning pilots to air units in the air reserve a separate subphase. Each major power will assign pilots to air units, which will then be added to the reinforcements for placement on the map. These are separate subphases and assigning pilots has to be completed before placing reinforcements on the map.

The way this works is that the side which had the initiative in the last turn processes through the pReinforcement phase first. Each major power on a side can be anywhere in the sequence, without having to wait for the other major powers on his side. The USSR could be scrapping units while the CW has already advanced to removing air units, the USA is still placing reinforcements on the map, and the Chinese are done (RspDone). Once all the major powers on a side are RspDone, the the side which did not have the initiative in the previous turn, begins the pReinforcement phase. When they are done, the turn advances to the pLending phase.

I have pulled the naval replacement task off of the setup form and given it its own little form. Likewise, I removed the button for branching to the Air Reserve form from within the setup form. Though you can review the air reserves more or less whenever you like, actually assigning pilots can only be done within the RspAirReserves subphase of pReinforcement.

Image
Attachments
Seq52920071.jpg
Seq52920071.jpg (85.27 KiB) Viewed 384 times
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 »

I have gone over the sequence of play again, adding in new phases for some new optional rules and modifying what was called a phase versus a subphase. For instance, there is now a full set of subphases for land combat, to match the similar subphase systems for air and naval combat.

Image
Attachments
Seq7420071.jpg
Seq7420071.jpg (100.36 KiB) Viewed 384 times
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 »

I got rid of the game stages labels. Though I find them philosophically alluring, I do not see any need for them.

Image
Attachments
Seq7420072.jpg
Seq7420072.jpg (87.29 KiB) Viewed 384 times
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 »

Two changes here. I got rid of the Japanese occupation subphase by simply blending that into aligning minors (for the Japanese only). I have added the Forced Rebase to Nearest Hex box since this comes up in several locations within the sequence of play. [I might have missed some.]

Image
Attachments
Seq7420073.jpg
Seq7420073.jpg (90.47 KiB) Viewed 384 times
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 »

The only change here is the branch to Scrap, which comes up whenever a unit is destroyed. I intend to make/keep it a button on the destroy units form. That way the program will not always be asking whether you want to scrap a unit that was just destroyed. Instead, the player will have to take a proactive role and click on the Scrap button to scrap the unit. In reality the branch to scrap is just for the single unit that is destroyed (i.e., is does not cintinue on to setup as might be inferred from the 1st page).

Image
Attachments
Seq7420074.jpg
Seq7420074.jpg (103.07 KiB) Viewed 384 times
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 »

Here I added the box for debarkation of land units when the naval transports ends it move in port with cargo. I also added the (I) after the naval combat snice internally there is adistinction made about the 3 source of naval combat: Interception, phasing player (A), and non-phasing player (D).

Image
Attachments
Seq7420075.jpg
Seq7420075.jpg (77.67 KiB) Viewed 384 times
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 »

Just a few changes to the labels (if I remember correctly).

Image
Attachments
Seq7420076.jpg
Seq7420076.jpg (113.5 KiB) Viewed 384 times
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 »

A couple of important changes here. The overruns are pulled out as a separate sequence that can be invoked from several places in the sequence of play. I also made a large box for the instances when moving a unit into a country causes a major interruption in the sequence of play.

Image
Attachments
Seq7420077.jpg
Seq7420077.jpg (86.85 KiB) Viewed 384 times
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 »

Here I renamed the land combat 'phases' as land combat subphases (LCsp...). I added the Select Land Combat box and relocated the Shattered or Retreat box.

Image
Attachments
Seq7420078.jpg
Seq7420078.jpg (93.69 KiB) Viewed 384 times
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 »

9th and last in the series.

Massive changes to this page. Only a few things are still the same in fact. I still need to go back an identify the name for each form that this page uses. Right now I only have two of them labeled. Unless I am unusually lucky, this page will require a lot more work over time.

Image
Attachments
Seq7420079.jpg
Seq7420079.jpg (122.19 KiB) Viewed 384 times
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 reviewing the CWIF code for declarations of war, I came across a section where the program informs the player that a DOW may cause the US to never be able to DOW Japan/EuroAxis. This is for all Allied DOWs, not just DOWs by the US. it also applies to DOWs on both major powers and minor countries.

Now, at first I thought this was just a convenience to keep the players from accidentally declaring war when they didn't mean to. However, the placement of this question in the sequence of play can affect the game rather dramatically. If the previous DOWs in the turn have gone badly/well, then that might cause a player to change his mind.

Therefore it is my intention to remove this "ask for confirmation" code. Players have all the information they want available to them and can decide whether to DOW or not. I do not believe they should see the results of previous DOWs, vis-a-vis US Entry prior to making those decisions.

For review, the current DOW subphases for MWIF are:

Majors DOW majors
Majors DOW minors
US Entry die rolls and chit draws etc.
Neutrality pacts created/renewed
Reserves setup
Attacked minors setup (includes deciding who aligns the attacked minor)
Align minors (voluntary)
Aligned minors setup.

These are all distinct subphases with each one completed by all involved major powers before the next subphase starts.

To clarify, asking for confirmation during the first 2 subphases seems needless, and in fact whether to DOW will prevent the US from ever declaring war can't be predicted very accurately. Asking for confirmation during the 3rd subphase would be made with a very accurate prediction of its effect. but then that would be a major change from how WIFFE plays.
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 »

To clarify, asking for confirmation during the first 2 subphases seems needless, and in fact whether to DOW will prevent the US from ever declaring war can't be predicted very accurately. Asking for confirmation during the 3rd subphase would be made with a very accurate prediction of its effect. but then that would be a major change from how WIFFE plays.
Seems alright.
User avatar
dale1066
Posts: 108
Joined: Sat Jun 23, 2007 7:49 am

RE: MWIF code modules

Post by dale1066 »

Seen this code in practice at the start of CWif games when the russian player tries to do too much in one phase ie occupy baltics, poland and dow on finland say and the number of chits in the pool vs euro-axis is low.
To clarify, asking for confirmation during the first 2 subphases seems needless, and in fact whether to DOW will prevent the US from ever declaring war can't be predicted very accurately. Asking for confirmation during the 3rd subphase would be made with a very accurate prediction of its effect. but then that would be a major change from how WIFFE plays.
Would not want to change the way the game plays but as mistakes go
a DOW may cause the US to never be able to DOW Japan/EuroAxis
that would seem like a big one.

How do games play out where this has happened?

Is it an unbalencing factor? would/should a side making this error just give up and go home?

A player should be responsible for checking that he could let that happen, and experienced players will no doubt, or indeed take a risk others less experienced might not realise that its possible, or the consequences. Is/should there be a way of warning of even the possibility of that mistake being made. I realise that there is nothing to stop a player dow'ing everyone in an impulse 'cept common sense so it could be impossible to implement. I guess the tutorials will mention it though RTFM is never on my mind much when i get a new toy[:)]

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
Seen this code in practice at the start of CWif games when the russian player tries to do too much in one phase ie occupy baltics, poland and dow on finland say and the number of chits in the pool vs euro-axis is low.
To clarify, asking for confirmation during the first 2 subphases seems needless, and in fact whether to DOW will prevent the US from ever declaring war can't be predicted very accurately. Asking for confirmation during the 3rd subphase would be made with a very accurate prediction of its effect. but then that would be a major change from how WIFFE plays.
Would not want to change the way the game plays but as mistakes go
a DOW may cause the US to never be able to DOW Japan/EuroAxis
that would seem like a big one.

How do games play out where this has happened?

Is it an unbalencing factor? would/should a side making this error just give up and go home?

A player should be responsible for checking that he could let that happen, and experienced players will no doubt, or indeed take a risk others less experienced might not realise that its possible, or the consequences. Is/should there be a way of warning of even the possibility of that mistake being made. I realise that there is nothing to stop a player dow'ing everyone in an impulse 'cept common sense so it could be impossible to implement. I guess the tutorials will mention it though RTFM is never on my mind much when i get a new toy[:)]
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.[;)]
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 »

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.
Post Reply

Return to “World in Flames”