Increased Health?

Tutorials and discussions about Mapping - Introduce your own ones!
Post Reply
Loose Cannon
Skilled
Posts: 165
Joined: Tue Jan 19, 2016 4:17 am

Increased Health?

Post by Loose Cannon »

Hello everyone,

I'm making a particular map where I'd like the max health to go above 199. I looked around on the map's level properties, but didn't find where I could change it. Can someone direct me on how to increase 1 maps maximum health beyond 199? If it is even possible that is....

Thanks, LC
User avatar
Barbie
Godlike
Posts: 2802
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Increased Health?

Post by Barbie »

IMO this cannot be done by pure mapping. In GameInfo.RestartPlayer() you'll find

Code: Select all

aPlayer.Health = aPlayer.Default.Health;
and Pawn's Default value is 100. So you have to write an embedded Mutator that changes either Player.Default.Health or overrides GameInfo.RestartPlayer().

The value of Health=199 comes from TournamentHealth.uc:

Code: Select all

if (bSuperHeal) HealMax = Min(199, HealMax * 2.0);
You can create a sub object of it and change these lines. Or use the "bPak.u" package, which includes a BHealthPack with a healing amount of 1500. (I just saw in the code that the BHealthPack.HealingAmount property is useless: the health is always increased by 1500 (until the maximum of 5000) regardless of that property setting.)
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
UTX
Skilled
Posts: 214
Joined: Fri Aug 28, 2015 3:39 am

Re: Increased Health?

Post by UTX »

Barbie is right, it's not the map or the pawns but the pickups that limit health to 199.
Loose Cannon
Skilled
Posts: 165
Joined: Tue Jan 19, 2016 4:17 am

Re: Increased Health?

Post by Loose Cannon »

Thanks Barbie, but you and you're mapping/coding are out of my league! :P :shock:

In the same line of mapping....I'm changing the "blue" liquid inside a health vial into a gold liquid and making it +10 (no problem). I'm trying to change the message when you pick it up from "you picked up a health vial +5" to "you picked up a super vial +10" under the health vial properties / inventory / pickup message. It says it in the property line, but won't display it on the screen when picked up during gameplay. Any ideas why?

Thanks!
UTX
Skilled
Posts: 214
Joined: Fri Aug 28, 2015 3:39 am

Re: Increased Health?

Post by UTX »

Show us how you're doing it, the default classes will make the message display the healing amount automatically.
Loose Cannon
Skilled
Posts: 165
Joined: Tue Jan 19, 2016 4:17 am

Re: Increased Health?

Post by Loose Cannon »

I'm just changing the text in the pick up message under the properties.... However it still says you picked up a health vial +5...

I did change it's property health increase to + 10 also.
Attachments
more prop.jpg
more prop.jpg (34.04 KiB) Viewed 2161 times
health vial.jpg
User avatar
Barbie
Godlike
Posts: 2802
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Increased Health?

Post by Barbie »

Loose Cannon wrote:Any ideas why?
Yep, short view coding of Epic. On pickup, TournamentHealth.PlayPickupMessage() is executed

Code: Select all

function PlayPickupMessage(Pawn Other) {
	Other.ReceiveLocalizedMessage( class'PickupMessageHealthPlus', 0, None, None, Self.Class );
}
Self.Class refers to HealthVial.
PickupMessageHealthPlus returns the following then:

Code: Select all

Class<Inventory>(OptionalObject).Default.PickupMessage $ Class<TournamentHealth>(OptionalObject).Default.HealingAmount;
where Class<TournamentHealth>(OptionalObject).Default.HealingAmount is the original HealthVial, not your modified one.

To get this working, just subclass HealthVial: Right click on it in Actor Browser, select "New...". For Package use "MyLevel" (it will be embedded in your map then) for Name something unique, eg "MyHealthVial". Then a code window opens - close it without changes. In the Actor Browser you'll find a new item below HealthVial with the above given name. Right click and select "Default Properties". Set "HealingAmount" to your desired value and close that window. Now add that new MyHealthVial to your map.
<EDIT>
Hint: If you don't add that new item to your map, it will be deleted if you save and reopen the map.
</EDIT>
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
EvilGrins
Godlike
Posts: 9695
Joined: Thu Jun 30, 2011 8:12 pm
Personal rank: God of Fudge
Location: Palo Alto, CA
Contact:

Re: Increased Health?

Post by EvilGrins »

For unknown reasons (to me anyway) the megahealth from Unreal1 doubles a players' default health... in a weird way. See the UT megahealth only boosts health to a max of 150 for all players, regardless of the model they're using's health.

Standard player has a default 100 health. The U1 megahealth can get them up to 200 health, but an SKtrooper's default health is 130 and the U1 gets that up to 260.

So, I'd suggest setting up Unreal1 megahealths on your map.
http://unreal-games.livejournal.com/
Image
medor wrote:Replace Skaarj with EvilGrins :mrgreen:
Smilies · viewtopic.php?f=8&t=13758
User avatar
sektor2111
Godlike
Posts: 6410
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Increased Health?

Post by sektor2111 »

EvilGrins wrote:For unknown reasons (to me anyway) the megahealth from Unreal1 doubles a players' default health... in a weird way
For for know reasons to me default DM replaces everything with TournamentPickup-s. Not everything is MH.
This problem, it's not "configurable", it do needs a few script lines written else won't be recorded changes in messages. Also we have Net Code missing... example me, by doing an universal health replacement, pickup message stays original, won't be copied as mesh and everything so you'll need a new class.

As mentioned above, old items (if you play another DM type) are configurable with bSuperHeal or such able to go at 200 + a good healing amount.
User avatar
EvilGrins
Godlike
Posts: 9695
Joined: Thu Jun 30, 2011 8:12 pm
Personal rank: God of Fudge
Location: Palo Alto, CA
Contact:

Re: Increased Health?

Post by EvilGrins »

sektor2111 wrote:Not everything is MH.
Indeed. I've known about this since before MonsterHunt was (Gods Above, I'm old) created.
http://unreal-games.livejournal.com/
Image
medor wrote:Replace Skaarj with EvilGrins :mrgreen:
Smilies · viewtopic.php?f=8&t=13758
Loose Cannon
Skilled
Posts: 165
Joined: Tue Jan 19, 2016 4:17 am

Re: Increased Health?

Post by Loose Cannon »

That worked Barbie!! Thanks so much! :tu: :gj: Now if we could just go beyond 199 health.
User avatar
Barbie
Godlike
Posts: 2802
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Increased Health?

Post by Barbie »

Loose Cannon wrote:Now if we could just go beyond 199 health.
I see no way there without coding. Or use a already coded package.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
Post Reply