NKEA {Basic AI module} V.0.1 BETA

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,888
Reaction score
2,859
First Language
French
Primarily Uses
RMMV
■ Nio Kasgami Engine Ace N.K.E.A -"Basic AI module"
V.0.1​
Author:
Nio Kasgami

Introduction:

This script is a dev tool for permit to allow more interaction between the player and the NPC in special Scene. If I explain do you not find boring and generic to always just buy and sells your goods without having some spice in the shop ? 

so I build this for help people to implement VN AI in their scene without having to pass likes 10 hours just for create it. I programmed this module for permit to just have to call the method in their scripts for works

example : 

module Vendor_IAdef self.create_vendor@vendor = Sprite.new#blablaenddef startyour stuffVendor_IA.create_vendorendand this script is totally standalone so the compatibility is high!

Sure you it's still a Scripter tools and you still need to know a little how to implement some method like this in the shop : 

class Scene_Shop < Scene_MenuBasedef on_number_ok @interaction_type = Vendor_IA.interaction_type Sound.play_shop case @command_window.current_symbol when :buy do_buy(@number_window.number) @interaction_type = :buy Vendor_IA.interaction when :sell do_sell(@number_window.number) @interaction_type = :sell Vendor_IA.interaction end end_number_input @gold_window.refresh @status_window.refresh endmodule Vendor_IAdef interaction case interaction_type when :buy execute_buying_reaction when :sell execute_selling_reactionendendyou will not have to worry I will make  a premade scene who use the AI for help people to understand ! but take in note this a SCRIPT dev tool mostly so this not TOTALLY plug'n play you still have to build your script around it  but mostly the script is automatic by itself

the script will contain a custom message system for it..but will contain ALL the sames text code features of the default message system

Features 

  • easy modular script 
  • easy to remove or add options
  • can be modify in games
  • standalone
  • pre-implemented dialogues_system
  • pre-implemented bust system
  • pre-mplemented animation
  • pre-mplemented vocal dialogues add-ons
  • Haggle System add-ons
  • RTP-shops addons for example
  • mood and reputation system
  • Each AI can have is own personality

Compatibility : 

Will be compatible with Luna Engine

Will ask compatibility with Enelvon External Text script

Will be compatible with Vlue Advance game time

How to use : 

need to be build in the scripts

but mostly all the script is configurable via the main setup module

Scripts: 

it's currently not work for the moment but you can see the script structure and see my progress for the moment 

http://pastebin.com/PHwAF8MY

Screenshot :

none at the moment sorry the script it's still at the earlier stage

Term of use :

The Script is free of use for both commercial and non-commercial

You can edit or use this script as a base for your scripts AS LONG you credit me proprepely and don't remove the original Header 

Credit : 

credit me as Nio Kasgami
 
Last edited by a moderator:

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,888
Reaction score
2,859
First Language
French
Primarily Uses
RMMV
Absolutely fantastic!
thanks haha tought unless you know how to scripts this script module is not really usefull haha but not worry I will release some scene who use this module ~
 

Yuuta Kirishima

kind of a big deal
Veteran
Joined
Jul 9, 2013
Messages
551
Reaction score
131
First Language
Engilsh
Primarily Uses
RMMV
This could be used to create a traveling merchant correct?
 

Yuuta Kirishima

kind of a big deal
Veteran
Joined
Jul 9, 2013
Messages
551
Reaction score
131
First Language
Engilsh
Primarily Uses
RMMV
A vendor that travels through maps that sells certain items.
 

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,888
Reaction score
2,859
First Language
French
Primarily Uses
RMMV
actually this the sames thing of a regular shops ...maybe you could just use AI_Personality for give a unique personality to your different travalling merchand
 

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,888
Reaction score
2,859
First Language
French
Primarily Uses
RMMV
I bump this thread for update a explanation about HOW to implement my module in  your script ! 

first of all you have to implement this important code in your script or the system gonna just not initialize the module in your scene

AI_Base.pre_check_setupafter the shopkeeper bust will appear by itself and doing the first action who is 

"Greeting_customer" 

but after the AI will not react to other action because you not "programmed" what he have to do in your script! For doing that 

you have to enter two command I will explain :

AI_Base.interaction AI_Base.interaction_type = :keywhat does AI_Base.interaction?

it's what who will make the reaction possible for the AI

what does AI_Base.interaction_type = :key ?

it's the method you have to call BEFORE interaction it will say to the system WICH reaction to do 

example in script : 

Scene_Shop < Scene_MenuBase def return_scene AI_Base.interaction_type = :say_goodbye AI_Base.interaction SceneManager.return endendit's will initialize the interaction :say_goodbye at the moment you will press the cancel button!

I also updated the script link with the explanation but it's still in french for the moment I have to finish  the explanation in first before doing the translation.

ALSO you not need to update my module via the terminate method my scripts already do the update by itself!
 

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,888
Reaction score
2,859
First Language
French
Primarily Uses
RMMV
I bump this thread again for show HOW to implement your own Reaction in the scripts if you follow this pattern you will be able to create a lots of interaction for your AI 

#==============================================================================# ■ AI_Base {Interactive AI::Interaction}#------------------------------------------------------------------------------#============================================================================== def self.interaction_type return @interaction_type end def self.interaction_emotion_type return @interaction_emotion_type end def self.interaction case interaction_type when :buying_shop call_buying_reaction end end def self.interaction_emotion case interaction_emotion_type when :neutral @index = 0 when :irritated @index = 1 when :happy @index = 2 end end def self.call_buying_reaction interaction_emotion_type = :happy call_dialogues(buy_goods_dialogues) refresh if Input.trigger?:)C) end #===============================================================================# => END : AI_Base {AI::Interaction}#===============================================================================what's is "interaction_emotion_type" 

this a variable you call for help the system to know which emotion to choose in your bust file it's generally works in index for the bust

what's is "call_dialogues"

it's the pre-implemented  message system it's permit to push the dialogues and make the character to speak

and finally you refresh for make the system return to the original expression who is Neutral 

UNLESS you use my module add-ons "mood" who permit to establish a mood system but for the moment this add-on don't exist
 

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,888
Reaction score
2,859
First Language
French
Primarily Uses
RMMV
Goods news peoples! I found how to make my message system I was stuck for the 

call_dialogues(dialogues_method)but now I found a way to call it properly by checking how the default message system done :

by doing this :

def self.call_dialogues(dialogues) @dialogues.push(dialogues) endnow I updated my script link...soon it will begin to work! I just have to do test with a dummy scene

(I don't worked on the Graphics part for the moment so no busr is show but the interaction begin to work!

EDIT : IT'S FINALLY WORKS! okai it's still a wip stage but hey guys it's finally works! 

 
Last edited by a moderator:

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,888
Reaction score
2,859
First Language
French
Primarily Uses
RMMV
Decide to pass the module to a Class  for better stability sake but no worries guys the system will work the same things of the default one but will be better organized this because I had some update issue with the modules 
 

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,888
Reaction score
2,859
First Language
French
Primarily Uses
RMMV
Guys goods news! it's now possible to have personalities for the AI I struggled a lots with that but now you can do personalities for each AI!
 

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,888
Reaction score
2,859
First Language
French
Primarily Uses
RMMV
goods news guys I will update a ghitub for post the scripts (because they have a lots of separate part) 

the script is complete! it's only rest to finish the message_dialogues and the AI_GRAPHICS part for show bust!! 

but now people can call it really easily without having to edit a lots of part I just created a special script calls in the scene_interpreter 

you can check here I added a method for call the scene you want

def ai_scene(scenes,personality_type) SceneManager.call(scenes) SceneManager.scene.prepare(personality_type) endendno need to touch this but you only have to call it in a scripts call :o !

ai_scene(Scene_Test, 1) it's simple no? 

Also you are not forced to use my message dialogue and you can use your OWN message system or the default one!

it only rest to complete and translate the manual! 
 

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,888
Reaction score
2,859
First Language
French
Primarily Uses
RMMV
Here People it's FINISH! 

okai some tweaking to do but ....in the overal this will works : D

http://pastebin.com/y2iyzXGK

but humm it's still rest to do the documentations and fixing this damns effect >_>
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Ksi
Looking forward to messing around with MZ when it comes out in little over a week. Anyone else amped? What's the first thing you're gonna look at/try to do?
by now, I think most people know that I hate misanthropic bad guys, but I realize one more reason I hate them so much is because the motive is easy and takes no thought to come up with. It's actually more challenging to create a villain that doesn't have that motive.
SOC
If the VisuStella videos are using the MZ RTP tilesets... I'm really disappointed. MV's look so much better. I hope it's easy to convert MV tiles to MZ.
If this thing end to be good enough, I'll be pleased to release it there for free (looong to be completed...).
And back. Trying to work online with no internet for 1.5 days was...interesting. I felt like a character in a old Sierra game trying to find internet due to all the hoops I had to jump through just to get online for work.

Forum statistics

Threads
100,740
Messages
979,023
Members
132,366
Latest member
Talim
Top