Aller au contenu

Photo

how to permanently increase players HP


  • Veuillez vous connecter pour répondre
22 réponses à ce sujet

#1
el.sombrero

el.sombrero
  • Members
  • 100 messages
 Hey guys,

 Is there a way to increase players hp without leveling him up? I would like to have something like that which could be put on a trigger or an object (say, when the player walk over the holy simbol he is given 80 permanent HP or when he drinks from the holly grail he is given 80 permanent HP). 
 The only simmilar thing I could do was give temporary hit points to the player...  but I need a permanent solution, and it is fundamental that these extra HP appear at the avatars portrait.

thx!

#2
Lugaid of the Red Stripes

Lugaid of the Red Stripes
  • Members
  • 955 messages
You can set bonus hit-points as an object property.

#3
Dann-J

Dann-J
  • Members
  • 3 161 messages
Yes - an equipped creature hide with the property would be ideal, since unlike an effect it can't be removed easily.

#4
Guest_Iveforgotmypassword_*

Guest_Iveforgotmypassword_*
  • Guests
Or just a token/souvenier of the deed done that grants the hp. Make it plot, unswappable and leave it in their inventory.

#5
kamal_

kamal_
  • Members
  • 5 240 messages
Can also grant via feat if you want.

#6
el.sombrero

el.sombrero
  • Members
  • 100 messages
Hey guys!

Were do I edit the item to give it this property?
KAMAL, how could I grant it as feat... this option interests me most!

#7
Guest_Iveforgotmypassword_*

Guest_Iveforgotmypassword_*
  • Guests
In the properties tab of the item look for and select item properties, scroll down to bonus hitpoints and click it. Now it should say bonus hit points +1 on the left click that and select the bit that says costvalue and has just appeared on the right scroll down and decide how much to add then click it.

I advise using something that already gives a bonus when it's not equipped ( works when in the inventory ) and just deleting its bonuses, changing the tag, description, icon, making it plot and of course adding the hit point bonus.

#8
Dann-J

Dann-J
  • Members
  • 3 161 messages
If you don't want the player to be able to drop it, you might want to check the 'cursed' flag as well.

#9
kamal_

kamal_
  • Members
  • 5 240 messages

el.sombrero wrote...

Hey guys!

Were do I edit the item to give it this property?
KAMAL, how could I grant it as feat... this option interests me most!

You can add a feat via script, it's a stock function. Be warned it will make a pc fail validity checks, because the pc will have extra feats. But in your own module it shouldn't be an issue. The feat shows up on the character sheet, obviously, you can always make custom feats.

int FeatAdd( object oCreature, int iFeatId, int bCheckRequirements, int bFeedback=FALSE, int bNotice=FALSE );


There is an index of the feats here:
http://www.gamefaqs....ts-2/faqs/45639
or
http://nwn2.wikia.com/wiki/Givefeat

#10
el.sombrero

el.sombrero
  • Members
  • 100 messages
Hey guys... I'm trying the item method, but I have a problem... I would like that when the game started the player already had those extra 80 hp.
I created the item, but can't make the player start the game with it. Is it possible?
One solution I've thought about is to give the item through NPC. I've a small conversation/tutorial at the very beginning of the game, and using Aurora Toolset I've tried to write a script that gives the item to the pc at the moment the NPC sees him. The thing is Aurora asks me for the item ResRef, and I dont have the least idea what is the ResRef of the item I modified and were to find it. Anybody can help me out?

#11
Lugaid of the Red Stripes

Lugaid of the Red Stripes
  • Members
  • 955 messages
You can give them the item via script, either the on-module-loaded or the on-client-enter script for your particular start area.

#12
Dann-J

Dann-J
  • Members
  • 3 161 messages
You'll find the ResRef in the blueprint properties in the 'Items' section of the toolset. If you've copied an existing blueprint and modified it, then the new blueprint will have a ResRef almost the same as the old one, but with a zero at the end. If you make another copy, the toolset would add a one to the ResRef (then a two, and so on).

You might want to change the ResRef in the modified blueprint to something a bit easier to remember. There's a certain amount of logic to the existing codes, but it takes a while to decypher the naming conventions.

#13
el.sombrero

el.sombrero
  • Members
  • 100 messages
hey guys, what is the script line that makes a script work "on module load" or "on-client-enter"?
I just know the
void main()
{
object oPC = GetEnteringObject();

if(!GetIsPC(oPC)) return;

#14
Lugaid of the Red Stripes

Lugaid of the Red Stripes
  • Members
  • 955 messages
Those are events, not lines in a script. Go to the toolbar at the top of the screen, click view, then 'module properties'. Then open up the properties tab on the right, and you'll get the module properties. Scroll down and you'll see a set of fields to enter in the scripts, just like you would enter in the event scripts on a creature, area, or placeable.

#15
el.sombrero

el.sombrero
  • Members
  • 100 messages
thx

#16
el.sombrero

el.sombrero
  • Members
  • 100 messages
Guys,
I tried to give the item via script, both "on module load" and at a conversation, but both methods failed... I think its because I couldnt properly change the resref of the item I've modified. I've looked at the itens properties and couldn't find the "resref" field in it

#17
Dann-J

Dann-J
  • Members
  • 3 161 messages
I think it's called 'Template' or something similar in a blueprint.

#18
Lugaid of the Red Stripes

Lugaid of the Red Stripes
  • Members
  • 955 messages
It's actually called "Resource Name", at least in my American English version of the toolset. I tend to set 'Resource Name', 'Tag', and 'Template Resref' to all the same thing, just avoid complications like this.

#19
Guest_Iveforgotmypassword_*

Guest_Iveforgotmypassword_*
  • Guests
Look for something further down the list that's similar to the tag and if you're unsure you can make sure by reading it's tag and resref in the items section of the blueprints tab.

#20
el.sombrero

el.sombrero
  • Members
  • 100 messages
Guys,

I made the change but it isnt working yet. The "template" and tag of my object is "extraHP". It is placed on the map and it was this object which had the template and tag modified.
I tried to put the script both at "on module start" and "on client enter", but it had no effect. The change only happens when I go and pick the object from the ground.
Bellow goes the script I'm using (it compiles ok).
void main()
{
object oPC = GetFirstPC();
int DoOnce = GetLocalInt(OBJECT_SELF, GetTag(OBJECT_SELF));
if (DoOnce==TRUE) return;
SetLocalInt(OBJECT_SELF, GetTag(OBJECT_SELF), TRUE);
CreateItemOnObject("extraHP", oPC);
}

#21
Dann-J

Dann-J
  • Members
  • 3 161 messages
Are you just placing the item on the ground in the toolset? You need to create a blueprint for it in the module as well if you want to be able to spawn copies of it, so it shows up in the 'Items' list on the right-hand side of the screen.

#22
el.sombrero

el.sombrero
  • Members
  • 100 messages
And THAT was the problem... Thx dude (and all of you guys)

#23
Lance Botelle

Lance Botelle
  • Members
  • 1 480 messages

DannJ wrote...

Yes - an equipped creature hide with the property would be ideal, since unlike an effect it can't be removed easily.


Hi DannJ,

There are potential problems when adding/using skins on PCs. I used to do it this way until I discovered issues. See this post I made many months ago:

http://social.biowar...3/index/4999059

I discovered all items added to a PC affected teh gameplay one way or another, and so have avoided using them since. I now use the undroppable item method.

Cheers.
Lance.