Crea
Expand Your World
Create and share new mods to expand your worlds: items, monsters, skills, races, realms, game systems. Anything and everything is possible.
Learn More
Lorinthio 1 21 Jun, 2016 @ 6:42am
Starting a mount mod....
Hey guys, I'm beginning work on a mount mod. Eventually I plan to get art and animations for different horse types. To start with I am going to utilize the speed and edit some of its ai. But the first issue to come up with is how to control an entity via player input. Is there an easy way to attach one to the other or will I need a task to handle this?

Since you may wonder why you would need a mount in the first place, I'm considering making it a summoning item that you could use in other worlds to explore more quickly. You will have higher move speed and jump time while mounted
< >
Showing 1-7 of 7 comments
Baxter900 4 21 Jun, 2016 @ 9:20am 
Hmm, no clue the best way to tie entity control to the player. Try input.py and see if that's any help.

As for the ai, if you want an easy-ish base for the ai I had at one point made a "pet" ai base. The pet would just essentially try to follow you around semi-closely. It was made for a pet that was tied to a summoning item, so I can give you that whole file if you want the basis.
Lorinthio 1 21 Jun, 2016 @ 1:47pm 
Yeah it would definitely help in the creation of my own ai! Thanks in advance!

The only thing I'm afraid of is mostly the client/user of the mount. I could see the player who is controlling the mount, on his specific client moving in front of the horse due to network delay. Where all the other players would see it update correctly each frame.

So if there is a way to pass the authoritative power from the server to the client for this one entity, thats what I would most likely need. So fingers crossed I don't have to do too much extra work for it
Lorinthio 1 21 Jun, 2016 @ 2:30pm 
After doing some code browsing I did find a promising code snippet. Which I may be able to use if I'm understanding it.

The core/component/projectile.py has an attachTo method.

def attachTo(self, entity, offset=Vector()): parent = self.getParent() if entity.has('attachment'): entity.attachment.attach(parent, offset) else: self.attached = entity self.attachedOffset = offset parent.physics.onTimeStep.listen(partial(self.attachOnHit, moveToCenter=False))

Seems promising if I can manage to make sure that my mount entity has 'attachment'... (searching for what this is referring to now)

Edit: Seems like players definitely has attachment, so I'm thinking, I can feed into input as you suggested check if the player is mounted with a bool flag, and then move the mount as well as the player in the same frame.
Last edited by Lorinthio; 21 Jun, 2016 @ 2:42pm
Baxter900 4 21 Jun, 2016 @ 9:15pm 
I'll get the code to you for the pet tomorrow morning.
Lorinthio 1 21 Jun, 2016 @ 9:20pm 
Seems like my hunch with the attachTo method was right. Was buggin Jasson tonight with the question, and he said that the server/client will be handled fine with the attach method. So the player and server will see it all correctly.

As for the AI, I'll probably just freeze it and have a simple summon ring for it. Simply to avoid needless code as well as make the mount easily moveable
Baxter900 4 22 Jun, 2016 @ 7:33am 
Here's the pet code: https://www.dropbox.com/s/zumdydvvt241t5v/crea%20pet%20mod.zip?dl=0

It includes three pet examples, one being a speep, one an ortomi, and one a "hovercat". The "hovercat" is tied to the "cat_statue" item, interacting with the "cat_statue" item will spawn a "hovercat" if there's none nearby in the world. The pets will try to follow you (but can fail) and are non-aggressive. They are on the default player team meaning they don't take damage from the player, but do take damage from enemies. If you have any questions about it just ask!
PickleRick 23 Jul, 2016 @ 9:18pm 
i dont know anthing about teh mods. however,wouldnt using light orb to toggle summon your horse sprite work instead of this?
Last edited by PickleRick; 23 Jul, 2016 @ 9:20pm
< >
Showing 1-7 of 7 comments
Per page: 1530 50