Aller au contenu

Photo

rolled hit dice


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

#1
-Semper-

-Semper-
  • Members
  • 2 256 messages
hi  there scripting gods among mere humans Posted Image

after leveling up in nwn2 the pc recieves maximum hp always. i already know the debate about average hp and how nwn2 is centered around the maxhp setting. i still want to alter this in my own module because i do believe that those big amount of hp causes an inbalance between classes and weakens abilities.

i can adjust the creature-hp of my module manually in the blueprints. i know that the hit dice are stored within the classes.2da but that won't be liked rolled points. how was this achieved in nwn1? perhaps hardcoded?

anyways i've got the following idea but i am too bad in scripting to know if this'll work:

place a script in the module's level up event which gets the appropriate hit dice of the pc through the gethitdice() function. a switch (gethitdice()) now gets the actual maximum hp of the pc after level up, rolls a random number according to the hit die (e.g. d10() if the hit die of the class is 1d10), subtracts this from the actual hp and applies it to the pc as a permanent supernatural effect. this is more rolling down your hp but at least it's random and more coherent to the rules Posted Image

is this a bad idea with too many side effects?

Modifié par -Semper-, 21 octobre 2011 - 08:28 .


#2
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
I think this is a really excellent idea. Sometimes I feel like the game would be more interesting with actual dice rolls. Of course, balance would have to be changed significantly for the mods, but that is easily done if the level up system is in mind from the beginning of production.

I don't see a reason why it should not work if there is a function to set max HP. Off the top of my head, I don't know if there is. The only concern would be that the events and scripts associated with the Level Up GUI may interfere, but if that is the case, you should be able to attach your script to the button on the Level Up GUI that gets you out of the GUI, that way your script fires after the Level Up process has occurred.

#3
painofdungeoneternal

painofdungeoneternal
  • Members
  • 1 799 messages
Not sure how that would work, effectdamage is a one time deal, what effect were you thinking of applying, and they'd be able to heal from that. I know EffectTemporaryHitpoints is a very scary function you want to avoid, and only increases them i think but might be able to get into something that can work. Might be able to set the hitpoints of all classes to 1, and add to that.

A NWNx function to set the max hitpoints would be nicer. Doing it to the bic file seems like it might be an option as well ( but that would require a PW setting ).

The monsters hitpoints balance the damage in the OC. For them it's a non issue, the module maker can just roll dice or decide whatever he wants. But then the issue is not character hit points vs monster hit points, it's character damage vs monster hit points - and then monster damage vs character hit points.

#4
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
One place to look may be the XML scripts that fire from the level up GUI. They may provide some insight into the inner workings of the process by which hitpoints are added.

#5
-Semper-

-Semper-
  • Members
  • 2 256 messages
actually i had temporary hitpoints in mind. something like this as a core:

imaxHP=getcurrenthitpoints(oPC)
nDice= case sensitive random number according to gethitdice(oPC)

ApplyEffectToObject ( DURATION_TYPE_PERMANENT,

EffectTemporaryHitpoints (imaxHP - nDice), oPC);

this way the effecttemphp returns always a positive value, smaller than the current maxhp of the pc. i didn't know that this function only adds hp and is that freaky :D

as a sidenote: there's also EffectBonus_hitpoints. could that be applied with a negative value, subtracting from the getcurrenthp()?

the on level up event only fires after the level up process so this won't interfere with the gui and connected scripts.
dunno if there's something hidden within the gui scripts. this i have to look ;)

Modifié par -Semper-, 21 octobre 2011 - 09:02 .


#6
painofdungeoneternal

painofdungeoneternal
  • Members
  • 1 799 messages
EffectTemporaryHitpoints adds hitpoints, i doubt it removes them. http://www.nwnlexico...yhitpoints.html

It tends to be very problematic, you tend to see players able to manipulate it ( or just accidentally do this ) to get 6000+ hps on a low level character just by logging in and out and equiping gear. Using this would effectively mean all other features using this would have to be removed ( they strip out any effects like this prior to application to prevent the above bugs )

Worth trying out, but i'd be very leery of anything which is not being used as intended - a negative value might result in very odd game behavior.

#7
-Semper-

-Semper-
  • Members
  • 2 256 messages
and i guess effectbonus_hitpoints won't work with a negative value subtracting from the currenthp. that's too bad :D

guess i have to dig through the levelup gui scripts. how were rolled hit dice achieved in nwn? hardcoded?

editing classes.2da down to average hp is the last resort. it ain't random but at least lower :D

Modifié par -Semper-, 21 octobre 2011 - 09:12 .


#8
painofdungeoneternal

painofdungeoneternal
  • Members
  • 1 799 messages
Hard coded - UI was completely different in NWN1 as well. Don't even think it's a visible field, happens when you save your character.

( note you cannot script the UI on character creation, only afterwards. )

#9
-Semper-

-Semper-
  • Members
  • 2 256 messages
changing the hit dice to 1 and adding to that is very clever ;)
this way i have to switch through the base and prestige classes to set hit dice, add maxhp on client enter as do once at first level and add bonus hitpoints after each level up, always subtracting 1 within the function.

that could work or am i missing something^^

does the switch work with strings too or only with integer?

Modifié par -Semper-, 21 octobre 2011 - 09:25 .