Resource icon

RestartButton 2016-11-04

Remgrandt

Chieftain
Joined
Nov 4, 2016
Messages
37
RestartButton - Adds a restart button to the in game menu.

Download at NexusMods

This adds a restart button that restarts the game using the same settings, but new random seeds.

Installation:
  1. If you have version 1.0.2 installed, remove it (just delete it from the mod/dlc folder)
  2. Download zip file
  3. Unzip in the root of the game directory (on Windows, typically C:\Program Files (x86)\Steam\steamapps\common\Sid Meier's Civilization VI)
  4. Overwrite all
A word on why this can't be a modular modification. As things are right now, script files contained in mod packages will not be loaded until a game is started (as in a getting past the Sean Bean loading screen). This means any scripts that execute on the Main Menu won't run until you first start a game and then exit, and that defeats the point of this mod.

Version 1.0.7
  • Compatible with game build 1.0.0.110 (253607)
Version 1.0.7
  • Compatible with game build 1.0.0.56 (241523)
Version 1.0.6
  • Fixed a bug with non-Ancient starts

Version 1.0.5
  • Remembers the correct number of leaders, if changed from the default

Version 1.0.4
  • Compatible with game build 1.0.0.38 (235603)
Version 1.0.3
  • Random leaders no longer named "Random Leader"
  • Restart no longer stalls during the first restart
Version 1.0.2:
  • Preserves the "no barbarian setting"
  • City States no longer spawn infinitely
  • Random leaders should stay random
Read more about this resource...
 
Last edited:
As someone that restarts a lot until he gets a map he's happy with, THANK YOU! The most annoying part was putting all the settings back in.
 
I'm playing Civ on Macbook. Seem to have issues using this mod. Noticed couple of times after using the "Restart option that City states colours gets messed up and their spawning location also, seen them spawn minimum distance from other civs capitals. Some strange reason it also slows down my computer and waiting time between turns goes up.
 
So this only changes the seed and not the options set to random. Have previous Civ versions handled that the same way?
 
I'm playing Civ on Macbook. Seem to have issues using this mod. Noticed couple of times after using the "Restart option that City states colours gets messed up and their spawning location also, seen them spawn minimum distance from other civs capitals. Some strange reason it also slows down my computer and waiting time between turns goes up.
Can you explain city state color thing some more? I am assuming that the Mac version works the same as the Windows version, since Lua is cross platform, so I wouldn't expect any issues with Mac. As for the waiting time between turns, how many restarts are talking about here? Firaxis has it disabled for some reason, I wonder if they memory leaking. You could try restarting until you get a start you like, then saving, and actually exiting all the way out of the game, then load your save.
 
So this only changes the seed and not the options set to random. Have previous Civ versions handled that the same way?
I'm not sure. The restart code from Civ V doesn't really indicate what happens.
Code:
function OnRestartGame()
   if(Game ~= nil) then
       Game.DoControl(ControlTypes.CONTROL_RESTART_GAME);
   end
end
It should be possible to do this with random options preserved. If you look at InGameTopOptionsMenu.lua, the part about saving the game state just needs to be moved to MainMenu.lua before you launch the game. Either way, Firaxis left notes in the code indicating they were going to go back and give us an official implementation later.
 
Can you explain city state color thing some more? I am assuming that the Mac version works the same as the Windows version, since Lua is cross platform, so I wouldn't expect any issues with Mac. As for the waiting time between turns, how many restarts are talking about here? Firaxis has it disabled for some reason, I wonder if they memory leaking. You could try restarting until you get a start you like, then saving, and actually exiting all the way out of the game, then load your save.

Only done between 10-15 restarts. Seen Buenos Aires in the same coloring scheme as Arabia (Thought it was arabia when I met them and in other restart same city state had dark green color. But the most weird was about their spawning locations as I said, Had a restart where La Venta spawned minumum distance from Gandhis capital. You are right about that option of restarting until good start and then just save quit, but it defeats the purpose of the whole thing a little bit.
 
Only done between 10-15 restarts. Seen Buenos Aires in the same coloring scheme as Arabia (Thought it was arabia when I met them and in other restart same city state had dark green color. But the most weird was about their spawning locations as I said, Had a restart where La Venta spawned minumum distance from Gandhis capital. You are right about that option of restarting until good start and then just save quit, but it defeats the purpose of the whole thing a little bit.
Thanks. I think what is happening is I am using the game settings after map generation, and then rerunning the map script. I will upload a fix when I get off work.
 
my 2 problems i have are i disable barbarians as i am using a giant map from YnAMP, and if i restart they are no longer disabled. the other one is several times after a restart i have another civilization within 3 squares, and i can meet and greet on turn 1..... although i laughed a bit, as 3 times it was Kongo...
 
my 2 problems i have are i disable barbarians as i am using a giant map from YnAMP, and if i restart they are no longer disabled. the other one is several times after a restart i have another civilization within 3 squares, and i can meet and greet on turn 1..... although i laughed a bit, as 3 times it was Kongo...

Also looks like it gets messed up with city-states. I used the restart button a bunch, found a map I liked and started playing. I encountered 3 Kumanri (or however it's spelt) all 3-4 tiles from each each and 2 versions of La Venta next to each other before quitting out.
 
The mod does seem to need a little tinkering. It is not completely unusable by any means , just not perfect yet. As for in my case the weird 'buggy placement' happens after several restarts...your mileage may very.
 
I must confirm there is a bug with player colors. I just found an orange green Vilnius. Nice color combination though. A hidden hint of a yet unrevealed Civ maybe? ;)

I would love to see some overhaul of this mod though.
 
I think there is a problem with new maps after a Restart. Every restart seems to add more city-states to the next map.

When creating a large map, I get 12 city states. If I "restart", the next map has 24 city states (with the really cool colors, etc). The third restart has 36 city states.

Perhaps this a bug inherent to Civ6 itself - and thus why they did not implement the Restart button at release.
 
Nice mod. Can you please add a .modinfo file so that it appears in the Mods menu and can be (un)selected easily.
I've created one like so and it works:
Code:
<?xml version="1.0" encoding="utf-8"?>
<Mod id="c4f79f38-65da-41e6-b64b-991b4d5975c1" version="1">
    <Properties>
        <Name>Restart Button</Name>
        <Teaser>Adds a restart button to the in game menu.</Teaser>
        <Description>This mod lets you restart the game using the same game settings, but with a new random seed. The restart button was already in the game files, but didn't have any functionality attached to it. This just exits the current game and restarts it. There may be a way to do it with less overhead, but this should suffice until Firaxis implements the button properly.</Description>
        <Authors>Remgrandt</Authors>
    </Properties>
    <Components>
        <ImportFiles id="RESET_BUTTON">
            <Items>
                <File>Base/Assets/UI/FrontEnd/MainMenu.lua</File>
                <File>Base/Assets/UI/Menus/InGameTopOptionsMenu.lua</File>
            </Items>
        </ImportFiles>
    </Components>
    <Files>
        <File>Base/Assets/UI/FrontEnd/MainMenu.lua</File>
        <File>Base/Assets/UI/Menus/InGameTopOptionsMenu.lua</File>
    </Files>
</Mod>
 
I tried to install it in DLC, i made a cache verification but the button does not appear : i checked the mod in the additionnal content screen.

Sadly, it is impossible to restart : i have the save the gave, reload etc but not the new button. Sigh :(

Edit : i succeded to make it work but everything is random when a restart, the previous options chosen are not kept.
 
Last edited:
Top Bottom