Author Topic: (GH2) Space Suit Optional?  (Read 1299 times)

Offline Burzmali

  • Sr. Member
  • ****
  • Posts: 399
    • View Profile
(GH2) Space Suit Optional?
« on: January 10, 2008, 07:29:24 AM »
While I haven't exhaustively checked in the game, I've noticed that there doesn't seem to be any code penalizing a character for walking around a hard vacuum in their skivvies.  Am I missing something, or is the only use for the "sealed" intrinsic to block GAS attacks?

Offline Francisco Munoz

  • Sr. Member
  • ****
  • Posts: 401
    • View Profile
    • http://www.wesnoth.org
(GH2) Space Suit Optional?
« Reply #1 on: January 10, 2008, 08:26:54 AM »
You are wrong.
You get damage if you are not in a sealed suit (or being a sealed creature)
Check arenaplay.pp
         NAV_Vacuum:    begin
               FX_String := '1 DAMAGE 10 0 ArmorIgnore GasAttack NoMetal CanResist';
               FX_Desc   := MsgString( 'ENVIRO_VACUUM' );
               end;

Offline Onisuzume

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 562
    • View Profile
(GH2) Space Suit Optional?
« Reply #2 on: January 10, 2008, 09:25:21 AM »
Yup, though being inside a mecha while waltzing around in vacuum makes you immune to it... as long as you stay inside the mecha.

Offline Burzmali

  • Sr. Member
  • ****
  • Posts: 399
    • View Profile
(GH2) Space Suit Optional?
« Reply #3 on: January 10, 2008, 09:34:32 AM »
True, but following the chain of events:

arenaplay.pp:CombatMain( Camp: CampaignPtr );
arenacfe.pp:MassEffectFrontEnd( GB: GameBoardPtr; FX_String,FX_Desc: String );
effects.pp:MassEffectString( GB: GameBoardPtr; FX_String,FX_Desc: String );

   { Loop through all the models on the board, and apply the effect against them. }
   M := GB^.Meks;
   while M <> Nil do begin
      if GearActive( M ) and OnTheMap( GB , M ) then DoEffectAgainstGear( GB , ER , M , 0 );
      M := M^.Next;
   end;


It would seem that "vacuum" effects are only applied to Meks, which are immune to gas effects by definition.

EDIT follow ups:
1. I realized that Meks might mean people too, but I'm not sure
2. The effect only seems to generate from Combat, does this mean float around outside of combat is okay?

Online Erathoniel

  • Hero Member
  • *****
  • Posts: 1122
    • View Profile
    • Kyle's Ideas
(GH2) Space Suit Optional?
« Reply #4 on: January 10, 2008, 03:13:35 PM »
In caves and whatnot you can suffer vacuum, but I don't know about deep space. Of course, if you're in deep space, and don't have a spacesuit, you may be doomed anyways. Food.

Offline Joseph Hewitt

  • Administrator
  • Hero Member
  • *****
  • Posts: 2552
    • View Profile
    • http://www.gearheadrpg.com
(GH2) Space Suit Optional?
« Reply #5 on: January 10, 2008, 09:07:02 PM »
Quoting: Onisuzume
Yup, though being inside a mecha while waltzing around in vacuum makes you immune to it... as long as you stay inside the mecha.

Correct. It's assumed that all mecha have sealed life support systems.

Quoting: Burzmali
I realized that Meks might mean people too, but I'm not sure

Oops... sorry, the legacy naming conventions are confusing. "Meks" is a list of everything on the game board: mecha, characters, doors, smoke, etc. "CombatMain" is the main game loop. There isn't a secondary procedure dedicated to combat, it all happens here.

In the beginning, GearHead only featured arena mode, but it wasn't like modern arena mode as there were no missions, just random violence. So, the main game loop got named "CombatMain" and the gears on the map got named "Meks". By the time the RPG campaign was added it would have been a pain in the arse to change things, so they've stayed the same. I should probably change them, though- it would take a lot of search-and-replace but wouldn't be too difficult. I've added this to the to-do list.

Speaking of CombatMain, I need to find a way to switch between clock mode and tactics mode in-game. Right now you need to restart a level (or save and reload, or otherwise exit the loop and then re-enter the other one) in order to switch modes. Tactics mode is good for fighting, and it would be great in the RPG campaign to be able to control all of your lancemates directly. Unfortunately, controlling them all individually while walking around town would be a pain. There should be a key to switch to tactics mode for combat then back to regular mode afterwards.

Offline Onisuzume

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 562
    • View Profile
(GH2) Space Suit Optional?
« Reply #6 on: January 10, 2008, 11:53:35 PM »
Why fix something that isn't broken?

Offline Joseph Hewitt

  • Administrator
  • Hero Member
  • *****
  • Posts: 2552
    • View Profile
    • http://www.gearheadrpg.com
(GH2) Space Suit Optional?
« Reply #7 on: January 11, 2008, 01:09:41 AM »
Because it makes things easier to read, and so easier for other people to understand. If GearHead were a closed source game it wouldn't matter at all, but since everybody can browse through the source I'd prefer to keep things as readable as possible.

Mind you, I wouldn't talk about fixing this if it were likely to take a lot of time or cause any problems. This is a nice little project to do sometime late at night when I'm too tired to do anything new but too active to just shut down.

Offline Burzmali

  • Sr. Member
  • ****
  • Posts: 399
    • View Profile
(GH2) Space Suit Optional?
« Reply #8 on: January 11, 2008, 05:49:25 AM »
What about when you are outside of "CombatMain"?  In particular I am thinking about when you eject from your mecha during combat.

Offline Francisco Munoz

  • Sr. Member
  • ****
  • Posts: 401
    • View Profile
    • http://www.wesnoth.org
(GH2) Space Suit Optional?
« Reply #9 on: January 11, 2008, 06:11:49 AM »
IIRC You die.. I have been there...
(I mean you start getting damage)

Offline Joseph Hewitt

  • Administrator
  • Hero Member
  • *****
  • Posts: 2552
    • View Profile
    • http://www.gearheadrpg.com
(GH2) Space Suit Optional?
« Reply #10 on: January 11, 2008, 06:47:38 AM »
Generally, the CombatMain loop can be exited in two ways: either the player quits the game, or leaves the gameboard (by exiting, ejecting, or dying). When you exit CombatMain, program control drops back to the Navigator loop. Assuming that you didn't die or quit the game, this loop immediately returns to CombatMain.

Offline Burzmali

  • Sr. Member
  • ****
  • Posts: 399
    • View Profile
(GH2) Space Suit Optional?
« Reply #11 on: January 11, 2008, 07:53:59 AM »
Ah, so the "overland" map is still handled as part of combatMain?

Offline Onisuzume

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 562
    • View Profile
(GH2) Space Suit Optional?
« Reply #12 on: January 11, 2008, 08:26:41 AM »
Which in turn means that large, SF3 or bigger battles could be fought there.
Quoting: JH
Correct. It's assumed that all mecha have sealed life support systems.

So an "open-topped" or "non-sealed" attribute could be added o override this.

I guess its probably possible to code it so that it then checks if the pilot wears a fully-sealed suit..

Still, would it be worth it?

Offline Burzmali

  • Sr. Member
  • ****
  • Posts: 399
    • View Profile
(GH2) Space Suit Optional?
« Reply #13 on: January 11, 2008, 09:14:01 AM »
Okay, I guess that settles my question.

On a related note, how hard would it be to make an armor add-on that "seals" a piece of armor?  I've picked up some pretty cool armor in wrecks, but since it wasn't sealed, I was hesitant to wear it.

Offline Francisco Munoz

  • Sr. Member
  • ****
  • Posts: 401
    • View Profile
    • http://www.wesnoth.org
(GH2) Space Suit Optional?
« Reply #14 on: January 11, 2008, 12:25:20 PM »
IIRC from my tests to desing gas masks and NBK overalls
...A sealed harness will make the body part wearing it sealed.
I could be wrong, so test it by yourself(no gh here)

HeadHarness 1
name <Gas Mask and Hood>
desc <A cheap and light transparent plastic mask and hood with an integrated rebreather that could be wear over your head>
Category <SPACE>
Factions <GENERAL>
Sealed
legality -5