Heya,
I'd like to open this thread for the opportunity at asking a few questions (I might have more later on) about AI.
Until recently, I had not played SWGB for several years, though after grabbing SWGB Saga from Steam (as I cannot seem to find the disks) I have since started again. When the MSN game zone was still alive, I used to play (and love) alot of 'Senate' scenarios. I also used to make a few senate maps, in fact using the scenario editor helped spark my interest in level design back then.
I'm interested in attempting to make a Senate map with an AI controlled senate, I've been following Wok's AI scripting tutorials, but I don't see the potential for an AI player to detect chat strings (unless it goes under another command). Is there any way I could get this AI to detect certain chat messages as a fact which follows through with an 'action' or even several 'actions'? I'd like the Senate to be able to react/respond to certain things which players say in the game chat (hopefully once i do that and learn a few more things, I can have the Senate player take some things into consideration that are said in senate meetings, we'll see).
I'm also having some issues with getting the AI senate to send messages to all of his allies, I have made the followingdefrule for testing purposes.
(defrule
(food-amount > 51)
=>
(chat-to-allies "Attention all governers")
(chat-to-allies "the senate is currently experiencing a severe famine")
(chat-to-allies "the capital urgently requires food supplies")
(chat-to-allies "to preserve inhabitant life.")
(chat-to-allies "Please send all auxiliary food you can spare")
(chat-to-allies "to the senate immediately.")
)
So basically, what I'm trying to define is that when the Senate has over 51 units of food, he would follow through with a sequence of messages to his allies.
However, after launching the game the Senate player sends no messages, even though his food is well above 51 units of food. I assume I'm doing something wrong but I'm not sure what. After I know how to get it to work I will change the operator to be 'below 51 units of food'<
I don't have alot of scripting knowledge, though I'm interested in learning as I think it's a part which I find interesting.
Are there any more expansive tutorials which would be relevant to this?
Thanks for the help in advance.
I'd like to open this thread for the opportunity at asking a few questions (I might have more later on) about AI.
Until recently, I had not played SWGB for several years, though after grabbing SWGB Saga from Steam (as I cannot seem to find the disks) I have since started again. When the MSN game zone was still alive, I used to play (and love) alot of 'Senate' scenarios. I also used to make a few senate maps, in fact using the scenario editor helped spark my interest in level design back then.
I'm interested in attempting to make a Senate map with an AI controlled senate, I've been following Wok's AI scripting tutorials, but I don't see the potential for an AI player to detect chat strings (unless it goes under another command). Is there any way I could get this AI to detect certain chat messages as a fact which follows through with an 'action' or even several 'actions'? I'd like the Senate to be able to react/respond to certain things which players say in the game chat (hopefully once i do that and learn a few more things, I can have the Senate player take some things into consideration that are said in senate meetings, we'll see).
I'm also having some issues with getting the AI senate to send messages to all of his allies, I have made the following
(defrule
(food-amount >
=>
(chat-to-allies "Attention all governers")
(chat-to-allies "the senate is currently experiencing a severe famine")
(chat-to-allies "the capital urgently requires food supplies")
(chat-to-allies "to preserve inhabitant life.")
(chat-to-allies "Please send all auxiliary food you can spare")
(chat-to-allies "to the senate immediately.")
)
So basically, what I'm trying to define is that when the Senate has over 51 units of food, he would follow through with a sequence of messages to his allies.
However, after launching the game the Senate player sends no messages, even though his food is well above 51 units of food. I assume I'm doing something wrong but I'm not sure what. After I know how to get it to work I will change the operator to be 'below 51 units of food'
I don't have alot of scripting knowledge, though I'm interested in learning as I think it's a part which I find interesting.
Are there any more expansive tutorials which would be relevant to this?
Thanks for the help in advance.
[This message has been edited by IceLizard (edited 01-24-2019 @ 02:33 PM).]