Jump to content

Changing player_common


Recommended Posts

Hey everybody,

i was wondering if anybody could help me out here. I am currently working on my first mod (and even tbh my first coding project) for Don't Starve. While what I am planning might be quite ambitious for someone with no coding experience whatsoever - a overhaul/extension to Don't Starve, with it's main focus on increasing the difficutly of survival in general - what I am trying to do for starters was just to implement the poison mechanic from SW and with it bring snakes and the tropical spider warriors to the realms of RoG. (BTW I'm aiming for making this mod compatible with SW, but not have it rely on it, to work)

So while I did manage to bring over the snakes and provided them a different way to spawn than the vine based snakedens, I am having trouble with the poison mechanic.

I would need to change the MakePlayerCharacter function from player_common.lua to make the player poisonable. So I copied the RoG player_common.lua to my mod and added the poison changes, but it can't seem to register said file.

So hope y'all can understand what i was trying to say and have some ideas.

 

Edit: Ok, so i got the character poisonable afterall, within my modmain, by creating a MakePlayerPoisonable function, which basically is just a copy of MakePoisonableCharacter, except for it only doing it with the parameters, that are used within the SW player_common.lua. Only problem i got left, is i can't seem to add the PoisonFX, the effect of little bubbles around the body, because Vector3(0,0,0) is seen as a nil value, even if i set Vector03 = GLOBAL.Vector3 or require "vector3" . So thats that.

Thanks and

Happy Starvin'

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...