Jump to content

(help) two problems with tamable bees


Recommended Posts

Here's what I've done: I moddified bee.lua in order to make bees tamable. I added the trader and the follower components.

 

Here's my problem(s):

1) The trader functions don't seem to work, as I can give a bee anything, but it doesn't consume the item, or even print my debug lines.

2) When I put -item.prefab == "honey"- to check if the bee got honey, the game throws an error: comparing boolean to number. This is not the case in any of the other code I wrote, nor in the main game.

 

What I hope for: Somebody to show up on this thread and be like "yeah just put X before Y and also you did Z wrong, do it like that:".

 

I am going to look into the "Satori, the Mind Reader" mod, so the issues may just resolve without input from this thread.

Thank you very much for your time and effort!

Link to comment
Share on other sites

Why would you want to tame those little buggers? Just plain curiosity.

Anyway, you should check this mod's code. http://forums.kleientertainment.com/files/file/835-beatrice/

Might be helpful.

 

Whilst that doesn't solve either issue, and I still want to know why item.prefab isn't working, I could rewrite the whole thing based on that mod, and it'd be more compatible with other mods too. Thank you very much.

And... Don't underestimate united power. That's literally what the mod I'm working on right now is about.

EDIT: I probably won't release it anyways. Thanks nontheless.

Link to comment
Share on other sites

Whilst that doesn't solve either issue, I could rewrite the whole thing based on that mod, and it'd be more compatible with other mods too. Thank you very much.

And... Don't underestimate united power. That's literally what the mod I'm working on right now is about.

Glad I could be helpful after not being so much. XD

Link to comment
Share on other sites

Hey @Mobbstar, I've just "repaired" your not working 'bee.lua' :-)

 

Things I've done:

 

- Packed 'bee.lua' to fast-made mod, because I didn't want to replace original game files...

- Commented player-check stuff, because I was testing this on Wilson... (you can uncomment it of course :-) )

- Changed item == "honey" to item.prefab == "honey"...

And, the most important thing:

- Fixed that crash you have occurring, and leaved a helpful note for you... Everything in line 203 ;)

 

It's working like a charm now :-D Packed mod in attachment.

 

Hope I helped :-)

Bee Test.zip

Link to comment
Share on other sites

How... How did I not consider that the broken bit? I'm so bad at this :wilson_tranquil: thank you, I don't know how to recompense you though.

You don't have to, "fixing" is my favorite part of modding :-) Good luck with the mod ;-)

Link to comment
Share on other sites

How... How did I not consider that the broken bit? I'm so bad at this :wilson_tranquil: thank you, I don't know how to recompense you though.

fixing is a part of modding. i was making a castle crasher character and i was almost done and forgot to add in  his food prefs and it took me over 2 hours to fix what was wrong.

Link to comment
Share on other sites

One more question: how to listenforevent in modmain?

You can't listenforevent in modmain, you can do it in prefabs,components and widgets... What you want to do?

 

PS.: If you don't wont to spoiler or release your mod/parts of the mod here, consider PM-ing it to me :-)

Link to comment
Share on other sites

@DevilXD I'm making a note here, --HUGE success!
 

The mod is up! Check it out!

 

oh, and btw:

And... Don't underestimate united power. That's literally what the mod I'm working on right now is about.

EDIT: I probably won't release it anyways. Thanks nontheless.

no tamable bees, unless I decide otherwise. I just felt like a idiot making a mod when there is already basically the same out there.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...