RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Does "Position" really DO anything?

0 Members and 1 Guest are viewing this topic.

**
Rep: +0/-0Level 82
Front, Middle, Rear position. Seriously...so far they seem to do the opposite of what I'd expect in testing. I just finished another test combat. 4 enemies vs 2 PCs (1 Front position, 1 Rear position). Of the 6 attacks dealt to the PCs, 5 went to the "Rear position". This seems to happen a LOT. Is something actually wrong? Or am I just witnessing an astounding failure of probability?

********
Resource Artist
Rep:
Level 94
\\\\\
Project of the Month winner for June 2009
What are you talking about?

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Failure isn't a correct term - and while 5/6 attacks is unlikely, it's not astounding. In any case, the chance depends in part on the composition of the party. The way random targetting works is the actor is added to the array (4 - position) times. Front is 0, so that actor is added to the array four times. Rear is 2, so that actor is added twice.

Thus, there is a 1/3 chance that the rear actor would be targetted by random targetting. So it's unlikely, but not impossible. Also, it is not linear with the number of people in the party. In a party with one front character and three rear characters, the chance that a specific rear character will be hit is 1/5. In a party with three front characters and one rear character, the chance the rear character would be hit is 1/7. And in a party with only one front character and one rear character, the chance is 1/3, which isn't that unlikely.


One thing to note, a sample size of six is not a reliable sample size.
« Last Edit: December 01, 2009, 01:52:35 AM by modern algebra »

**
Rep: +0/-0Level 82
Gotcha. Thanks for explaining the background math. Kinda wish they gave us the option to weight a little more heavily one way or the other.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Well, if you wanted to, you could change the odds method of Game_Actor, which is here:


Code: [Select]

  #--------------------------------------------------------------------------
  # * Get Ease of Hitting
  #--------------------------------------------------------------------------
  def odds
    return 4 - self.class.position
  end

If, for instance, you wanted it weighted heavier so that front classes are more likely to get attacked you could have something like this:

Code: [Select]

  #--------------------------------------------------------------------------
  # * Get Ease of Hitting
  #--------------------------------------------------------------------------
  def odds
    return 5 - (self.class.position*2)
  end

Then, in a party of one rear actor and one front actor, the chance the rear actor would be attacked is 1/6 and the chance the front actor is attacked would be 5/6. In a party with three rear actors and one front actor, the chance the front actor would be attacked is 5/8