What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal
RebornBuddy Forums

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Change the amount of pulses.

Exmortem

Community Developer
Joined
Mar 28, 2010
Messages
799
Is it possible to override the amount of pulses the bot gives out within a combatroutine? I'm having an issue where I want to be able to heal out of combat, so I modified the combat assist botbase to be able to do so, in turn it's lowered the games performance because RB is constantly pulsing looking at my parties health.

This is what I use to find a healing target.

Code:
                foreach (PartyMember p in PartyManager.VisibleMembers)
                {


                    if ((p.GameObject as BattleCharacter).CurrentHealthPercent < 100 && !(p.GameObject as BattleCharacter).IsDead)
                    {


                        if (healtarget == null || (p.GameObject as BattleCharacter).CurrentHealthPercent < healtarget.CurrentHealthPercent)
                            healtarget = (p.GameObject as BattleCharacter);
                    }
                   
                }

Only pulsing that at the bots current rate is lowering my FPS by nearly 20, if I add a check to see if the healtarget is a tank it continues to lower FPS. I'm thinking that lowering the pulses will return some performance.
 
If this is running on a separate thread, it should not affect your games FPS. Is it?
 
If this is running on a separate thread, it should not affect your games FPS. Is it?

I'm not running it on a different thread, I guess I should, i'm still very new to programming and have never used threads before. If the routine is calling a variable from a class that's on a different thread will that cause an issue?
 
I'm not sure how RebornBuddy implements its plugins. If everything is time sharing, including the memory lookups, this might be troublesome. I've been developing a plugin (not a bot-base) and we run on a seperate thread for all our logic. Some of it is fairly advanced, and we don't have any slow downs.

Accessing variables that are shared between threads is bad -- unless you have a locking mechanism. As long as all your code that affects the same thing runs on the same thread, you will be fine. I just noticed you're using the CombatRoutine, so that shouldn't be an issue... if this still the case I would suggest hooking a profiler remotely to the RebornBuddy EXE and see where the REAL slowdown is. This will show you which method is sucking up with the biggest chunk of your CPU.
 
Back
Top