CSBuild question: Monster hitpoints?

Discuss Chaos Strikes Back for Windows and Linux, an unofficial port of Chaos Strikes Back to PC by Paul Stevens, as well as CSBuild, an associated dungeon editor.

Moderator: Zyx

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

CSBuild question: Monster hitpoints?

Post by Gambit37 »

In CSBuild, the dialog box for modifying generators states that the monster's hitpoints are calculated using this formula:

(HPM ? HPM : LEM) * BHP + random (BHP / 4 + 1)

While I understand the second part, could you please explain to us non-programmers what the first part (HPM ? HPM : LEM) means? I am not familiar with this syntax.

Thanks!
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Re: CSBuild question: Monster hitpoints?

Post by Paul Stevens »

You ain't supposed to understand easily! We
programmers like to have our secrets. Otherwise
people would discover that we are not so smart
after all.

That syntax means:
if HPM is non-zero then use HPM else use LEM

In this instance it means if the monster's HitPointMultiplier
is non-zeo use it. Else use the LevelExperienceMultiplier.
Post Reply

Return to “Chaos Strikes Back for Windows & Linux (CSBWin) / CSBuild”