ExpMayVary / Character-Life-Simulator-in-Godot

A utility-based AI character simulator built in Godot, designed to model various life needs and select optimal activities. Ideal for incorporating into your own game projects to add life-like behavior to NPCs
2 stars 0 forks source link

Add a Demo Scene? #1

Open SamSmith17 opened 2 weeks ago

SamSmith17 commented 2 weeks ago

Hi there, thanks for uploading this repo! I'm relatively new to Godot, and reading through the code, I can understand most of what it's doing, but I currently lack the core understanding of Godot required to actually implement it in my Godot projects.

Do I create a have to create a CharacterBody3D and attach the Character_Class.gd script to it, and then put the Main.gd code in my Main.gd script?

I think this is a really neat project, and I'd love to be able to play around with it, so I thought I'd ask if you could potentially add a sample project to the repo? If I can open up a scene and play around with it for a bit, I can usually figure out how it works. Obviously my lack of understanding is ultimately my problem, and I'll keep trying to figure it out, but I figured I'd ask in case you already have a simple example project that you'd be willing to upload to make it easier for noobs like me to use.

Thanks!

ExpMayVary commented 2 weeks ago

Hey! I have added the sample project. its just a simple GUI with the needs showing and what activity was selected. you just need to in some way instantiate the main.gd and it will pull and create the demo character "Jane". (this is done in the example project) ultimately you will need to add to what ever script is controlling "your" character the code to instantiate the Character_class.gd with the information your character has (see main.gd line 6-22 and 52) then you will have some game_controller or time_controller interacting with the decay_needs, best_activity and apply_activity code to have the world interact with them. I am glad you are interested in the project I am more then happy to help you further if you have questions. a potential challenge you could help you wrap your head around the code is that currently "Jane" never takes the eating_at_home activity because eating_out is always better maybe adding a money need could add some more realism.