Hero offers in v0.9 more scarce?

Discuss anything related to warbarons.

Re: Hero offers in v0.9 more scarce?

Postby Zaque » Tue Jan 29, 2013 6:46 pm

Well that is true on low income maps, but on high income maps it should not be too bad. So you really need to know your map type before you risk a hero in a low% fight. The fact that you get a higher lvl hero helps you a lot in that now you can search lvl 2 ruins from the start and you are lvl 2.
Zaque
 
Posts: 49
Joined: Mon May 21, 2012 9:30 am

Re: Hero offers in v0.9 more scarce?

Postby piranha » Tue Jan 29, 2013 8:38 pm

Your chance to get a hero doesn't decrease with more gold. A hero will come in level 2 if you can afford it otherwise in level 1. You should have a better chance of getting hero offers in 0.9 compared to before.
User avatar
piranha
Site Admin
 
Posts: 1189
Joined: Fri Feb 12, 2010 9:44 pm

Re: Hero offers in v0.9 more scarce?

Postby KGB » Tue Jan 29, 2013 10:24 pm

Piranha,

piranha wrote:Your chance to get a hero doesn't decrease with more gold. A hero will come in level 2 if you can afford it otherwise in level 1.


No one ever thought the chance would *decrease* with more gold. We expect it to increase with more gold.

So even though the game says that at T13 hero offers are *only* L2 and L3 that you can still get a L1 hero?

You should have a better chance of getting hero offers in 0.9 compared to before.


Are you sure about this? Chazar is indicating that he has gotten no hero offers for 5+ turns. That seems very very unlikely if you have 500-700 gold. There was also an allowance for the chance to go up to 100% instead of the 75% cap. Is that still in place?

Or better yet, can you post the new code for the hero chance.

KGB
KGB
 
Posts: 3030
Joined: Tue Feb 16, 2010 12:06 am

Re: Hero offers in v0.9 more scarce?

Postby Experix » Tue Jan 29, 2013 10:44 pm

I have no experience with having no heroes, but I have also feelings the hero offers are more rare in 0.9.
From my cca 10 games, I only managed to get third hero before turn 11 once. It was usual for me in 0.8...

I wrote myself exact gold in first turns in the current game. I got the offer for second hero in turn 7. If the 0.8 rules were valid, I had 94% probability to get this offer earlier. I can't judge anything from one game, but I started to study that because my experience from previous games was +- the same -- several turns around 1000 gold and no second hero offer.

I think that, regardless to this current experience, that in order to reduce luck, there should be at least some boundary like you have for ruins or battles, where you can reach the certainity. Like, for example, if you have 75% probability, you didn't succeed in three turns in row, you would get offer in the next.
If I got, for example the hero in the second turn (and there was over 50% probabilty for that) instead of seventh, my expansion would have been much faster, and the hero would be nearly L3 by that time. Very difficult to overcome such handicap that this happens for one player, but the other one has to wait for his hero for a long time...

I would be curious whether somebody got L2 hero offer before turn 13, since I haven't get any yet myself...

I would like to see the new algorithm for the hero offers too...
Experix
 
Posts: 129
Joined: Wed Jul 04, 2012 8:39 am

Re: Hero offers in v0.9 more scarce?

Postby KGB » Wed Jan 30, 2013 2:21 am

I've gotten heroes before on turn 2. In a couple of games I have had 3 heroes by turn 5. Overall my personal experience is that the offers are about the same as 0.8. But then I am a player who tends to buy a cheap unit on turn 1 to save large amounts of gold for a 2nd hero offer starting on turn 2.

I do think the automatic L2 hero offer at T13 has a bug in it. I am on turn 15 in a game (35597 - Sloppy Swish) where I had 2500+ gold and I was only offered a L1 hero. That should be impossible because I had more than enough gold for a L2 (I still have 800 gold remaining even after buying the hero and 2 RD's even though I found 350 of that in a ruin).

KGB
KGB
 
Posts: 3030
Joined: Tue Feb 16, 2010 12:06 am

Re: Hero offers in v0.9 more scarce?

Postby Chazar » Wed Jan 30, 2013 7:06 am

Turn 16, 860 Gold. 0 heroes still. :( Never having a hero offer apart from turn 1 sucks big time.
Chazar
 
Posts: 670
Joined: Tue Feb 28, 2012 7:51 pm

Re: Hero offers in v0.9 more scarce?

Postby KGB » Wed Jan 30, 2013 11:47 pm

Another game, turn T13, 1300+ gold and only a L1 hero offer with no allies. That should be impossible as I have more than enough gold for a L2 hero and I am pretty sure I had enough for a L3 hero even at maximum cost.

It's as if the game is trying to assign a high level hero AND allies and if you can't afford the whole thing you just get a plain L1 hero. What should happen is first drop the allies and see if the player can take a leveled up hero. Then drop the hero 1 level at a time until you reach something the player can afford. This might also be why Chazar can't get a hero despite 850+ gold.

KGB
KGB
 
Posts: 3030
Joined: Tue Feb 16, 2010 12:06 am

Re: Hero offers in v0.9 more scarce?

Postby Experix » Thu Jan 31, 2013 12:39 am

It's as if the game is trying to assign a high level hero AND allies and if you can't afford the whole thing you just get a plain L1 hero.


I don't think so. For example now, in testing game, turn 19, 2 heroes, 6500 gold, L1 hero (+allies), which was together by several thousands cheaper than these 6500 gold.
Experix
 
Posts: 129
Joined: Wed Jul 04, 2012 8:39 am

Re: Hero offers in v0.9 more scarce?

Postby KGB » Thu Jan 31, 2013 3:06 am

We really need to see the code then to understand what's going on.

I would expect to see something like this:

Code: Select all
if (playerGold >= minHeroOffer)  // Need at least 400 gold to have a chance for a hero offer
{
    // Work out the percentage chance to get a hero based on current number of heroes + player gold etc. Lets say this is somewhere between 10-75% as it was in 0.8. We'll call it heroChance.
    heroRoll = rand(0,100)  // Roll for the hero
    if (heroRoll <= heroChance)   // Got a hero
    {
        heroCost = rand(400, 450)  // Base cost is between 400 and 850.
        if (heroCost > playerGold) heroCost = playerGold // Since player got a successful roll make sure they can afford that hero
        heroLevel = 1

        // Now work out extra levels first
        heroLevelRoll = rand(0,100)
        if (turn >=6 && turn <=12)
        {
            if (heroRollLevel <= 66) heroLevel = 2
        }
        if (turn >=13 && turn <=18)
        {
            heroLevel = 2
            if (heroRollLevel <= 33) heroLevel = 3
        }
        if (turn >=19 && turn <=24)
        {
            heroLevel = 2
            if (heroRollLevel <=25) heroLevel = 3
            if (heroRollLevel >25 && heroRollLevel <=50) heroRollLevel =4
        }
        if (turn >25)
        {
            heroLevel = 3
            if (heroRollLevel <=33) heroLevel = 4
            if (heroRollLevel >33 && heroRollLevel <=66) heroRollLevel =5
        }

        // Now adjust level by player gold to get the max they can afford
        for (i=0; i<heroLevel; i++)
        {
             if (heroCost + i*250 < playerGold)
             {
                 finalHeroLevel = i+1   // For zero based loop
             }
        }
        heroCost = heroCost + finalHeroLevel*250

        // Now work out any allies (just using your posted 0.8 code)
        $availablegold = playerGold - heroCost;
       if ($availablegold > 500)
       {
           minrand=0;
           maxrand=1;
       }
      if ($availablegold > 1000)
      {
          $minrand=1;
          $maxrand=2;
      }
      if ($availablegold > 1500)
      {
          $minrand=1;
          $maxrand=3;
      }
      if ($availablegold > 2000)
      {
          $minrand=2;
          $maxrand=3;
     }
     if ($availablegold > 2500)
     {
         $minrand=2;
         $maxrand=4;
     }
     if ($availablegold > 3500)
     {
         $minrand=3;
         $maxrand=4;
     }

     $maxnumberofallies = rand($minrand,$maxrand);

     wizard[0] = rand(200, 400);
     medusa[0] = rand(250, 500);
     elemental[0] = rand(250, 500);
     ghost[0] = rand(250, 500);
     demon[0] = rand(600, 900);
     devil[0] = rand(550, 950);
     archon[0] = rand(700, 1200);
     dragon[0] = rand(800, 1250);

     wizard[1] = 22;
     medusa[1] = 20;
     elemental[1] = 24;
     ghost[1] = 21;
     demon[1] = 25;
     devil[1] = 26;
     archon[1] = 27;
     dragon[1] = 28;

    alliearray = array(wizard, medusa, elemental, ghost, demon, devil, archon, dragon);

    shuffle(alliearray); // Only one type of allie in the same offer
    allyCost = 0
    for (i=0;i maxnumberofallies ;i++)
    {
        // shuffle(alliearray);
        newally = alliearray[0];

        if (availablegold < newally[0])
        {
            continue;
        }
        allycontent[] = newally[1];
        availablegold=availablegold-newally[0];
        allyCost = allyCost + newally[0];
    }
   
    // heroCost is the cost of the leveled hero
    // allyCost is the cost of the allies
    // finalHeroLevel is the level of the hero
}


KGB
KGB
 
Posts: 3030
Joined: Tue Feb 16, 2010 12:06 am

Re: Hero offers in v0.9 more scarce?

Postby piranha » Thu Jan 31, 2013 8:46 pm

You were right. It was lower chance to get a hero. I changed to the code now. Looks like this:

Code: Select all
  $morethanfive = ($numberofheroes - 4);
if($morethanfive < 1) {$morethanfive = 1;}
$newherochance = ($currentgold - ($numberofheroes * $numberofheroes * 100 * $morethanfive)); // Number of heroes squared
if(($currentgold > 400) && ($newherochance < 500)) {$newherochance = 500;} // Always a **% chance - assuming enough gold
            if(($newherochance > 1250) && ($numberofheroes > 0)) {$newherochance = 1250;} // Maximum **% chance if 1+ heroes

            //hero cost
            $hero = rand(400, 850);
            if(rand(350,950) < $newherochance && $currentgold > $hero)


Not sure what this translates into in terms of chance but should now be slightly easier to get a hero than in 0.8.
User avatar
piranha
Site Admin
 
Posts: 1189
Joined: Fri Feb 12, 2010 9:44 pm

PreviousNext

Return to Game discussion

Who is online

Users browsing this forum: No registered users and 0 guests

cron
Not able to open ./cache/data_global.php