G
Guest
Guest
Archived from groups: rec.games.roguelike.nethack (More info?)
I've put a new experimental patch up on my website [1] which
implements the partial-XP idea I have been talking about. Basically it
adds an "XP granted" field to each monster to keep track of how much
of the XP for that monster has already been granted to the player.
This allows you to define actions which grant you only some fraction
of a monster's XP, with the knowledge only the remaining fraction will
be given when the monster is killed.
So, for example, the patch grants you (up to) half a monster's remaing
XP when you put it to sleep. So if a monster is worth, say, 100 XP,
then the first time you put it to sleep you get 50 XP. And the monster
is now worth only 50. So if you killed it, you would only get the
remaining 50. Or if you put it to sleep again, you'd get 25 XP and the
monster would be worth on 25, and so on.
I intend to integrate this into various patches to allow you to get XP
for pacifying animals, stealing from monsters, etc...
At the moment I'd still classify this as experimental. The code I've
written could potentially interact with a number of things in
unexpected ways. If anyone cares to road-test it, I'd be grateful.
In particular, I needed some way to test who was responsible for
putting a monster to sleep in sleep_monst. Rather than passing around
an extra parameter everywhere, I've tried to make a general solution.
I've added a global variable "responsible" which should represent
which monster (possibly you_monst) is responsible for the current
effect. I'm not sure I've necessarily caught every change of
responsibility. If this proves to be a workable mechanism, I may go on
to adapt some of the existing code to also use it.
Malcolm
[1] http://www.cse.unsw.edu.au/~malcolmr/nethack
I've put a new experimental patch up on my website [1] which
implements the partial-XP idea I have been talking about. Basically it
adds an "XP granted" field to each monster to keep track of how much
of the XP for that monster has already been granted to the player.
This allows you to define actions which grant you only some fraction
of a monster's XP, with the knowledge only the remaining fraction will
be given when the monster is killed.
So, for example, the patch grants you (up to) half a monster's remaing
XP when you put it to sleep. So if a monster is worth, say, 100 XP,
then the first time you put it to sleep you get 50 XP. And the monster
is now worth only 50. So if you killed it, you would only get the
remaining 50. Or if you put it to sleep again, you'd get 25 XP and the
monster would be worth on 25, and so on.
I intend to integrate this into various patches to allow you to get XP
for pacifying animals, stealing from monsters, etc...
At the moment I'd still classify this as experimental. The code I've
written could potentially interact with a number of things in
unexpected ways. If anyone cares to road-test it, I'd be grateful.
In particular, I needed some way to test who was responsible for
putting a monster to sleep in sleep_monst. Rather than passing around
an extra parameter everywhere, I've tried to make a general solution.
I've added a global variable "responsible" which should represent
which monster (possibly you_monst) is responsible for the current
effect. I'm not sure I've necessarily caught every change of
responsibility. If this proves to be a workable mechanism, I may go on
to adapt some of the existing code to also use it.
Malcolm
[1] http://www.cse.unsw.edu.au/~malcolmr/nethack
