Forum posts

If someone is still talking about HL is because of modding, I still don´t know why valve is so harsh with some modders if they don´t care about HL anymore.
This post was made on a thread that has been deleted.
Titanfall is a mixage of District 9, Elysium, Chappy... I love it!, a pity that it does not include offline Bots, if so this game could have been GLORIOUS.
Posted 5 years ago2019-01-24 21:23:36 UTC
in Post Your Desktops Post #341830
I swear I will try Ubuntu. If it´s faster thatn W7 Ultimate 64Bits... ;)

Look what I did found in one of my treasure chests...
User posted image
Episode 3 with a good ending, that´s what they only need... Being less picky with releasing their engines could help too.
I think that each person willing to make a mod should, before ANYTHING is to know the boundaries of the engine. Not doing so is to ask for trouble and frustration.
Agree. Know your tool before starting to build. Or you´ll find yourself in trouble.
I also consider that the engine is just a tool. If you need that your game will use enormous landscapes you must use a proper engine to do that. For highly detailed and realistic scenarios you need another one, if you need that your engine could show hordes of enemies you need another kind of engine. Just that. It´s not that a modern engine is better, is that modern engines let you do things that older ones not because they have limited hardware on which they could work with.
The idea that engine choice dictates if a game is good quality or not is incredibly ignorant.
Don't be stupid
Two insults in two replies this day. We are giving oppinions, we are not here to be insulted because of them. We love that anyone could discount our opinions, but beware of insulting someone for giving them.

But you are right, I like Shadow Warrior (1998) much more than I like the AAA Shadow Warrior 2.
If you're getting bad framerates, I'd rather say it's your design that pushes things too far. The engine simply isn't made for it. So, you should optimise it.
No, it is not about framerates. Some games require the right atmosphere and that could be only achieved through the use of the right engine. The sensations of playing doom 2016 are not the same of playing Doom 1, right? Just that, if you discover that fps are droping is time to optimize, but if your game don´t work as intended with thte minimum elements, maybe is time to jump to another more powerful one, unless you are Solokiller and create your own. :crowbar:
Furthermore, a "masterpiece" can be made in any engine. The idea that engine choice dictates if a game is good quality or not is incredibly ignorant.
Eeerrrr... No, if the engine is limited, so are you, at least if you want to do a decent FPS. Even Brutaldoom have had to move from id1 to another ports just because the id1 was weak to show and move what BD has to show .
Wish I could do that... in person... :crowbar:
Plus, who want to spend a bunch of money in developing a game if you have one of the biggest, if not the most big, modding community, plenty of talented people doing wonders with two almost 20 and 15 year old engines?, also, it´s a nonsense to lawsuit and threaten people wo wants to improve those engines and to give life to their games, FOR FREE!.
Posted 5 years ago2019-01-22 15:10:02 UTC
in A Utopia At Stake Post #341784
Well, I can be a bit abrupt sometimes
Yes :crowbar: , but you help people a lot. That´s what counts in the end. ;)
Posted 5 years ago2019-01-21 22:51:37 UTC
in REV - Resident Evil Valiant Post #341776
Wow... :gak:
I think that the HL formula was oversused for almost 20 years. People focus on MP games instead of SP games, and people get bored too soon of games like HL because of newer alternatives. :(
Posted 5 years ago2019-01-20 20:14:13 UTC
in Post Your Desktops Post #341744
Can you play games with Ubuntu? :gak: Isnot that a nightmare to find drivers for the GPU, the Keyboard, the mouse, the screen, the motherboard, the processor... :\
Posted 5 years ago2019-01-19 15:44:53 UTC
in Post Your Desktops Post #341717
This one is a modified image I´ve done, the original is named "dinoblues", you can see its original in the link below textThis one is a modified image I´ve done, the original is named "dinoblues", you can see its original in the link below text
https://cdnb.artstation.com/p/assets/images/images/000/002/153/large/Dinoblues2.jpg?1400143521
Cute.Cute.
Coffee... I like coffee with croissants, this wp makes me hungry  :walter:Coffee... I like coffee with croissants, this wp makes me hungry :walter:
Posted 5 years ago2019-01-16 17:36:40 UTC
in SharpLife - Dot Net Core based modding p Post #341702
You shouldn't make any decisions yet, this project is far from complete. I'd suggest checking out tutorials for basic Hello World stuff first, then maybe WPF since it requires the use of many language features.
Ok. I´ll finish all the graphics left undone (the code is 99,99% done) and I´ll keepseeing how SL grow and evolves. Thanks Solokiller (as always) :)
Posted 5 years ago2019-01-16 14:53:43 UTC
in SharpLife - Dot Net Core based modding p Post #341695
Ok, no avi for SL :crowbar:

What are the entities did you tested successfully among, info_player entities, env entities, lights (I saw something about those), scripst,etc.? apart from what´s descibed in Post #339709.

Also, what programs are you using to edit-compile the source?

Sorry for saying the "translation" thing, but, in your experience, what will be the major problems a non expert code will find when trying to "port" his/her code to SL?, many of us use tutorials all written in C++... ;)

Sorry for my too basic questions, I know that maybe this is not the place to ask them because the info here reached a high level, but I am very interested in SL as I was in EHL and PS before, and I want to gather as much info as possible before making the decission to jump from C++ to C#, because if C++ was sometimes like chinese to me, I think I will not be able to learn korean. :glad: :walter:
Posted 5 years ago2019-01-15 23:37:44 UTC
in SharpLife - Dot Net Core based modding p Post #341685
If you want a better engine other than Xash then you'll have to wait.
You caught me!! ;) But, If it can load original content like the original HL does I will wait for sure. Also It appears to work without vgui.dll, which´s the major limitation of Xash when it comes to go greenlightened on STEAM, right? , I´m with ZWC for the last 14 years, one more will not harm me. :crowbar: :D

In what a media playing is about, can we use other formats than AVI for the intro and sierra videos? also, I remember that in EHL you wanted to add background maps for the game menus, is this still present in SL?
Posted 5 years ago2019-01-15 20:23:38 UTC
in SharpLife - Dot Net Core based modding p Post #341681
So, it is not a question of doing anything from scratch, just knowing the "sintaxis" and "translating" waht´s already done to C#, right?. So, Solokiller is doing a "translation" of the HLSDK if I am not wrong, applying of course updates and making the code cleaner and optimized. :\

Well, what´s your advice for people like us who´re searching for a GoldSource compatible engine capable of more "horsepower" to move bigger and complex mods? I mean that if we could use, as Solokiller said, his engine to move GS mods or it is oriented to newer mods created on the SL plataform. Probably my explanations are not accurate, but I think from the perspective of a car user with little knowledge about car maintenace, and you are car´s motor and electronics designers, Idk if you catch the idea. :crowbar:
Posted 5 years ago2019-01-15 18:11:06 UTC
in SharpLife - Dot Net Core based modding p Post #341674
Crap. :( So, what should a mod creator do to his/her mod to make it be run under SL? If this require to learn C# and start all from scratch, will not it disencourage people to port their mods to SL?, maybe I don´t understand very well what Shepard said "building your own GAME (I have this clear) /MOD (What!?) on top of it". We are talking about a program made to take profit of a better written code and all the capabilities of modern hardware, right?.
Posted 5 years ago2019-01-15 16:37:49 UTC
in SharpLife - Dot Net Core based modding p Post #341671
What mods can SL run right now?, I´m curious. :crowbar:
Posted 5 years ago2019-01-15 15:04:03 UTC
in SharpLife - Dot Net Core based modding p Post #341664
and i have coded projectile bullets before. based on ar grenade
Better use hornetgun... But the entity limit is a problem (BIG PROBLEM) as you say. How much entities will support SL at a time before struggling?, also, and remember that I am quite an ignorant in coding, will it depend of the PC specs or this number will adapt itself independently of the system on which SL will run on?
Posted 5 years ago2019-01-14 21:26:52 UTC
in SharpLife - Dot Net Core based modding p Post #341656
:gak: Can´t wait. I swear. If only I could see my MOD run as it is now at more than 50 fps, I´ll be more than happy.
Posted 5 years ago2019-01-14 17:39:46 UTC
in SharpLife - Dot Net Core based modding p Post #341654
Wow, I repeat that will be the solution for all us mod makers that use very large models and maps in terms of size and polycount and add hordes of npcs!!

One question, what will be the structure of SL?, I mean, will it load a mod directly or it´ll depend of a Half-Life folder with the valve folder and all the rest of junk?, I like the way (don´t flame me please) Xash works. With it you must only create a folder with whatever name you want, you put the Xash exe, three dlls and the very folder of the mod in it and that´s all. Less than 10 Mb in size. And you can launch a full mod as if it was a standalone game (at least if you have all the needed assets in the MOD folder, of course).
Posted 5 years ago2019-01-14 16:06:45 UTC
in SharpLife - Dot Net Core based modding p Post #341652
I think Solokiller talked about adding the possibility of using materials (correct me if I am wrong!), which can be bigger images than the max 512x512 of GS, maybe 4098x4098 and its variations (more than enough for detailing!!).

The question about the renderer is, what would Sharplife use?, and whith what scalability? I am probably mistaking something, but when I hear about renderers I think about OpenGL and those kind of things, I don´t know if Vulkan is a possibility. What API will be used by SL?. :\
Posted 5 years ago2019-01-13 21:46:27 UTC
in SharpLife - Dot Net Core based modding p Post #341640
If you want a mod made in the most irresponsible way in the world where good practising in coding is an utopia, and where the impossible is demanded to the graphic engine ( like hordes of npcs and lots of models with more than 12,000 polygons) to try Sharplife :crowbar: you just have to say it !.
Posted 5 years ago2019-01-13 19:50:27 UTC
in SharpLife - Dot Net Core based modding p Post #341638
Ok. I´ll wait. Only one last thing, what are the features that could be found in Sharplife ? I don´t mean the complex things related to the very innards of coding, of course. i know this is wishful thinking, but a huge amount of entities (yes, I´m mulish about that) and a new renderer (call me mororn, but i have recently discover that all render in HL was almost completely done by the CPU an that task was not shared with GPU) able to take profit of new GPUs will be more than enough to keep very graphically complex mods from crashing or of playing at 12 FPS. :crowbar:
Posted 5 years ago2019-01-13 18:00:20 UTC
in SharpLife - Dot Net Core based modding p Post #341636
As always, I am impressed and willing to use that with my mod if possible. Is there an approximate launch date?.
Posted 5 years ago2019-01-13 17:13:24 UTC
in SharpLife - Dot Net Core based modding p Post #341633
I´ve been reading all the thread, and I must recognize that the 99% of things escaped from my poor knowledge about programming languages. Aniway, I have read the FPS recordings for very well known maps of Half-Life and I´m really impressed. How did you achieve those fps? was not the GS engine fully dependant of the CPU capabilities of rendering things?, unless you are working on a GPU rendering add-on for GoldSource (that could be cool). Or probably you are making things better managed by the engine. Sorry if it´s written and explained on the thread and I didn´t see it; but that could be the solution for many of us trying to make a mod.
I remember Half Life Enhanced and PowerSource, and it was so promising.
Posted 5 years ago2019-01-13 11:05:27 UTC
in The Ballet of the Bots Post #341628
I have checked it, it is something related with Xash, i´m afraid. All is ok, but it keeps telling me that there are problems. Funny and bothering at the same time. :\
Posted 5 years ago2019-01-11 21:26:15 UTC
in The Ballet of the Bots Post #341622
I have tried everything I know. In fact, I have decompiled-compiled the models to see if something is not rightly placed, but HLMV shows no problem (ACT_ thingy included) and the extrange thing is that all animations are present, and the npcs act as they should. Probably is something related with Xash. :/
Posted 5 years ago2019-01-11 18:15:48 UTC
in The Ballet of the Bots Post #341618
I am afraid YES. They don´t disappear... :(
Posted 5 years ago2019-01-10 14:57:49 UTC
in The Ballet of the Bots Post #341615
Well, lots of them:

script "Anim4" can't find monster "apua"
Found apub, but can't play!
Found ascari, but can't play!
Found crane, but can't play!

Many of those as an example....continuously. I don´t want any messages apart form the ones sent by the game itself like "reload" or "x has killed y". :/
Posted 5 years ago2019-01-09 14:39:17 UTC
in The Ballet of the Bots Post #341603
F... damn!! :( Well, the TE_TELEPORT effect is right by now, unless I learn enough C++ to make the effect I want on my own, which is ... impossible. Thanks a lot for your help! :P

BTW: how can I disable dev messages?, I have no command line added to the shortcut but they still appear flooding the console.
Posted 5 years ago2019-01-08 15:31:54 UTC
in The Ballet of the Bots Post #341590
Mmmm, as far as I can see, TE_ entities show not many options to customize... TE_BEAMTORUS create a nice effect, but it´s a 2D planar effect. The TE_LARGEFUNNEL shows almost what I want, but is narrow and in a greenish color... :/ Well, it is not a must, I just want to add a little more detail to the final effects of the MOD. :D Aniway, could I add more optios or is it hardcoded in the engine so I cannot add width, life, etc to its parameters?
Posted 5 years ago2019-01-05 19:32:45 UTC
in The Ballet of the Bots Post #341558
Ha ha!!, yes, it´s a pain in the ass when you have no idea of what you are doing!!, is like "hey!, what if I mix water with solid sodium?", "funny" things will happen... :crowbar: :walter:

Aniway, the code works now. I am now doing the logic part of the code so the Bot changes from FEMP to CROWBAR to MACHINE GUNS... :freeman:

Well, now all works like a charm. Bots "seem" to work as real players, they use the FEMP, the Uraken... now I am working with the FEMP effect, I have used this code:
// Particle Burst

                MESSAGE_BEGIN( MSG_BROADCAST, SVC_TEMPENTITY );
                WRITE_BYTE( TE_TELEPORT );
                WRITE_COORD(pev->origin.x);
                WRITE_COORD(pev->origin.y);
                WRITE_COORD(pev->origin.z);
                WRITE_BYTE( 0 );
                WRITE_BYTE( 0 );
                WRITE_BYTE( 3 ); // life
                WRITE_BYTE( 24);  // width
                WRITE_BYTE( 5 );   // noise
                MESSAGE_END(  );
I want it to be BIGGER, yes it plays, but is small, I want it to reach a farther distance. I have tried different values for life, width, and noise, but it accelerates the shockwaves, the burst remain the same. Any ideas? :\
Posted 5 years ago2019-01-05 15:39:32 UTC
in The Ballet of the Bots Post #341552
Well, put me the label of "moron" again. I am asking to the code to add PRIMARY AMMO to a weapon that HAS NO PRIMARY AMMO to load in...

I have to add better a pPlayer there and AddAmmo to the player with the ( number, ammo type, number) part (As in the monster_trolley) :crowbar:

I will test it and post the results. ;)
Posted 5 years ago2019-01-04 22:01:19 UTC
in The Ballet of the Bots Post #341543
Sounds complicated... :roll: I´ll take a look to HPBot Template #4 to see how it manages bot spawning and connects to the CS and other Mod´s gameplay. :crowbar:

One question: Where should I put this code in the Crowbar.cpp to make so if you swing or hit X times with the crowbar it gives you ammo?
count++;
if(count>=6)
{
  m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType]+=25;//Erase if it works!!

  if (FBitSet(m_pPlayer->pev->flags, FL_FAKECLIENT)){m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType]+=101;}// For Bots Only

     m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.4;

     count=0;// Reset Counter
}
Of course int count is already declared in crowbar code in weapons.h

I put it in int CCrowbar::Swing( int fFirst ) right after TraceResult tr; but with no luck... :(

Because I cannot make the Bots quit using the crowbar after depleting their ammo, I thought that I will let them use the crowbar for a while and then give them some ammo to fight again, use the RELOAD call, etc. :crowbar:
Posted 5 years ago2018-12-30 22:42:48 UTC
in The Ballet of the Bots Post #341525
Hi Admer!!, yes, I have added that is in the shape of a skill method. But I am thinking now in adding a find entities method for the weapon itself. :)
Thanks for the grid hint!!, I did never use it, ha ha!!, what a moron!!! ;)
Posted 5 years ago2018-12-29 00:06:38 UTC
in Looking for a cs 1.6 map. any help? Post #341512
What about making it from scratch on your own? Actually computers and compiling tools make this task a lot of easier than before.
Posted 5 years ago2018-12-28 22:56:53 UTC
in Sven Co-op forums shutting down Post #341510
I know, I know. I was just joking, I must left that clear... :lol:

But as Rufee said, I think that there must be another reasons. Aniway, I remember when Thewavelenght closed beacuse it was attacked by a massive flood of porn spam, it ruined the continuity of my Mod as far as I emember (I denounced it to the cybernetic police of the authorities of my country because the age of the images were of girls less than extremely barely legal). After that, none remained of TWL except the old archive. Even the forums cannot be rescued of the disaster.
Posted 5 years ago2018-12-28 22:10:00 UTC
in Sven Co-op forums shutting down Post #341508
Or are there other reasons? I remember the sour relationship you had with the members of the Sven-Coop development team. Anyway, you will be a little tempted to feel a kind of cruel satisfaction ... :crowbar:
Posted 5 years ago2018-12-28 20:43:15 UTC
in The Ballet of the Bots Post #341506
Oh. I think my bots will act like that forever because I am not able to code a complex combat algorythm. :/

EDIT: Well. I have long thought about what you told me and, after trying and trying variations of the code, the closest thing to what I want to achieve is this:
//=====================================================================
// FEMP
//             30-Nov-2018 1er. Intento de que lo usen los BOTS
//=====================================================================

  if ((pev->weapons & (1<<WEAPON_FEMP)) )
   {
      if (


            ((distance < 100) && (distance > 10 ) && ( fempshot == 0 ))

            && (weapon_choice == 0)

            && (weapon_choice == WEAPON_FEMP)



            || (primary_ammo[WEAPON_TWOHAND]    < 10)


            || ( primary_ammo[WEAPON_SHORYUKEN] < 10 )


            || ( primary_ammo[WEAPON_SIEGE]     < 10 )


            || ( primary_ammo[WEAPON_MJOLNIR]   < 10 )


            || ( primary_ammo[WEAPON_SHREDDER]  < 10 )


        )

    {

        if (primary_ammo[WEAPON_FEMP] > 0) // check if the bot has any ammo left for this weapon...
        {

            if (m_pActiveItem != new_weapon)// check if the bot isn't already using this item...

            SelectItem("weapon_femp");  // select the FEMP

            pev->button |= IN_ATTACK;  // use primary attack (bang! bang!)

            f_shoot_time = gpGlobals->time + 10.0 + RANDOM_FLOAT(primary_fire_delay[WEAPON_FEMP][bot_skill][0],primary_fire_delay[WEAPON_FEMP][bot_skill][1]);     // set next time to shoot

            fempshot +=1; // Damos un fempshot para limitar su uso

            return TRUE;

            if ( ( pev->health <= 100 ) )

                {
                    pev->button |= IN_ATTACK2;

                } // Posicion original del codigo del AUTO-HEALTH

            if  ( f_shoot_time = gpGlobals->time = 15.0 )

                {
                    fempshot -=1;
                }
        }
      }
    }
  return FALSE;


}
And this:
//=============================================================================================
// WEAPON URAKEN/CROWBAR I cannot make the bot use this weapon!!! I suck in coding...4-May-2015
// GOT IT!! 24-November-2018 but with Issues...
//=============================================================================================

if (pev->weapons & (1<<WEAPON_CROWBAR))

  {
      if (

             (distance == 0)

          && (weapon_choice == 0)

          || (( fempshot == 1) && ( f_shoot_time = gpGlobals->time ==   0.0 ))


          && (weapon_choice == WEAPON_CROWBAR)




          || ( primary_ammo[WEAPON_TWOHAND]   ==0 )

          || ( primary_ammo[WEAPON_SHORYUKEN] ==0 )

          || ( primary_ammo[WEAPON_SIEGE]     ==0 )

          || ( primary_ammo[WEAPON_MJOLNIR]   ==0 )

          || ( primary_ammo[WEAPON_SHREDDER]  ==0 )

          )
    {

          new_weapon = weapon_ptr[WEAPON_CROWBAR];

         {

            if (m_pActiveItem != new_weapon)// check if the bot isn't already using this item...

            SelectItem("weapon_crowbar");  // select the crowbar

            pev->button |= IN_ATTACK;      // use primary attack (whack! whack!)

            f_shoot_time = gpGlobals->time + 4.0 + RANDOM_FLOAT(primary_fire_delay[WEAPON_CROWBAR][bot_skill][0],primary_fire_delay[WEAPON_CROWBAR][bot_skill][1]);

            return TRUE;

         }


    }



   }
//========================================================================================
Well. What I obtained is that the Bots now "seem" to act differently: some of them use one weapon and others use a different weapon, but, if one or two of them are slightly close to each ohter, they tend to use the same weapon. For them to use a diferent weapon the distance must be much bigger i.e: one in the outer circle and the ohter in the third farthest of the bridges. :\

What I want is the Bots use the Uraken when the enemy is very close, and the FEMP if the distance is farther, BUT, keeping them from sticking to that weapon, because, once they start to use one or another, they seem to like it so much and hardly choose another weapon... :quizzical:

Also, they seem to not detect very well the distances, because they use short range weapons when there´s no close enemy.

Also. I have one more doubt and probably the dumbest, but... how can I measure distances in the map editor?. I mean, I want the Bot to use weapon X if distance is Y, but I don´t know how to measure it (remember that I use a block the size of the info_player_start to do calculations!!). :walter:

Thanks in anticipation, :crowbar:
Posted 5 years ago2018-12-24 14:54:01 UTC
in The Ballet of the Bots Post #341487
Well, I cannot say. The bot code was modified to be able to create bots for different teams, and the weapons´ behaviour, navigation code, and many other things were modified or directly eliminated (my bot is nothing but a moving turret), what´s true is that every bot acts as its team´s friends do, no difference in weapon selection or weapon usage or enemy targeting. The only thing they do differently is movement, they walk in different directions and try to reach different battle spots, apart of that, they act as a whole.
Posted 5 years ago2018-12-24 13:03:49 UTC
in The Ballet of the Bots Post #341485
And this is the code that "creates" the bot
void CBot::Spawn( )
{
   char c_skill[2];
   char c_index[3];

   CBasePlayer::Spawn();

   pev->flags = FL_CLIENT | FL_FAKECLIENT;

   // set the respawn index value based on key from BotCreate
   strcpy(c_index, GET_INFO_KEY_VALUE(GET_INFOBUFFER(edict( )), "index") );
   sscanf(c_index, "%d", &respawn_index);

   bot_respawn[respawn_index].pBot = (CBasePlayer *)this;

   // get the bot's name and save it in respawn array...
   strcpy(bot_respawn[respawn_index].name, STRING(pev->netname));

   bot_respawn[respawn_index].state = BOT_IDLE;

   pev->ideal_yaw = pev->v_angle.y;
   pev->yaw_speed = BOT_YAW_SPEED;

   // bot starts out in "paused" state since it hasn't moved yet...
   bot_was_paused = TRUE;

   v_prev_origin = pev->origin;
   f_shoot_time = 0;

   fempshot = 0;// Nuevo para la IA del BOT y que use el FEMP

   // get bot's skill level (0=good, 4=bad)
   strcpy(c_skill, GET_INFO_KEY_VALUE(GET_INFOBUFFER(edict( )), "skill") );
   sscanf(c_skill, "%d", &bot_skill);
   bot_skill--;  // make 0 based for array index (now 0-4)
   f_max_speed = 42;

     // pick a wander direction (50% of the time to the left, 50% to the right)
   if (RANDOM_LONG(1, 100) <= 50)
      wander_dir = WANDER_LEFT;
   else
      wander_dir = WANDER_RIGHT;

   f_pause_time = 0;
   f_find_item = 0;

   if (g_pGameRules->IsTeamplay())  // is team play enabled?
   {
      strcpy(model_name, g_pGameRules->GetTeamID(this));

   }
   else
   {
      strcpy(model_name, GET_INFO_KEY_VALUE(GET_INFOBUFFER(edict( )), "model") );
   }


  CBasePlayer *pPlayer = GetClassPtr((CBasePlayer *)pev);//NEW

   bot_model = 0;
   if (strcmp( model_name, "abbadon" ) == 0)
   {
      bot_model = MODEL_ABBADON;

   }
   else if (strcmp( model_name, "manheym") == 0)
   {
      bot_model = MODEL_MANHEYM;

   }
   else if (strcmp( model_name, "blitzkrieg") == 0)
   {
      bot_model = MODEL_BLITZKRIEG;

   }
   else if (strcmp( model_name, "berserk") == 0)
   {
      bot_model = MODEL_BERSERK;

   }

   f_pain_time = gpGlobals->time + 5.0;
   f_weapon_inventory_time = 0;
   f_dont_avoid_wall_time = 0;

   pBotEnemy = NULL;
   pBotUser = NULL;

   switch(RANDOM_LONG(1,4))

   {
    case 1:pPlayer->BotTeam( pPlayer, TEAM1_NAME );pPlayer->m_class = 1;break;//NEW
    case 2:pPlayer->BotTeam( pPlayer, TEAM2_NAME );pPlayer->m_class = 2;break;//NEW
    case 3:pPlayer->BotTeam( pPlayer, TEAM3_NAME );pPlayer->m_class = 3;break;//NEW
    case 4:pPlayer->BotTeam( pPlayer, TEAM4_NAME );pPlayer->m_class = 4;break;//NEW
   }

}
Sorry if I did not posted it before.
Posted 5 years ago2018-12-18 23:10:18 UTC
in The Ballet of the Bots Post #341469
Hello!.
I am writing again to ask you a question about the Bots of my mod.

After modifying things here and there I managed to make the Bots finally begin to be a bit better in terms of combat ability, but I observed something very striking after doing several test sessions from an external point of view.

I have been looking for the cause of the Bots to lower the FPS when they are on screen, I have removed a lot of parts of the navigation code and another parts of the code that was not used at all (jump, stairs, swimming) and I have not had a spectacular success as soon as increase of FPS.

What I have observed is that ALL the Bots of the same team act in coordination, in unison: that is, if a bot shoots an enemy all the bots of the same team shoot the same enemy, if that bot uses the weapon 1 all Bots use Weapon Number 1, and I have observed the same behavior in the four teams of Bots. It is like if when a Bot is created it shares the same AI of the rest of bots created within the same team.

The bot is based on the bot # 10 of Botman.

If you want I can pass the code to those who want to lend a hand.

Thanks in advance.
Yes!, I have all his Bot´s source, and I decided to use Bot #10 code to make the code for my Bot. Basically is a moving turret. Now I am working on the FEMP countermeasure. The bot have used it two or three time in all this years of development, but I am sure I will find how to make it choose this weapon. :)
Well, I am putting so much confidence on the Bot's habilities, what I'll try is to think it from the point of view of a tool maker, putting the task of deciding this process on the weapon's part. I will tell you later what happen.

Edit: well, all is fixed now. Of course there are things still undone, as the fact that one of the weapons is not still used by the Bots, but I know now exactly what to do. The approach was wrong from the beggining, and one of the causes of this bad approach was to take too much seriously the Bot, as I said before. This Bot (Bot #10) is very simple, please, don´t get me wrong, working 10 hours a day for 30 years could not make me do something similar, but the bot is simple in therms of features. It is oriented to be used as a standalone comrade in classic Half-Life deathmatch. It can pick weapons and navigate maps that are not very complex, even it can use health rechargers and jump and crouch, but my mistake was to try to make them more than that.

What I should do first is to think on the way the things work in real life, that is, what´s overheating, cooling itself, and is able to be reloaded?, the weapon, right?, so I decided to put all the conditions on the weapon. Can the weapon overheat?, well, let´s put conditions for the REAL player and for the FAKE player, can it reload?, ok, put some if statements and make them so the FAKE PLAYER receive this or that thing that, combined with the Bot code make things happen as I wanted.

Finally I hace added this two lines of code (forgive me if the code sucks, is dirty, makes your eyes bleed, etc. PLEASE :walter: ):

`void CShoryuken::Reload( void )
{
Cooldown(); // Shepard : Cool down our weapon (if we can)
//========================================================================================================
// New RELOAD call. It will activates the monstermakers from distance.
//--------------------------------------------------------------------------------------------------------
// Concept code first version (c) Angel Ramos (Not Implemented) Based on satchel.cpp code
// Code second version advices(c) Shepard62700FR (Not implemented)
// Concept code third version (c) Solokiller (implemented)
// First code based on Solokiller´s advices (implemented, not working)
// Non working RELOAD key Fix (c) Shepard62700FR
// Last version (c) Solokiller Working!!
// Last fixes (c) Angel Ramos ( Limited number of reloads, added Triggerreleased part so button only works
// on "semi", because, before, all "ammo" was depleted when the button "R"
// was pressed because the call was continuous)
//=========================================================================================================

if ( m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] >= 100 || m_pPlayer->m_rgAmmo[m_iSecondaryAmmoType] <= 0 || !TriggerReleased || m_iCall >= 1 )

return;

else if ( ( m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] >= 500) )
{
m_iCall -=1;
}
edict_t *pPlayer = m_pPlayer->edict( );

CBaseEntity *pEntity = NULL;
//Pass pEntity as the start entity to search through all entities properly. - Solokiller
while ((pEntity = UTIL_FindEntityInSphere( pEntity, m_pPlayer->pev->origin, 500000.0f)) !=NULL)
{
//Check if the targetname matches the owning player's team to filter monstermakers. - Solokiller
if ( FClassnameIs( pEntity->pev, "monstermaker" ) && FStrEq( STRING( pEntity->pev->targetname ), m_pPlayer->TeamID() ) )
{
pEntity->Use( m_pPlayer, m_pPlayer, USE_ON, 0.0f );
}
}

ALERT( at_console, "RELOAD!!\n" );
m_pPlayer->m_rgAmmo[m_iSecondaryAmmoType] -= 1;
TriggerReleased = FALSE;
EMIT_SOUND(ENT(pev), CHAN_ITEM, "weapons/reload.wav", 1, ATTN_NORM);//Aqui va lo del sonido
m_iCall +=1;//Nuevo

if (FBitSet(m_pPlayer->pev->flags, FL_FAKECLIENT) && ( m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0 )) { m_iCall += 0;
m_pPlayer->m_rgAmmo[m_iSecondaryAmmoType] -= 0; m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] += 20; }
if (FBitSet(m_pPlayer->pev->flags, FL_FAKECLIENT) && ( m_iCall =1 )) { m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] -= 600; }
}`

It's so coarse that I'm ashamed to put it here, but, well, I'm not able to do it better, and, hey, it works ... :crowbar:

Now the Bot, when it uses a projectile weapon and can Reload (m_iCall = 0) but its ammo is depleted(m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0), and because sometimes it is like if they cannot decide to use the reload function I decided to give them a bit of ammo (m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] += 20) to let them still try to reload. If all goes right, they´ll use the reload button, and that´s when they receive +1 m_iCall and their ammo was depleted instantly (m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] -= 600) so they must use the URAKEN weapon. When the Bot is reloaded, m_iCall is set to zero again, they can reload, and have new fresh ammo to fight.

:nuts:

Thanks for reading!! ;)

BTW: I´m again working on ZWC.
User posted image