Jump to content

  • Log In with Google      Sign In   
  • Create Account


Event Processing for AI


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 ZoomBoy   Members   -  Reputation: 162

Like
Likes
Like

Posted 26 May 2000 - 12:53 AM

In a previous thread here I talked about creating a messaging system. For that I'll need In my RPG I've got 2 event types to pass to my message system. One is for the story events(Binky has returned the Golden Shovel to the Royal Foo) and the other is for Action events(during Map movement and combat)
class StoryEvent : class totplist
{
//	char KeyName[40];   // EventName
//	int  KeyCode;       // EventCode
//	char Key2ndName[40];// MapInfo
//	int  KeySourceCode; // Sender
//	int  UPriority;     // UPriority
//	int  ObjType;       // ObjType
//	int  nID;           // nID

};

class ActionEvent : class totplist
{
//	char KeyName[40];   // EventName
//	int  KeyCode;       // EventCode
//	char Key2ndName[40];// Misc info
//	int  KeySourceCode; // Sender
//	int  UPriority;     // UPriority
//	int  ObjType;       // ObjType
//	int  nID;           // nID
	XPos, YPos;			// Where it emanates from
	Range;				// Effective Range
	Duration;			// How long it lasts
	Target;				// Who receives it 
}

Looking closer they seem to be related but do different things. Am I missing any other variables? In relation to Story Events I was looking in Planescape:Torment's quest.txt [init] questcount=125 [0] title=37696 descAssigned=39732 descCompleted=39733 assignedChecks=1 aVar1=Pharod aValue1=0 aCondition1=EQ completeChecks=1 cVar1=Pharod cValue1=0 cCondition1=GT [1] title=39734 descAssigned=39735 .... ZoomBoy Developing a 2D RPG with skills, weapons, and adventure. See my character editor, Tile editor, diary, 3D Art resources at Check out my web-site Edited by - ZoomBoy on 5/26/00 9:03:18 PM Edited by - ZoomBoy on 5/26/00 9:04:27 PM

Sponsor:

#2 ZoomBoy   Members   -  Reputation: 162

Like
Likes
Like

Posted 26 May 2000 - 03:00 PM

Ya the major difference between them(Story vs. Action event/msgs) is putting together the antecedents or necessary conditions for their completion.

With Action messages, they go onto a queue or list and all the current jobs are sorted by priority.

With Story events I need to keep track of them from map to map. Also there are things they need to have and jobs/events to do before a lone event is completed. Maybe a queue needs to be created.

hmmmmmmmmm

ZoomBoy
Developing a 2D RPG with skills, weapons, and adventure.
See my character editor, Tile editor, diary, 3D Art resources at
Check out my web-site


#3 ZoomBoy   Members   -  Reputation: 162

Like
Likes
Like

Posted 29 May 2000 - 12:07 AM

I think I''ll just do the Action events only until I figure out a way to Sory event checking

ZoomBoy
Developing a 2D RPG with skills, weapons, and adventure.
See my character editor, Tile editor, diary, 3D Art resources at
Check out my web-site


#4 Kylotan   Moderators   -  Reputation: 3333

Like
Likes
Like

Posted 30 May 2000 - 03:40 AM

Probably not relevant, but just a thought: to check whether something is completed, you could have some sort of recursion:


bool Event::IsCompleted()
{
for (all events that must be completed before this)
{
// If any one of them is not done yet, this one
// cannot be done either, so return false
if (!prevEvent.IsCompleted())
return false;
}

if (other requirements not met)
return false;
else
return true;
}

So if every event stores a list of events that must be completed beforehand, you can still just make a single call to Event::IsCompleted() for any given event and that recursively checks all the events it depends on automatically.

#5 ZoomBoy   Members   -  Reputation: 162

Like
Likes
Like

Posted 30 May 2000 - 04:15 AM

Excellent thought. I had been considering defaulting to a
function called Waiting() that when there was nothing left to do would still do visual and aural checks


ZoomBoy




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS