Graal Forums  

Go Back   Graal Forums > PlayerWorlds > Era Main Forum
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 11-21-2008, 08:18 AM
Bl0nkt Bl0nkt is offline
Era Developer
Bl0nkt's Avatar
Join Date: Mar 2005
Location: Pennsylvania
Posts: 1,589
Bl0nkt will become famous soon enough
Send a message via AIM to Bl0nkt
New Era Baddies - Work in Progress

For a while I've been trying to create the smartest baddies Era has ever seen-- something that could effectively simulate player reactions and styles. These baddies, in which I titled "smartbaddy", have a wide range of player-like responses and actions.

Below are the current variables implemented with an explanation to each.

PHP Code:
  //Basic baddy stuff       ---------------------------------------------------------------------------------------------------------------------------------
  
this.baddyMustDie2Continue true;                                                         //Does the baddy have to die to continue into any rooms? (true/false)
  
this.baddyCanAlert false;                                                                //The baddy can alert the other baddies in the level (true/false)
  
this.baddyDeathMessages = {"DRATS""Ow!"};                                                //Random selection of messages the baddy says upon death
  
this.baddyAlertMessages = {"I see you!""Spotted!"};                                      //Random selection of messages the baddy says upon contact
  
this.baddyMode "projectile";                                                             //-- "projectile" or "melee"
  
this.baddyRespawnSecs 60;                                                                //Time for baddy to respawn
  
this.baddySpeed 0.39;                                                                    //Baddy run speed
  
this.baddyRadius 14;                                                                     //Distance it takes for baddy to see you
  
this.baddyReflexTime 4;                                                                  //Increase to make the baddy react to movements slower (MUST BE AN INTEGER)
  
this.baddyMaxHp 140;                                                                     //Maximum HP
  
this.baddyHp 140;                                                                        //Start HP
  
this.baddyDefaultDir 2;                                                                  // 0 = up, 1 = left, 2 = down, 3 = right
  
this.baddyIdleGani "era_deagle-idle";
  
this.baddyWalkGani "era_deagle-walk";
  
this.baddyDefaultGani "sit";                                                             //The gani shown before combat

  //Baddy melee control      ---------------------------------------------------------------------------------------------------------------------------------
  
this.baddyMeleeSpeed 0.78;                                                               //How fast their melee hits
  
this.baddyMeleeFreeze 0.3;                                                               //Freeze time of melee
  
this.baddyMeleeDamage 5;                                                                 //Amount of melee damage done
  
this.baddyMeleeAni "era_knife_stab1";

  
//Baddy projectile control ----------------------------------------------------------------------------------------------------------------------------------
  
this.baddyMaxProjectileDist 12;                                                          //Distance the baddy tries to stay at when shooting at a player
  
this.baddyProjectileSpeed 1.54;                                                          //Speed of their projectile weapon
  
this.baddyProjectileFreeze 0.34;                                                         //Freeze of projectile weapon
  
this.baddyProjectileDamage 25;                                                           //Projectile damage
  
this.baddyProjectileSpread 0.05;                                                         //Projectile weapon's spread
  
this.baddyProjectileXModifier = {0, -0.802};                                           //Sets the projectile's X offset {up, left, down, right}
  
this.baddyProjectileYModifier = {-0.8, -0.50.50};                                      //Sets the projectile's Y offset {up, left, down, right}
  
this.baddyProjectileAni "era_deagle-fire"
EXAMPLE (LOW QUAL):
Reply With Quote
  #2  
Old 11-21-2008, 09:22 AM
Sage_Shadowbane Sage_Shadowbane is offline
Graal Developer
Sage_Shadowbane's Avatar
Join Date: Mar 2004
Posts: 585
Sage_Shadowbane will become famous soon enough
Very impressive Hach!
Reply With Quote
  #3  
Old 11-21-2008, 10:01 AM
Crono Crono is offline
:pluffy:
Join Date: Feb 2002
Location: Sweden
Posts: 20,000
Crono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond repute
Nice.
__________________
Reply With Quote
  #4  
Old 11-21-2008, 02:04 PM
Freudian_slip Freudian_slip is offline
Registered User
Join Date: Mar 2006
Posts: 169
Freudian_slip is an unknown quantity at this point
These guys are pretty smart fellas.
I'd rather have these guys than 80% of Era.
Reply With Quote
  #5  
Old 11-21-2008, 02:46 PM
Codein Codein is offline
jwd
Codein's Avatar
Join Date: Oct 2005
Location: Greater Manchester
Posts: 2,423
Codein has a spectacular aura aboutCodein has a spectacular aura about
Send a message via AIM to Codein Send a message via MSN to Codein
Nice job
Reply With Quote
  #6  
Old 11-21-2008, 03:13 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Nice job so far Hachi. I remember when you started this back then (: Make sure to test them for bugs/exploits, and try to optimize them as good as you can, so they don't eat that much cpu/memory.
Reply With Quote
  #7  
Old 11-21-2008, 04:35 PM
TSAdmin TSAdmin is offline
Forum Moderator
TSAdmin's Avatar
Join Date: Aug 2006
Location: Australia
Posts: 1,980
TSAdmin has much to be proud ofTSAdmin has much to be proud ofTSAdmin has much to be proud ofTSAdmin has much to be proud ofTSAdmin has much to be proud ofTSAdmin has much to be proud of
Could have done without the music D: I didn't realise that my volume was up as much as it was and hit play and it blared like crazy and scared the crap out of me
__________________
TSAdmin (Forum Moderator)
Welcome to the Official GraalOnline Forums! Where sharing an opinion may be seen as a declaration of war!
------------------------
· User Agreement · Code of Conduct · Forum Rules ·
· Graal Support · Administrative Contacts ·
Reply With Quote
  #8  
Old 11-21-2008, 04:47 PM
Darlene159 Darlene159 is offline
Administrator
Darlene159's Avatar
Join Date: Aug 2001
Location: Florida
Posts: 12,470
Darlene159 has much to be proud ofDarlene159 has much to be proud ofDarlene159 has much to be proud ofDarlene159 has much to be proud ofDarlene159 has much to be proud ofDarlene159 has much to be proud of
Quote:
Originally Posted by TSAdmin View Post
Could have done without the music D: I didn't realise that my volume was up as much as it was and hit play and it blared like crazy and scared the crap out of me
Same here, lol

Impressive baddies though.
__________________
FORUM RULES
GRAAL BIBLE (Lots of useful info)
INFO ABOUT REPUTATIONS.
INFO ABOUT INFRACTIONS.
HOW TO APPLY FOR THE NON-GRAAL RELATED FORUM (<<READ THOROUGHLY!)

SUPPORT: http://support.toonslab.com

NOTE: YOU ARE RESPONSIBLE FOR YOUR OWN POSTS.
READ>THINK>POST
Reply With Quote
  #9  
Old 11-22-2008, 03:08 AM
BlueMelon BlueMelon is offline
asdfg
BlueMelon's Avatar
Join Date: Sep 2008
Posts: 1,481
BlueMelon is a splendid one to beholdBlueMelon is a splendid one to beholdBlueMelon is a splendid one to beholdBlueMelon is a splendid one to behold
Kick ass
Reply With Quote
  #10  
Old 11-22-2008, 03:26 AM
natchez416 natchez416 is offline
Registered User
Join Date: May 2006
Posts: 205
natchez416 will become famous soon enough
See if you can get them to dodge bullets.
that would be really impressive.
Reply With Quote
  #11  
Old 11-22-2008, 11:11 AM
pico57 pico57 is offline
Zone Rank : God
pico57's Avatar
Join Date: Apr 2008
Location: FRANCE! FTW
Posts: 357
pico57 is an unknown quantity at this point
Send a message via MSN to pico57
Quote:
Originally Posted by natchez416 View Post
See if you can get them to dodge bullets.
that would be really impressive.
Lmao. true.




And good job. D:
__________________
Reply With Quote
  #12  
Old 11-23-2008, 03:41 AM
Nonepwnz Nonepwnz is offline
Đucimus.
Nonepwnz's Avatar
Join Date: Nov 2008
Location: Sewers.
Posts: 132
Nonepwnz is an unknown quantity at this point
Send a message via AIM to Nonepwnz
:O Good job, really awesome!
Reply With Quote
  #13  
Old 11-23-2008, 04:02 AM
knightfire35 knightfire35 is offline
Registered User
Join Date: Jul 2008
Posts: 283
knightfire35 is on a distinguished road
Very Nice, can't wait to see them in-game.
Reply With Quote
  #14  
Old 11-23-2008, 08:06 AM
Demisis_P2P Demisis_P2P is offline
Kanto League Champion
Demisis_P2P's Avatar
Join Date: Jan 2005
Posts: 2,357
Demisis_P2P has much to be proud ofDemisis_P2P has much to be proud ofDemisis_P2P has much to be proud ofDemisis_P2P has much to be proud ofDemisis_P2P has much to be proud ofDemisis_P2P has much to be proud ofDemisis_P2P has much to be proud of
Quote:
Originally Posted by natchez416 View Post
See if you can get them to dodge bullets.
that would be really impressive.
It's possible, but the most reliable method is really resource intensive (scanning the level npc array on a loop looking for projectiles).
Zone has them and I think Stefan said that each one might use up to 5 percent of the era server's cpu.
Since Era shares a server with other playerworlds that already hog cpu clock cycles there isn't a lot of room for things like that.
(To put "5 percent" into perspective, at any time the most resource intensive script on Era is usually taking up less than 1 percent of the cpu. Sometimes explosions will jump to 2-3 percent temporarily if people are setting off a LOT of p4s at once, but usually your computer will freeze/crash from client lag before you can create enough explosions to cause server lag).
__________________
Reply With Quote
  #15  
Old 11-23-2008, 10:45 AM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by Demisis_P2P View Post
It's possible, but the most reliable method is really resource intensive (scanning the level npc array on a loop looking for projectiles).
Zone has them and I think Stefan said that each one might use up to 5 percent of the era server's cpu.
Since Era shares a server with other playerworlds that already hog cpu clock cycles there isn't a lot of room for things like that.
(To put "5 percent" into perspective, at any time the most resource intensive script on Era is usually taking up less than 1 percent of the cpu. Sometimes explosions will jump to 2-3 percent temporarily if people are setting off a LOT of p4s at once, but usually your computer will freeze/crash from client lag before you can create enough explosions to cause server lag).
I'm pretty sure the projectiles have their own object array. But it's still a resource intensive thing to do
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 12:04 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.