Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Bots

Development::Bots Forum for bots.

Reply
 
Thread Tools Display Modes
  #1  
Old 12-16-2013, 03:08 PM
TylerBarnes
Sarnak
 
Join Date: Dec 2012
Location: Sunny California
Posts: 62
Default Enabling new race/class combinations for bots

On the server I'm working on I have enabled new race/class combinations for players that I thought always should have existed on live, but when I was testing my bots, they weren't reflected on them. So after some Googling I didn't find much to go on as far as enabling new race/class combinations.
That's when I turned to the code in c:/EQ/Source/zone/bots.cpp.
Just as a warning, don't change anything else. If you accidently delete a chunk then exit without saving and start over. This code tells the bots how to function and one wrong character in it and it could completely break your bots.

I scrolled down to find the following:
Quote:
case 1: // Human
switch(GetClass()) {
case 1: // Warrior
case 2: // Cleric
case 3: // Paladin
case 4: // Ranger
case 5: // Shadowknight
case 6: // Druid
case 7: // Monk
case 8: // Bard
case 9: // Rogue
case 11: // Necromancer
case 12: // Wizard
case 13: // Magician
case 14: // Enchanter
This is just a piece I copied from the text. It'll have one for each race. This is humans (race 1). The writer of this code was kind enough to label it for us, but if for some weird reason yours isn't labeled then the race/class numbers match the bot race/class numbers (which are actually the same for character race/class id's).
You'll notice shaman, beastlord and berserker aren't listed here. It's because they're not playable by default. To enable them simply add them to each race. On my server humans will be able to be any class, so mine looks like this
Quote:
case 1: // Human
switch(GetClass()) {
case 1: // Warrior
case 2: // Cleric
case 3: // Paladin
case 4: // Ranger
case 5: // Shadowknight
case 6: // Druid
case 7: // Monk
case 8: // Bard
case 9: // Rogue
case 10: // Shaman
case 11: // Necromancer
case 12: // Wizard
case 13: // Magician
case 14: // Enchanter
case 15: // Beastlord
case 16: // Berserker
Now you see shaman, beastlord and berserker have been added. Don't touch the code around this because this chunk is incomplete without the beginning and closing code it won't know when to stop, thereby breaking the script. You'll need to only add case 10, 15, and 16. I'm not sure if they need to be in order but I did it just to be safe.
Once you've added the classes to each race and feel happy with it you'll need to recompile zone and copy the file over.

If you don't feel comfortable editing code yet, do what I did and just look it over without editing it.

I really have minimal knowledge of this kind of scripting so I don't feel comfortable writing new script, but this process I worked for me.
If anyone has anything to add, maybe with more experience, then please do.
Reply With Quote
  #2  
Old 12-16-2013, 03:11 PM
TylerBarnes
Sarnak
 
Join Date: Dec 2012
Location: Sunny California
Posts: 62
Default

You may also want to back up bots.cpp before you go changing it just to be safe.
Reply With Quote
  #3  
Old 12-16-2013, 03:40 PM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

A few things about customizing that you may want to do...

If you make a mistake, you can always revert a file to the base copy. But, doing so will lose any changes that you've made.

Also, if the file that you are making is updated, and if you want to stay up-to-date, you will need to learn how to incorporate those changes.


- Consider putting remarks in your personal code to 'remind' you as to why you did something.
- Either keep a 'diff' of the file(s) that you modify, or keep a unified 'diff' of the modified source code. (This will make updating your server a little easier and keep those 'oops!' moments from happening.)
__________________
Uleat of Bertoxxulous

Compilin' Dirty
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 -4. The time now is 10:08 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3