Hi~
I create turret mod and entity is add add add...
And I have to change the name to manage.
But if I change entity name, It is delete.
I want some way, Even if change entity name, maintain entity and renewal new name.
Is this possible?
How can I keep items?
Re: How can I keep items?
Yes, you want to use an entity migration script. You can look at how we do it in the core mod migrations folder.
Specifically json migrations: http://lua-api.factorio.com/latest/Migrations.html
Specifically json migrations: http://lua-api.factorio.com/latest/Migrations.html
If you want to get ahold of me I'm almost always on Discord.
Re: How can I keep items?
Rseding91 wrote:Yes, you want to use an entity migration script. You can look at how we do it in the core mod migrations folder.
Specifically json migrations: http://lua-api.factorio.com/latest/Migrations.html
Oh Thank you!!
But can I have some example??
I change prototype/entity name
"rapid-cannon-turret" -> "cannon-turret-mk1"
and add migrations
Code: Select all
game.reload_script()
{
"entity":
[
["rapid-cannon-turret", "cannon-turret-mk1"]
],
"item":
[
["rapid-cannon-turret", "cannon-turret-mk1"]
]
}
and this message
message
Did I make a mistake?
Re: How can I keep items?
Oh It work!!
not lua.. just json
and type only
not lua.. just json
and type only
Code: Select all
{
"item":
[
["rapid-cannon-turret", "cannon-turret-mk1"]
]
}
...