Finite8's Modding Adventures

This forum is for anything that doesn't specifically have to do with Better Than Wolves
Post Reply
User avatar
finite8
Posts: 587
Joined: Mon Jul 04, 2011 9:31 pm
Location: Melbourne, Australia

Finite8's Modding Adventures

Post by finite8 »

So, i've still been playing a lot on my vanilla server and i have reached that point where very few things are a challenge. I recently went into the nether to hunt for some wither skulls and the little jumps of fear made me realise that the overworld is really boring. Sure, there are creepers there, but they really aren't that scary if you pay attention.

Then i remembered the ender man. I remembered that feeling of fear i got from them with they were first released back in beta. There was so much potential there, but it was all wasted. They seem to have potential to be smarter than the average mob, but why aren't they. Then it hit me.

I can't convince my friends to use BTW, so isntead I am having a play around with the enderman AI with the goal of implementing more interesting behaviour without the clients being involved. As far as i can tell, as long as i focus entirely on only modifying behaviour and not add new features, there is no reason i cant just implement this in the server in a way that doesn't need a client mod. I am borrowing some ideas inspired by FC, but my premise is:
- Enderman are a bit loopy from their transition into the overworld.
- When holding something, there is a chance they inadvertently turn it into end stone.
- This makes them go crazy and attack anything that isn't their own species (i quite enjoyed seeing an ender man chase down a bat or duel a skeleton)
- As more and more endstone is placed, they start to gain more of their sentience. The end is not safe for them (not with that horrible enderdragon ruling them), so the Overworld is the perfect place to make a new home.

I was surprised to see that EntityEnderman doesn't use the new AI logic, but that way of working is messy enough as it is. Thankfully, the "EntityNavigate" and "MoveHelper" classes are really well done and works a treat (pretty much nails all of the hard work i did with my Golems idea and pathfinding a while back) and blends almost perfectly with the endermen. There are a few movement glitches which i think is due to the hitboxes not configured for the "EntityNavigate" class which i will look in to, but already they are becoming a bit more "Genetic" in their behaviour. I added a small non-block destroying explosion when they did the conversion which funnily enough is not appreciated by other endermen nearby. Seeing the endermen fight it out is interesting too.

Anyway, just thought I'd share and thank FC for inspiring the idea.
Last edited by finite8 on Mon Apr 15, 2013 4:52 pm, edited 1 time in total.
Flowerchild (IRC) wrote:I'm not trying to stop you BTW ..., I'm saying that I think you're a piece of shit...not the same thing
User avatar
FlowerChild
Site Admin
Posts: 18753
Joined: Mon Jul 04, 2011 7:24 pm

Re: Scarier Mobs for my BTW-phobes

Post by FlowerChild »

You sure about the client not needing the changes man? I'm not certain about this, but I think if you just implement the AI over on the server, the client side prediction of where the mob is at well get flumoxed and you'll have mobs warping about.

Again...could be wrong there, I just wouldn't take it as a given that AI changes don't need to be performed client side as well.
User avatar
finite8
Posts: 587
Joined: Mon Jul 04, 2011 9:31 pm
Location: Melbourne, Australia

Re: Scarier Mobs for my BTW-phobes

Post by finite8 »

Hmm... will double check that. I didn't notice any weird behaviour but then again, it was pretty simple at that stage (once i confirmed my proof-of-concept i switched to the client side as debugging the server was a bit painful). There may have been holes in my proof of concept test though... can't count anything out.

My gut feeling though is there may be some glitches in which way they look around when you get near but my play experiences so far is when the connection lags out, the mobs stay still which implies that current position is entirely server based without client prediction.

Will test this when i get home.
Flowerchild (IRC) wrote:I'm not trying to stop you BTW ..., I'm saying that I think you're a piece of shit...not the same thing
User avatar
FlowerChild
Site Admin
Posts: 18753
Joined: Mon Jul 04, 2011 7:24 pm

Re: Scarier Mobs for my BTW-phobes

Post by FlowerChild »

Some of it must be client side man, otherwise they'd jump all over the place, I just don't know if the AI communicates objectives to the client, or if it's expected to figure it out on its own. Never dug into it that far.

Anyways, you may be fine, like I said, I just didn't want you to take it for granted that it would automatically work.
User avatar
finite8
Posts: 587
Joined: Mon Jul 04, 2011 9:31 pm
Location: Melbourne, Australia

Re: Scarier Mobs for my BTW-phobes

Post by finite8 »

From what i can tell, the client-side uses the vectors for prediction (position, direction and velocity). Also any physics seems to be calculated client side too but behavioral changes and setting these values just like the existing code does should be fine. I have just tested the same code and it seems to work as expected server side. The server i normally use is currently down (apparently their host has been hit with a DDoS attack that has lasted a few days) so i will try to do some testing with latency as well.
Flowerchild (IRC) wrote:I'm not trying to stop you BTW ..., I'm saying that I think you're a piece of shit...not the same thing
User avatar
DaveYanakov
Posts: 2090
Joined: Sat Jul 23, 2011 5:17 am

Re: Scarier Mobs for my BTW-phobes

Post by DaveYanakov »

Warr and Benanov would be the ones to talk to about server side behavioral mods. They've pulled off some incredible things without ever touching client code and may have further insight into what is and what is not possible.
Better is the enemy of Good
User avatar
finite8
Posts: 587
Joined: Mon Jul 04, 2011 9:31 pm
Location: Melbourne, Australia

Re: Scarier Mobs for my BTW-phobes

Post by finite8 »

DaveYanakov wrote:Warr and Benanov would be the ones to talk to about server side behavioral mods. They've pulled off some incredible things without ever touching client code and may have further insight into what is and what is not possible.
Interesting. Perhaps i will hit them up for some info. I'm pretty sure though that my proof-of-concept is bang on. I would probably even bet a small and cute fluffy kitten on it :P
Flowerchild (IRC) wrote:I'm not trying to stop you BTW ..., I'm saying that I think you're a piece of shit...not the same thing
User avatar
finite8
Posts: 587
Joined: Mon Jul 04, 2011 9:31 pm
Location: Melbourne, Australia

Re: Finite8's Modding Adventures

Post by finite8 »

So, for a bit of fun, I decided to see how hard it would be to make some server-only rule adjustments to make the game more challenging and add some more "survival" to SMP. Surprisingly, this was really easy and worked a treat. I adjusted the following:
- Health no longer regenerates when at full health (Watching an Ultra Hard Core match inspired this)
- Sleeping in a bed no longer skips the night (Thanks FC!)
- Sleeping in a bed through does regenerate heal very slowly and Consumes hunger to do so. An additional observation on this is that when sleeping you cant see hunger or health bars. This is actually advantageous to the mechanic. Just as you wouldn't know when to wake up because your sore leg is now better, so too you won't know when you have fully healed
- Removed Bonemeal working as a fertilizer for anything (I can't be stuffed figuring out how to get hardcore bonemeal server only, so dropping this feels to be the best way).
- Iron is harder to obtain. Furnace requires 8 Iron ore to smelt 1 Ingot. (Again, Thanks FC)
- Cows now drop more leather to compensate for this (It's a whole cow, yet i only get one little sliver of skin? BS!)
- Because i can't remove recipes without clunkiness and glitches, i adjusted the damage values. Wood and Gold only deal 1 heart damage and Stone only deals 1.5 hearts.

I had a bit of a play like this and really enjoyed it. For the first time without BTW, i had a need to obtain Leather Armour and it is really a survival element i feel Vanilla missed. I personally really enjoy the bed-healing mechanic but i am going to explore this more to see if it feels right. My plan is to have a bit of a competitive Capture-The-Flag night using these new mechanics along with a 5 minute death timer and see how it goes. My gut feeling is it should be fun.

Also, renamed thread.
Flowerchild (IRC) wrote:I'm not trying to stop you BTW ..., I'm saying that I think you're a piece of shit...not the same thing
Post Reply