Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Era Main Forum (https://forums.graalonline.com/forums/forumdisplay.php?f=162)
-   -   New Era Baddies - Work in Progress (https://forums.graalonline.com/forums/showthread.php?t=82846)

Bl0nkt 11-21-2008 08:18 AM

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):

Sage_Shadowbane 11-21-2008 09:22 AM

Very impressive Hach! :D

Crono 11-21-2008 10:01 AM

Nice.

Freudian_slip 11-21-2008 02:04 PM

These guys are pretty smart fellas.
I'd rather have these guys than 80% of Era.

Codein 11-21-2008 02:46 PM

Nice job :)

Crow 11-21-2008 03:13 PM

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.

TSAdmin 11-21-2008 04:35 PM

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 :(

Darlene159 11-21-2008 04:47 PM

Quote:

Originally Posted by TSAdmin (Post 1443779)
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.

BlueMelon 11-22-2008 03:08 AM

Kick ass

natchez416 11-22-2008 03:26 AM

See if you can get them to dodge bullets.
that would be really impressive.

pico57 11-22-2008 11:11 AM

Quote:

Originally Posted by natchez416 (Post 1443916)
See if you can get them to dodge bullets.
that would be really impressive.

Lmao. true.




And good job. D:

Nonepwnz 11-23-2008 03:41 AM

:O Good job, really awesome! :D

knightfire35 11-23-2008 04:02 AM

Very Nice, can't wait to see them in-game.

Demisis_P2P 11-23-2008 08:06 AM

Quote:

Originally Posted by natchez416 (Post 1443916)
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).

Crow 11-23-2008 10:45 AM

Quote:

Originally Posted by Demisis_P2P (Post 1444218)
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 :p

DustyPorViva 11-23-2008 10:54 AM

Or just set it so when they get hit with a projectile, instead of getting hurt, they do a matrix gani of them dodging it... it'll be cheap but it'll be cool as hell.

Codein 11-23-2008 11:47 AM

Quote:

Originally Posted by DustyPorViva (Post 1444237)
Or just set it so when they get hit with a projectile, instead of getting hurt, they do a matrix gani of them dodging it... it'll be cheap but it'll be cool as hell.

I agree. That would look pretty damn cool.

Freudian_slip 11-23-2008 09:39 PM

Quote:

Originally Posted by Codein (Post 1444242)
I agree. That would look pretty damn cool.

That would be ***, gani's take time and I dont want to freeze in a middle of a fight. Don't mess with PK, thats what r-tard Jenn did and it ruined Era.

Codein 11-23-2008 09:51 PM

It's not PK. It's for baddies? o_O


All times are GMT +2. The time now is 11:16 PM.

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