SMAN's The World at War

Some good news! I figured out what's causing the missing scroll bar in the tech tree problem. The mod has 2 references to the Terrace Farm and 1 reference to the "Medic General" promotion (which I guess only comes from DLC). In a test version, I removed those references and the tech tree worked fine.

Will put those changes into the next version of the mod. Not sure when that will be exactly, as I wanted to wait until the WW2 scenario is released, just in case I need to make any changes in the main mod because of it. Hopefully in a couple of weeks.
 
so some wierd stuff is happening in my game
upload_2019-1-13_11-59-11.png
 
@sirsting - do you have the Inca and Mongol DLC installed? If not, this would probably account for the bug.

The good news is this error is fixed in the next version (V3) - to be released in the next couple of days.
 
I can't open the link - no permissions. Are the files you're trying to upload .log files? They should be ok. Or convert them to .txt if that doesn't work.
 
Version 3 of the main WAW mod published!!!!

For grins, I included the "VP-Compatibility" script in the main mod. Hopefully, if it works acceptably, I'll only have to maintain one baseline for the mod.

Download: https://forums.civfanatics.com/resources/smans-the-world-at-war.27142/

---------------------------------------------------------------------------------------------------------------

Also, Version 3 of the "Unique Units Companion Mod" has also been published. It adds 107 units, which bring the total number to 226 units for 12 civilizations.

Download: https://forums.civfanatics.com/resources/smans-world-at-war-unique-units-companion-mod.27143/

---------------------------------------------------------------------------------------------------------------

Finally, have released V1 of the "Irregular Units Companion Mod" - which adds Militia and Partisan units throughout the game (Ancient to Information/Cold War Eras). These units will randomly appear when you are at war against a major civ. Militia can also be trained normally. They are about half as strong (and expensive) as their normal, main-infantry-unit-of-the-Era counterparts.

Partisans will appear whenever a civ loses a city to conquest. They represent that final chance for the local citizens to join the fight and hopefully reverse the outcome.

Download: https://forums.civfanatics.com/resources/smans-the-world-at-war-irregular-units.27211/
 
Last edited:
@sirsting - do you have G&K and BNW expansion enabled?

In the Database.log, the first thing I noticed was an error when loading units - missing "FaithCost" entry in the database. As this was introduced to the game with the G&K expansion, I'm wondering if you don't have that installed?

There were several other errors relating to missing database elements that also look like not having the expansions installed/enabled.

This mod requires G&K/BNW. It simply won't run without it.
 
Thanks, @Florian, I'm pretty happy with how the mod is progressing.

I looked over your Spanish Civil War (SCW) mod and have to tell you, I'm impressed by how much you've put into it! I do believe it will be a lot of fun to play when you get it done.

Unfortunately, my time is very limited right now - am way behind on all my projects - both work and play. But, if you have any questions about the data in my mods, I'll be happy to answer what I can. I think that using my World War I scenario ("The War to End All Wars") should be a good template for about everything you're trying to do. Just need to change the artwork (which looks like it's already done), and add any Unique Units you thing dresses up the mod.

The part you'll probably want to look at closest is in the LUA/Scenario Manager folder. This is where the scenario is initialized and set up, where reinforcements (mostly for the AI to give the mod more of a challenge) are spawned, the victory conditions are evaluated, and last but not least - where the "movement directives" are established.

In my scenario, victory is determined by who has the highest scenario score (not game score!) at a certain game turn. That might work well for SCW, or you may want to use a combination of cities being controlled by a civ? Either way, the coding is pretty easy. Especially, since the timed victory is already finished in the mod.

The Movement Directives is the heart of the "AI replacement" the scenarios need to force the AI to behave somewhat like a human general. MD's sound complicated, but it's actually fairly straight-forward. Each major combatant civ has a certain number of "fronts" they manage - e.g. Germany has an Eastern and Western Front. Russia has Western, Southwestern, and Southern, etc. These fronts are actually a table of cities that represent their attack plan for that area of the map. Keep in mind, there should be several of that civ's own cities in the earliest part of the table. In Germany's Western Front (at game start) - the first city they really want to attack is Metz, so it's logical to make that city the first in the table. But what happens later in game, after French/Brit counter attacks mean that Germany's enemies control Frankfurt? We'd want Germany to retake Frankfurt before moving forces back to Metz, no?

So, the front table ideally (and will when I update the WW1 mod) would have a few German cities at the top of that table (representing the highest priority) before it includes the first enemy city on the "campaign" for that front. Then you'd add cities to the table in the order you'd like them to be attacked in. Usually, geography plays a part here, as it takes a lot of turns to get the AI to "maneuver" its forces to the objective. Keeping it simple is key here, as the AI can handle only so much help....

In the WW2 scenario, I'm currently working on this very issue. But instead of "Fronts" - action is set around "Operations" - similar in nature, but not always the same, as Operations have to include a lot of diplomatic considerations (i.e. If I attack A, what will B do? What was C doing before I decide to attack? etc.).

Again, it may sound complicated, but it doesn't have to be. If you have a group of cities you want to conquer, start with the one closest to your forces at scenario start, then add the next one, etc. Give the AI players lots of extra units (they'll need them to put up a decent fight), and that's about all you'll need to manage. With this approach, it at least looks like the AI knows what it's doing....

And with the very coarse tools we have available to influence AI unit behavior, this may be as good as it gets....
 
@sman1975 Thank you for your dedication and for the detailed response you usually give, both here and on Steam.
First regret my poor command of English.
Initially try to model your excellent WW1 scenario, but I was not able to articulate civilizations. I have been using the CIV5 modification tools for a short time.
I know that you carry out various projects, and from experience I get the attention it requires.
At the moment I am at the beginning of the SCW scenario project, although I have advanced some aspects such as new buildings (I have been forced by the number of cities that have the map) and new "wonders" that give a historical context to the scenario.
With regard to this there are issues that I have deliberately decided to ignore the historical reality in which the war was developed, since it is a game, not a historical study.
I refer, for example, to the atrocities committed. (common graves, chekas, repression of the civil population, ...).
In your WW1 mod I notice what you mention in the LUA / Scenario Manager folder. On the different strategies that must be taken by the AI with respect to the player. Playing check is that in the practical sense tend to work well and pose a challenge to the human player (or I am bad playing xD).
The intention to publish it in your thread is in relation to the work you have been developing, since in the scenario that I propose is based on the detailed contributions of your WAW mod. In my opinion, you have been right to give depth to this historical period.
I do not know if you know the mod that El Justo made for CIV III "Age of Imperialism" that developed from the Belle Epoque until the end of WW1 on a world stage. I mention it in case it could be useful in some way.
On the other hand I will inform about the development of the mod, if you like this question.
At your service. xD
 
No worries, @Florian de Saltés - your English is ridiculously better than my Spanish - and I live in south Texas! You know, where one really should learn a little... :mischief:

If the Civs are causing problems, I'd recommend by starting slowly - just add 2 custom civs at the start of development. Get that working before you add any more.

The scenario manager folder contains the scripts that (1) initialize the scenario, (2) manage unit movement, (3) manage reinforcements, and (4) determine victory conditions. Your scenario will have to do these things as well.

The good thing is - in the WW1 scenario - all of the things you need for your mod is already there and (more or less) working. You just need to adjust things a bit. If you can wait a few weeks, I hope to have the WW2 scenario completed, and a couple of hot-fixes for the WAW companion mods (After the Revolution and Covert Ops) - then I could probably help you out. At least setting everything up, so you could expand on it to really provide the customized playing experience you're looking for.
 
@Florian de Saltés - a minor update: I'm finally finishing up on the "game engine" for the WW2 scenario. It's been a true pain, but... I completely re-wrote the WW1 scenario engine - so that now I have a body of working code that is completely data driven.

What this means is that all the "procedural" statements (functions, etc.) that make very specific things happen during the game to "mimic" a thinking AI player's actions - all of these statements are dependent on tables of data to work.

It's a bit hard to explain, but here's an example: say I have Germany in the WW2 scenario. It has a few things it should do (invade Poland, France, Russia, etc.) to make it look like it knows what it's doing for the specific scenario. Normally, you would write very specific code to get them to do this. It works great, but the code can't be used for anything else.

The current engine - takes data from various tables, then extrapolates what it should do, based on the data in these files.

This means, if I change the data in the files, the engine will still work - performing something completely different on the map, but i won't have to change a line of code. So - now I add "Republicans" custom civ to a SCW map, build the appropriate tables, then the new scenario should work just fine.

This will save a ton of time getting your scenario off the ground. And building the data tables isn't really a lot of work. Basically, you need to build a series of "Operations" for each of your MAJOR civs. These Operations consist of 1-3 "Fronts" - which are basically a list of cities you want the AI to attack/own (in order). The reinforcements are automatic (based on the size of the Front list/game difficulty), as are the "movement directives" (the engine decides what units should move to attack objectives, based on how close they are to that objective). The engine decides when Operations should launch, and when they should shut down (again, based on data base entries). It even decides, when things are going badly for a civ (~ half cities lost) if it needs to cancel all Operations and bring the boys home to fight on the home front. Finally, if things get even worse (~75% or more original cities lost), it will "sue for peace" - which forces "permanent peace" between them and everyone else for 3 turns. All foreign armies will leave their territory, and they have a chance to put their house in order before someone decides `why not hit 'em again...` The thought is based on Vichy France in WW2.

The only thing I haven't fully moved into the new engine is Custom Victory Conditions, although I probably will before final scenario release. Currently, the scenario is based on a 84 turn timed-victory - with a custom "score" (based on number of cities owned at that moment, compared to how many cities they started the game with). Whoever has the highest custom score wins.

I've thought about adding a simple list of "critical cities" - that if a civ captures all of them, they win the game automatically on that turn. Was thinking something like "London/Paris/Berlin/Moscow/Rome" - if one civ (or allied civs) win them, the game ends. This is because in some of the test games, I've been able to knock Germany out of the war in 1943, and was thinking the scenario looks a little silly running until the end of 1945 when there are no real enemies left for 40+ turns.

I mention this because you might have an idea of certain cities in Spain that would constitute automatic victory if one faction or another controls them all.

Anyways, back to working on the scenario. There's still a great deal of testing required. It's one of the things about the "data driven" technique: it's difficult to effectively test quickly. Takes a lot of setting up to see how data progress through the engine and some of the impacts it makes while doing so. But, thankfully, the rest of the scenario is finished, so with a little luck during testing, I can finally let this one go...
 
@sman1975
No worries, @Florian de Saltés - your English is ridiculously better than my Spanish - and I live in south Texas! You know, where one really should learn a little... :mischief:

At the moment it seems that we can understand each other. :mischief: And a greeting to the good people of Texas, who certainly have customs of my land (Andalusia, Spain), I mean the culture of ranches (ranchos), cowboys (vaqueros), ...

I would like to thank you for the help you have given me and the other members, and the great contributions you make for the Civ 5.

At the moment I am finishing the structure of the buildings and the "wonders", and graphic aspects. So I can wait for you to finish the WW2 scenario, to adapt the AI behavior engine.

The truth is that the work you have developed to achieve an intelligent behavior of the AI by organizing it in battle fronts is incredible.

I've thought about adding a simple list of "critical cities" - that if a civ captures all of them, they win the game automatically on that turn. Was thinking something like "London/Paris/Berlin/Moscow/Rome" - if one civ (or allied civs) win them, the game ends. This is because in some of the test games, I've been able to knock Germany out of the war in 1943, and was thinking the scenario looks a little silly running until the end of 1945 when there are no real enemies left for 40+ turns.

It would be very appropriate in the scenario of the SCW, since it could give the historical sense of battle fronts that were in the Civil War. In the case of the SCW it would be to add the most important cities (economically and politically) to be an automatic victory.

This means, if I change the data in the files, the engine will still work - performing something completely different on the map, but i won't have to change a line of code. So - now I add "Republicans" custom civ to a SCW map, build the appropriate tables, then the new scenario should work just fine.

I understand that the code is "fed" with Civs with objective cities. Following this model can move to the SCW stage, since the national side, was developing the war based on battles front, while the Republican side (which was creating an army) the tactic that used was to attack certain fronts of battles to counteract national attacks.

For example: Faced with the failure of the national armies to conquer Madrid (Battle of Madrid 1936, Battle of Jarama February 1937, Battle of Guadalajara March 1937), which will remain on the Republican side until the end of the war.
The rebellious side initiated the Campaign of the North, this is to occupy the isolated territories in the north of Spain that were of the republican side.
To counteract this Campaign, the Republican command organized the offensives in Brunete (near the front of Madrid) and in the front of Aragon (Battle of Belchite).
The same thing would happen with the Battles of Teruel and the Ebro, which responds as an offensive to counteract the advances of the nationals in other fronts.
This is why I believe that the engine you have created would be great for this scenario. Since summarizing the scenario would be configured with the following civs: Nationals, Republicans, Basque Government, Catalan Government and Council of Aragon (anarchists).
In the conflict it was the national side that led the war effort, the Republican side from the central position carried out counterattacks in response, while the Basque Government, Catalan and the Council of Aragon had a defensive and passive role, in addition they dissociated from the republican side once they lost "their territory".

In the conflict in broad strokes are (they act on the defensive and in the case that it is appropriate to serve as a reserve) and the armies of maneuvers. In this aspect the advantage is in the national side since they have the Army of Africa, later renamed as Army Corps of Morocco, which was the professional and elite part of the Spanish Armed Forces in 1936.
In the republican side with the course of the war it manages to articulate the Army of Maneuver, in September of 1937 with the grouping of the V, XVIII, XX, XXI and XXII Army Corps.

Returning to the stage, I have a doubt regarding the number of citizens of the cities since the scenario is present towns and cities. I tried to make an equivalence of the "citizen" by number of inhabitants, for example 1 citizen = 10,000 inhabitants. But I do not see it as practical since Madrid or Barcelona had a population of one million inhabitants, which by applying this formula in the game would have 100 citizens.
I think that it is best to designate a fixed number to define the different populations by classifying them by estates, such as Metropolis (it's a saying :lol:), City, Town, Village, ... and to this give a fixed number of citizens and vary according to the city in question. What would be the ideal numbers in terms of balance?
 
@sman1975

After the Revolution.
With this mod, I saw it suitable for the setting of the Italian and German Unification, respectively, or in the Spanish case of the 19th century Carlist Wars, a series of civil wars that took place in Spain during the 19th century (three civil wars :crazyeye:). [In case someone asks the national sport in Spain are the wars, both civil and foreign, is a joke :), although the nineteenth century in Spain was no joke.:)].

Out of curiosity, as you plan to do the stage of the Belle Époque; The Great Game, Scramble for Africa, or a world stage, was why I told you about the CIV mod III Age of Imperialism.
 
This all sounds good. It will be a few weeks, but when we get to this, I should be quite familiar with building a new scenario using the old engine. I'm hoping it will be very quick.

The "Great Game" scenario will probably be one of the last I do. Need to use a different map from the other scenarios, as there is not enough Asia/Middle East on the current map.


BTW - I added 10 "Spanish" units to the WAW Unique Units Companion Mod. Not sure if you'd seen them. Perhaps some of them could be used in your scenario?

https://steamcommunity.com/sharedfiles/filedetails/?id=1562535329
 
@sman1975 Great units! :thumbsup:

As information the helmet used by the army of earth, in general, in the decades of the 40s and 50s was the Stahlhelm M1935 (German helmet).

593840d1384040098-m35-helmet-spanish-civil-war-002.jpg
593841d1384040161-m35-helmet-spanish-civil-war-003.jpg

In case it's helpful.:)
 
@sman1975
I have updated the link with the scenario

https://forums.civfanatics.com/resources/spanish-civil-war.27212/

It remains to edit and assign the units of each side, most are included, limit the technology to the time, and include the resource of olives on the map. Apart from adding the design of the stage and the AI. If you do not mind I'll open a thread in case some member of the forum wants to help with these tasks, since those aspects I do not have very clear how to do it.:mischief:
 
I think opening a collaboration space for the Spanish CW mod is a good idea. Great way to capture good ideas before they're quickly forgotten. Of course, that may be just me....

I've finally finished the "Scenario Management Engine" (SME) - and to be honest, it's looking quite good. The SME will manage almost the entire scenario from just a few pieces of data that really doesn't take more than an hour or so to complete. It handles all aspects of the scenario. Also, these data tables are exclusively for the AI. Human players aren't impacted by these:

1. SME activity is focused around "Combat Operations" (Combat OPs) - e.g. "Operation Barbarossa" - the German invasion of the USSR.

2. Combat OPs consist of 1-3 "Fronts" - basically a collection of cities you'd expect the attacker to conquer (in order); fronts "should" consist of about 10 cities, with about 1/3 of them your own (cities you need to make sure you own before you launch the offensive). When you conquer a large percentage (85%) of the cities in a Front, you've "won" the Front. When you win enough cities in all of the Fronts (85%), you win the Combat OP. "Barbarossa" had a northern, center, and southern "Fronts." Most Combat OPs will probably be fine with only 1 Front.
--- There is a new UI to see what OPs are open/closed/possible - accessed through the "Additional Information" menu.

3. Combat OPs have other features (data that needs to be defined by the scenario designer) required by the engine:
--- Earliest/Latest start turns the OP can possibly launch.
--- Chance to launch the OP on any given turn (inside its earliest/latest window). 5% per turn? 10%?
--- Is there a prereq OP that must be "won" by the attacker? Or is there a "mandatory city" that the attacker must own before the OP launches? E.g. Germany must win the Polish OP (Fall Weiss) before the can launch Barbarossa. The Germans must own Calais before the can launch Operation Sealion.
--- Is there a mandatory start turn (meaning, on Game Turn 'X' this OP launches (these should be tied to a mandatory city) - the SME gives you 6 turns after the mandatory start turn to gain possession of the mandatory city, otherwise, it never launches it.
--- Is there a "mandatory stable front" - meaning is there a Front that must be "stable" (attacker owns at least 50% of the cities in that Front) - before this OP can launch? E.g, France must be stable (non-threatening to the homeland) before Barbarossa can start.

4. Front definitions are simpler. You basically need a list of cities (10 is ideal, with 3 being your own cities closest to the enemy), and a "box" (2 x locations (X/Y) - one for the SW corner of the box, the other for the NE corner). Basically, any units inside this "box" are ordered to move to the next "enemy owned" city in the Front's list. So, the Front boxes should entail some of your own territory, and not overlap with other Front boxes.

5. There are some other "bookkeeping" types of data to define (max game turns, starting gold bonuses, etc.), but this takes about 5 minutes to complete.

6. During the game, the SME decides what OPs launch (and what wars to declare), and manages the performance of those OPs. It manages:
--- Starting Bonuses: free gold, culture, tech, etc. to help prepare your civ for the coming wars. "Major" combatants get more than "minor" ones. This is defined by a changeable "Major City" threshold value.
--- Reinforcements: AI civs get extra "free" units - to help compensate for its generally poor performance. If the AI Civ is "allied" with a human player (i.e. defensive pact or same team), then they get about 25% of the "free" reinforcements a different AI civ would get. If they are at war with a human player, they get 50% more... The reinforcement functions will determine then spawn the best units available (bombers, fighters, infantry, armor, ADA, artillery) for that AI civ.
--- Reinforcements: There are 2 types of reinforcements: Global (amount based on total cities in empire) that spawn near the capital; and Front-based (also based on number of cities in the Front owned by that civ) that spawn near the closest owned city to the next objective.
--- Movement (land): Using the "Front" data, the engine will maneuver units within the various Front boxes towards the next available objective city.
--- Movement (sea): The SME will also maneuver ships inside the various boxes on "sea fronts" - These are basically "fronts" without a list of objective cities. The engine will move any naval unit inside this box to the same random location within the box itself - it looks like the ships are actually "patrolling" their sea lanes.

7. SME will decide if a Front needs to be closed: It will close a front when all the cities in the list are conquered, but there's a random chance the front may close if the amount conquered grows above 75%. Correspondingly, if the attacking civ is getting its butt kicked (i.e. losing more cities than it started the OP with), there's a chance the SME will also close the OP and name the other civ as the winner. If things are going very badly (but not bad enough for #8 below), the SME may decide to cancel all of a civ's OPs and force them to move units towards their capital.

8. When thing REALLY start going badly for an AI civ (they're losing half their starting cities, etc.) - the AI may "Sue for Peace" - which basically stops all that civ's OPs and wars, and ejects any foreign troops from their territory. They are guaranteed peace for 3 turns. After that, normal DoWs can be made against that civ. Also, they may not Sue for Peace again for another 12 turns. The performance of the French in WW2 is what this dynamic is based on.

9. Militia units spawn periodically throughout the game, especially near damaged cities. Partisans spawn when a city is taken. These units cannot go far from friendly territory.

10. The SME provides "standard" events (each event has a small chance of happening every turn, ~10%): Savings Bonds (extra gold), Industrial Espionage (free research), and Rebels Appearing (barb units show up when you're performance in the war is not good at all). It is quite easy to add new events, and a customized popup is provided to announce them.

11. Victory conditions. Generally, a scenario is a "max game turns" type of victory. Whoever has the largest score when that turn hits is the winner. There is an optional "Automatic Victory - City List" - actually, there are 2 lists: one for major capitals, and one for minor capitals. There is also a "threshold" defined for the number of minor capitals needed. So - if you and your "allies" (other civs you have a defensive pact or on the same team) own all of the cities on the major capital list and more capitals on the minor capital list than the threshold, you automatically win the game. So, for WW2 we might put London, Paris, Berlin, Moscow, and Rome on the major list. And add Belgrade, Sofia, Budapest, Bucharest to the minor list, with a threshold of 2.
--- It is "theoretically possible" with the automatic victory condition - that a "minor combatant" could be allied with other minor combatants and miraculously capture/own all of the cities required to win automatically. In this case, the engine will allow the minor civ in this alliance with the highest scenario score to win the game. This is the only way a minor combatant could win. If the alliance that wins automatically has both major and minor combatants, the major combatant with the highest score wins - even if there are minors with even higher scores.


Hopefully, this gives you an idea what the SME can do - all with just a few minutes of data entry.

I'll be testing this theory in the next couple of days, when I actually build the WW2 scenario, using only SME. The engine has been quite stable during testing, but the test game was on a much smaller, less complicated map than the WW2 scenario is. I'm hoping that I can have the entire thing built in the next couple of days (lots of IRL distractions the next few days). But, building won't take more than 2 hours. It's the testing that will take days and days. To make sure all the features of the SME are working.

Fingers crossed - but if it all works OK, I plan on testing SME flexibility with a different scenario (basically Patton's "Red Star-White Star" scenario - which sees the allies against the USSR in 1945-1948. No new units will be required, and I can drop over half the playable civs (from 17 to about 6), and the number of OPs/Fronts will also be a small fraction of the WW2 mod. I plan on using this 2nd scenario as the true test for the SME instead of the Spanish Civil War because I won't have to collaborate with anyone on it, which will definitely speed the process a lot.

I'm thinking that any adjustments required to the SME by the time the second scenario is completed will mean we can probably get the Spanish Civil War done very, very quickly.

Will let you know how things are going when I get some better clarity on the WW2 scenario. Fingers crossed, but I'm hopeful it will be done this week (or next...), then I can start working on absolutely anything else...
 
Last edited:
@sman1975

Thanks for the great work, the Patton stage is very interesting and sounds fun.

As I mentioned, for my part I subordinate the work of the Spanish Civil War scenario to the development you are doing. I mean, I'm not in any hurry.
Much is already completed, what would remain are aspects that do not control very well as editing (units, end technology, ...) that are not very broad.
I hope either to complete them by myself or by whoever offers to help.
For this reason I have opened the threads in the forum and in Steam, to solve these aspects. :)
 
Back
Top Bottom