Page 1 of 1

How to disable victory conditions for all gamemodes

Posted: Tue Apr 30, 2024 10:53 pm
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,

Re: How to disable victory conditions for all gamemodes

Posted: Fri May 03, 2024 9:18 am
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

Re: How to disable victory conditions for all gamemodes

Posted: Fri May 03, 2024 9:41 pm
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?

Re: How to disable victory conditions for all gamemodes

Posted: Sat May 04, 2024 7:12 am
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.

Re: How to disable victory conditions for all gamemodes

Posted: Sat May 04, 2024 11:25 pm
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

Re: How to disable victory conditions for all gamemodes

Posted: Mon May 06, 2024 2:38 pm
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.