How to disable victory conditions for all gamemodes

Moderator: rbodleyscott

Post Reply
Ihatesiginingupforstuff
Private First Class - Wehrmacht Inf
Private First Class - Wehrmacht Inf
Posts: 5
Joined: Wed Sep 06, 2023 2:00 pm

How to disable victory conditions for all gamemodes

Post by Ihatesiginingupforstuff »

hello everyone, is there a universal way to disable victory conditions for every game mode in FOG Medieval? since i usually only play hotseat mode, i keep finding battles ending abruptly and i would rather if i could just disable the whole thing and roleplay if a side loses heart or not, this has been talked about before in the fog rome forum, but solutions there were only applicable to a custom game module and changing every battle script for each individual epic battle, which sounds very tedious, so is there any way to do it once? even if its modding the main build.

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

Re: How to disable victory conditions for all gamemodes

Post by rbodleyscott »

Ihatesiginingupforstuff wrote: Tue Apr 30, 2024 10:53 pm hello everyone, is there a universal way to disable victory conditions for every game mode in FOG Medieval? since i usually only play hotseat mode, i keep finding battles ending abruptly and i would rather if i could just disable the whole thing and roleplay if a side loses heart or not, this has been talked about before in the fog rome forum, but solutions there were only applicable to a custom game module and changing every battle script for each individual epic battle, which sounds very tedious, so is there any way to do it once? even if its modding the main build.

thanks,
It should be possible.

In /Data/scripts/MoreScenarioTools.BSF there is a section starting around line 5596 that reads:

Code: Select all

											if ((MPGame == 0) && (GetTurn() < deadline) && (UseTutorialMode() == 0) && (IsHotseat() == 0))
												{
													MaybeEndBattle(); // Chance for player to continue playing if desired
												}
											else
												{
													SetGlobal("victory", 1);
													gGameScoreData.decisive = 1;
													gGameScoreData.winner = 0;													
													EndBattle(0);
												}
												
If you changed the first line of this to

Code: Select all

if ((MPGame == 0) && (GetTurn() < deadline) && (UseTutorialMode() == 0))
It should allow you to continue battles in HotSeat().

However, if you edited it in your main build, you would NEVER be able to play MP, because the changed code would cause a warning message that the scripts have been altered, and might (or might not) actually break MP synch.

You would therefore need to put the modded file in a Global Mod.

See: https://archonwiki.slitherine.com/index.php/Modding
Richard Bodley Scott

Image
Ihatesiginingupforstuff
Private First Class - Wehrmacht Inf
Private First Class - Wehrmacht Inf
Posts: 5
Joined: Wed Sep 06, 2023 2:00 pm

Re: How to disable victory conditions for all gamemodes

Post by Ihatesiginingupforstuff »

rbodleyscott wrote: Fri May 03, 2024 9:18 am
Ihatesiginingupforstuff wrote: Tue Apr 30, 2024 10:53 pm hello everyone, is there a universal way to disable victory conditions for every game mode in FOG Medieval? since i usually only play hotseat mode, i keep finding battles ending abruptly and i would rather if i could just disable the whole thing and roleplay if a side loses heart or not, this has been talked about before in the fog rome forum, but solutions there were only applicable to a custom game module and changing every battle script for each individual epic battle, which sounds very tedious, so is there any way to do it once? even if its modding the main build.

thanks,
It should be possible.

In /Data/scripts/MoreScenarioTools.BSF there is a section starting around line 5596 that reads:

Code: Select all

											if ((MPGame == 0) && (GetTurn() < deadline) && (UseTutorialMode() == 0) && (IsHotseat() == 0))
												{
													MaybeEndBattle(); // Chance for player to continue playing if desired
												}
											else
												{
													SetGlobal("victory", 1);
													gGameScoreData.decisive = 1;
													gGameScoreData.winner = 0;													
													EndBattle(0);
												}
												
If you changed the first line of this to

Code: Select all

if ((MPGame == 0) && (GetTurn() < deadline) && (UseTutorialMode() == 0))
It should allow you to continue battles in HotSeat().

However, if you edited it in your main build, you would NEVER be able to play MP, because the changed code would cause a warning message that the scripts have been altered, and might (or might not) actually break MP synch.

You would therefore need to put the modded file in a Global Mod.

See: https://archonwiki.slitherine.com/index.php/Modding
im sorry i dont understand what you did, it seemed to me like you removed the "&& (IsHotseat() == 0))" part but that causes a script error, this is probably a mistake on my part so could you explain further?
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28084
Joined: Sun Dec 04, 2005 6:25 pm

Re: How to disable victory conditions for all gamemodes

Post by rbodleyscott »

Ihatesiginingupforstuff wrote: Fri May 03, 2024 9:41 pm
rbodleyscott wrote: Fri May 03, 2024 9:18 am
Ihatesiginingupforstuff wrote: Tue Apr 30, 2024 10:53 pm hello everyone, is there a universal way to disable victory conditions for every game mode in FOG Medieval? since i usually only play hotseat mode, i keep finding battles ending abruptly and i would rather if i could just disable the whole thing and roleplay if a side loses heart or not, this has been talked about before in the fog rome forum, but solutions there were only applicable to a custom game module and changing every battle script for each individual epic battle, which sounds very tedious, so is there any way to do it once? even if its modding the main build.

thanks,
It should be possible.

In /Data/scripts/MoreScenarioTools.BSF there is a section starting around line 5596 that reads:

Code: Select all

											if ((MPGame == 0) && (GetTurn() < deadline) && (UseTutorialMode() == 0) && (IsHotseat() == 0))
												{
													MaybeEndBattle(); // Chance for player to continue playing if desired
												}
											else
												{
													SetGlobal("victory", 1);
													gGameScoreData.decisive = 1;
													gGameScoreData.winner = 0;													
													EndBattle(0);
												}
												
If you changed the first line of this to

Code: Select all

if ((MPGame == 0) && (GetTurn() < deadline) && (UseTutorialMode() == 0))
It should allow you to continue battles in HotSeat().

However, if you edited it in your main build, you would NEVER be able to play MP, because the changed code would cause a warning message that the scripts have been altered, and might (or might not) actually break MP synch.

You would therefore need to put the modded file in a Global Mod.

See: https://archonwiki.slitherine.com/index.php/Modding
im sorry i dont understand what you did, it seemed to me like you removed the "&& (IsHotseat() == 0))" part but that causes a script error, this is probably a mistake on my part so could you explain further?
You need to leave the last ")" in.
Richard Bodley Scott

Image
Ihatesiginingupforstuff
Private First Class - Wehrmacht Inf
Private First Class - Wehrmacht Inf
Posts: 5
Joined: Wed Sep 06, 2023 2:00 pm

Re: How to disable victory conditions for all gamemodes

Post by Ihatesiginingupforstuff »

rbodleyscott wrote: Sat May 04, 2024 7:12 am
Ihatesiginingupforstuff wrote: Fri May 03, 2024 9:41 pm
rbodleyscott wrote: Fri May 03, 2024 9:18 am

It should be possible.

In /Data/scripts/MoreScenarioTools.BSF there is a section starting around line 5596 that reads:

Code: Select all

											if ((MPGame == 0) && (GetTurn() < deadline) && (UseTutorialMode() == 0) && (IsHotseat() == 0))
												{
													MaybeEndBattle(); // Chance for player to continue playing if desired
												}
											else
												{
													SetGlobal("victory", 1);
													gGameScoreData.decisive = 1;
													gGameScoreData.winner = 0;													
													EndBattle(0);
												}
												
If you changed the first line of this to

Code: Select all

if ((MPGame == 0) && (GetTurn() < deadline) && (UseTutorialMode() == 0))
It should allow you to continue battles in HotSeat().

However, if you edited it in your main build, you would NEVER be able to play MP, because the changed code would cause a warning message that the scripts have been altered, and might (or might not) actually break MP synch.

You would therefore need to put the modded file in a Global Mod.

See: https://archonwiki.slitherine.com/index.php/Modding
im sorry i dont understand what you did, it seemed to me like you removed the "&& (IsHotseat() == 0))" part but that causes a script error, this is probably a mistake on my part so could you explain further?
You need to leave the last ")" in.
thank you! i got it to work, this is exactly what i was looking for :) appreciate your help
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28084
Joined: Sun Dec 04, 2005 6:25 pm

Re: How to disable victory conditions for all gamemodes

Post by rbodleyscott »

Ihatesiginingupforstuff wrote: Sat May 04, 2024 11:25 pm thank you! i got it to work, this is exactly what i was looking for :) appreciate your help
Glad to help.
Richard Bodley Scott

Image
Post Reply

Return to “Field of Glory II: Medieval - Modding”