Starbound Vore Mod Discussion
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Two glitches - NPCS vanishing, and Bunyip Tenants malfunctioning.

3 posters

Go down

Two glitches - NPCS vanishing, and Bunyip Tenants malfunctioning.  Empty Two glitches - NPCS vanishing, and Bunyip Tenants malfunctioning.

Post by rossmallo Sun Aug 06, 2017 4:53 pm

I'm having a few problems with some of the Tenants - Namely, they keep turning invisible.

Spoiler:

Most of the time they eventually reappear, but there's one that doesn't - An NPC from one of their quests never left, but eventually vanished, but they can still be talked to even if their name can't be seen.

EDIT: It appears that it is somewhat linked to Tenants teleporting. Two of them teleported and they were both invisible on entry. Cannot offer this as concrete proof but may be worth investigating.

Spoiler:

Log Below (I think this is the right thing, tell me if not)

Spoiler:


Last edited by rossmallo on Sun Aug 06, 2017 6:18 pm; edited 1 time in total
rossmallo
rossmallo

Posts : 5
Join date : 2017-07-14

Back to top Go down

Two glitches - NPCS vanishing, and Bunyip Tenants malfunctioning.  Empty Re: Two glitches - NPCS vanishing, and Bunyip Tenants malfunctioning.

Post by rossmallo Sun Aug 06, 2017 5:41 pm

Bunyips are also not working correctly. They lose their costume after eating someone.

Spoiler:

Log:

Spoiler:
rossmallo
rossmallo

Posts : 5
Join date : 2017-07-14

Back to top Go down

Two glitches - NPCS vanishing, and Bunyip Tenants malfunctioning.  Empty Re: Two glitches - NPCS vanishing, and Bunyip Tenants malfunctioning.

Post by maiesen Mon Aug 07, 2017 12:55 pm

I have been playing with this mod for quite a bit and also noticed NPCs disappearing. For me, it happens when I unloaded(save&quit/beam up) the planet/spacestation after the NPC has been eaten by another NPC (Can also happen to my player character). After fiddling with some commands, I found that the vore status effect simply didn't disappear. This makes the affected NPCs invisible and paralyzed. This is because how Starbound handles reloading status effect.

From the init() function in stats/effects/npcvore/npcvore.lua
Code:
function init()
 pred = effect.sourceEntity()
 blink = false
 status.addPersistentEffects( "vore", {"intents", "paralysis" } )
 effect.addStatModifierGroup({{stat = "fallDamageMultiplier", effectiveMultiplier = 0}})
 effect.addStatModifierGroup({{stat = "invulnerable", amount = 1}})
end

The 'pred' variable is supposed to contain the ID of the NPC who applied the status effect. Upon loading the world however, the 'pred' variable references the prey instead. So essentially the NPC ate themselves instead of being eaten.

There are two ways (that I have found so far) to fix this issue.
1. Use 'alt' key to reveal the invisible NPC location. Place your cursor over them and with admin turned on, type in this command (without quotes): "/entityeval status.clearAllPersistentEffects()". This should clear the status effect and make them normal again.
2. A more permanent option is to change the code itself. In the update(dt) function of npcvore.lua, add in this code.
Code:
if entity.id() == pred then
 status.clearPersistentEffects("vore")
 effect.expire()
 do return end
end
This will clear the status effect automatically when 'pred' references the prey NPC.
There is another unrelated npcvore.lua located in scripts/vore/. Don't do anything to that file.

Side note: There is another way NPCs can be in a different location from the pred. This happens when they decided to lounge on some furniture while being eaten. This will prevent them from being moved to the pred position. Simply interact with them to make them teleport to their respective pred. (I tried to fix this in code but haven't had any successes)

Hope this helps!

maiesen

Posts : 3
Join date : 2017-08-05

Back to top Go down

Two glitches - NPCS vanishing, and Bunyip Tenants malfunctioning.  Empty Re: Two glitches - NPCS vanishing, and Bunyip Tenants malfunctioning.

Post by rossmallo Mon Aug 07, 2017 1:40 pm

Exactly what line should I put the code mentioned in point 2? I'm not great with coding.
rossmallo
rossmallo

Posts : 5
Join date : 2017-07-14

Back to top Go down

Two glitches - NPCS vanishing, and Bunyip Tenants malfunctioning.  Empty Re: Two glitches - NPCS vanishing, and Bunyip Tenants malfunctioning.

Post by maiesen Mon Aug 07, 2017 1:54 pm

Just something like this should be good enough.
Code:
function update(dt)
 if world.entityExists( pred ) then
 vector = world.entityPosition( pred )
 else
-- sb.logInfo("exited via pred missing")
 status.clearPersistentEffects("vore")
 effect.expire()
 do return end
 end
 
 if entity.id() == pred then
 status.clearPersistentEffects("vore")
 effect.expire()
 do return end
 end

...other code here...
end

Note: This will only work for non-digest preds. To do the same for the digestion counterparts , go to stats/effects/npcdigestvore/npcdigestvore.lua and repeat the process. I haven't tested this but it shouldn't be any different.

maiesen

Posts : 3
Join date : 2017-08-05

Back to top Go down

Two glitches - NPCS vanishing, and Bunyip Tenants malfunctioning.  Empty Re: Two glitches - NPCS vanishing, and Bunyip Tenants malfunctioning.

Post by rossmallo Thu Aug 10, 2017 1:25 pm

Can confirm the above worked perfectly. Thank you so much c:
rossmallo
rossmallo

Posts : 5
Join date : 2017-07-14

Back to top Go down

Two glitches - NPCS vanishing, and Bunyip Tenants malfunctioning.  Empty Re: Two glitches - NPCS vanishing, and Bunyip Tenants malfunctioning.

Post by Winter_Spyper Wed Apr 03, 2019 10:34 am

I as well had invisible tenants but thanks to this post I managed to fix it. I literally had a hotel full of invisible Tenants before I found this post.
But to get back to the other matter at hand, Bunyip Tenants don't seem to be able to equip the bunyipbelly.legs, and lose bunyip.legs until they teleport back. I looked in the bunyip.lua and pred_bunyip.npctype files and cross-referenced to some other npc files that hadn't broken and couldn't find what could have caused the bug.


Last edited by Winter_Spyper on Sat Jun 08, 2019 3:31 pm; edited 1 time in total (Reason for editing : small fixes and corrections)

Winter_Spyper

Posts : 2
Join date : 2019-04-03

Back to top Go down

Two glitches - NPCS vanishing, and Bunyip Tenants malfunctioning.  Empty Re: Two glitches - NPCS vanishing, and Bunyip Tenants malfunctioning.

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum