Recommended Posts

LilithYawe    4

So I'm a new modder  and I'm trying to Reveal  Robin Egg (roc_robin_egg) in hamlet minimap  when the game starts *for PERSONAL uses only*. But its not working

the mod i'm using as a base to do this was made by other modder  -  "where is chester" by nossr50 

it reveals chester eyebone and added an icon to it

AND

I have ALREADY adapted his code to work in shipwrecked and reveal packim_fishbone as well as adding an Icon to it.

my DS coding knowledge is not THAT good, so I'm trying things out until they work, and I've been doing great so far. But for some reason there is something different with hamlet that makes impossible for the game to reveal robin egg when the game is loading. It always brings =nil value  no matter what I do or change.

 

modmain.lua -- file

local require = GLOBAL.require

[.....]

    function RevealRobin(player)
            if not GLOBAL.TheSim:FindFirstEntityWithTag("ro_bin") then 
                  if GLOBAL.TheSim:FindFirstEntityWithTag("roc_robin_egg") then --  nil value
            
                        local target = GLOBAL.TheSim:FindFirstEntityWithTag("roc_robin_egg")   --  nil value
            
                        local x, y, z = target.Transform:GetWorldPosition()
            
                        player:DoTaskInTime(0, function()
                            GLOBAL.GetWorld().minimap.MiniMap:ShowArea(x, y, z, 25)
                        end)    
                  end
            end
    end

[...]

    AddSimPostInit(RevealRobin)

 

This function is working with DS/RG - chester/SH - packim  but not with hamlet - (roc_robin_egg)

Could anybody help me understand why  GLOBAL.TheSim:FindFirstEntityWithTag is bringing a nil value instead of stone egg (roc_robin_egg) info

THX.

Share this post


Link to post
Share on other sites
LilithYawe    4

So after an endless searching through the forum and finding a lot of content but nothing that would help me.

I decided to check ro_bin lua as well as roc_robin_egg lua files

roc_robin_egg does not use its name for its own tag. it uses  (ro_bin_egg).instead

packim fishbone and chester eyebone were working fine because their code names are the same as its tags

 

So...

there is no  ("roc_robin_egg") tag in the game.

I should have used ("ro_bin_egg").

Happy Ending.

Share this post


Link to post
Share on other sites

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
Sign in to follow this