[Solved] Skip intro but retain the crashsite

Place to get help with not working mods / modding interface.
Post Reply
Theis
Inserter
Inserter
Posts: 27
Joined: Tue Sep 13, 2022 9:57 am
Contact:

[Solved] Skip intro but retain the crashsite

Post by Theis »

I am trying to create a piece of software to aid in creating a TAS, and the freeplay intro cutscene is disrupting.

I have tried:

Code: Select all

script.on_init(function()
    local freeplay = remote.interfaces["freeplay"]
    if freeplay then  -- Disable freeplay popup-message
        if freeplay["set_skip_intro"] then remote.call("freeplay", "set_skip_intro", true) end
        if freeplay["set_disable_crashsite"] then remote.call("freeplay", "set_disable_crashsite", true) end
    end
end)
It does remove the intro, but it also removes the crashsite.

As far as i can tell

Code: Select all

remote.call("freeplay", "set_skip_intro", true)
only skips the pop-up message,
However

Code: Select all

remote.call("freeplay", "set_disable_crashsite", true)
both skips the cutscene and skips spawning the crashsite.

I want to skip the cutscene because it means that the user has to provide inputs and it gets annoying very fast.
I want to retain the crashsite as it provides some difficulty.

Is there anything simple i can do?
Last edited by Theis on Thu Sep 15, 2022 6:29 pm, edited 1 time in total.

User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2528
Joined: Fri Nov 06, 2015 7:41 pm

Re: Skip intro but retain the crashsite

Post by Deadlock989 »

I don't know what a TAS is in this context.
Theis wrote:
Tue Sep 13, 2022 10:44 am
Is there anything simple i can do?
Not really, that's the way the freeplay scenario is set up - you can see how it handles those remote calls in Factorio\data\base\scenarios\freeplay\freeplay.lua.

For non-simple solutions you could maybe create your own custom scenario that doesn't use freeplay but does access the crash site resources (Factorio\data\base\prototypes\entity\crash-site.lua) - basically making a modified version of the freeplay scenario that does what you want.
Image

FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 2610
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: Skip intro but retain the crashsite

Post by FuryoftheStars »

I think the No Freeplay Cutscene mod does what you're looking for, so take a look at their code. A brief look, I think they ran into the same issue as you, but defined some additional code that essentially adds the crash-site back if the user opted to skip the cut-scene but not remove the crash-site. The mod author decided it wasn't worth the effort trying to code the reverse (allow the cut-scene but remove the crash-site). :P
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles | New Gear Girl & HR Graphics

Theis
Inserter
Inserter
Posts: 27
Joined: Tue Sep 13, 2022 9:57 am
Contact:

Re: Skip intro but retain the crashsite

Post by Theis »

I don't know what a TAS is in this context.
It is short for Tool Assisted Speedrun.
For non-simple solutions you could maybe create your own custom scenario that doesn't use freeplay but does access the crash site resources (Factorio\data\base\prototypes\entity\crash-site.lua) - basically making a modified version of the freeplay scenario that does what you want.
I am not in love with this option. It might eventually be the correct solution, but it would require quite a bit of rewriting.
I think the No Freeplay Cutscene mod does what you're looking for, so take a look at their code.
It does look like it does what I want, thank you.

ichVII
Long Handed Inserter
Long Handed Inserter
Posts: 98
Joined: Mon Feb 27, 2017 10:16 pm
Contact:

Re: Skip intro but retain the crashsite

Post by ichVII »

If your TAS is set seed anyway, you could just save the game and export as a scenario after you manually skipped the intro. This scenario would then be the startpoint of your TAS.

The issue with that is how to count the final time (do the few seconds during cut scence skip count) and if it did not count, the issue arizes that you might be able to use this in order to wait for the perfect amount of ticks in order to manipulate coal rock RNG. I currently do not see any reason to believe there will be multiple TAS runs less then 10s apart, so the time counting does not seem particularly relevant at the moment.

BTW are you aware of the current TAS wr and the TAS planning/running which Zaspar currently does?

FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 2610
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: Skip intro but retain the crashsite

Post by FuryoftheStars »

ichVII wrote:
Thu Sep 15, 2022 12:40 am
If your TAS is set seed anyway, you could just save the game and export as a scenario after you manually skipped the intro. This scenario would then be the startpoint of your TAS.

The issue with that is how to count the final time (do the few seconds during cut scence skip count) and if it did not count, the issue arizes that you might be able to use this in order to wait for the perfect amount of ticks in order to manipulate coal rock RNG. I currently do not see any reason to believe there will be multiple TAS runs less then 10s apart, so the time counting does not seem particularly relevant at the moment.

BTW are you aware of the current TAS wr and the TAS planning/running which Zaspar currently does?
I'm not 100% sure, but I think starting a new map off from a scenario starts with the game.tick = 0. (If that's not what you were referring to, then my apologies, just ignore me.)
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles | New Gear Girl & HR Graphics

ichVII
Long Handed Inserter
Long Handed Inserter
Posts: 98
Joined: Mon Feb 27, 2017 10:16 pm
Contact:

Re: Skip intro but retain the crashsite

Post by ichVII »

Ok, I do not know how RNG is calculated. If it just depends on the game tick, that would be fine. But if saving as a scenario and then loading changes the RNG, this would be an issue. The amount of coal/stone dropped from coal rocks is a very important number for the first 5mins.

FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 2610
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: Skip intro but retain the crashsite

Post by FuryoftheStars »

Oh, RNG for the resources? These are based entirely on map settings (seed, resource sliders, and water slider (due to water to land ratio, this can cause water to cut into/be where resources would spawn)) and how the game processes those settings (so changes by the devs to map generation logic can cause the same settings to load differently between different versions of the game if a change was made).

That said, a scenario created by converting a save game into a scenario I believe bakes all of those settings into it, and then never gives the player the option to change them when starting a new game with it as the template. As such, they should always start identically on the same version of the game.

But I didn't get the impression that's what the OP wanted? Maybe I'm wrong there, but I thought they just wanted to be able to remove the intro and keep the crash-site, while still allowing the player to adjust their own map settings.
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles | New Gear Girl & HR Graphics

Theis
Inserter
Inserter
Posts: 27
Joined: Tue Sep 13, 2022 9:57 am
Contact:

Re: Skip intro but retain the crashsite

Post by Theis »

ichVII wrote:
Thu Sep 15, 2022 12:40 am
If your TAS is set seed anyway...
While individual TAS are set-seed for obvious reasons, i am not actually building a TAS. I am building a TAS helper, so others can create a TAS.
ichVII wrote:
Thu Sep 15, 2022 12:40 am
...you could just save the game and export as a scenario after you manually skipped the intro. This scenario would then be the startpoint of your TAS...
I don't think it is an option to bundle seeds with the TAS helper, just because of sheer variety of viable seeds.
ichVII wrote:
Thu Sep 15, 2022 12:40 am
BTW are you aware of the current TAS wr and the TAS planning/running which Zaspar currently does?
I have seen the any% TAS and some of the other TAS' for shorter categories. I have consistent communication with Zaspar

Theis
Inserter
Inserter
Posts: 27
Joined: Tue Sep 13, 2022 9:57 am
Contact:

Re: Skip intro but retain the crashsite

Post by Theis »

FuryoftheStars wrote:
Thu Sep 15, 2022 5:07 pm
Oh, RNG for the resources?
RNG for huge-rock yields,
FuryoftheStars wrote:
Thu Sep 15, 2022 5:07 pm
But I didn't get the impression that's what the OP wanted? Maybe I'm wrong there, but I thought they just wanted to be able to remove the intro and keep the crash-site, while still allowing the player to adjust their own map settings.
You are correct. I was hoping for an easy option, and have choosen to use/copy the skip cutscene mod. Which have turned out quite good.

FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 2610
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: Skip intro but retain the crashsite

Post by FuryoftheStars »

Theis wrote:
Thu Sep 15, 2022 6:35 pm
FuryoftheStars wrote:
Thu Sep 15, 2022 5:07 pm
Oh, RNG for the resources?
RNG for huge-rock yields,
Ohhh. Sorry, misunderstood. Yeah, that may be a standard rng that's not consistent from play-through to play-through, but I haven't cared enough about those to ever test/investigate. I prefer turtling. :D
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles | New Gear Girl & HR Graphics

Post Reply

Return to “Modding help”