Page 1 of 1
mod error
Posted: Tue Mar 08, 2016 9:33 pm
by ZombieMooose
I keep getting the error:
Error while loading item prototype "raw-fish" (capsule): Prototype "raw-fish" registered twice
I'm trying to change the raw-fish into an item so I can smelt it into a cooked fish.
Re: mod error
Posted: Wed Mar 09, 2016 1:45 am
by DaveMcW
It's already an item, you can't define it again.
If you are trying to copy it and make a cooked-fish item, be sure to change the name.
Re: mod error
Posted: Wed Mar 09, 2016 5:20 pm
by ZombieMooose
Well then how do I change it to where when you "catch" a fish it gives you the item I'm creating?
Re: mod error
Posted: Wed Mar 09, 2016 9:35 pm
by Koub
you destroy the catched fish, and you spawn your own kind ?
(btw I know nothing to modding ^^)
Re: mod error
Posted: Wed Mar 09, 2016 9:42 pm
by ZombieMooose
Koub wrote:you destroy the catched fish, and you spawn your own kind ?
(btw I know nothing to modding ^^)
yeah kinda
I want to change raw-fish into an item that can be smelted (cooked) into cooked-fish to eat
Re: mod error
Posted: Wed Mar 09, 2016 9:46 pm
by Arch666Angel
just setup another recipe which turn the raw fish into cooked fish?
Re: mod error
Posted: Fri Mar 11, 2016 7:36 pm
by ZombieMooose
Arch666Angel wrote:just setup another recipe which turn the raw fish into cooked fish?
the problem is how do I catch the new raw-fish I made?
Re: mod error
Posted: Fri Mar 11, 2016 7:47 pm
by Arch666Angel
What is it you want to achieve?
1. Do you just want to cook the fish you can already catch into something?
-This can be done by setting up a recipe and an item for the cooked fish
2.Or do you want to add a second kind of fish which can be cooked?
-This is a bit more complex because I'm pretty sure you have to tweak something to have you new fish to spawn alongside the other.
Re: mod error
Posted: Sat Mar 12, 2016 12:07 pm
by daniel34
The fish you catch will still be the same fish as in vanilla, raw-fish.
(Note that the entity on the ground is called "fish", but the item you get when mined is "raw-fish")
You then add an extra item called cooked-fish and a recipe to convert the raw-fish in a furnace:
Code: Select all
data:extend(
{
{
type = "recipe",
name = "cooked-fish",
category = "smelting",
enabled = true,
energy_required = 10,
ingredients = {{"raw-fish", 1}},
result = "cooked-fish"
}
}
)
To change the amount of health the cooked-fish gives you, make it into a capsule that gives you negative damage, the same as raw-fish does:
Code: Select all
{
type = "capsule",
name = "cooked-fish",
icon = "__base__/graphics/icons/fish.png",
flags = {"goes-to-quickbar"},
subgroup = "raw-resource",
capsule_action =
{
type = "use-on-self",
attack_parameters =
{
type = "projectile",
ammo_category = "capsule",
cooldown = 30,
range = 0,
ammo_type =
{
category = "capsule",
target_type = "position",
action =
{
type = "direct",
action_delivery =
{
type = "instant",
target_effects =
{
type = "damage",
damage = {type = "physical", amount = -40}
}
}
}
}
}
},
order = "f-e-a",
stack_size = 100
},
Re: mod error
Posted: Wed Mar 16, 2016 6:17 pm
by ZombieMooose
well I don't know what happened, but it seems to work now
so there's that
I'm gonna check compatibility with my other mods to see why it didn't work in the first place
thanks everyone for their help!