[0.17.66] /cheat doesn't research technologies in order with respect to pre-requisites.

Bugs that are actually features.
PyroFire
Filter Inserter
Filter Inserter
Posts: 356
Joined: Tue Mar 08, 2016 8:18 am
Contact:

[0.17.66] /cheat doesn't research technologies in order with respect to pre-requisites.

Post by PyroFire »

/cheat doesn't research technologies in order with respect to pre-requisites.

I know this because my mod is throwing an error when /cheat is used, but not when researching normally.
/c game.player.force.research_progress= 1
User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5414
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [0.17.66] /cheat doesn't research technologies in order with respect to pre-requisites.

Post by Klonan »

PyroFire wrote: Tue Aug 20, 2019 10:16 am I know this because my mod is throwing an error when /cheat is used
Can you attach the mod

What error is it throwing?
Can you attach a log file?
PyroFire
Filter Inserter
Filter Inserter
Posts: 356
Joined: Tue Mar 08, 2016 8:18 am
Contact:

Re: [0.17.66] /cheat doesn't research technologies in order with respect to pre-requisites.

Post by PyroFire »

https://mods.factorio.com/mod/warptorio2

Base mod only 0.7.7

The offending research:
warptorio-teleporter-portal being script.raise_event'd before warptorio-teleporter-1.

The -1 etc research accesses a variable in the global table that is created by -portal.
It is throwing an error because this hasn't happened yet, despite pre-requisites.

Proof:
Image

Image
Rseding91
Factorio Staff
Factorio Staff
Posts: 16098
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.17.66] /cheat doesn't research technologies in order with respect to pre-requisites.

Post by Rseding91 »

Thanks for the report however that's not a bug. Technologies can be researched in what ever order anyone wants them to be by just setting ".researched = true" on any of them at any time using the Lua API. You'll need to fix your mod to account for that.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Not a bug”