Jump to content

Recommended Posts

Hi,

I'd like to make a small tweak to frog and mosquito ponds so that you fish freshwater fish ("pondfish")es out of them instead of the regular fish from old DS (which, from the wiki, is supposed to already be what it is?). It seems like these lines of code from scripts\components\fishable.lua:

Spoiler
function Fishable:HookFish(fisherman)
    local fishprefab = self.getfishfn ~= nil and self.getfishfn(self.inst) or GetRandomKey(self.fish)
    local fish = SpawnPrefab(fishprefab)
    if fish ~= nil then
        self.hookedfish[fish] = fish

 

are what determine what fish is supposed to be pulled out of the pond. I think the "fishprefab" in "local fish = SpawnPrefab(fishprefab)" is pointing to a variable that's supposed to be created by this function:

Spoiler
function Fishable:AddFish(prefab)
    self.fish[prefab] = prefab

 

which, when I take a look at "scripts\prefabs\pond.lua" is set to "pondfish" already. Yet, in game I always pull out a regular fish that can't be murdered (like the old ones) when I fish from swamp and frog ponds. Merms drop freshwater fish ("pondfish"). What am I wrong about? What should I do to tweak this? 

Edited by aurora40

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...