Temp states changing to permanent states bug/"feature"

Jul 2, 2014, 7:06 pm
#1
Joined: Feb 20, 2012
Posts: 232
So I took a look at this, and it turns out fixing it is as simple as changing one line from
#define PERMANENT 0xFFFF
to
#define PERMANENT -1

However, it seems like most players embrace this bug, and are quite fond of the ability to eat three floating eyes for perma-ESP and such. I personally feel that allowing that is a bit too easy for IVAN* (you would get a ton of ESP/telecontrol time when you eat that much anyway), and being that it is a bug, I'm all for removing it. So, do you guys want this bug removed, or should it remain and be promoted to the status of "accidental feature"?

*This really shows with blink dogs: since they reproduce, you're pretty much guaranteed perma-telecontrol as soon as a blink dog spawns.
Jul 2, 2014, 9:26 pm
#2
capristo's avatar
The Imperialist


Joined: Dec 2, 2007
Location: New Attnam
Interests: bananas
Posts: 2,141
I vote to keep it.
Jul 3, 2014, 8:56 am
#3
Joined: Dec 11, 2008
Posts: 1,770
I too vote for keeping it.
As it stands, none of the perma-states are all that easy to get consistently (save blink dog example, haste fountain value). More importantly no status is a surefire ticket to victory either and so far as I know it's not restricted to only positive statuses which means with the worst luck in the world you could be perma-slowed, for example (something we could implement ourselves too).
Jul 3, 2014, 12:00 pm
#4
red_kangaroo's avatar
elder dark mage


Joined: Apr 2, 2014
Location: North Tyris
Posts: 567
Keep it, please.

I really like this feature, even though the blink dogs could be tweaked somehow.

On the other hand, I would understand removal of this - it is somewhat a part of "ascension kit" to get telepathy and telecontrol through eating, so you can have free ring and amulet slots. Really, you wouldn't miss a chance to get these states once you know about his, unless you'd want to challenge yourself, so it slightly limits the decisions the player can make while sticking to more or less optimal gameplay.

Without this feature, the equipment dependancy of the player would be greater, and even though you could still get these states for a really long time, it could be sometimes worthwhile to think more about the rings you wear and whether to put on your AoLS, or if the AoESP could be of more use right now.

He he - devil's advocate.

4zb4 wrote
with the worst luck in the world you could be perma-slowed, for example (something we could implement ourselves too).



Yes, please!
Jul 3, 2014, 1:12 pm
#5
capristo's avatar
The Imperialist


Joined: Dec 2, 2007
Location: New Attnam
Interests: bananas
Posts: 2,141
Oh man, perma slowed would SUCK
Jul 3, 2014, 1:21 pm
#6
Joined: Feb 20, 2012
Posts: 232
One of my recent characters was perma-confused because I was on the verge of starvation and drank all of the vodka from the cellar.
Jul 3, 2014, 4:59 pm
#7
Joined: Sep 8, 2010
Occupation: Petty Functionary
Location: Drinking pea soup in the world map
Interests: Mangoes
Posts: 1,110
I vote to keep it the way it is. I don't know to what degree this feature is intentional. What I'd really like to know first is how state activation affects the danger level and what the danger system does to increase the difficulty of the game.
Jul 3, 2014, 11:58 pm
#8
Joined: Feb 20, 2012
Posts: 232
Warheck wrote
I vote to keep it the way it is. I don't know to what degree this feature is intentional. What I'd really like to know first is how state activation affects the danger level and what the danger system does to increase the difficulty of the game.

Here's a little bit of information on this from holybanana. He didn't seem to convey any intention of changing it; I'm not sure if anyone has the original source of those comments or if there was any more info there.

In any case, I too would love to know the inner workings of the danger system. I suppose that's a code-diving project for another day.
Jul 4, 2014, 1:59 am
#9
Joined: Dec 3, 2007
Occupation: Chaos Weaver
Location: Standing between all life and death
Posts: 2,824
I can't believe I'm contributing with a six year old post.

Anyway, the quote is from the original forums. Look around and you'll find it.
Jul 4, 2014, 6:27 am
#10
Joined: Feb 20, 2012
Posts: 232
Here we go:

holybanana wrote
Nah, I think we are going to leave it. I see nothing bad about it. We might modify that number 65535 though, it's so arbitrary. I don't remember why it was chosen, probably because at some point we allocated only 16 bits for state counters and 65535 is the highest number you can represent this way (2^16-1).
Jul 4, 2014, 5:49 pm
#11
Joined: Sep 8, 2010
Occupation: Petty Functionary
Location: Drinking pea soup in the world map
Interests: Mangoes
Posts: 1,110
Good researching! Pent, your link from post #8 (chao's quote) provides some tantalizing clues as to the workings of the danger system. Holybanana hints at the fact that activated states are taken into account during monster generation. I wonder what else is taken into account?
Jul 4, 2014, 10:28 pm
#12
Joined: Feb 20, 2012
Posts: 232
Warheck wrote
Good researching! Pent, your link from post #8 (chao's quote) provides some tantalizing clues as to the workings of the danger system. Holybanana hints at the fact that activated states are taken into account during monster generation. I wonder what else is taken into account?
I intended to respond to this with a short message pointing you in the direction of possible information, but my curiosity got the better of me, and rather than write a 30 second response as I originally planned, I've spent the last 4-5 hours searching through and poring over the code and compiling a document on what I've discovered.

It isn't nearly complete, but I need a break (and sleep), so here's what I've got (attached as .txt as well, for those who want to read it without the wonky colors):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       Danger System
            of 
   Iter Vehemens ad Necem
~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Organization is (ideally) from the ground up, such that the document can be read straight
through without having to skip around for definitions.

For simplicity's sake, when possible, in character:: member functions, the calling character shall 
be assumed to be the player (a note will be made upon each necessary suspension of this assumption).


~ GetTimeToDie
char.cpp, line 5702:
double character::GetTimeToDie(ccharacter* Enemy, int Damage, double ToHitValue, truth AttackIsBlockable, truth UseMaxHP) const
bodypart.cpp, line 1507:
double bodypart::GetTimeToDie(int Damage, double ToHitValue, double DodgeValue, truth AttackIsBlockable, truth UseMaxHP) const

Various damage calculations are performed. Returns minimum hits required to kill character.


~ GetTimeToKill
nonhuman.cpp, line 349:
double nonhumanoid::GetTimeToKill(ccharacter* Enemy, truth UseMaxHP) const
human.cpp, line 1924:
double humanoid::GetTimeToKill(ccharacter* Enemy, truth UseMaxHP) const

/* Returns the average number of APs required to kill Enemy */

TimeToKill = AttackStyles / Effectivity

AttackStyles is incremented for each type of attack the enemy has: Arm-based attacks,
Leg-based attacks, and Head-based attacks. For each AttackStyle an addition to Effectivity is 
calculated in part by GetTimeToDie(), which seems to be where equipment actually factors
into danger calculations (as GetTimeToDie() performs various damage calculations). 

If character is hasted Effectivity is doubled.
If character is slowed Effectivity is halved.

Should AttackStyles be equal to 0, a value of 10,000,000 will be returned instead of AttackStyles/Effectivity.


~ Limit
felibdef.h, line 68:
inline type Limit(type Value, type Minimum, type Maximum)
{ return Value >= Minimum ? Value <= Maximum ? Value : Maximum : Minimum; }

If I interpret this properly, then this is equivalent to:
if (Value >= Minimum) {
	if (Value <= Maximum) 
		return Value; 
	else
		return Maximum;
}
	else
		return Minimum;
   
or, more simply:

if (Value < Minimum)
	return Minimum;
if (Value > Maximum)
	return Maximum;
else
	return Value;

In essence, if the result is below the minimum, it returns the minimum, and the same should 
the result be over the maximum. Should the value be within the limits it is returned intact.


~ Relative Danger
char.cpp, live 5732:
double character::GetRelativeDanger(ccharacter* Enemy, truth UseMaxHP) const
/*calculates relative danger of Enemy*/

TimeToKill is used to calculate the initial Danger, via dividing the enemy's time to
kill the player by the player's time to kill the enemy.

If Enemy's movement AP requirement is greater than that of the player, Danger is multiplied by 1.25.
In the opposite case, Danger is multiplied by 0.80.

If the Enemy is not visible, Danger is halved (if Enemy is the player it is multiplied by 0.2).
If the Player is not visible to the Enemy, Danger is multiplied by 5 (if the caller is a non-player, Danger is doubled).
##This doesn't make sense; shouldn't the opposite be the case? GetTimeToDie may be the key here, 
##since being invisible to the other party should heavily affect the ToHitValue.

If the caller is NOT the player, and has an INT of less than 10, Danger is multiplied by 0.80.
If the Enemy has an intelligence of less than 10 (and is NOT the player), Danger is multiplied by 1.25.

Returns Limit fuction of Danger with a minimum of 0.001, and maximum of 1000.


~ Danger Map
Map containing danger values of characters

~ Naked Danger
Component of Danger Map

~ Equipped Danger
Component of Danger Map


~ Knowledge of the Ancients
Option D (Character Danger Values) displays three stats for each character:
Danger (Relative Danger (to player)*1000), NGM (Naked Danger*1000), and EGM (Equipped Danger*1000)

~ InitDangerMap
?
~ CalculateNextDanger
?
~ Danger Iterator
?

~ GetMinDifficulty


~ BalancedCreateMonster
proto.cpp, line 22:
character* protosystem::BalancedCreateMonster()

This is the most interesting part: the part where the game actually determines what critters to spawn!


I'm too tired to sort it out mentally at the moment, but you can take a look at BalancedCreateMonster() in proto.cpp for reference. Also just below it is BalancedCreateItem(), which I haven't looked at at all, but may contain some interesting stuff as well.

Jul 5, 2014, 3:34 am
#13
Joined: Dec 3, 2007
Occupation: Chaos Weaver
Location: Standing between all life and death
Posts: 2,824
How interesting. They actually take into account whether the monster attacks with its arms, legs or head.
Sep 2, 2016, 2:40 pm
#14
Joined: Aug 15, 2016
Location: Wales
Posts: 12
All those times gained Perma-slow from fountains and suicided was waste xD
Sep 3, 2016, 12:11 pm
#15
red_kangaroo's avatar
elder dark mage


Joined: Apr 2, 2014
Location: North Tyris
Posts: 567
BTW, how is everyone's opinion on permastates now?

I know I have voiced my enjoyment of this bug/feature, but I came to realise that the ease of gaining some of the states (telecontrol, I'm looking at you) for good is pretty much gamebreaking.
Sep 3, 2016, 1:11 pm
#16
Joined: Sep 22, 2008
Posts: 631
I still very much like the idea of permanent states.

That being said, simply eating three blink dogs to gain permanent telecontrol is indeed stupidly easy and frankly makes rings of telecontrol useless the moment you find a single blink dog. Instead of removing the permastate, I'd suggest nerfing the blink dog flesh effect strength to 10-20%. This way in order to gain the effect, you'd need to find and eat 15-30 corpses scattered all over the area from teleports on death. Not only that, but you'd also need to contend with overeating and actually getting to the corpses fast enough before the effect runs out or the corpses spoil.

ESP currently takes a bit more work, as you need to keep the eye corpses fresh long enough to gather a few up. Increasing the corpses needed to around 5 would be enough in my opinion.

Haste is completely fine as it is, it takes a lot of wands and a Cleptia prayer to get to permanent status.
Sep 3, 2016, 2:51 pm
#17
Joined: Apr 9, 2016
Occupation: Priestx of Sophos
Location: Standing on a big mine in GC1
Interests: the relation of queer crystal hyperfeminism and amphibious neutronium cybersocialist art
Posts: 258
JoKe wrote
I still very much like the idea of permanent states.
Haste is completely fine as it is, it takes a lot of wands and a Cleptia prayer to get to permanent status.
Likewise permanent invisibility, which takes fewer wands but sometimes turns out to be undesirable if you want to buy something.

In general I like that temporary states can be made permanent this way because it works the same for every status (even if the means to increase the temporary counter are different), and it's not trivial to accomplish - permanent haste, invis, and even ESP can require cloning/mirroring charges.

Also, I'd agree that the number of turns of telecontrol per gram of blink dog flesh could stand to be reduced. However, getting a blink dog to breed after you've gained permanent invisibility can be really difficult. One time I resorted to throwing various objects at one until it panicked. I think that was enough to get two more.
Sep 3, 2016, 5:56 pm
#18
Joined: Sep 8, 2010
Occupation: Petty Functionary
Location: Drinking pea soup in the world map
Interests: Mangoes
Posts: 1,110
Pent wrote

Whoa that was exactly 10 years ago.

Default values for material effect is 100. The line for determining the amount received is here.

We can nerf blink dog effect a la JoKe's suggestion by setting
EffectStrength = 20;
for blink dog flesh to give 20% effect (15 corpses). Shall we start with that, or should it be more?

To eat five floating eyes instead of three, need to set
EffectStrength = 60;
for floating eye flesh.

Shall we make the change for these two? (Anyone with git can make these changes by the way...)
We can always roll it back in subsequent releases.
Sep 4, 2016, 3:00 am
#19
Joined: Dec 3, 2007
Occupation: Chaos Weaver
Location: Standing between all life and death
Posts: 2,824
Should be fine. Let's not forget, the game will compensate for that permanent state.

... Alternatively, how about tweaking how fast the game adapts to it? Do we know? Is it instant the moment you go to a new floor and it generates monsters, or does it happen over time? The original comment implies it's not instant. Might be interesting if acquiring a permanent state makes the game force the player into a play-style based around said state.
Sep 4, 2016, 4:03 am
#20
red_kangaroo's avatar
elder dark mage


Joined: Apr 2, 2014
Location: North Tyris
Posts: 567
I'm all for tweaking the blink dog flesh, telecontrol is very strong even from the ring.
Sep 4, 2016, 12:54 pm
#21
Joined: Mar 17, 2008
Occupation: Software developer
Location: Ohio
Interests: Physics
Posts: 67
Telecontrol change seems good, but I think 3 floating eyes are already sufficiently painful. Also, we should double check that eating the new blink dog gives telecontrol at least as long as it would take to burn the food counter that you gained.
Sep 4, 2016, 7:18 pm
#22
Joined: Aug 15, 2016
Location: Wales
Posts: 12
red_kangaroo wrote
I'm all for tweaking the blink dog flesh, telecontrol is very strong even from the ring.
playing with the script folder past few days.. this perma-state 'feature'|superbug is very useful and outright OP at times

A character who I play often Loves INT, after a while in the lower GC he happily gains perma Telecontrol and ESP, along with his love of Intelligence, newfound TeleControl + stack of Wands of Teleport, he may blink endlessly around, while finding any threats. (ESP should scale with PER)
Like Polyitis and Teleportitis, ESP(ESP-ing?) gained natural could/should activate every few turns(think Detecting Status) . The higher your ESP/Telecontrol, the longer you can have it in effect. Amulets being Permanent by wearing need not switch off every so often.

to remove the bug would spark hell for the lovers and haters. To address some of the strategies we've developed around this emergent feature or NERF it a tad (now 3 Floating eyes, say 5 instead) and allow a chance/event to remove it. 'You ate some mutated blink dog flesh'[ you may NEVER have telecontrol ever again..']
Sep 11, 2016, 5:54 am
#23
Joined: Sep 8, 2010
Occupation: Petty Functionary
Location: Drinking pea soup in the world map
Interests: Mangoes
Posts: 1,110
So there is a pull request here: https://github.com/Attnam/ivan/pull/162

We can trial it for the next release and roll it back or tweak it at a later stage.
Sep 11, 2016, 7:20 am
#24
Joined: Apr 9, 2016
Occupation: Priestx of Sophos
Location: Standing on a big mine in GC1
Interests: the relation of queer crystal hyperfeminism and amphibious neutronium cybersocialist art
Posts: 258
With effect strengths of 60 and 20 you would need to eat 4 floating eyes and 11 blink dogs. Maybe 12 if you're slow. Just sayin'.
As a fix I would suggest strengths of 50 and 15.
Sep 11, 2016, 8:09 am
#25
Joined: Sep 8, 2010
Occupation: Petty Functionary
Location: Drinking pea soup in the world map
Interests: Mangoes
Posts: 1,110
Serin-Delaunay wrote
With effect strengths of 60 and 20 you would need to eat 4 floating eyes and 11 blink dogs. Maybe 12 if you're slow. Just sayin'.
As a fix I would suggest strengths of 50 and 15.

Thank you for checking this. I did base my calculations on anecdotes and straight ratios. Is the difference because the player tends to eat integer number of corpses?
Jump to