Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Poll

See Episode 11, Which contract should we take?

Contract 1, FedCom Extraction Raid
- 4 (100%)
Contract 2, Outworlds Alliance Recon Raid
- 0 (0%)
Contract 3, FedCom Recon Raid #1
- 0 (0%)
Contract 4, FedCom Recon Raid #2
- 0 (0%)
None of the above - wait a month and try again (please post to specify acceptable contract criteria)
- 0 (0%)

Total Members Voted: 4


Pages: 1 ... 11 12 [13] 14 15 ... 40

Author Topic: Let's Play MegaMek (Against the Bot campaign)  (Read 73969 times)

Hanzoku

  • Bay Watcher
    • View Profile
Re: Let's Play MegaMek (Against the Bot campaign)
« Reply #180 on: November 20, 2015, 03:03:25 am »

Episode 4 – Repairs and Followup



Spoiler: Round 2 (click to show/hide)

Spoiler: Round 3 (click to show/hide)

Spoiler: Round 4 (click to show/hide)

Spoiler: Results (click to show/hide)

In the aftermath, we claim the crippled Stinger as salvage. James took one hit and will need to see the doctor, and we captured two of the pirates.

Repairs go well for the most part – we need a new left torso for the crab, find one and it is in transit. Repairs to the Gyro succeed, so once the left torso is fixed, the arm can be reattached and it’ll be as good as new.

The Stinger needs a great deal of work, and the admins get busy sourcing legs for the thing.

On Thursday, a new Gyro arrives for Jack’s Wolfhound. After a great deal of work, the techs manage to get it installed, and Scout lance is fully up and running again.

On the other hand, the first Right leg delivered for the Stinger doesn’t fit, so they end up having to scrap it and try again.

Friday brings the needed Torso section for the Crab, and once it’s in place, the rest of the process is smooth, getting our company fully operational again for the weekend.

Saturday brings continued troubles with the Stinger’s right leg, and replacement #2 is scrapped.

The next week changed everything. On the 29th, the pirates mustered an assault on Firebase Foxtrot, the base the 12th Bay Hammerers were staging out of. With only the Command Lance at base to assist the defenders, defeat means a failed contract and possibly the end of the unit.
Logged

Rince Wind

  • Bay Watcher
    • View Profile
Re: Let's Play MegaMek (Against the Bot campaign)
« Reply #181 on: November 20, 2015, 05:38:04 am »

Victory! Even though I didn't hit anything and couldn't even manage to distract them from poor Knave.

Regarding repairs: you can always make more complicated repairs take more time and get easier rolls. And don't forget that we have the transport bay from the dropship, which should be better than the field workshop.
Logged

Hanzoku

  • Bay Watcher
    • View Profile
Re: Let's Play MegaMek (Against the Bot campaign)
« Reply #182 on: November 20, 2015, 07:23:55 am »

Huh... I didn't know about the more time option. I'll make use of that in the future. I have been making sure to place mechs back into the transport bay for the slightly better chances there.
Logged

Neonivek

  • Bay Watcher
    • View Profile
Re: Let's Play MegaMek (Against the Bot campaign)
« Reply #183 on: November 20, 2015, 07:30:22 am »

Well I guess next time we are going to see a Quad in action.

I have a slight feeling it won't show off why I love quads juuuust yet.

Please don't die me!

If I do die, I do have a silly plan.
Logged

GentlemanRaptor

  • Bay Watcher
  • Got a present for ya!
    • View Profile
Re: Let's Play MegaMek (Against the Bot campaign)
« Reply #184 on: November 20, 2015, 07:33:23 am »

Hey! I killed something! Hoorah for slightly-okay skills!
Logged
Amusingly, he's a Marksdwarf, which gives me the mental image of him conducting medical malpractice an appendectomy from fifty paces with a crossbow.
On bay12, a poll option of basically 'nuke the world' named 'Apocalypse Hitler' is like asking an alcoholic if they want some whiskey.

Neonivek

  • Bay Watcher
    • View Profile
Re: Let's Play MegaMek (Against the Bot campaign)
« Reply #185 on: November 20, 2015, 07:36:47 am »

Hey! I killed something! Hoorah for slightly-okay skills!

You did pretty good given that your mech isn't really designed for someone with your skills.

I always felt like mechs were designed for vet pilots and higher.
Logged

Rince Wind

  • Bay Watcher
    • View Profile
Re: Let's Play MegaMek (Against the Bot campaign)
« Reply #186 on: November 20, 2015, 08:03:51 am »

Huh... I didn't know about the more time option. I'll make use of that in the future. I have been making sure to place mechs back into the transport bay for the slightly better chances there.

You have to right click on the task and choose mode -> the desired time.
Logged

Hanzoku

  • Bay Watcher
    • View Profile
Re: Let's Play MegaMek (Against the Bot campaign)
« Reply #187 on: November 20, 2015, 09:49:14 am »

Yeah, in the scenarios, every pilot is at least veteran, if not into elite/ultra-elite territory. The advantage for vehicle crews is that each crewmember focuses on one skill, while mech pilots have to split their XP across at least two, and more if they're an officer.
Logged

Knave

  • Bay Watcher
    • View Profile
Re: Let's Play MegaMek (Against the Bot campaign)
« Reply #188 on: November 20, 2015, 10:04:23 am »

Oof that definitely was not a great start to my merc career! That must have been one lucky shot to knock the poor crab down on the first hit.

I will have to write up an expletive-filled recounting :)
Logged

Hanzoku

  • Bay Watcher
    • View Profile
Re: Let's Play MegaMek (Against the Bot campaign)
« Reply #189 on: November 20, 2015, 10:22:47 am »

Yeah, the south fight would have gone entirely differently if he hadn't managed that gyro-killing lucky hit. You two would have probably kicked the Pegasus to pieces and done a number on the Blackjack.
Logged

Neonivek

  • Bay Watcher
    • View Profile
Re: Let's Play MegaMek (Against the Bot campaign)
« Reply #190 on: November 20, 2015, 10:24:33 am »

Yeah, the south fight would have gone entirely differently if he hadn't managed that gyro-killing lucky hit. You two would have probably kicked the Pegasus to pieces and done a number on the Blackjack.

And get kicked out of Clan? Ohh wait :P I forgot we are the inner sphere. Hence we make sense.
Logged

Anvilfolk

  • Bay Watcher
  • Love! <3
    • View Profile
    • Portuguese blacksmithing forum!
Re: Let's Play MegaMek (Against the Bot campaign)
« Reply #191 on: November 20, 2015, 11:38:14 am »

Hanzoku: there's a really useful option under MekHQ -> File -> MegaMek Options -> Victory Conditions, right at the top, called, "skip all phases when forced victory occurs". This basically means that if you've forgotten to declare victory or defeat before you end a round (especially defeat, which happens twice), then you can declare it whenever and the game stops there. It's great to avoid losing units unnecessarily!
« Last Edit: November 20, 2015, 04:49:41 pm by Anvilfolk »
Logged

Anvilfolk

  • Bay Watcher
  • Love! <3
    • View Profile
    • Portuguese blacksmithing forum!
Re: Let's Play MegaMek (Against the Bot campaign)
« Reply #192 on: November 20, 2015, 03:29:15 pm »

So, huh, I wrote a python script that automatically generates the reports you've been compiling. It reads from round.txt and writes into round2.txt, though I'm sure we can change that if there's another way that you prefer. It doesn't really consider everything, but it should be fairly complete. It reads off all damage done, taken, physical attacks, takes damage transfers into account, falling down and destruction, crits and destroyed parts.

It's probably also fairly buggy!

Code: [Select]
import re

with open ("round.txt", "r") as myfile:
    data=myfile.readlines()
   
data = [line.strip('\n').strip('\r').strip('\t') for line in data]
data = list(filter("".__ne__, data))

class Unit:
    def __init__(self, name, faction):
        self.name = name
        self.faction = faction
        self.timesFired = 0
        self.timesFiredHit = 0
        self.timesFiredAt = 0
        self.timesFiredAtHit = 0
        self.damageTaken = 0
        self.damageDealt = 0
       
        self.kick = False
        self.kicked = 0
        self.punch = 0
        self.punched = 0
        self.physTarget = None
        self.physDamage = 0
       
        self.lastPartHit = None
        self.crits = []
        self.destroyedParts = []
       
        self.destroyed = ""
        self.prone = False
        self.immobile = False
   
    def __str__(self):
        return "("+self.faction+") " + self.name
   
    def asList(self):
        l = []
        l.append("("+ self.faction +") " + self.name)
        if self.timesFired > 0:
            l.append("   Fired " + str(self.timesFired) + " times, hit " + str(self.timesFiredHit) + " times for " +str(self.damageDealt)+" damage")
        if self.damageTaken > 0 or self.timesFiredAt > 0:
            l.append("   Fired at " + str(self.timesFiredAt) + " times, hit " + str(self.timesFiredAtHit) + " times for " + str(self.damageTaken) +" damage")
        if self.kick:
            pd = " for " + str(self.physDamage) + " damage" if (self.physDamage > 0) else " and missed!"
            l.append("   Kicked " + str(self.physTarget) + pd)
        if self.punch > 0:
            pd = " " + str(self.punch) +" times for " + str(self.physDamage) + " damage" if (self.physDamage > 0) else " and missed!"
            l.append("   Punched " + str(self.physTarget) + pd)
        if self.punched > 0 or self.kicked > 0:
            l.append("   Was punched " + str(self.punched) + " times and kicked " + str(self.kicked) + " times.")
        if len(self.crits) > 0:
            l.append("   Crits received: " + ", ".join(self.crits))
        if len(self.destroyedParts) > 0:
            l.append("   Destroyed parts: " + ", ".join(self.destroyedParts))
        if self.prone:
            l.append("   PRONE")
        if self.immobile:
            l.append("   IMMOBILE")
        if len(self.destroyed) > 0:
            l.append("   DESTROYED ("+self.destroyed+")")
        return l

def getNextLine():
    global data
    line = data[0]
    data = data[1:]
    return line

unitFire = re.compile('Weapons fire for ([^\(]*) \(([^\)]*)\)')
unitPhys = re.compile('Physical attacks for ([^\(]*) \(([^\)]*)\)')
weaponsFire = re.compile('([a-zA-Z/0-9 ]+) at ([^\(]*) \(([^\)]*)\); needs \d+, rolls \d+ : (misses|hits)[ ]*(?:\([^\)]+\))?[ ]*([A-Z]+)?')
damageTaken = re.compile('([a-zA-Z0-9 -]*) \(([^\)]*)\) takes (\d+) damage to ([A-Z]+)')
physAttack = re.compile('(Kick|Punch)[ ]*(?:\([^\)]+\))? at ([^\(]*) \(([^\)]*)\); needs \d+, rolls \d+ : (misses|hits)[ ]*(?:\(using Rear table\))?[ ]*([A-Z]+)?')
falling = re.compile('([a-zA-Z0-9 -]*) \(([^\)]*)\) falls ')
critical = re.compile('CRITICAL HIT on ([^.]+).')
destroyedParts = re.compile('SECTION DESTROYED')
destroyed = re.compile('\*\*\* ([a-zA-Z0-9 -]*) \(([^\)]*)\) DESTROYED by ([^!]+)! \*\*\*')
transferDamage = re.compile('(\d+) damage transfers to [A-Z]+')

units = dict()

def getUnit(name, faction):
    global units
    if name not in units:
        units[name] = Unit(name, faction)
    return units[name]
   
currentUnit = None
targetUnit = None
physical = False

while len(data) > 0:
    line = getNextLine()
   
    # Check if this is a firing line
    r = unitFire.match(line)
    if r is not None:
        physical = False
        currentUnit = getUnit(r.group(1), r.group(2))
        targetUnit = None
        continue
   
    r = unitPhys.match(line)
    if r is not None:
        physical = True
        currentUnit = getUnit(r.group(1), r.group(2))
        targetUnit = None
        continue
   
    r = weaponsFire.search(line)
    if r is not None:
        currentUnit.timesFired += 1
        targetUnit = getUnit(r.group(2), r.group(3))
        targetUnit.timesFiredAt += 1
        if r.group(4) == "hits":
            currentUnit.timesFiredHit += 1
            targetUnit.timesFiredAtHit += 1
        continue
   
    r = physAttack.search(line)
    if r is not None:
        targetUnit = getUnit(r.group(2), r.group(3))
        currentUnit.physTarget = targetUnit
        if r.group(1) == "Kick":
            currentUnit.kick = True
            if r.group(4) == "hits":
                targetUnit.kicked += 1
        elif r.group(1) == "Punch":
            currentUnit.punch += 1
            if r.group(4) == "hits":
                targetUnit.punched += 1
        continue

    r = falling.search(line)
    if r is not None:
        currentUnit = None
        targetUnit = getUnit(r.group(1), r.group(2))
        targetUnit.prone = True
       
    r = damageTaken.search(line)
    if r is not None:
        targetUnit.damageTaken += int(r.group(3))
        targetUnit.lastPartHit = r.group(4)
        if currentUnit is None:
            continue
        if physical:
            currentUnit.physDamage += int(r.group(3))
        else:
            currentUnit.damageDealt += int(r.group(3))
        continue   
   
    r = transferDamage.search(line)
    if r is not None:
        targetUnit.damageTaken -= int(r.group(1))
        if physical and currentUnit is not None:
            currentUnit.physDamage -= int(r.group(1))
        elif not physical and currentUnit is not None:
            currentUnit.damageDealt -= int(r.group(1))
   
    r = critical.search(line)
    if r is not None:
        targetUnit.crits.append(r.group(1) + "["+targetUnit.lastPartHit+"]")
   
    r = destroyedParts.search(line)
    if r is not None:
        targetUnit.destroyedParts.append(targetUnit.lastPartHit)
       
    r = destroyed.search(line)
    if r is not None:
        unit = getUnit(r.group(1), r.group(2))
        unit.destroyed = r.group(3)
   
   
factions = {}
def getFaction(name):
    global factions
    if name not in factions:
        factions[name] = {}
    return factions[name]

for unit in units.values():
    f = getFaction(unit.faction)
    f[unit.name] = unit

output = []
   
sortedFactions = sorted(factions.keys())
for factionName in sortedFactions:
    unitList = getFaction(factionName)
    sortedUnitList = sorted(unitList.keys())
    for unitName in sortedUnitList:
        output = output + unitList[unitName].asList() + [""]
       
   
with open ("round2.txt", "w") as myfile:
    myfile.write("\n".join(output))


Here's some sample output from a round between 4 mechs, where my team's name is J, enemy is Princess:
Quote
(J) Assassin ASN-101
   Fired 3 times, hit 2 times for 10 damage
   Fired at 3 times, hit 1 times for 5 damage
   Kicked (Princess) Clint CLNT-2-4T for 8 damage

(J) Hermes HER-1B
   Fired 3 times, hit 3 times for 15 damage
   Kicked (Princess) Clint CLNT-2-4T for 80 damage

(Princess) Clint CLNT-2-4T
   Fired 3 times, hit 1 times for 5 damage
   Fired at 6 times, hit 5 times for 117 damage
   Was punched 0 times and kicked 2 times.
   Crits received: Standard Gyro[CT], AC/2 Ammo (37)[RTR]
   Destroyed parts: RT, CT
   PRONE
   DESTROYED (ejection)


Hopefully this'll help, as long as you can get Python working! I know there are some online interpreters, so we might be able to make it work online somehow?

Basically, just go into each round, and copy paste the entire content of that round onto round.txt, run the script in the same directory, and output is in round2.txt.

Quick edit: just prettied up the output a little, so nothing shows up if you weren't shot at, and lets us know how many physical attacks each mech received.

Also, we can probably make it BBcode enabled by adding a few tags around mech names to make them bold/italic, whatever? Up to you!
« Last Edit: November 20, 2015, 03:38:17 pm by Anvilfolk »
Logged

Hanzoku

  • Bay Watcher
    • View Profile
Re: Let's Play MegaMek (Against the Bot campaign)
« Reply #193 on: November 21, 2015, 12:46:28 am »

AnvilFolk - Thanks a lot! Both for the hint on the victory condition setting and for the script!

The output looks perfect, and neatly includes the physical damage into the report. I'll play around with it Monday and see if there are any problems on my system.
Logged

Rince Wind

  • Bay Watcher
    • View Profile
Re: Let's Play MegaMek (Against the Bot campaign)
« Reply #194 on: November 21, 2015, 10:06:20 am »

Cool thing, Anvilfolk!


Hanzoku: Would you mind giving my Mech a custom camo with one of the playing card variants?
Logged
Pages: 1 ... 11 12 [13] 14 15 ... 40