Author Topic: How to Create an Arena Mission  (Read 7463 times)

Offline SharkD

  • Hero Member
  • *****
  • Posts: 961
    • View Profile
    • Isometricland
How to Create an Arena Mission
« Reply #15 on: January 15, 2007, 04:52:42 PM »
Good job palefire. Keep it up!

Offline Joseph Hewitt

  • Administrator
  • Hero Member
  • *****
  • Posts: 2521
    • View Profile
    • http://www.gearheadrpg.com
How to Create an Arena Mission
« Reply #16 on: January 15, 2007, 06:34:15 PM »
Quoting: palefire
Reinforcement--Deploy?

Deploy is a trigger; it identifies a script, in this case the script to call when the mission is started. To add reinforcements in the middle of a mission you can use the WMecha command from any script. The format for the command is:

WMecha [Team] [UPV]

Team is the team to place the mecha on. They will appear in that team's designated deployment zone. UPV is Unit Point Value: how many mecha to add, expressed in dollars. To generate a good value you can use the Threat function, whose format is:

Threat [Renown] [Percent]

Renown is basically the difficulcy number, and for this you should use ArenaRenown. Percent scales the number of mecha generated by a given percent. For the basic combat missions, 400% is used. The Threat function is calibrated for the RPG campaign where there's only one PC, so for the arena campaign 4x that amount sounds fair.

Quoting: palefire
Dialogue in the middle of combat--ForceChat?

Yes, you send it the Character ID of the NPC who will be speaking. The leader of the arena team is the one being spoken to. This will be the PC with the highest Leadership rating, or if nobody has the Leadership skill it will be the character with the highest Charm (it might be the character with the highest Charm anyway if that character's natural Charm bonus is higher than the leader's Leadership skill plus Charm bonus, but that's pretty unlikely).

Quoting: palefire
1. Apparently I don't know how to use the else command. So, at some point a message will show up multiple times. GoNewOrder

This is probably due to a feature/bug where sometimes multiple "unit destroyed" triggers are generated for a single destruction. I'll take a look at it.

Quoting: palefire
2. Obviously I have no idea how to place the units. So, sometimes you start right next to the FCS.

Assign ParaX and ParaY values to its team, team 5. Place these far away from the character's starting point.

Offline palefire

  • Full Member
  • ***
  • Posts: 187
    • View Profile
How to Create an Arena Mission
« Reply #17 on: January 16, 2007, 08:24:36 PM »
Yet Another Senseless Sceneario
1. The rational is simple. They destroy your blockade to let their force in. You destroy their blockade to let your force in.  So this time the problem is not the bugs (I think), but the rationality of the scene. Space beneath the city is quite disturbing, that's like gundam colony; I don't know if gearhead spinner is like that.

2. Actually I didn't want them  to rush in at once, I'd like them to come in waves but I don't know how to do that. Maybe set up a counter, and use 5min <wmecha> ... but how to stop it?  And to simulate the fighting outside, make each wave smaller. (I think it is impossible to insert damaged mechs, is it?)
  Also, they just sneak in there if the threat value is too small, can't tell if there's really a reinforcement or not.... I mean, popping out of nowhere and blending into the crowd. Managed to complete the mission many times with a freshly built basic character in a savin(bought with all of the starting funds).

ArenaMission
   name <Somebody set up us the bomb>
   requires <Military>
   desc <War was beginning. Take off every mech!! You know what you doing. Move mech!! For great justice.>

   MapWidth 50
   MapHeight 50

   PayRate 400

   CityMap
   IndustrialTiles

   Element1 <Faction Military Enemy>
   Element2 <Faction Ally>

   % L1 = Initialization Counter
   % L2 = Victory Counter
   Start <if= L1 0 Alert 1 L= 1 1>
   nu1 <if= T1 0 if= L2 0 L= 2 1 Alert 2 LoseArenaMission Print 2>
   nu2 <if= T2 0 if= L2 0 Salvage Return XPV 100 L= 2 1 Alert 3 WinArenaMission Print 3>
   nu3 <if= T3 0 Print 4 Wmecha 2 Threat ArenaRenown 1600 Alert 6>
   nu5 <if= T5 0 Print 5 Wmecha 4 Threat ArenaRenown 1600>

   Msg1 <Enemy inflitrators have blown open a hole right in the middle of the city! Strange interference is

causing malfunctions to most of our mechs! Destroy the inflitrators before they could destroy the blockage or face

the entire army of the invader!>
   Msg2 <The mission is a failure.>
   Msg3 <The mission is a success.>
   Msg4 <The barrier is broken. Enemy mechs are rushing into the city.>
   Msg5 <The interference is gone. Our allies are able to fight again.>
   Msg6 <How are you, gentlemen!! You are on the way to destruction. You have no chance to survive. Make your

time. Ha! ha! ha!>

   sub
      Team 1
      SetEnemy 2
      SetAlly 3 4
      Home <Deployzone>

      Team 2
      SetEnemy 1 3
      SetAlly 5
      Deploy <SetSelfFaction M1   WMecha 2 Threat ArenaRenown 400>
      Home <Hole>

      Team 3
      Home <Hole>
      SetEnemy 2
      Setally 1 4

      Team 4
      SetEnemy 2
      Setally 1 3
      Deploy <SetSelfFaction M2   WMecha 4 Threat ArenaRenown 50>
      Home <Deployzone>      

      Team 5

      Rect
      Name <Hole>
      width 4
      height 4
      Floortype 23

      Rect
      Name <Deployzone>
      width 2
      height 2
      Floortype 21
   end
   inv
      Prop 20
      SetTeam 3
      Scale 2
      Name <Emergency Patching Unit>
      
      Prop 20
      SetTeam 3
      Scale 2
      Name <Emergency Patching Unit>   

      Prop 20
      SetTeam 3
      Scale 2
      Name <Emergency Patching Unit>

      Prop 20
      SetTeam 3
      Scale 2
      Name <Emergency Patching Unit>   

      Prop 30
      SetTeam 5
      Scale 2
      Name <Mr. Heavy Myomer>
      sdl_sprite <cha_m_host.png>
      desc <"Heavy Myomer Muscles replaces conventional muscles with a technologically-improved

biomaterial." Lots of birds are flying around this ... thing.>

      Prop 30
      SetTeam 5
      Scale 2
      Name <Miss Perfect Pitch>
      sdl_sprite <cha_f_hostess.png>
      desc <"Cyber Ears improves the perception of sound, but Perfect Pitch improves the sensibility."

Lots of birds are flying around this ... thing.>
      
      Prop 30
      SetTeam 5
      Scale 2
      Name <First Froggy>
      sdl_sprite <monster_frog.png>
      desc <For some strange reason, this is an advertisement of a mountainside resort. Lots of birds

are flying around this ... thing.>

   end

Offline Joseph Hewitt

  • Administrator
  • Hero Member
  • *****
  • Posts: 2521
    • View Profile
    • http://www.gearheadrpg.com
How to Create an Arena Mission
« Reply #18 on: January 30, 2007, 10:00:05 PM »
I've added "A Waltz for Three" to the missions list. I'll try out the other missions later.

Anyone else game for trying their hand at this?

Offline palefire

  • Full Member
  • ***
  • Posts: 187
    • View Profile
How to Create an Arena Mission
« Reply #19 on: January 30, 2007, 10:43:15 PM »
Urgh, you may have to downtone the threat value a bit for those missions. I tested them with freshly built green and expereinced units. I tried three-sided battle at Ace level and has to wait two minutes each round to see them fight it out.  

I am sure everyone else know this: moving the default arena files out of the directory will make it easier to test your missions. Changes don't take effect until your arena unit loads the mission again, i.e. you have exhausted the missions stored in your arena unit GHU save files. Took me some time to realize this.

Also, even though the Alert box is quite big, there's a word limit to the message, you can only fill in about half of the box. I think it would be nice if you can show pictures in messages.

Offline JohnnyDmonic

  • Hero Member
  • *****
  • Posts: 627
    • View Profile
How to Create an Arena Mission
« Reply #20 on: March 26, 2007, 10:29:03 PM »
Squee!

*happiness is a new world to mod*

Offline Francisco Munoz

  • Sr. Member
  • ****
  • Posts: 400
    • View Profile
    • http://www.wesnoth.org
How to Create an Arena Mission
« Reply #21 on: April 04, 2007, 04:34:16 PM »
This is 2 additional arena missions.. all for police factions... capture unaligned bandits. A gang of mecha robbers who give you extra reward but no salvage and named bandit with salvage (and maybe an themed mecha)
(added another 2 versions placed on earth)

ARENAMISSION_Police.txt (<- file)
===========================

ArenaMission
   name <Wanted Bandit Asteroid Hideout>
   requires <police L5PAT -!Ne>
   desc <The asteroid hideout of a wanted criminal, %name1%, has been found.>

   AsteroidMap
   RockyTiles
   Vacuum

   MapWidth 50
   MapHeight 50

   PayRate 400

   Element1 <Prefab>

   % L1 = Initialization Counter
   % L2 = Victory Counter
   Start <if= L1 0 ForceChat M1 L= 1 1>
   nu1 <if= T1 0 if= L2 0 L= 2 1 Alert 2 LoseArenaMission Print 2>
   nu2 <if= T2 0 if= L2 0 Salvage Return XPV 100 L= 2 1 Alert 3 WinArenaMission Print 3>

   Msg1 <Enemy mecha have been spotted. Eliminate them all.>
   Msg2 <The mission is a failure.>
   Msg3 <The mission is a success.>

   sub
      Team 1
      SetEnemy 2
      ParaX 5
      ParaY 15

      Team 2
      SetEnemy 1
      Deploy <WMecha 2 Threat ArenaRenown 200>
      ParaX 45
      ParaY 35

      Persona 1
      Greeting <if= V1 1 else GoGreet EndChat Say 1>
      *GoGreet <*BattleChallenge GoThemeInfo GoThemeInfo>
      *GoThemeInfo <*THEME_EXPO&Enemy GoStartCombat>
      GoStartCombat <V= 1 1>
      Msg1 <You never catch me alive!>
   end
   inv
      NPC Bandit
      SetTeam 2
      %% Normal criminal...no large faction
   end

ArenaMission
   name <Wanted Bandit Hideout>
   requires <Police EARTH -!Ne>
   desc <The hideout of a wanted criminal, %name1%, has been found.>

   WildMap

   MapWidth 50
   MapHeight 50

   PayRate 400

   Element1 <Prefab>

   % L1 = Initialization Counter
   % L2 = Victory Counter
   Start <if= L1 0 ForceChat M1 L= 1 1>
   nu1 <if= T1 0 if= L2 0 L= 2 1 Alert 2 LoseArenaMission Print 2>
   nu2 <if= T2 0 if= L2 0 Salvage Return XPV 100 L= 2 1 Alert 3 WinArenaMission Print 3>

   Msg1 <Enemy mecha have been spotted. Eliminate them all.>
   Msg2 <The mission is a failure.>
   Msg3 <The mission is a success.>

   sub
      Team 1
      SetEnemy 2
      ParaX 5
      ParaY 15

      Team 2
      SetEnemy 1
      Deploy <WMecha 2 Threat ArenaRenown 200>
      ParaX 45
      ParaY 35

      Persona 1
      Greeting <if= V1 1 else GoGreet EndChat Say 1>
      *GoGreet <*BattleChallenge GoThemeInfo GoThemeInfo>
      *GoThemeInfo <*THEME_EXPO&Enemy GoStartCombat>
      GoStartCombat <V= 1 1>
      Msg1 <You never catch me alive!>
   end
   inv
      NPC Bandit
      SetTeam 2
      %% Normal criminal...no large faction
   end
   


ArenaMission
   name <Bandit Gang Asteroid Hideout>
   %Easier no bandit but no salvage
   requires <Police L5PAT>
   desc <The asteroid hideout of a mecha robbers gang has been found. There is a good reward for their capture but no salvage allowed.>

   AsteroidMap
   RockyTiles
   Vacuum

   MapWidth 50
   MapHeight 50

   PayRate 600

   Element1 <Prefab>

   % L1 = Initialization Counter
   % L2 = Victory Counter
   Start <if= L1 0 ForceChat M1 L= 1 1>
   nu1 <if= T1 0 if= L2 0 L= 2 1 Alert 2 LoseArenaMission Print 2>
   nu2 <if= T2 0 if= L2 0 Return XPV 100 L= 2 1 Alert 3 WinArenaMission Print 3>

   Msg1 <Enemy mecha have been spotted. Eliminate them all.>
   Msg2 <The mission is a failure.>
   Msg3 <The mission is a success.>

   sub
      Team 1
      SetEnemy 2
      ParaX 5
      ParaY 15

      Team 2
      SetEnemy 1
      Deploy <WMecha 2 Threat ArenaRenown 300>
      ParaX 45
      ParaY 35

   end

ArenaMission
   name <Bandit Gang Hideout>
   %Easier no bandit but no salvage
   requires <Police EARTH>
   desc <The hideout of a mecha robbers gang has been found. There is a good reward for their capture but no salvage allowed.>

   WildMap

   MapWidth 50
   MapHeight 50

   PayRate 600

   Element1 <Prefab>

   % L1 = Initialization Counter
   % L2 = Victory Counter
   Start <if= L1 0 ForceChat M1 L= 1 1>
   nu1 <if= T1 0 if= L2 0 L= 2 1 Alert 2 LoseArenaMission Print 2>
   nu2 <if= T2 0 if= L2 0 Return XPV 100 L= 2 1 Alert 3 WinArenaMission Print 3>

   Msg1 <Enemy mecha have been spotted. Eliminate them all.>
   Msg2 <The mission is a failure.>
   Msg3 <The mission is a success.>

   sub
      Team 1
      SetEnemy 2
      ParaX 5
      ParaY 15

      Team 2
      SetEnemy 1
      Deploy <WMecha 2 Threat ArenaRenown 300>
      ParaX 45
      ParaY 35
   end

Offline palefire

  • Full Member
  • ***
  • Posts: 187
    • View Profile
How to Create an Arena Mission
« Reply #22 on: April 07, 2007, 10:26:50 AM »
Is it possible to bomb the scene in mecha scale combat? I mean, explosions that are either random or targeted created by a source outside the scene with artillery support, ICBM, Colony Laser, Solar Wind, Bahamut, whatever. When Gundams go to war in space, there's always those laser fire and explosions in the background.

Offline Francisco Munoz

  • Sr. Member
  • ****
  • Posts: 400
    • View Profile
    • http://www.wesnoth.org
How to Create an Arena Mission
« Reply #23 on: April 07, 2007, 02:47:27 PM »
Check the asteroid hit random stuff at RANCON_Default.txt

Offline palefire

  • Full Member
  • ***
  • Posts: 187
    • View Profile
How to Create an Arena Mission
« Reply #24 on: April 07, 2007, 06:28:59 PM »
Well, I tried using the BOMB command in my arena script but nothing shows up.

Correction: Using the debug # to execute it multiple times, I realize that there's indeed a explosion somewhere; it's simply off screen and didn't hit anything when I tested my arena script. So, what other parameters can the BOMB command use? Can I change the shape of the explosion to LINE and simulate colony laser?

Offline alias

  • Jr. Member
  • **
  • Posts: 60
    • View Profile
How to Create an Arena Mission
« Reply #25 on: February 14, 2009, 09:39:04 PM »
Necropost on a still-relevant topic, fleshing out the arena mission files.  I'm not sure I grasp all this because it isn't quite as simple/straightforward as the item description codes.
One thing I'm curious about is coding a wargame scenario where our damage is all turned to paint and there's no risk of damage, fatality or loss of reputation but also no rewards.  You would of course do this either against your own faction or an allied one.  This is deceptively simple because you still need some system for handling terrain damage plus effects like rust, burn, experimental and all the rest.
I'm also hopeful I'll get to buy mecha repair supplies and other SF:0 stuff in my mechs at some point and maybe even install cybernetics into my pilots but I understand this isn't where the developmental focus is right this moment.

Debug the following mission data as necessary please, someone with the required competence.
P.S. Yes I DO have something against round/even numbers, them and the dentists both....

----------------------

ArenaMission
   name <Defend The Hospital>
   requires <*REWARD -!Ne>
   desc <Our hospital station is under attack by %name1% and %name2%. Defend our wounded!>

   MapWidth 91
   MapHeight 91

   PayRate 737

   SpaceMap
   terrain <SPACE>
   SpaceScroll
   Microgravity
   Vacuum
   SpaceBackdrop

   Element1 <Faction Enemy>
   Element2 <Faction Enemy !Ally 1>

   % L1 = Initialization Counter
   % L2 = Victory Counter
   % L3 = Destroy Base Counter
   Start <if= L1 0  CommanderSays 1  L= 1 1>
   nu1 <if= T1 0 Return if= L2 0 L= 2 1 if= L3 0 else GoLoseMission if= T2 0 else GoLoseMission Goto GoWinMission>
   nu2 <if= T2 0 if= T4 0 if= T5 0 if= L2 0 L= 2 1 Return if= L3 1 else GoWinMission Goto GoLoseMission>
   nu3 <if= T3 0 if= L3 0 L= 3 1>
   nu4 <Goto nu2>
   nu5 <Goto nu2>

   GoWinMission <Salvage Alert 3 WinArenaMission XPV 327 AddMinorSkill 16 History 4>
   GoLoseMission <Alert 2 LoseArenaMission>

   Msg1 <Defend the base against enemy mecha.>
   Msg2 <The mission is a failure.>
   Msg3 <The mission is a success and you've saved many lives, the medical staff offer your unit training in life saving techniques.>
   Msg4 <You saved the lives of your fellow pilots at the hospital station.>

   sub
      Team 1
      SetEnemy 2 4
      SetAlly 3
      home <The Hospital Station>

      Team 2
      SetAlly 4 5
      SetEnemy 1 3
      Deploy <SetSelfFaction M1 WMecha 2 ArenaRenown 293>
      ParaX 9
      ParaY 31

      Team 3
      SetEnemy 2 4
      SetAlly 1
      home <The Hospital Station>

      Team 4
      SetAlly 2 5
      SetEnemy 1 3
      Deploy <SetSelfFaction M1 WMecha 4 ArenaRenown 311>
      ParaX 28
      ParaY 11
      
      Team 5
      SetAlly 2 4
      SetEnemy 1 3
      Deploy <SetSelfFaction M2 WMecha 5 ArenaRenown 499>
      ParaX 79
      ParaY 81

      rect
      name <The Hospital Station>
      MFX 45
      MFY 45
      sub
         SuperProp
         requires <*Fortress>
         SetTeam 3
      end
   end