SUBSIM Radio Room Forums

SUBSIM Radio Room Forums (https://www.subsim.com/radioroom/index.php)
-   SH5 Mods Workshop (https://www.subsim.com/radioroom/forumdisplay.php?f=249)
-   -   [WIP] SH5 True Dynamic Campaign (https://www.subsim.com/radioroom/showthread.php?t=163229)

R-T-B 03-04-10 06:12 PM

[WIP] SH5 True Dynamic Campaign
 
UPDATE: Most of the below info is obsolete. I've started a complete rewrite since then, and am at a sort of crossroads in development. The game will now either run using a propietary engine of my own design that is proving very diffilcult to get to act realistics, or it will interface with the game Making History Gold (and later, Making History 2). The pros/cons of each choice are listed below:

My own engine (Option 1) PROS:
-The submariner would be able to effect the outcome of the war.
-Faster campaign generation.

My own engine (Option 1) CONS:
-My engine is not behaving realisticly at the moment, and is proving diffilcult to tame.
-Could a submariner really effect the war THAT much? I really don't see it as that likely (not really a con but had to be said).

Making History (Option 2) PROS:
-Ability to play the game as germany in grand stratedgy mode, and then switch to a uboat and let the AI take over as desired. You could even have the AI play the whole war if you want. This would allow you to both command germany, and play as a captain of a uboat, perhaps averting the course of the war.
-much more realistic, believable war outcomes
Making History (Option 2) CONS:
-Much longer campaign generation (perhaps up to one hour)
-Silent Hunter 5 gameplay would no longer have an effect on the actual outcome of the war, at least not in the initial release.

If the mods here could make this thread a poll with the following options, I'd be most appreciative:

Option 1.) Original Engine

Option 2.) Interface with Making History Gold

Please read before voting, and let me know why you voted what you did in this thread.

Old post can be found below in quotes:


Quote:

I'm just unveiling this today as I'm trying to decide whether to finish it or not. That and I need some help.

What I have here is very primitive, but should be very immersive all the same. I'm coding a simple VB.NET application to load a truly dynamic campaign, that is, based on your actions it should generate a different outcome in the war. You could theoretically get scenarios such as the UK siding with Germany, or something interesting like that. Granted it does this through a degree of randomization, but it takes historical relations into account so generally things will stick to history unless something signifigant happens.

TECHNICAL DETAILS:

This works by using a "loader" application that is run prior to playing the game, similar to SH3 commander. The application generates a campaign based on the recent events by the player (read straight from the save game files), as well as some random events that have a percentage chance of going either way. Once the campaign is written, you can play as long as you want in it, and then "regenerate" the campaign every once in a while (basically whenever you feel like it, probably best inbetween patrols) to regenerate relations and see if any war decs/or signifigant events have happened. It will then write a new campaign and you can patrol under the new circumstances.

This theoretically will allow you to play games even past 1945, provided germany survives. It simulates rudimentary control of ground cities and such to facilitate this.

TECHNICAL LIMITATIONS:

This engine only can work based on fixed "events." It's similar to the SH5 branching campaign in that each time it is run, "major" nations can make decisions, but only so many scenarios can happen. Example, if the UK sides with germany, the US will side with Japan. This is a temporary limitation and it is moddable in the sense that it simply copy and pastes fixed campaign files so you can customize each "event" to your liking.

It uses several formulas and an excel table to manage relations and predict wars. I'm attatching a notepad document below that I have used for notes to describe how it works. It's a bit crazy (I never intended anyone but me to read it) but it should explain things:

Quote:

STATIC BOOST/LOSS,TREND PER MONTH
Unjustified Declaration of War (more than 2 in a year, or relation value above -25): -50,-1
Sinking of ship: -5,0
Militarization of non-allied state: 0,-1 (per military unit under half of value or over equal value)
Ideology Difference: 0, 1 per distance from Nation Ideology minus 50, -1 per distance from nation ideology + 50 when greater than 50.
At war with top allied nation = 0,-10
EVENTS (AI can execute three of these three per month)
EVENT: Relation repairing (can't be at war, can be declined) 25,1
EVENT: Badgering (can be at war, can't be declined)
-25,-1
EVENT: Build military 5% of Industrial Value,0
EVENT: Build industry 5% of Industrial Value,0
EVENT: Influence other countries ideology 1% of military strength,0 (for other country)

RANDOM EVENTS:

Revolution: Ideology change of random number +/- range of 75
Economic boost: Inudstrial point change of random +/- 50% range

COUNTRY ATTRIBUTES:
Ideology: Attribute indicating authoritarian nature of country. 75 extreme authoritarian nationalistic, 0 standard -75 extremely liberal democratic.
Extreme Authoritarian nationalistic (70 and above) get a penalty to any non-allied nations of -5 per turn.
Industrial points: LONG Value "skies the limit" effecting military production.
Relations = -100 to 100, less than -100 equals war.

Military strength, virtually unlimited unsigned LONG value. Can go as "high as the sky" so to speak.

War Formula = IF 0 > Relations + military percentage value (double and over = 50, %0 = -50) + War Justification Check (If not true add 100, +/- 25 for extreme liberal or authoritarian) THEN WAR
Please feel free to ask for clarification if neccesary, it is a bit hard to understand.

WHERE I NEED HELP:

I need help with the following arbitrary figures I am using: Industrial Capacity, Military Strength, Diplomatic relations. I need to generate an excel document of the initial relations as of August 1939 (when the game will start), and an excel document for industrial capacity and military strength. These figures are arbitrary and only represent percentages against other nations. If anyone could provide me a good resource to figure out the approximate strength in each catagory of each nation relative to each other, I'd be most appreciative, as it's proving too much for me.

FINAL NOTES:

This is far from finished. I'll probably have a non-gameplay functional demo up somewhere between a week to a month, depending on how hard I work. The actual final will take even longer, and likely be missing a few features. However, it IS going to happen, as I am highly enthusiastic about this project, it's just a matter of how much I can actually obtain of the above feature list. If I fail I will open source the project. Any help anyone can offer is more than welcome, because my knowledge of the actual historical values is a bit lacking. :)

You can go nuts now people. :)

R-T-B 03-04-10 06:15 PM

I thought I'd add I'll be updating this thread with "Simulated war logs" (text files my engine outputs of major events) in the coming weeks. You can then debate the realism of my engine and where it needs improvements. :)

piri_reis 03-04-10 06:21 PM

Hey man go slow, my head is about to explode :O:

So your program can parse savegame files?

R-T-B 03-04-10 06:25 PM

Yeah man, I know. I did go a bit nuts as I pretty much have been working on this for the past week "top secret" I was working before I even had the game. ;) Keep in mind I never really intended anyone but me to read the notes in the quote.

A goal is to decode the savegame format via a hex editor. That's another thing I have a rudimentary understanding of looking over them in the past few days. It's yet to be implemented in my program (I want to get a realistic war enigine simulator going first), but I'm pretty sure it can be done via VB Binary file access commands.

EDIT: Actually, my understanding comes from SH3 save games, which I was testing with. I just looked at SH5 save games and they seem to be encrypted! Oh Ubi... :shakeshead:

No matter, there may still be a way around this, and even if not I can easily work without player impact, just would suck quite a bit.

EDITEDIT: Workaround found! I can look in the "Campaign Progress" text file and get all the information I need! It has my most recent kills nationality, for example!

CCIP 03-04-10 06:40 PM

That sounds pretty intriguing. Keep us updated - hey, a bit of strategy in this never hurts, and it's always fun to explore even the distant "what-ifs" :yeah:

R-T-B 03-04-10 06:45 PM

Yes, but my main goal for making this thread was to conduct research, we must keep that in mind. It's far from finished, heck, Lurker may finish his campaign before I even have a prototype out!

The engine is ready to parse excel files, but at the moment my fairly fake values are producing totally off the wall results that are far from believable (Germany declaring war on Italy, for example. WTF?) I need some acurate data, but have no idea where to find any... Especially not how to interpet it into a simple "Military/Relations/Industrial value" which is quite abstract. It's proving diffilcult, which is what prompted me to make this thread.

EDIT: Ok, let's start with something a little more simple:

What nations should qualify as "Major" nations? These are the nations that can actually go to war, decide policy, etc. The rest of the nations will be "Minor Nations" and unfortunately due to limitations at the moment, will only go to war if a major nation they are "associated" with does (they may/may not based on a decreasing percentage chance per turn), and they will never change their relations/industrial/military values. They also will generally lose wars if a bigger nation attacks them.

Right now, I'm thinking:

United States,
Germany,
Japan,
England (pretty much the whole empire will be treated as one unit, objections?),
Russia,
France,
Italy.

Thoughts? What "sub-nations" should be associated with each nation. For example, if the United States goes to war, should Mexico have a strong chance of following suite (just an example?). If so, Mexico should be considered a minor nation under the influence of the US. Please note, due to engine limitations at the moment only one "major" nation can be assigned to each subnation.

Thoughts? Also, if anyone could provide me with a complete list of nations in SH5, it'd help a lot for coding minor nations.

R-T-B 03-04-10 08:08 PM

For those interested, this is the following excel workbook that will be used for relations. Comments welcome, and I could really use a list of minor nations to work with. I'll post my preliminary ideas soon:

http://i1020.photobucket.com/albums/.../MOD/Table.jpg

Just FYI, there will be several editable tables like this that ship with my program.

BTW, Anyone ever played making history? It sort of like Hoi, which I never got into.

Anyhow, since I am using a similar system to it, I'm actually going to use it for reference military and industrial values until you guys give me some sources... It may be ugly, but who knows, might work. :P

EDIT: This is what Making History indicates industrial values should be. Thoughts?
http://i1020.photobucket.com/albums/...OD/Table-1.png

R-T-B 03-04-10 10:51 PM

I decided to make all nations represented in game by any sort of thing "major" nations AI wise. This will require a bit of a rewrite but I think it's neccesary to produce authentic results.

Here's my new table. Please comment. 100 relations = OMG I LOVE YOU, -100 = very bad words are used to describe the other nation

http://i1020.photobucket.com/albums/...OD/Table-3.png

Thoughts? I sort of made a few up randomly, others came from Making History the video game. It's probably not the best, but we'll see how it runs soon. I'll also follow up with approximate industrial values (again, until I can find another source, taken from Making History. :/)

iambecomelife 03-04-10 11:01 PM

Very fascinating. I myself would love to play into 1946 or even beyond.

Anyway, here are a few suggestions for minor nations:

GERMANY:

Finland (opposition to Soviets)
Spain (Franco's Nationalist/anti-Communist Policies)
Argentina (German expatriate population, pro-German military officers)

UNITED STATES:

Most of Central/South America, other than Argentina
Philippines (Quezon's pro-American Gov't)

France's and England's minor nations should probably be whatever colonies and ex-colonies they owned.

I have a copy of Conway's Fighting Ships for the WWII era, and I can give you an idea of how strong every country's navy would have been around 1939. Let me know if you're interested.

R-T-B 03-04-10 11:05 PM

That'd be great. The main problem I'm running into is that many nations navies aren't actually represented in SH5. I don't know why, but I have to deal with that. As such, I either need someone to model a massive amount of ships for me (that'd be pretty hard to do honestly), or I just have to live with the nations I got at least for initial relase. Right now I'm going with the latter. The table above shows the nations present in SH5.

A bit dissapointing nations like Finland aren't present (It would've been cool to simulate the Winter War), but eh, not much I can do really.

BTW, based on your advice Germany and Argentina's relations will now be 20, as opposed to 10.

iambecomelife 03-04-10 11:07 PM

Quote:

Originally Posted by R-T-B (Post 1294549)
I decided to make all nations represented in game by any sort of thing "major" nations AI wise. This will require a bit of a rewrite but I think it's neccesary to product authentic results.

Here's my new table. Please comment. 100 relations = OMG I LOVE YOU, -100 = very bad words are used to describe the other nation

http://i1020.photobucket.com/albums/...OD/Table-2.png

Thoughts? I sort of made a few up randomly, others came from Making History the video game. It's probably not the best, but we'll see how it runs soon. I'll also follow up with approximate industrial values (again, until I can find another source, taken from Making History. :/)

A few suggs: I think Spain should be moderately hostile to the UK and France. IIRC several British ships were sunk by Spain during the Spanish Civil War, and by 1939 there would still be some anger between the countries, I suppose.

Ireland should be hostile to the English, although unlikely to go to war (historical resentment, the Easter Rebellion during WWI, etc.)

Japan and Russia should be somewhat more hostile to each other - right before WWII they were in an undeclared "hot war" with thousands of casualties.

R-T-B 03-04-10 11:12 PM

Quote:

Originally Posted by iambecomelife (Post 1294571)
A few suggs: I think Spain should be moderately hostile to the UK and France. IIRC several British ships were sunk by Spain during the Spanish Civil War, and by 1939 there would still be some anger between the countries, I suppose.

Ireland should be hostile to the English, although unlikely to go to war (historical resentment, the Easter Rebellion during WWI, etc.)

Japan and Russia should be somewhat more hostile to each other - right before WWII they were in an undeclared "hot war" with thousands of casualties.

Noted. As I said my history isn't what it could be, so this help is massively appreciated. I'm a coder and a gamer first, a historian second. :)

I'll update the image to show the changes. Japan and Russia are now -25, ireland and england -10, Spain and england/france now -5.

EDIT: Table now up to date. I'm eager to plug this baby into my engine and simulate a war for you guys! Wouldn't that just top off the evening? Just need to work on the industry table now...

R-T-B 03-04-10 11:47 PM

Here's the alliance table. Tables within their own alliance will take a lot more relation drops to go to war, and will also react quite differently to millitarization of other allied countries (they won't see a larger military as a bad thing).

Unalligned nations (Group UNALIGN) can go to war with each other (and anyone) freely.

http://i1020.photobucket.com/albums/...OD/Table-4.png

Now for the ideology table and industry table. With that (and some source code changes) I should be able to generate a sample war.

R-T-B 03-05-10 12:31 AM

Got them done. Now I spend the rest of the evening updating the source code, which gives you time to comment on the values above and say whether you like/dislike them. Tomorrow (or the day after), we should have a sample war!

See the quote above to understand the country attributes. The names are simply the first three leters of the countries real name (ie NET=Netherlands)

http://i1020.photobucket.com/albums/...OD/Table-6.png

Highbury 03-05-10 12:33 AM

You list ENG but not UK.. are the Commonwealth countries (Australia, NZ, Canada etc) included in that? They would be at war as soon as England was in any case so it may be easier to consider them one and the same.


All times are GMT -5. The time now is 12:14 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 1995- 2025 Subsim®
"Subsim" is a registered trademark, all rights reserved.