Scenario design

Moderators: rbodleyscott, Slitherine Core, Gothic Labs

rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 21961
Joined: Sun Dec 04, 2005 6:25 pm

Re: Scenario design

Post by rbodleyscott » Sat Apr 22, 2017 10:06 am

edward77 wrote:Is it possible to put up a message during the scenario for either side on any turn without using the reinforcement method?
Yes.

Code: Select all

FUNCTION StartTurn(side)
{
	if (GetTurn() == 0)
		{
			ShowUIScreen("BattlePop0", "Anim1", "IDS_SCN_BICOCCA_INTRO");
			AddVizDelay(30);
		}
		
	if (GetTurn() == 2)
		{
			ShowUIScreen("BattlePop0", "Anim1", "IDS_SCN_BICOCCA_TURN2");
			AddVizDelay(30);
		}
		
	if (GetTurn() == 4)
		{
			ShowUIScreen("BattlePop0", "Anim1", "IDS_SCN_BICOCCA_TURN4");
			AddVizDelay(30);
		}
If you want the message to only show for the show side you can surround it by a

if (GetShowSide() == GetCurrentSide())

condition

If so the AddVizDelay(30) needs to be outside that condition, otherwise there might be synch issues in MP.

e.g.

Code: Select all

   if (GetTurn() == 2)
      {
         if (GetShowSide() == GetCurrentSide())
             {
                ShowUIScreen("BattlePop0", "Anim1", "IDS_SCN_BICOCCA_TURN2");
             }
          AddVizDelay(30);
      }
Note that string tags for use in BattlePop0 have to have the "_BP0TEXT" suffix in order to work.

So you put

ShowUIScreen("BattlePop0", "Anim1", "IDS_SCN_BICOCCA_TURN4");

in the code, but the string tag must be defined in the text1.txt file as

IDS_SCN_BICOCCA_TURN4_BP0TEXT, "The Venetians on our right are at last ready to advance.",
Richard Bodley Scott

Image

Odenathus
Staff Sergeant - StuG IIIF
Staff Sergeant - StuG IIIF
Posts: 280
Joined: Sat Jun 27, 2009 10:02 pm

Re: Scenario design

Post by Odenathus » Mon Apr 24, 2017 1:37 am

It is, but involves quite clever scripting, which only RBS and a few others can do!

HobbesACW
Sergeant - 7.5 cm FK 16 nA
Sergeant - 7.5 cm FK 16 nA
Posts: 225
Joined: Thu Jun 27, 2013 9:31 pm

Re: Scenario design

Post by HobbesACW » Sat Jun 10, 2017 9:48 pm

Hi folks, I've finally finished my Jankow scenario. I lost interest for quite a while as I couldn't get the AI to behave as I wanted but I pushed the battle to a later stage and it now gives quite a decent game (the AI is beating me at the moment). I'm just trying to add the game graphics but struggling with SIDEICON file. To me in Paint.net the background for these two chaps look transparent but when I add them to the scenario they have a black background. Can anyone help?

Hmm. Just tried to upload the images and it says "The extension dds is not allowed".

Thanks,
Chris

rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 21961
Joined: Sun Dec 04, 2005 6:25 pm

Re: Scenario design

Post by rbodleyscott » Sun Jun 11, 2017 6:39 am

HobbesACW wrote:Hi folks, I've finally finished my Jankow scenario. I lost interest for quite a while as I couldn't get the AI to behave as I wanted but I pushed the battle to a later stage and it now gives quite a decent game (the AI is beating me at the moment). I'm just trying to add the game graphics but struggling with SIDEICON file. To me in Paint.net the background for these two chaps look transparent but when I add them to the scenario they have a black background. Can anyone help?
You need to save them as DXT3 (Explicit Alpha)
Richard Bodley Scott

Image

HobbesACW
Sergeant - 7.5 cm FK 16 nA
Sergeant - 7.5 cm FK 16 nA
Posts: 225
Joined: Thu Jun 27, 2013 9:31 pm

Re: Scenario design

Post by HobbesACW » Sun Jun 11, 2017 4:04 pm

That was an easy fix! Thanks so much.
Capture.JPG
Capture.JPG (165.49 KiB) Viewed 3656 times

HobbesACW
Sergeant - 7.5 cm FK 16 nA
Sergeant - 7.5 cm FK 16 nA
Posts: 225
Joined: Thu Jun 27, 2013 9:31 pm

Re: Scenario design

Post by HobbesACW » Sun Jun 18, 2017 10:26 am

Hi folks, another couple of questions. Does anyone know why the scenario text appears so high up and the first line is partially obscured? Also I have a SIDEICON0 and a SIDEICON1 yet only the player's modded leader is displayed - the AI leader is still shown as the default.
Capture1.JPG
Capture1.JPG (59.58 KiB) Viewed 3626 times
Thanks,
Chris

rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 21961
Joined: Sun Dec 04, 2005 6:25 pm

Re: Scenario design

Post by rbodleyscott » Sun Jun 18, 2017 11:41 am

HobbesACW wrote:Hi folks, another couple of questions. Does anyone know why the scenario text appears so high up and the first line is partially obscured? Also I have a SIDEICON0 and a SIDEICON1 yet only the player's modded leader is displayed - the AI leader is still shown as the default.
Capture1.JPG
Thanks,
Chris
Is this the campaign test or the scenario text?

For the campaign text you need to copy Campaign_Overlay.txt from one of the historical campaigns

e.g. /Campaigns/1ThirtyYearsWar/Data/UI/Campaign_Overlay.txt

to

Documents/My Games/PSCAMP/Campaigns/YourCampaign/Data/UI/Campaign_Overlay.txt

For the scenario text, see

http://www.slitherine.com/forum/viewtop ... 19&t=62582
Richard Bodley Scott

Image

HobbesACW
Sergeant - 7.5 cm FK 16 nA
Sergeant - 7.5 cm FK 16 nA
Posts: 225
Joined: Thu Jun 27, 2013 9:31 pm

Re: Scenario design

Post by HobbesACW » Mon Jun 19, 2017 6:15 pm

Thanks!

edward77
Sergeant - Panzer IIC
Sergeant - Panzer IIC
Posts: 188
Joined: Wed Nov 10, 2010 9:11 pm

Re: Scenario design

Post by edward77 » Tue Oct 31, 2017 11:48 am

Richard, I put the question earlier about putting out a message on any turn for either side, then used your answer. The objective here is to get Team 5 to reinforce Team 0 if the Players unit are close and then inform the player as to what has happened.
Here is the code.

Code: Select all

   team = 0;    // Inf Ramillies        
                     If (AI_GetClosestDistanceToClosestEnemyUnit(side, team, 0) <= 4)
                        {
                            ShowUIScreen("BattlePop0", "Anim1", "IDS_SCN_RAMILLIESV2_2");
                            AddVizDelay(30);
                           MoveTeamCoord(1, 5, 40, 55, 8);     // If Enemy close Team 5 reinforces Ramillies
                           MoveTeamCoord(1, team, -1, -1, 8);  // Team 0 responds
                       }
I also put the string IDS_SCN_RAMILLESV2_2_BP0TEXT, "The French are reinforcing Ramillies.", in the text1.txt file

Two problems. Firstly I suspect a general message just like a reinforcement message doesn`t work for the AI
Secondly team 5 seems to jump the gun even though they are not close and there are no other commands to move them.

edward77
Sergeant - Panzer IIC
Sergeant - Panzer IIC
Posts: 188
Joined: Wed Nov 10, 2010 9:11 pm

Re: Scenario design

Post by edward77 » Sat Nov 04, 2017 2:58 pm

Subject to a bit more testing I will shortly be releasing my second version of Ramillies 1706. This has come about after seeing two new sources (for me anyway).
Firstly, Jeff Berry's excellent Obscure Battles site which is one of the best I have encountered for creative wargamers. For each battle on the site he provides a comprehensive wealth of information on OOBs, unit types, locations, flags and colours along with a highly detailed map.
Secondly the book 'Ramillies' by Niel Litten which gives a clear account of the battleground and the developments during the battle. Both sources clearly demonstrate that my first version was pretty poor on several counts as well as being easy to win.
The map, the OOBs and unit dispositions are hopefully much more accurate whilst the French defence/counter attack is now much more conditional on Allied movement. Because of the 64 unit limit the scenario will be set up at a Brigade level with approximately 2-3 battalions or 5-6 squadrons as the base units. Having now mastered Paint.net I have also customised all the unit and VP flags.
Here are few pictures at set up.
The 1st shows the French defence of Ramillies, the 2nd shows the Danish part of the LW Allied Cavalry and the 3rd some of the Allied Infantry facing Ramillies
Bavarian, Irish & French Inf in Ramillies.jpg
Bavarian, Irish & French Inf in Ramillies.jpg (106.48 KiB) Viewed 3233 times
Danish Cav & Holstein -Gottrop Dragoon.jpg
Danish Cav & Holstein -Gottrop Dragoon.jpg (73.23 KiB) Viewed 3233 times
English & Hanoverian Inf.jpg
English & Hanoverian Inf.jpg (35.32 KiB) Viewed 3233 times
I hope that this time it will be a much greater challenge. edward77

rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 21961
Joined: Sun Dec 04, 2005 6:25 pm

Re: Scenario design

Post by rbodleyscott » Sun Nov 05, 2017 10:24 am

Cool
Richard Bodley Scott

Image

Micha63
1st Lieutenant - Grenadier
1st Lieutenant - Grenadier
Posts: 774
Joined: Mon Jul 11, 2011 8:56 pm
Location: Germany
Contact:

Re: Scenario design

Post by Micha63 » Sun Nov 05, 2017 11:11 am

Nice work,thank you.

Adebar
Staff Sergeant - StuG IIIF
Staff Sergeant - StuG IIIF
Posts: 294
Joined: Tue Oct 14, 2014 10:39 pm
Location: HRR

Re: Scenario design

Post by Adebar » Mon Nov 06, 2017 2:19 pm

Very nice! Those beautiful new flags add much to the immersion. Looking forward to the new version!
Image

IC XC
NI KA

edward77
Sergeant - Panzer IIC
Sergeant - Panzer IIC
Posts: 188
Joined: Wed Nov 10, 2010 9:11 pm

Re: Scenario design

Post by edward77 » Mon Nov 06, 2017 3:25 pm

Thanks guys. Any answers for my " battlepop0 question."
Richard, I no longer receive the automatic e-mail response about replies on the forum.

rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 21961
Joined: Sun Dec 04, 2005 6:25 pm

Re: Scenario design

Post by rbodleyscott » Mon Nov 06, 2017 6:17 pm

edward77 wrote:Richard, I put the question earlier about putting out a message on any turn for either side, then used your answer. The objective here is to get Team 5 to reinforce Team 0 if the Players unit are close and then inform the player as to what has happened.
Here is the code.

Code: Select all

   team = 0;    // Inf Ramillies        
                     If (AI_GetClosestDistanceToClosestEnemyUnit(side, team, 0) <= 4)
                        {
                            ShowUIScreen("BattlePop0", "Anim1", "IDS_SCN_RAMILLIESV2_2");
                            AddVizDelay(30);
                           MoveTeamCoord(1, 5, 40, 55, 8);     // If Enemy close Team 5 reinforces Ramillies
                           MoveTeamCoord(1, team, -1, -1, 8);  // Team 0 responds
                       }
I also put the string IDS_SCN_RAMILLESV2_2_BP0TEXT, "The French are reinforcing Ramillies.", in the text1.txt file

Two problems. Firstly I suspect a general message just like a reinforcement message doesn`t work for the AI
Secondly team 5 seems to jump the gun even though they are not close and there are no other commands to move them.
It is probably best to email me the whole scenario to look at (and not just the scenario script). I can't really tell what is going on from a snippet of code.
Richard Bodley Scott

Image

Post Reply

Return to “Scenario Design”