Announcement

Collapse
No announcement yet.

World At War! (1900 - 1950) V1.03

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    On ships.....

    Okay, I knew something might need to be changed in the cruisers and battlecruisers. Remember, I did move them forward from Naval Warfare (just forgot to tone them down) . I'll fix that one up.

    The order:

    - Battleships
    - Cruisers
    - Destroyers

    This was deliberate BTW. Battleships were around before 1900. Britain had the largest fleet of battleships in the world in 1898. As for cruisers, I decided to put them to Assembly Lines because before procedural/automated manufactoring, not many cruisers were produced. There were a few floating around (pun intended ) but the battleship was still the main ship till just after WWI. In WWI the British learned that battleships were too vulnerable to the Turkish battleship (faster and smaller than the British/French/USA version). That's when cruisers came into their own as a production ship. By WWII, there were heaps of cruisers floating around Europe/USA. By placing the destroyer where I have, it is the natural opposite to the U-boat/submarine combo. Destroyers were too small to challange battleships one-on-one, but after sonars/radars/radios, destroyers came into the fore as a brilliant defender of convoys.

    This explains my reasoning for the ship placement. Yes, I know there were some of these ships before the time I placed them, but they came into their own at these points as a ship worth building. Hope this clears that up.

    On the AI naval ability, I'll be looking into this in more detail later. I'm throwing some ideas around my head. The AI builds cruisers over battleships not from strength, but because I forgot to move cruiser within it's build lists. So preference is given to cruisers over battleships. This will change.

    Comment


    • #17
      my $0.02

      Hi Dale,

      Just wanted to give you my 2 cents. I'm on my second game with the mod and again, you did a great job. My first game I played on medium difficulty with 8 civs and a standard sized map. I did the complete warmonger thing, and really didn't have much difficulty in taking the world. I'm now playing deity/impossible level and am in a fight for my very survival. One thing that I've noticed so far is that you can not be at peace in this mod. The AI will attack you without any warning. This is great just because it forces us to stay on our toes, but it also has it's drawbacks. In the time of WW1 and WW2 a great many alliances were formed. The AI in general is almost pointless to talk to IMO, because you can give it the world in gifts for 20 turns straight, and it will continue to dislike you and attack you just for fun on the 21st. I found this out the hard way when I was sandwiched between England and Scotland. England had attacked me, and all of my resources were being consumed with holding them off, so I started bribing Scotland, but to no avail. They attacked me!! So I had the evil bast$rds coming at me from both sides!! I was able to spread my self out well enough to hold them off, and Now they are both only shells of there former might

      This brings me to something else that I've noticed, The AI does a great job of stacking units and coming after the human, But in doing so I've noticed that they often leave their cities unprotected, with out a single unit in the garrison. I'm not saying that is a bad thing mind you, because it comes as a much needed breather at times

      Comment


      • #18
        Re: my $0.02

        Originally posted by centrifuge
        This brings me to something else that I've noticed, The AI does a great job of stacking units and coming after the human, But in doing so I've noticed that they often leave their cities unprotected, with out a single unit in the garrison. I'm not saying that is a bad thing mind you, because it comes as a much needed breather at times
        That's frency so I wonder if I reconsider to include it as standart in the next version of GoodMod, and I already decided to plug it in as a tempory sollution until I can finish my own script that moves the AI in transports, stack its units and might for the AI to go on its AI and human opponents.

        -Martin
        Civ2 military advisor: "No complaints, Sir!"

        Comment


        • #19
          This is the one issue with Frenzy (the AI vacating cities) that I would love to see fixed/adjusted. Peter is currently looking at the Frenzy code - however, he has yet to figure out how this can be fixed. I am hoping though...and if anyone else with SLIC ability wants to look at the coding, they are more than welcome to do so to see if something can be done.

          Still, given the fact that an-overly aggressive AI is making the game a challenge can be seen as a good thing.

          BTW, the hate factor for the AI to start a war thru Frenzy can be adjusted to different levels.
          Yes, let's be optimistic until we have reason to be otherwise...No, let's be pessimistic until we are forced to do otherwise...Maybe, let's be balanced until we are convinced to do otherwise. -- DrSpike, Skanky Burns, Shogun Gunner
          ...aisdhieort...dticcok...

          Comment


          • #20
            One of the two main changes for the next update, revolves around getting the frenzy script to ignore AI defense units. I'm working on a AI naval improver script as well. I'll fill you in on details when I've got a more stable script.

            Comment


            • #21
              Maybe some input from the SLICers out there. Here's the psydocode for the new AI naval improver script I'm working on. What do you guys think?

              Code:
              AI naval improver:
              - Makes sure AI spreads its naval builds across all good attacking ships 
              (in WAW that's battleships, cruiser, subs and destroyers).
              - Makes the AI stack naval units except transport ships to create fleets.
              
              
              // Globals
              //////////
              
              int_t ShipFlag;
              
              HandleEvent(BeginTurn) pre {
              	ShipFlag = 0;
              }
              
              // Make 1/4 battleships, 1/4 cruisers, 1/4 submarines, 1/4 destroyers
              /////////////////////////////////////////////////////////////////////
              
              HandleEvent(CreateUnit) pre {
              	Check if non-human player & alive;
              		Check if AI built a naval unit;
              			Check if AI built a cruiser and ShipFlag == 0;
              				NumBships = number of AI battleships;
              				NumCruiser = number of AI cruisers;
              				NumBCruiser = number of AI battlecruisers;
              				NumTCruisers = NumCruiser + NumBCruiser;
              				NumSubs = number of AI submarines;
              				NumUboats = number of AI uboats;
              				NumTSubs = NumSubs + NumUboats;
              				NumDestroyers = number of AI destroyers;
              				Check which of NumBships, NumTCruisers, NumTSubs & NumDestroyers is lowest;
              					Change the ship being built to the "lowest";
              					ShipFlag = 1;
              					Create the new unit;
              					Stop running this script;
              				}
              			}
              		}
              	}
              }
              
              // Stack naval units
              ////////////////////
              
              HandleEvent(BeginTurn) pre {
              	Check if non-human player & alive;
              		Cycle through all units;
              			Check if naval unit and not a transport ship;
              				Get unit's location;
              				Get number of units at location;
              				If more than 1 naval unit at location
              					Check if location is a city;
              						Move naval units except transport ships out 1 square;
              						Stack units;
              					Else if location is not a city;
              						Stack units;
              					}
              				Else if only 1 naval unit at location
              					If found nearest naval unit/stack under 12 within 5 squares
              						Move to that square;
              						Stack units;
              					Else if not found naval unit/stack within 5 squares
              						Leave unit be;
              					}
              				}
              			}
              		}
              	}
              }

              Comment


              • #22
                And here's the psydocode for the new AI army improver code....

                Code:
                AI army improver:
                - Make AI create 8 large army stacks, at least 5 units big.
                - Make AI keep these stacks within 2 of the capital.
                - Make AI move stacks towards enemy cities.
                - Make AI move stacks towards enemy units.
                - Make AI replenish dead stacks.
                - Make AI place stacks on transports and move towards enemy shoreline.
                
                // Globals
                //////////
                
                int_t ArmyStatus[256];		// 0 - dead, 1 - less than 5 units, 2 - alive, 3 - warpathing same continent, 4 - warpathing diff continent, 5 - transports
                location_t ArmyLocs[256];
                
                // Moving 8 stacks
                //////////////////
                
                HandleEvent(BeginTurn) 'keep stacks at home' pre {
                	Check if non-human player & alive;
                		Cycle through 8 armies;
                			Check if army exists on same continent as capital and not war-pathing or transported;
                				Check if army location more than 2 away from AI capital;
                					Un-entrench army;
                					Move army towards capital;
                				Else if within 2 squares of capital;
                					Cancel orders;
                					Stack army;
                					Entrench army;
                				}
                			Else if not on same continent as capital;
                				Change army status to 0;
                			}
                		}
                	}
                }
                
                // War-pathing
                //////////////
                
                HandleEvent(BeginTurn) 'war-pathing' pre {
                	Check if non-human player & alive;
                		Check if at war with someone other than barbs;
                			Check if any armies on the same continent as enemy;
                				Check if any army stack is next to an enemy city or unit/s on the same continent;
                					Bombard enemy city or unit/s;
                					Attack enemy city or unit/s;
                				}
                				Check for army stacks closest to an enemy city and on the same continent;
                					Move army stacks closer to enemy city;
                				}
                				Check for two other stacks closest to enemy unit/s and on same continent;
                					Move army stacks closer to enemy unit/s;
                				}
                			Else if no armies on the same continent as enemy;
                				Check for less than 2 stacks being transported or warpathing diff continent;
                					Move army stack towards nearest friendly coastal city to capital;
                				Check for army stacks next to 3 transport ships;
                					Move army stack onto transport ships;
                					Stack transport ships;
                				Check for 3 transport ships with army stack;
                					Stack transport ships;
                					Move transport ships to closest enemy coastal city;
                				Check for 3 transport ships with army stack next to nearest enemy coastal city;
                					Unload transport ships next to nearest enemy coastal city;
                				Check for three empty transport ships;
                					Move transport ships towards the closest friendly coastal city to capital;
                				}
                			}
                		}
                	}
                }
                
                // Creating 8 stacks
                ////////////////////
                
                HandleEvent(BeginTurn) 'create stacks' pre {
                	Check if non-human player & alive;
                		Cycle through existing cities;
                			Check if any "attack" units at city location;
                				Cycle through "attack" units at city location;
                					Check for first available army under 5 units;
                						Move unit to army location;
                					Else if all over 5 units;
                						Check for the smallest of the 8;
                							Move the unit to the smallest army location;
                						}
                					}
                				}
                			}
                		}
                	}
                }
                Once again, any comments welcome.

                Comment


                • #23
                  The problem with the transports that I can see is that I didn't found a function that checks if a unit is be transported, I didn't find a function that returns the cargo data either, maybe the units in a transport are counted as units in cell than it wouldn't be a problem to check if a ship has cargo.

                  -Martin
                  Civ2 military advisor: "No complaints, Sir!"

                  Comment


                  • #24
                    I'm no programmer, but that looks like some ambitious code, Dale

                    I'm looking forward to some great naval battles. . .

                    Comment


                    • #25
                      Martin:

                      I'll be using arrays to keep track of army locations, and a simple check on that location should tell me if there's three transports on the loc or not.

                      Leonidas:

                      Well, we've got the time eh? Just hope I can count on some beta testers when I get something running.

                      Comment


                      • #26
                        Hi,

                        I've just started playing your WAW 1.04 for only a few days, but so far it seems promising (aside from various details and balancing issues ).

                        There're a few things I've noticed that you may be able to shed some light on. First, whenever I click the science report button (the one on the wheel-menu, not the choose advance to research one), the game will freeze.

                        Secondly, in combat situation the AI throws settler units into the fray. They're not a stack of a settler and an escort unit scouting the area and trying to find a suitable site for a new city, but an offense force. Those stacks attack. Other time, it's spy or politician. I could see the logic in these if you program the AI to include stealth-detector, but settlers?

                        Comment


                        • #27
                          Originally posted by azalae
                          Secondly, in combat situation the AI throws settler units into the fray. They're not a stack of a settler and an escort unit scouting the area and trying to find a suitable site for a new city, but an offense force. Those stacks attack. Other time, it's spy or politician. I could see the logic in these if you program the AI to include stealth-detector, but settlers?
                          That is a real problem, I noticed this that the AI is stacking its settlers into an attack army. From my observation these armies weren't able to attack. Frenzy could be the reason for it that these stacks attack, but I am not shure if I understood the code correctly than frenzy will only move the armies to the human and finally it is up to the AI to attack. The stack algorithm of frenzy is a little bit simple but does not group any settlers into an army, that does the AI on its own. Therefore I started to write script that should regroup the AI's armies. If a settler is in than ungroup and group every single unit in that should be grouped. Unfortunatly I got huge stacks this way that prevented ship loading, therefore I couldn't add this code in a working state to GoodMod v.0.99. In the meanwhile I was able to write a loading algorithm. So that I am near to a working version.

                          -Martin
                          Civ2 military advisor: "No complaints, Sir!"

                          Comment

                          Working...
                          X