MaxHit points or %Hitpoints

Mapping & modding Fallout Tactics and reviewing maps thereof.
User avatar
requiem_for_a_starfury
Hero of the Wastes
Hero of the Wastes
Posts: 1820
Joined: Tue Oct 29, 2002 11:13 am

MaxHit points or %Hitpoints

Post by requiem_for_a_starfury »

Hi there,

I'm trying to set up a medical facility where if the squad is wounded a doctor will appear to heal them, I'm not sure which condition to use though. 'If player has less than Maxhitpoints' or 'if player has less than %hitpoints' also do I use the total hitpoints of the whole squad because what happens when they level up?

I hope that makes sense, if anyone can help I'd be grateful. I've tried looking at other maps, but can't work out what the difference between the 2 conditions are.

Cheers

Requiem
If you can bear to hear the truth you've spoken
Twisted by knaves to make a trap for fools,
User avatar
OnTheBounce
TANSTAAFL
TANSTAAFL
Posts: 2257
Joined: Thu Apr 18, 2002 8:39 am
Location: Grafenwoehr, Oberpfalz, Bayern, Deutschland
Contact:

Post by OnTheBounce »

Max Hit Points is the maximum number of HP an entity can have, whereas "%hitpoints" (as the editors call it) is the Current Hit Points an entity has expressed as a percentage of its Max Hit Points.

So if you're looking for a trigger that will be tripped when an entity is wounded you'll need to use "%hitpoints". Using "Max Hit Points" will only take into consideration an entity's, team's, or player's Max Hit Points. The "%hitPoints" will also compensate for characters having gained levels. (I can't be believe you said "level up"! :lol: )

The problem with these triggers is that if you set up a team or player-based trigger you'll be figuring in the whole group. So be careful with this. (This is why you can't really set up triggers based on a single entity in the PC squad having a very high level in a specific skill.)

I can't remember, but I think I had problems w/the team/player-based triggers dealing w/"%hitpoints", and had to rely on Tag Names.

BTW, how are you going to have the medic show up to heal the PCs? Are you thinking of using a "Switch Player" trigger to give the PC control of a medic NPC who can then be used to heal the squad, perhaps?

OTB
"On the bounce, you apes! Do you wanna live forever?!"
User avatar
requiem_for_a_starfury
Hero of the Wastes
Hero of the Wastes
Posts: 1820
Joined: Tue Oct 29, 2002 11:13 am

Post by requiem_for_a_starfury »

OnTheBounce wrote:Max Hit Points is the maximum number of HP an entity can have, whereas "%hitpoints" (as the editors call it) is the Current Hit Points an entity has expressed as a percentage of its Max Hit Points.

So if you're looking for a trigger that will be tripped when an entity is wounded you'll need to use "%hitpoints". Using "Max Hit Points" will only take into consideration an entity's, team's, or player's Max Hit Points. The "%hitPoints" will also compensate for characters having gained levels. (I can't be believe you said "level up"! :lol: )
Well it was 4am over here when I posted :mrgreen:
OnTheBounce wrote:The problem with these triggers is that if you set up a team or player-based trigger you'll be figuring in the whole group. So be careful with this. (This is why you can't really set up triggers based on a single entity in the PC squad having a very high level in a specific skill.)

I can't remember, but I think I had problems w/the team/player-based triggers dealing w/"%hitpoints", and had to rely on Tag Names.

BTW, how are you going to have the medic show up to heal the PCs? Are you thinking of using a "Switch Player" trigger to give the PC control of a medic NPC who can then be used to heal the squad, perhaps?

OTB
Yeah I've got a series of medic's deactivated who will join the team whilst they are in the medical bay, each one with a limited amount of enhancers and drugs (to prevent the player from stripping them). They will deactivate once the player leaves the zone and the next time the player returns for healing the next medic in the sequence will appear.

Mmm I think I'll have to do it per tag name otherwise the player will have to take the whole squad into the medical bay for treatment. *Sigh* If only they had included a trigger to give the player hit points :(

Thanks for the help OTB. :)
If you can bear to hear the truth you've spoken
Twisted by knaves to make a trap for fools,
User avatar
OnTheBounce
TANSTAAFL
TANSTAAFL
Posts: 2257
Joined: Thu Apr 18, 2002 8:39 am
Location: Grafenwoehr, Oberpfalz, Bayern, Deutschland
Contact:

Post by OnTheBounce »

requiem_for_a_starfury wrote:Well it was 4am over here when I posted :mrgreen:
Well, I suppose under those circumstances it's forgiveable, at least just this once. I was afraid you'd been squatting in front of one of those infernal consoles and that it had rotted your vocabulary. :lol:
requiem_for_a_starfury wrote:Yeah I've got a series of medic's deactivated who will join the team whilst they are in the medical bay, each one with a limited amount of enhancers and drugs (to prevent the player from stripping them). They will deactivate once the player leaves the zone and the next time the player returns for healing the next medic in the sequence will appear.
Yes, that part about the stripping of medics had crossed my mind, too. Players can be so unscrupulous. :lol: Your idea sounds like it will work, although it will take a bit of scripting.
requiem_for_a_starfury wrote:Mmm I think I'll have to do it per tag name otherwise the player will have to take the whole squad into the medical bay for treatment. *Sigh* If only they had included a trigger to give the player hit points :(
Yes, not including the ability to have NPCs heal PCs is a major hampering when scripting missions. Notice that the medics in the Bunkers can't heal characters, nor can they remove radiation poisoning, etc. According to the speech text files in the game they were originally supposed to do this, but unfortunately it -- like many, many things -- was never implemented.

This caused me to have to scale back one of the ideas in my campaign, where the PCs encounter a secret society of dedicated healers. I had planned to have them able and willing to heal the PCs regardless of Reputation, the only thing that would have stopped them from doing it would be if the PCs attacked them. Then, if the PCs helped them out in a certain way a small number of medics (better than any available in the Recruit Pool up to that point) would be seconded to the BoS. Unfortunately only the latter option exists now. :(
requiem_for_a_starfury wrote:Thanks for the help OTB. :)
No problem!

Cheers,

OTB
"On the bounce, you apes! Do you wanna live forever?!"
User avatar
requiem_for_a_starfury
Hero of the Wastes
Hero of the Wastes
Posts: 1820
Joined: Tue Oct 29, 2002 11:13 am

Post by requiem_for_a_starfury »

OnTheBounce wrote:Well, I suppose under those circumstances it's forgiveable, at least just this once. I was afraid you'd been squatting in front of one of those infernal consoles and that it had rotted your vocabulary. :lol:
Heh I bought a Playstation back in 1998 and it's gathering dust somewhere in my spare room, never could find any games that I liked for it. These days the only thing rotting my vocabulary is all the American & Canadian TV programs we get shown over here. :)
OnTheBounce wrote:Yes, that part about the stripping of medics had crossed my mind, too. Players can be so unscrupulous. :lol: Your idea sounds like it will work, although it will take a bit of scripting.
Seems like everything I want to do takes a lot of scripting, I plan my maps to be as simple as possible but it never works out that way. :(
OnTheBounce wrote:Yes, not including the ability to have NPCs heal PCs is a major hampering when scripting missions. Notice that the medics in the Bunkers can't heal characters, nor can they remove radiation poisoning, etc. According to the speech text files in the game they were originally supposed to do this, but unfortunately it -- like many, many things -- was never implemented.
Yeah there are a whole lot of things in the speech files that they didn't implement, I wonder if it was due to lack of time or they just couldn't get them to work? The fact that they invented the microsledge so that they wouldn't have to create new animations for the character sprites makes me think the former.
OnTheBounce wrote:This caused me to have to scale back one of the ideas in my campaign, where the PCs encounter a secret society of dedicated healers. I had planned to have them able and willing to heal the PCs regardless of Reputation, the only thing that would have stopped them from doing it would be if the PCs attacked them. Then, if the PCs helped them out in a certain way a small number of medics (better than any available in the Recruit Pool up to that point) would be seconded to the BoS. Unfortunately only the latter option exists now. :(
Hmm sounds interesting, a secret society or a religious order? A society of dedicated healers sounds like a monastic order, sorry I've just finished reading St Leibowitz and the Wild Horsewoman got monks on the brain .:angel:

Really looking forward to your campaign.
If you can bear to hear the truth you've spoken
Twisted by knaves to make a trap for fools,
User avatar
PaladinHeart
Strider
Strider
Posts: 747
Joined: Sun Feb 02, 2003 5:28 am
Contact:

How about this healing idea?

Post by PaladinHeart »

How about this?

Make a new healing item entity. Name it health ray or something. Maybe whatever those automatic doc things were in the earlier FO games.

Then make a trigger where if it is in location X (just outside the room) that it is placed back where it was, within a box or such. And have the trigger refresh.

I know, its a pretty lame option but if you want to have a way of healing your guys w/o too much work I think this might be the simplest option.

Yeah I know players are just too unscrupulous ;-)

Hmm.. I wonder.. Hey im gonna go fiddle with the entity editor and see if I can figure out something :)
User avatar
PaladinHeart
Strider
Strider
Posts: 747
Joined: Sun Feb 02, 2003 5:28 am
Contact:

Negative damage

Post by PaladinHeart »

Another solution is to make a deathtrap that does -1 damage every second or so. Then after placing it on your map you simply have trigger deactivate it whenever a unit with 100% or more hit points enters its area.

This can also be useful for healing specific entities. Meaning you could have say.. a turret that keeps repairing itself until you destroy some nearby capacitors or something.
User avatar
requiem_for_a_starfury
Hero of the Wastes
Hero of the Wastes
Posts: 1820
Joined: Tue Oct 29, 2002 11:13 am

Re: Negative damage

Post by requiem_for_a_starfury »

[TBC]-PaladinHeart wrote:Another solution is to make a deathtrap that does -1 damage every second or so. Then after placing it on your map you simply have trigger deactivate it whenever a unit with 100% or more hit points enters its area.

This can also be useful for healing specific entities. Meaning you could have say.. a turret that keeps repairing itself until you destroy some nearby capacitors or something.
I've tried the healing deathtrap option, but it didn't do anything. I set it to fire when ever you talked to the doctor, but there was no result : ( For testing purposes I changed the amount of hitpoints the deathtrap would take away back to a positive amount, then it worked fine.
[TBC]-PaladinHeart wrote:Make a new healing item entity. Name it health ray or something. Maybe whatever those automatic doc things were in the earlier FO games.

Then make a trigger where if it is in location X (just outside the room) that it is placed back where it was, within a box or such. And have the trigger refresh.
Do you mean a reusable type of stimpak? AFAIK there's a problem with the give to npc and give to player triggers, they won't move multiples of the same item nor will they affect any item the player has equipped. So if the player still has the healing item in someone's hand slot's, it won't be returned to the medical bay.
If you can bear to hear the truth you've spoken
Twisted by knaves to make a trap for fools,
User avatar
OnTheBounce
TANSTAAFL
TANSTAAFL
Posts: 2257
Joined: Thu Apr 18, 2002 8:39 am
Location: Grafenwoehr, Oberpfalz, Bayern, Deutschland
Contact:

Re: Negative damage

Post by OnTheBounce »

requiem_for_a_starfury wrote:I've tried the healing deathtrap option, but it didn't do anything.
Damn! I thought that a way to simulate Robot Repair Bays had been found... :(

OTB
"On the bounce, you apes! Do you wanna live forever?!"
User avatar
Red
Hero of the Glowing Lands
Hero of the Glowing Lands
Posts: 2085
Joined: Wed May 15, 2002 11:58 am
Location: Nowhere (important anyway)
Contact:

Post by Red »

auto-docs were how they were called.
...
User avatar
requiem_for_a_starfury
Hero of the Wastes
Hero of the Wastes
Posts: 1820
Joined: Tue Oct 29, 2002 11:13 am

Re: Negative damage

Post by requiem_for_a_starfury »

OnTheBounce wrote:Damn! I thought that a way to simulate Robot Repair Bays had been found... :(

OTB
Don't be so despondent OTB : )

Perhaps someone else has got it working, after all zones and hitpoint triggers aren't my strongest point. : )
If you can bear to hear the truth you've spoken
Twisted by knaves to make a trap for fools,
User avatar
OnTheBounce
TANSTAAFL
TANSTAAFL
Posts: 2257
Joined: Thu Apr 18, 2002 8:39 am
Location: Grafenwoehr, Oberpfalz, Bayern, Deutschland
Contact:

Post by OnTheBounce »

Red wrote:auto-docs were how they were called.
I'm not talking about Auto-Docs, Red. There is a sprite for something called a "Robot Repair Bay" in FoT along w/the option to set an entity's sound to "Robot Repair Bay". Evidently the designers were thinking of allowing the 'Bots to use these in lieu of medics. (Medics themselves were never implemented for either the BoS Bunkers, or the enemy, unfortunately.)
requiem_for_a_starfury wrote:Don't be so despondent OTB : )

Perhaps someone else has got it working, after all zones and hitpoint triggers aren't my strongest point. : )
:lol: I'm not despondent, RfaSf. But I do have a mission that takes the players to a high-tech storage facility, and it will be much better than it currently is if I can find a way to simulate an automated repair system. If this can be done, it will be no big deal to set it up so that the PCs can shut the thing down one way or another, too.

OTB
"On the bounce, you apes! Do you wanna live forever?!"
User avatar
requiem_for_a_starfury
Hero of the Wastes
Hero of the Wastes
Posts: 1820
Joined: Tue Oct 29, 2002 11:13 am

Post by requiem_for_a_starfury »

OnTheBounce wrote: :lol: I'm not despondent, RfaSf. But I do have a mission that takes the players to a high-tech storage facility, and it will be much better than it currently is if I can find a way to simulate an automated repair system. If this can be done, it will be no big deal to set it up so that the PCs can shut the thing down one way or another, too.OTB
: ) To be honest OTB I've not really done much with deathtraps recently, it was the first time I tried mapping, about 8 months ago, that I played around with them and I can't honestly be sure that I got them working at all, either way. I do remember though that I never could get weapons to do negative damage, I had an idea for turning the pacification bot into a repair bot who would trundle around fixing robots on the battlefield.

Has anyone had any luck with negative numbers in the entity editor?
If you can bear to hear the truth you've spoken
Twisted by knaves to make a trap for fools,
User avatar
PaladinHeart
Strider
Strider
Posts: 747
Joined: Sun Feb 02, 2003 5:28 am
Contact:

Negative Numbers

Post by PaladinHeart »

As I have said before I don't post something on here unless I got it to work. If you're not having luck with the deathtrap then perhaps you didn't activate it? It has to be activated, just like a trap.

The problem I had with it was that the trap kept healing regardless of the max HP! So my guy just kept getting more and more HP. So you'll need a trigger that turns it off at 100% HP.You'll also need to refresh the triggers.

It is indeed possible. You just have to fiddle with the triggers a bit. If your deathtrap isn't "hurting" the character (they look like they're being hit or something) then you've not done the deathtrap itself correctly.

It might also be possible that your deathtrap wasn't doing enough negative damage? Can armor resist negative damage?.. hmmm...
User avatar
PaladinHeart
Strider
Strider
Posts: 747
Joined: Sun Feb 02, 2003 5:28 am
Contact:

Shields

Post by PaladinHeart »

Another idea for this is that you have a shield that gives you 500 more life at 100% life and fully heals the character. Perhaps only if you have a certain armor etc.. on?

As for items equipped not working with the tagged items. There is a trigger that covers equipped tagged items too. You just have to cover every option that the player might think of doing.
User avatar
requiem_for_a_starfury
Hero of the Wastes
Hero of the Wastes
Posts: 1820
Joined: Tue Oct 29, 2002 11:13 am

Re: Shields

Post by requiem_for_a_starfury »

[TBC]-PaladinHeart wrote:Another idea for this is that you have a shield that gives you 500 more life at 100% life and fully heals the character. Perhaps only if you have a certain armor etc.. on?

As for items equipped not working with the tagged items. There is a trigger that covers equipped tagged items too. You just have to cover every option that the player might think of doing.
I was refering to the give item to npc command, i.e when you want to get rid of the starting items at the begining of the campaign. If the character had the items equipped they wouldn't be passed to the npc off screen. To get rid of the armour I had to duplicate the leather armour entity and turn the original into raider armour so that the character didn't start out wearing it. The same with the mp5 if the character started with it equipped it wouldn't get taken away, but if the player chose other than the small arms skill so that they started with the mp5 in their inventory but not in their hand then it disappeared as planned.

[TBC]-PaladinHeart wrote:As I have said before I don't post something on here unless I got it to work. If you're not having luck with the deathtrap then perhaps you didn't activate it? It has to be activated, just like a trap.
It was 8 months ago I can't remember exactly what I did or didn't do, all I remember was that any weapon, trap set to do negative damage didn't do anything that I tried it to do. To be honest I prefer the medical orderly temporarily joining your team, it seems more personal than having a working autodoc. IMHO there's too much working tech in FOT as it is : )
If you can bear to hear the truth you've spoken
Twisted by knaves to make a trap for fools,
User avatar
OnTheBounce
TANSTAAFL
TANSTAAFL
Posts: 2257
Joined: Thu Apr 18, 2002 8:39 am
Location: Grafenwoehr, Oberpfalz, Bayern, Deutschland
Contact:

Re: Negative Numbers

Post by OnTheBounce »

[TBC]-PaladinHeart wrote:If you're not having luck with the deathtrap then perhaps you didn't activate it? It has to be activated, just like a trap.
Yes, TBC-Ph is right. You have to set the Object Script State (OSS) of a Death Trap if you want it to work.
[TBC]-PaladinHeart wrote:The problem I had with it was that the trap kept healing regardless of the max HP! So my guy just kept getting more and more HP. So you'll need a trigger that turns it off at 100% HP.You'll also need to refresh the triggers.
Yes, using Zone and %HP triggers you could toggle the OSS of your Death (Health?) Trap. Simply tick/check "Preserve" for those triggers and you're in business.
[TBC]-PaladinHeart wrote:Can armor resist negative damage?
I don't know. In the case of what I'm trying to do (Robot Repairs) setting the damage to Electric would solve that problem since 'bots have a negative resistance to that type of damage...oh yeah, real possiblities!

I guess I know what I'll be doing tomorrow evening... :lol:

OTB
"On the bounce, you apes! Do you wanna live forever?!"
User avatar
requiem_for_a_starfury
Hero of the Wastes
Hero of the Wastes
Posts: 1820
Joined: Tue Oct 29, 2002 11:13 am

Re: Negative Numbers

Post by requiem_for_a_starfury »

OnTheBounce wrote: Yes, TBC-Ph is right. You have to set the Object Script State (OSS) of a Death Trap if you want it to work.
Cheers OTB, I set up a test map to try it out and was just about to ask TBC-PH what they meant as there is no activation box to tick like mines.

Edit Damn still can't get it to work, must be doing something wrong with the OSS. Oh well never mind, I don't have a need for it in my current map, which is complicated enough as is. : )
If you can bear to hear the truth you've spoken
Twisted by knaves to make a trap for fools,
User avatar
PaladinHeart
Strider
Strider
Posts: 747
Joined: Sun Feb 02, 2003 5:28 am
Contact:

Aha!

Post by PaladinHeart »

So that's what you're doing wrong. You have to activate it with a trigger. Give the deathtrap a tag name and then use a trigger to activate it. That should solve your problem.

This has a lot of interesting potential.
User avatar
requiem_for_a_starfury
Hero of the Wastes
Hero of the Wastes
Posts: 1820
Joined: Tue Oct 29, 2002 11:13 am

Re: Aha!

Post by requiem_for_a_starfury »

[TBC]-PaladinHeart wrote:So that's what you're doing wrong. You have to activate it with a trigger. Give the deathtrap a tag name and then use a trigger to activate it. That should solve your problem.

This has a lot of interesting potential.
Ah but I must have the triggers set up wrong cause I still can't get it to work. Anyone know where the deathtraps are used in the campaign or in anyone's custom maps?

Nevermind, I'm not going to use it anyway, on a seperate note, this map is turning out to be total crap, I think I'll stick to making combat orientated maps in the future. I'll leave the rpg's to other people.
If you can bear to hear the truth you've spoken
Twisted by knaves to make a trap for fools,
Our Host!
Post Reply