SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SH5 Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 03-04-10, 06:12 PM   #1
R-T-B
Sparky
 
Join Date: Aug 2008
Posts: 150
Downloads: 324
Uploads: 5


Default [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.

Last edited by R-T-B; 03-13-10 at 09:14 PM.
R-T-B is offline   Reply With Quote
Old 03-04-10, 06:15 PM   #2
R-T-B
Sparky
 
Join Date: Aug 2008
Posts: 150
Downloads: 324
Uploads: 5


Default

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.
R-T-B is offline   Reply With Quote
Old 03-04-10, 06:21 PM   #3
piri_reis
Seasoned Skipper
 
Join Date: Aug 2005
Location: Istanbul, Turkiye
Posts: 715
Downloads: 115
Uploads: 0
Default

Hey man go slow, my head is about to explode

So your program can parse savegame files?
__________________

Lt.z.S. Barbaros Hayreddin, U-35, 2nd Flot/Kiel, Type VIIB
Oct.29.1939, 2nd Patrol Eastern English Waters
Running SH5/TWOS
piri_reis is offline   Reply With Quote
Old 03-04-10, 06:25 PM   #4
R-T-B
Sparky
 
Join Date: Aug 2008
Posts: 150
Downloads: 324
Uploads: 5


Default

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!
R-T-B is offline   Reply With Quote
Old 03-04-10, 06:40 PM   #5
CCIP
Navy Seal
 
Join Date: Apr 2005
Location: Waterloo, Canada
Posts: 8,700
Downloads: 29
Uploads: 2


Default

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"
__________________

There are only forty people in the world and five of them are hamburgers.
-Don Van Vliet
(aka Captain Beefheart)
CCIP is offline   Reply With Quote
Old 03-04-10, 06:45 PM   #6
R-T-B
Sparky
 
Join Date: Aug 2008
Posts: 150
Downloads: 324
Uploads: 5


Default

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.

Last edited by R-T-B; 03-04-10 at 07:48 PM.
R-T-B is offline   Reply With Quote
Old 03-05-10, 10:30 PM   #7
Hell_Diver
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

wow this is absolutely amazing guys.. this would be like my dream come true.. have you considered setting up a paypal donation account.. im sure alot of us would like to donate to such a project

Quote:
Just in between lines of code, got to rest my brain...

What is Falcon 4.0? Never played it. Would be good to have some inspiration.
falcon 4.0 was one of my favorites.. i believe the game modeled everything from the f-16 fighters to companies of troops and armored battalions artillery.. the war would unfold around you, maybe your flying to your target and see some hinds strafing Abrams guarding a key bridge and you could swoop in to help,.. and your actions could effect the outcomes of certain battles.. it was almost impossible to significantly affect the outcome unless you were an ace shooting down dozens of aircraft and bombing key bridges / industry's / power-plants... (at least on hard difficulty) ( however even if you couldn't change the course of the battle, you might prolong the war or delay the enemy advance, the battle was a fictional ~1990s battle over the Korean Peninsula, your airfield could be put out of action by bombing the runway, or hangers ect, it would repair, or you would be transferred somewhere else) the enemy could attack an aircraft carrier off shore and knock them out, you could attack just about anything related to the war effort and industry or airfileds, supply convoys and it would effect replacements, munitions ammunition, the supply of each individual weapon and ordinance. you might say run out of 2000 lb bombs and be limited to other weapons, , it was pretty impressive for such an old game, it would still be an amazing game if they updated the graphics and ai

Last edited by Hell_Diver; 03-05-10 at 10:45 PM.
  Reply With Quote
Old 03-05-10, 10:34 PM   #8
R-T-B
Sparky
 
Join Date: Aug 2008
Posts: 150
Downloads: 324
Uploads: 5


Default

Actually, I was getting to that, but I didn't want to bring it up right now.

This project is going to be commercial. Sorry guys, but there's no way I could motivate myself to finish and keep up to date otherwise. :/ I really want to support this for the long term and a small fee is the only way I can do that. Afterall, I also have a job and am a fulltime student. :/

It's going to be a nominal fee though, I'm thinking about $5, and there will be a free version that doesn't interact with Silent Hunter for release as a demo... So you'll know what your getting. You'll also get a lifetime of support. Payments will be made through paypal, and exceptions can be made for those who desperately want a copy but can't send me money via paypal for whatever reason (just don't abuse this).

I know, you're probably all skeptical right now, but when I release the first demo program and see my work I think you'll all agree it's worth it. Plus, it's DRM free, and the fee will give you a source code license for personal use! Try getting ubisoft to do that.

Right now, I have about 1000 lines of code from just last night. And that's just the incomplete demo! So I hope you can understand wanting to be reimbursed for my work somewhat.
R-T-B is offline   Reply With Quote
Old 03-05-10, 10:53 PM   #9
Hell_Diver
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

heh ill donate alot more than $5 if this is going to be as awesome as i think it is... can't wait

any possibility, that different countries might deploy / build different amounts of ships depending on how country allegiances play out? how are you going to determine whether countries surrender in battle ect? any possibility the out come of a conflict could be somewhat dynamic such as using you military and economic scores say the player may be able to affect the values to a very small extent such as removing military points for troop transports or warships suck and removing economic points for sinking merchants supply, and say how fast or slow a country surrenders to another may be predicated in the imbalance of the point scores against each other, so say UK is fighting German and i mange to sink 100 merchant points in my career affecting 100 points of economic score there by limiting military production a certain number of points which might prolong the war a month .. something like that would be cool, of course actually changing the course of the war would be likely a 1 in a 100 chance, and only possible if the two countries fighting were really evenly matched

Last edited by Hell_Diver; 03-05-10 at 11:15 PM.
  Reply With Quote
Old 03-05-10, 11:15 PM   #10
R-T-B
Sparky
 
Join Date: Aug 2008
Posts: 150
Downloads: 324
Uploads: 5


Default

Quote:
Originally Posted by Hell_Diver View Post
heh ill donate alot more than $5 if this is going to be as awesome as i think it is... can't wait

any possibility, that differnt countreis might deploy / build differnt amounts of ships depending on how country allegiances play out? how are you going to determine whether countries surrender in battle ect? this sounds like a monumental task
It is quite the task, that's for sure. The first release won't have everything you list, but it will do a rudimentary simulation of countries surendering/losing, turf changes, etc. It won't however change shipping lanes until the "2.0" release I imagine, which I plan to feature dynamic shipping lanes, more nations and more boats (contributions welcome, Finland is a major one I need to add, not in game and Russia goes to war with them), and many many more things.

There's no limit to how much you can add, because I'm writing it to be very modular. Nearly everything is wrapped in a callable subroutine or function so it's very modular, almost scriptable (heck, it could be with some work, but that's a low priority).

The first war log will simply simulate wars using a very rudimentary formula of "my military slowly grinds yours down based on numbers," sort of like battling spreadsheets. It works, but it's not ideal. The final 1.0 release will feature something much better, though I'm not saying much yet.

As far as changing the war goes, random events such as "economic booms" and "economic depressions" exist, allowing some things to change simply due to randomization. It should provide a different, but historical feeling experience each time if I can tune it right.

Of course, if you don't like how it's acting, it reads it's data from excel spreadsheets, and you have the source code, so there's nothing to stop you from changing it!
R-T-B is offline   Reply With Quote
Old 03-05-10, 11:50 PM   #11
iambecomelife
Silent Hunter
 
Join Date: Apr 2005
Posts: 4,706
Downloads: 300
Uploads: 0


Default

Quote:
Originally Posted by R-T-B View Post
It is quite the task, that's for sure. The first release won't have everything you list, but it will do a rudimentary simulation of countries surendering/losing, turf changes, etc. It won't however change shipping lanes until the "2.0" release I imagine, which I plan to feature dynamic shipping lanes, more nations and more boats (contributions welcome, Finland is a major one I need to add, not in game and Russia goes to war with them), and many many more things.

There's no limit to how much you can add, because I'm writing it to be very modular. Nearly everything is wrapped in a callable subroutine or function so it's very modular, almost scriptable (heck, it could be with some work, but that's a low priority).

The first war log will simply simulate wars using a very rudimentary formula of "my military slowly grinds yours down based on numbers," sort of like battling spreadsheets. It works, but it's not ideal. The final 1.0 release will feature something much better, though I'm not saying much yet.

As far as changing the war goes, random events such as "economic booms" and "economic depressions" exist, allowing some things to change simply due to randomization. It should provide a different, but historical feeling experience each time if I can tune it right.

Of course, if you don't like how it's acting, it reads it's data from excel spreadsheets, and you have the source code, so there's nothing to stop you from changing it!
There probably won't be a need to build very many ships. There are dozens of unique warship models for minor nations that were built for SH3 and SH4 - as soon as we figure out how to convert the models for SH5 there won't be very many ship classes needed. Nearly all of the important Japanese ships, for example, can be ported over from SH4.

It would be interesting if you could produce a "ripple effect" from the players' individual sinkings, as some people have already alluded to. If commodity stocks are modeled, it could create some interesting situations. Perhaps there could be several primary categories of goods:

POL (Petroleum/Oil/Lubricants)
Carried in: TANKERS
Affects: MILITARY OPS
CIVILIAN HAPPINESS (Gasoline, Heating Oil, &c.)

AMMUNITION
Carried in: FREIGHTERS
Affects: MILITARY OPS

FOOD
Carried in: FREIGHTERS, REEFER SHIPS
Affects: CIVILIAN HAPPINESS

MINERAL ORES
Carried in: BULK CARRIERS
Affects: INDUSTRIAL OUTPUT

TROOPS
Carried in: TROOP CARRIERS
Affects: MILITARY OPS

MILITARY STORES
Carried in: FREIGHTERS
Affects: MILITARY OPS

CONSUMER GOODS
Carried in: FREIGHTERS
Affects: CIVILIAN HAPPINESS

For instance, Player X goes out on patrol and sinks four British freighters and a British tanker in October 1939. Assuming all the ships were loaded. Britain loses, maybe, 2 points worth of consumer goods, one point of military stores, and one point of food, plus one point of petroleum products. The 20-30 U-Boats on patrol in 1939 will therefore sink an average of 5 ships per patrol, give or take a few. Over all, British resolve is shaken but not destroyed - after all, it's early in the war, and there are still a lot of merchants left.

A small number of U-Boats will be lost, based on historical averages for that time period. If the player's U-Boat is lost, then assume a higher U-Boat loss rate.

Democracies should be more sensitive to factors like civilian unhappiness, because they lack dictatorship's brutal efficiency. Also, countries like Britain and the USA should be accustomed to having more consumer goods than, say, Russia or Japan. If civilian unhappiness declines enough, then countries should suffer from civil wars, unrest, or even sue for peace. If petroleum/ammo stocks decline, it would be great if the campaign layers spawned fewer aircraft and naval sorties (shortages of ammo, aviation fuel, & bunker fuel).

Countries with smaller merchant fleets should suffer greater point penalties per merchant ship sunk. This can be mitigated somewhat if they have an ally with a large merchant fleet.

Sinking certain "prestige units" like Battleships should cause a large morale penalty/increase in unhappiness. The military would try to censor these losses, but of course word got around.

I don't know how much of this is possible - I'm just throwing out ideas.
iambecomelife is offline   Reply With Quote
Old 03-05-10, 11:23 PM   #12
The Fishlord
Planesman
 
Join Date: Jan 2008
Location: Maryland, USA
Posts: 185
Downloads: 119
Uploads: 0
Default

Wow...just skimmed the first pages of this thread but it looks like you're on to something. Obviously the chances of it happening in real life were near null, but...just what if I blew up Stalin on the way to Yalta? I wonder if you'll be able to code specific, one time ships like that having such a high value. Looks interesting, keep up the good work! Can't wait for a release
The Fishlord is offline   Reply With Quote
Old 03-05-10, 11:30 PM   #13
R-T-B
Sparky
 
Join Date: Aug 2008
Posts: 150
Downloads: 324
Uploads: 5


Default

It WOULD be interesting if my engine could attribute the "Revolution" event I have coded to trigger when certain ships, ones with particularly heavy escort preferably... Ones a leader might be on, sink...

Who knows? Probably won't make it into first release but I'll tell you know it is possible.
R-T-B is offline   Reply With Quote
Old 03-06-10, 08:11 PM   #14
pditty8811
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

Can't wait, this was the only drawback to SH3.

Possibly too, if you sink the Ark Royal or any other ship it will be gone for the rest of the campaign. Will that be possible? Can we do this, once ships are sunk they will not appear again in the campaign?
  Reply With Quote
Old 03-06-10, 08:20 PM   #15
R-T-B
Sparky
 
Join Date: Aug 2008
Posts: 150
Downloads: 324
Uploads: 5


Default

Quote:
Originally Posted by pditty8811 View Post
Can't wait, this was the only drawback to SH3.

Possibly too, if you sink the Ark Royal or any other ship it will be gone for the rest of the campaign. Will that be possible? Can we do this, once ships are sunk they will not appear again in the campaign?
That's certainly possible. Actually, it's in the roadmap. Won't be in first release though.

As you guys may have picked up, the first real release will be barebones, but will allow adding of many many features in the future.
R-T-B is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 03:25 PM.


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.