Mordel's Bar & Grill
Help two idiots with MegaMek
Post new topic   Reply to topic    Mordel's Bar & Grill Forum Index » General Discussion
View previous topic :: View next topic  
Author Message
chihawk
Clan Blood Spirit
Master Bartender
Master Bartender


Joined: 04-Feb-2002 00:00
Posts: 8044
Location: United States
PostPosted: 28-Feb-2022 07:45    Post subject: Help two idiots with MegaMek Reply to topic Reply with quote

I posted a question about even dueling mechs last week for something Mordel and I were doing at TotalCon, mostly as a Hail Mary, that didn't get many views and garnered one well-meaning but generally useless reply. So now we'll try something else...

Using MegaMek, let's say I want to run a Blackjack vs Centurion battle 100 times to see how close to a 50/50 battle it would be. Is there a way to "batch" run that, or do I need to set that battle up 100 times and just let it run each time?
_________________
www.210sportsblog.com
Back to top View profile Send site message Send e-mail Visit website Twitter Username
Stinger07
The Quickscell Company
Head Engineer
Head Engineer


Joined: 11-Mar-2015 09:52
Posts: 265
Location: United States
PostPosted: 28-Feb-2022 08:03    Post subject: Help two idiots with MegaMek Reply to topic Reply with quote

As far as I can tell, you will have to run it 100 times.

But, on top of that, you would likely want to run the AI with different aggressiveness settings as well, so it may be that you change the settings every time.
Back to top View profile Send site message Visit website
chihawk
Clan Blood Spirit
Master Bartender
Master Bartender


Joined: 04-Feb-2002 00:00
Posts: 8044
Location: United States
PostPosted: 28-Feb-2022 08:29    Post subject: Re: Help two idiots with MegaMek Reply to topic Reply with quote

Stinger07 wrote:
As far as I can tell, you will have to run it 100 times.

But, on top of that, you would likely want to run the AI with different aggressiveness settings as well, so it may be that you change the settings every time.


We don't want the settings changed every battle, we want to see if the mechs are equal under the same exact circumstances. Once you start creating variables you no longer know what changes you made make the battle unequal.
_________________
www.210sportsblog.com
Back to top View profile Send site message Send e-mail Visit website Twitter Username
chihawk
Clan Blood Spirit
Master Bartender
Master Bartender


Joined: 04-Feb-2002 00:00
Posts: 8044
Location: United States
PostPosted: 01-Mar-2022 07:47    Post subject: Help two idiots with MegaMek Reply to topic Reply with quote

The first test run led to one obvious conclusion: unless there's a faster way to do this other than manually entering everything after each duel, there's no way anyone has run a match-up more than a handful of times. It's far too time-consuming for anyone that has anything else to do in their life.

That being said, Blackjack BJ-1 vs Centurion CN9-A 20 times on the basic map (4/5 skills)...Blackjack "wins" 11-8, with one match going to a 39-round draw. I suspect that if they were matched up 100 times we'd see it being very close to 50/50.
_________________
www.210sportsblog.com
Back to top View profile Send site message Send e-mail Visit website Twitter Username
Vagabond
Mercenary
Mr. Referee
Mr. Referee


Joined: 04-Feb-2002 00:00
Posts: 5602
Location: United States
PostPosted: 02-Mar-2022 00:27    Post subject: Help two idiots with MegaMek Reply to topic Reply with quote

you can use a custom MMS Scenario to speed it up some.

copy and paste into a Text file and save as ????.mms. I tried to skip the options setup and such by using the fixed options in the code but it didn't seem to work. I'll try more later.

You just need change the Mech assignment and make sure to set Other Bot during player assignment.

Code:

#
#  A MegaMek Scenario file
#
#

# Versionstamp required to be recognized as a Scenario file
MMSVersion=1

# Name of the scenario
Name=Test1

# Scenario description
Description=This is an example scenario to show different scenario features

# Map Setup ------------------------------------------------------
# Size of the map in mapboards
BoardWidth=1
BoardHeight=1

# Directories to choose random boards from
RandomDirs=MapSet2,MapSet3,MapSet4,MapSet5,MapSet6,MapSet7

# Maps can be specified by name.  The order is left-to-right, top-to-bottom
# Any unspecified boards will be set to RANDOM
Maps=MapSet2/16x17 BattleTech

# Game/Rule Options ----------------------------------------------
# This is an xml file which can be created by copying your
# mmconf/gameoptions.xml
# path is specified relative to the scenario file
# This is one way to set victory conditions
GameOptionsFile=mmconf/gameoptions.xml
# The Game Options can be fixed. In this case the Game Options Dialog shown before the
# scenario starts is skipped.
FixedGameOptions=true

# Planetary Conditions ------------------------------------------
# Planetary Conditions can be fixed. In this case the Planetary Conditions Dialog shown before the
# scenario starts is skipped.
FixedPlanetaryConditions=true
# Temperature: Only integer values are allowed
PlanetaryConditionsTemperature=10
PlanetaryConditionsGravity=1.00
# Light: Default = Daylight; 1 = Dusk; 2 = Full Moon Night; 3 = Moonless Night; 4 = Pitch Black
PlanetaryConditionsLight=1
# Weather: Default = None; 1/2/3/4 = Light/Moderate/Heavy/Gusting Rain; 5 = Downpour;
# 6/7/9 Light/Moderate/Heavy Snow; 8 = Snow Flurries; 10 = Sleet; 11 = Blizzard;
# 12 = Ice Storm; 13/14 = Light/Heavy Hail
PlanetaryConditionsWeather=Default
# Wind: Default = None; 1/2/3 = Light/Moderate/Strong Gale; 4 = Storm; 5 = Tornado F1-3; 6 = Tornado F4
PlanetaryConditionsWind=Default
# Wind Direction: Default = Random; 0 = N; 1 = NE; 2 = SE; 3 = S; 4 = SW; 5 = NW
PlanetaryConditionsWindDir=0
# Atmospheric Pressure: Default = Standard; 0 = Vacuum; 1 = Trace; 2 = Thin; 4 = High; 5 = Very High
PlanetaryConditionsAtmosphere=Default
# Fog: Default = No Fog; 1 = Light Fog; 2 = Heavy Fog
PlanetaryConditionsFog=Default
# Shifting Wind
# Strength: Default = off; default min. Wind = 0 (see Wind above); default max. Wind = 6
# Direction: Default = off;
PlanetaryConditionsWindShiftingStr=Default
PlanetaryConditionsWindMin=0
PlanetaryConditionsWindMax=0
PlanetaryConditionsWindShiftingDir=Default
# Blowing Sand: Default = off
PlanetaryConditionsBlowingSand=Default
# EMI: Default = off
PlanetaryConditionsEMI=Default
# Allow Terrain Changes: Default = on
PlanetaryConditionsAllowTerrainChanges=Default

# Faction (= Player) list ---------------------------------------
# A scenario can be set to single player style. In this case the first player is
# the human player and all other players are Princess bots. This will skip the
# Player/Camo assignment dialog and the "Host game" dialog and directly connect
# to a localhost Server and use the correct player name.
SinglePlayer=true
# The player name used to log into the server MUST match this name to play as
# that faction.  Player names can *not* include spaces.
Factions=PlayerA,PlayerB,PlayerC

# Faction location
# Determines deployment area
# Valid values are Any,N,NE,E,SE,S,SW,W,NW,CTR,EDG and R (random)
Location_PlayerA=CTR
Location_PlayerB=N
Location_PlayerC=S

# Faction Teams
# Determines which players are on what teams.
# Valid values are any positive integer less than 2^31.
Team_PlayerA=1
Team_PlayerB=2
Team_PlayerC=3

# Faction minefields
# Gives the player minefields to deploy, the first number is conventional, the
# second command-detonated and the last is vibrabombs.
Minefields_PlayerA=0,0,0
Minefields_PlayerB=0,0,0

# Player Camos
# Assigns a camo to a player; advisable in single player scenarios where the player can't do this
# The directory and filename must be separated by a comma and the directory must end in a /


# Mechlist for each faction -------------------------------------------------
#
# Units are constructed as Unit_<faction name>_<#>, where the faction name
# matches the one listed in the Faction property and the # is a sequential
# numbering starting at 1.  If there is a gap in the numbering, any units after
# the gap will be ignored.
#

# The format is MechRef,PilotName,PilotGunnery,PilotPiloting,facing,x,y
# Facing and coordinates are optional. Facing is one of NW, N, NE, SE, S, SW
# Example: Unit_Irregulars_1=HGN-732,Col Rhonda Snord,2,1,N,01,32

Unit_PlayerB_1=Blackjack BJ-1,PilotB1,4,5,S,08,01
Unit_PlayerC_1=Centurion CN9-A,PilotC1,4,5,N,08,17

# Additional advantages to add to pilots. Most of these require the 'MaxTech
# Level3 Pilot Advantages' game option to be turned on. The possible values
# are:
# dodge_maneuver, maneuvering_ace, melee_specialist, pain_resistance
# Multiple advantages for one pilot are seperated by spaces

#set autoeject, only for mechs
Unit_PlayerB_1_AutoEject=true
Unit_PlayerC_1_AutoEject=true

#set which units should be commanders (for commander killed VC)

# Unit Camos
# Assigns a camo to a unit, overriding any player camo
# The directory and filename must be separated by a comma and the directory must end in a /

# To initially damage units, you can use a unit armor property, which specifies
# armor and internal values.  Values above the unit's nominal value for that
# location will be ignored. 
# Armor is specified in this order:
# H,CT,CTR,RT,RTR,LT,LTR,RA,LA,RL,LL,HI,CTI,RTI,LTI,RAI,LAI,RLI,LLI
# Here's an example:
#
# Unit_Kurita_1_Armor=0,30,19,24,20,24,10,24,24,33,33,1,25,17,17,13,13,17,17
#
# Alternately, if you want more random damage, and want to allow critical
# damage before the game starts, you can use a unit damage property, which
# specifies a number of blocks of 5 damage that will be randomly applied to
# the unit using the standard hit chart.  Any internal and critical hits will
# be resolved normally.
# Warning: this can result in the unit being destroyed before the game begins.
# Unit_PlayerB_1_Damage=5

# Advanced Dammage Modification
#
# Mech Locations
#    HEAD=0,CT=1,RT=2,LT=3,RARM=4,LARM=5,RLEG=6,LLEG=7
# Example for Mechs:
#   N0:1 Means Normal Armor Location 0 Set to 1
#   I2:2 Means Internal Armor Location 2 Set to 2
#   R2:3 Means Rear Armor Location 2 Set to 3
#
# Tank Locations
#    Body=0,FRONT=1,RIGHT=2,LEFT=3,REAR=4,TURRET=5
#
# Infantry Location
#   Men = 0 (Will set the number of men in the platoon)
#
# Battle Armor
#      Unit#=0(First Unit Number) to Armor
#      EG Unit_Kurita_3_DamageSpecific=N2:1,N3:0
#          Will set unit 3 to have 1 Armor Remaning
#          while unit 4 Destroyed
#
# Proto Mechs
#      Head=0,Torso =1,RARM=2,LARM=3,LEGS=4,Main Gun=5
#     

# Critical Hits
# eg Unit_Kurita_1_CritHit=1:8
# This does a crit hit on location 1 slot 8. 
#
# Mech Crit Hits
#    HEAD=0,CT=1,RT=2,LT=3,RARM=4,LARM=5,RLEG=6,LLEG=7
#    Slots starting from 1 to the number of filled critical slots
#
# Vehicle Crit Hits
#       Location is zero.
#       Slots is one of the following:
#    1 = Crew stunned for 3 turns
#    2 = Main weapon jams for 1 turn
#    3 = Engine Destroyed Immobile
#    4 = Crew killed (tank dead)
#    5 = Fuel Tank/Engine Shielding (tank dead)
#    6 = Power Plant Hit (tank dead)
#
# Proto Mechs
#    Head=0,Torso=1,RARM=2,LARM=3,LEGS=4,Main Gun=5
#    Slots starting from 1 to the number of critical hit boxes
#
#       In addition, you can specify whether the Torso weapons
#       should be damaged by damaging the following torso "slots":
#               Torso Weapon A=5,Torso Weapon B=6
#
#

# Set Ammo Ammount(Only Works for Mechs)
#
# Note will not be able to specifiy a value larger then Inital Ammout
#
# Loc and Slots are the same as Crit Locations
#
# For a Mech this would
# Unit_Kurita_6_SetAmmoTo=2:11-3
# Would set Ammo at Slot 2:11 to 3 points
#

# Set Ammo type (works only for 'Mechs, too)
#
# Loc and Slots work the same as for critical locations and ammo ammout
#
# Ammo name is the unique string used in the 'Mech files themselves.
# Errors will be logged to the normal log file and the ammo replaced
# by the standard defined for the 'Mech. The same will happen for ammo
# which is illegal according to the specified game rules.


# Set Altitude (works only for aerospace fighters, conventional fighters,
# small craft and dropships)
#
# You can set the altitude of a flying unit at the start of the scenario
# to be anything between 0 and 10. Altitude 0 means the unit deploys landed.
#
# Unit_Kurita_666_Altitude=3

_________________
one must work hard to cultivate the mind and body. and one must always cultivate the mind.



//^(^_^)^\\
Back to top View profile Send site message Visit website
Display posts from previous:
Post new topic   Reply to topic    Mordel's Bar & Grill Forum Index » General Discussion All times are GMT-04:00

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum