Advertisement

How Would One Do This (Scripted Reponces? Edited)

Started by April 30, 2003 12:13 PM
2 comments, last by Soulz 21 years, 9 months ago
Ok I’m wanting to make a world (RPG World) that revolves around events (E.G. Everything is an event from the Orc attacks to the pickpockets in town) now I know I will have to cut off how SMALL the events really get but I’m looking for some info on how to go about in doing this. I also want to event handler and the way NPC react to it to be independent pieces of code. **** And I would like some info on how to do something like this E.G Tutorials on do stuff like this. I know this is a big task but I need to start somewhere? **** For a more in-depth look at what I mean here is a description of a day in the world of mine ... it will be in story MODE However, the gist of what I want to happen in world is here The local Blacksmith wakes up because the fight out side is very close to his house. The Fighting is intense so its not just I simple drunken battle there’s skill in this fight. The man with the Dragon Armor also shows this is something big. The other woman was dressed in a hooded tunic and was moving so fast it was hard to keep up. In the end to town guards come rushing over just to be killed as the Women vanish out of sight. The Blacksmith went back in side before he was hurt. The next day news about the fight circled town and everyone had the own feelings on it. Some thought that the White Night Guild might be back in Dragon Falls; other thought that the Thieves guild was getting ready for something. The Blacksmith found out his supply of Ore had be Robed. Only the rare shipment of Orcish Silvon was taken and a few pieces of armor but still this will set him back by at least 3 to 4 weeks..... Now the events here would be this 1) The fight 2) The Break-in Each event would have details others could glen from it such as the mans armor was very rare so the blacksmith would have remembered that very easily and the movement of the women being so fast would stand out, the guards being killed etc.. The responses to the events are 1) people waking up because of the fight and then telling friends and family about it 2) the smith runing backin side so as to not get hurt 3) the fact that the people came to conclusions on why it happened 4) the fact that the blacksmith was set back and that he would have told others about that to,etc... Now I could go overboard very easily here and I don’t want that to happen I just want to have a world that has so many tangents that it seems to be "Breathing" with life and also I need to so that it will continue to "Breath" If anyone wants more info or even to help let me know. Now I don’t have the internet at my house so if I don’t respond right a way its because I haven’t gotten a chance to get to a puter but I will be checking this post everyday until this weekend then I will come by and check it next week So plz give me your info.... even if you just want to complain about my grammer thx Im a Idiot Savant without the Savant [edited by - Soulz on April 30, 2003 3:35:45 PM]
Im a Idiot Savant without the Savant :)
Maybe i don''t understand the problem. What issue are you having?

Let''s say i have a town loaded in memory. That town has a collection of agents called something like NPCs. The collection holds a bunch of people of class NPC. Each NPC has a couple of perception methods like Hear(sound, location). For each instance (like the blacksmith and a dog and the guy in the fight) you write code on how they behave given certain messages

SoundOfFireball : SoundOfMagic {
getRange();
}

NPC.ShootFireball() {
Sound someSound = new Sound(new SoundOfFireball());
world.makeNoise(this.location, someSound);
}

World.makeNoise(location, sound) {
NPCs.hearSound(location, sound);
}

NPCs.hearSound(location, sound) {
Collection localNPCs =
NPCs.getInRange(centralPoint, sound.getRange());
for each NPC in NPCs
NPC.hear(sound);
}

Smith : NPC {
hear(sound) {
if IsTypeOf(SoundOfMagic,sound)
runAndHideInCloset();
}
}

psuedo code, but you get the idea. Just pass the message around and have people react to it. Which in a big game probably means having each character (class or instance) run a script that the designer designs

Hope that''s what you were looking for

-baylor
Advertisement
You might want to take a look at Chris Crawford''s Erazmatron stuff. Specifically this page. His events just contain 3 things: a verb, what did it and what it was done to.

Does anyone have an opinion on that erasmatron? Seems pretty cool to me.
thx this should help me ...

baylor -- im really only to the point where i need to put it all in code and well this is very big project for me so thx

ditto -- thx the "what is an event" looks like it may help
Im a Idiot Savant without the Savant :)

This topic is closed to new replies.

Advertisement