PidorPi

Character customized coding problem

Recommended Posts

PidorPi    0

I've been searching for helpful guides in a while now. It may be just my inattention, but I just can't find anything to help me.
I wanted to make character lose his sanity faster when he's not around anybody. Players in 
particular.
But I couldn't find anything useful for me. Maybe somebody would want to help me a little with it?
I already gave up on trying to plan a transformation in full moon, but if anybody would like to help me with this - I would be really grateful.

Share this post


Link to post
Share on other sites
Ultroman    339

Both of these have been done on the forum. You should be able to find something if you just search for "transform" or "change animation build" something. See my newcomer post for tips on how to properly search the forum, how to get started with modding, where the tutorials are, how to debug your mod, how to find the game's log files, etc.

Share this post


Link to post
Share on other sites
Ultroman    339

Here's an earlier post about sanity-loss due to proximity to a number of other entities.

Here's a post about changing anim states (changing the look of your character) on phase changes. Figure out which event to listen for to get a notification on moonphases (I think it's actually "moonphase" but look around the game code for it). You can use WatchWorldState instead of ListenForEvent, as well, if you'd rather do that. You can search the forum for "full moon" and you should see a bunch of posts about how to trigger things when the full moon phase starts and ends.

Again, see my newcomer post for information about searching the forums properly and all that. The things you want to do are good entry-level stuff.

Share this post


Link to post
Share on other sites
PidorPi    0

Wow, thank you for the reply!
I'm completely new in this kind of thing and I have absolutely no experience in coding and etc. But I would say that my biggest problem is a sprite example at some point if we get to the transformation part. I have no idea of what I should do or how to draw to progress.

Share this post


Link to post
Share on other sites
Ultroman    339

Yeah, I can't help with art ^^ Spriter assembles your sprites into a compound set of images which can be animated, and outputs a "build" with all the animations in it. You still need to draw the images you put into it. For a transformation between two looks, you make two completely separate animation builds, and switch between them in your code. Even though we sorely need an up-to-date character animation tutorial, the existing ones will get you a long way. This is a character animation template, and this is the Extended Character Template (for DS, but its almost the same code for DST) and here is a thread about Problems and Fixes to the Extended Character Template.

You should be able to grasp the coding within a few days to a week, if you go through my newcomer post and do the things listed there. LUA is weird, but you can learn most of it pretty quickly, until there are only specific subtleties left to learn.

Share this post


Link to post
Share on other sites
PidorPi    0

I'm so thankful for your help.
You don't mind if I would ask several more questions if I will get into the dead end? Well, if that would be okay.

Share this post


Link to post
Share on other sites
Ultroman    339

Of course. That's what the forum is here for. It's best to create threads with specific problems, as it catches a programmer's eye more to see "It says my texture is invalid" than to see "I have a magical idea for an elaborate mod. Let me tell you all about it." :D

Share this post


Link to post
Share on other sites
PidorPi    0

While launching the world - the error seems to appear. 
It says that in the character LUA there is an unexpected symbol near ':'. It seems that I clearly did something wrong in the code, but I don't seem to fully understand.
image.thumb.png.084191b39d50065d7293c23c63a7a7cb.png

 

Share this post


Link to post
Share on other sites
Ultroman    339

You haven't closed the DoPeriodicTask parameter parenthesis.

Line 102

Share this post


Link to post
Share on other sites
Omaremad74    272
20 minutes ago, PidorPi said:

Surprisingly, nothing changed. The error still remains the same.
image.thumb.png.1da089eeffdd67f3adf77fe0ea9e0bf2.png

You need to put it in your fan function

Share this post


Link to post
Share on other sites
Omaremad74    272
1 hour ago, PidorPi said:

Uh... may I ask what does this mean?

Your fn function, where you set up all your components and things.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now