another one IVAN fork (build: 2025, Apr 18)

Mar 1, 9:47 am
Joined: Sep 5, 2010
Interests: make more ivans!
Posts: 430
because there is huge difference between commerce and banking. tbh, i simply don't want Mellis to be involved in this shit. nobody deserves that.

The Bank Corporation not really a god: they have no altars, there is no way to change your relations to them. it's just TBC voice interface nicely fits to prayers. Mellis would like to banish them, but he is not powerful enough.

SPOILER ALERT. Click here to see text.
i simply want to spit into the face of the banking system. and make some fun of them too. one of the planned quest lines (i am very-very slowly working on the first draft of the script) is "return real money to the world, and get rid of TBC".

p.s.: the weight of all returned coins will crush The Great Frog. world end.
Mar 1, 1:15 pm
Joined: Sep 5, 2010
Interests: make more ivans!
Posts: 430
btw, i think that petrus' wife #3 and petrus' wife #7 should join the player if he attacks Petrus. they prolly won't survive long enough, though…

also, it should be possible to give them weapons. let's pretend that nobody notices.
Mar 1, 4:07 pm
Joined: Apr 2, 2014
Occupation: Navastating
Location: Aslona
Posts: 854
vasiliy wrote
btw, i think that petrus' wife #3 and petrus' wife #7 should join the player if he attacks Petrus. they prolly won't survive long enough, though…

also, it should be possible to give them weapons. let's pretend that nobody notices.

That would be pretty nice.
Mar 1, 4:13 pm
Joined: Sep 5, 2010
Interests: make more ivans!
Posts: 430
i tried to implement that. if the player turns Petrus hostile (and only Petrus), the code first moves princesses to the player team. haven't checked if it works yet, but i cannot see why it shouldn't. also, introduced special handling for gifts, so it's now possible to give them something besides luxuries.

but if the player managed to turn Attnam hostile by some other reason, ladies won't join. they hate Petrus, but not the whole city (how noble of them! .

wife #7 will prolly need a special handling, tho. i don't think that the code will work for her. besides, she needs a different logic: i bet she could always join, considering her… living conditions.

SPOILER ALERT. Click here to see text.
i really want to have some way to help them escape. this prolly where random encounters might help: the player may meet the caravan with #3 and #7, travelling to their tribe for… something, and kill everybody there except the ladies.
Mar 2, 11:35 am
Joined: Sep 5, 2010
Interests: make more ivans!
Posts: 430
i think it's almost the time for the new build, mostly to show off new "finder AI". but i still can't decide on danger map update rate…

the problem is that i am very-very bad IVAN player, so what is "very hard" for me might be "normal" or even "easy" for others. there is the console variable to control the rate. i will prolly tell you how to change it (remind me, please!), so it would be possible to experiment a little and tell me what your preferred update rate is.
Mar 2, 11:51 am
Joined: Apr 2, 2014
Occupation: Navastating
Location: Aslona
Posts: 854
vasiliy wrote
wife #7 will prolly need a special handling, tho. i don't think that the code will work for her. besides, she needs a different logic: i bet she could always join, considering her… living conditions.

Maybe she could work like Ivan, joining you if you seem strong enough, with the hope of defeating Petrus?
Mar 2, 1:05 pm
Joined: Sep 5, 2010
Interests: make more ivans!
Posts: 430
red_kangaroo wrote
Maybe she could work like Ivan, joining you if you seem strong enough, with the hope of defeating Petrus?
this is great idea, thank you!

but we need to decide what to do with her sister then. their chat lines says that sisters are caring about each other, so it doesn't look like she would leave the sister and just go away.

maybe make her friendly, but don't allow her to leave Attnam? something like the question on leaving: "XXX doesn't want to leave her sister alone, and prefer to stay here. Continue?"

also, they need names, i think. the names could be revealed after befrending them.
Mar 2, 1:32 pm
Joined: Sep 5, 2010
Interests: make more ivans!
Posts: 430
drop UI in a shop will show the prices. it is really boring to try to drop each item just to see how much it costs.

upd: screenshot below.
Mar 2, 3:17 pm
Joined: Sep 5, 2010
Interests: make more ivans!
Posts: 430
i was slightly wrong about danger map updates: the updater is called irregularily. so it's not 800 turns: with normal gameplay, it is around 200-400 turns (average figure). still way too much, i believe.

interesting facts.
1. danger map was not updating when you are in the wilderness. i think this is wrong, so i removed that check.
2. danger map updates much faster when you are resting. like, 3-7 times faster.
Mar 2, 10:12 pm
Joined: Dec 19, 2018
Occupation: Pharmacy Tech
Location: USA
Interests: ZZT, Roleplaying,
Posts: 84
vasiliy wrote
drop UI in a shop will show the prices. it is really boring to try to drop each item just to see how much it costs.

FREAKING FINALLY!!!
Energizer - you are invincible
ZZT @narchists unite! Turn off the dark, get free money, defeat death itself!
Mar 3, 12:32 am
Joined: Dec 3, 2007
Occupation: Chaos Weaver
Location: Standing between all life and death
Posts: 2,922
vasiliy wrote
drop UI in a shop will show the prices. it is really boring to try to drop each item just to see how much it costs.

That's a really good QoL change!
Uchuudonge wrote
creating stable chaos
making patterns where there should be none
sewing order into the chaos
you spit in the face of random numbers, of chaos
Mar 3, 12:05 pm
Joined: Sep 3, 2024
Occupation: Childcare Provider
Location: Victoria, British Columbia
Interests: Retro gaming, retro computers, TTRPGS, painting and crafting miniatures and terrain, wargames
Posts: 43
vasiliy wrote
drop UI in a shop will show the prices. it is really boring to try to drop each item just to see how much it costs.

fsdfsdgsegseg FINALLY

Amazing work as always. Sorry I haven't been posting as much but I'm still eagerly anticipating this! My support is just more silent of late lol

Hope you've been well. I'll get caught up on what I've missed after breakfast
Mar 3, 12:56 pm
Joined: Sep 5, 2010
Interests: make more ivans!
Posts: 430
Yancakes wrote
Sorry I haven't been posting as much
no problems! it's not like we're on duty here. i was silent for 7 years, so i'll be the last person to blame someone for infrequent posting.


and while i'm on it — i added green "target cursor" to doors PC is trying to open. when there is a question about a door ("locked. open?" "closed. open?" "closed. kick?") the corresponding door will be marked with green cursor. no screenshot, just imagine it.

also, sell UI now looks slightly better: prices are aligned and better color-coded.


p.s.: found fun bug in options list (introduced by me earlier). forgot to reset one array index, so after 5 or so option changes out-of-bounds access starts overwriting random memory. silently, of course, it's C++, not some stupid Oberon. sigh.
Mar 3, 1:57 pm
Joined: Sep 5, 2010
Interests: make more ivans!
Posts: 430
as usual, each time i decide that it's a BUILD TIME! the game crashes.

and don't forget that there is ticket tracker for k8I. if you want to add more tickets, or fill the wiki, PM me, and i'll create a login for you. it's not a demand, of course, just a remainder about Yet Another Useless Login option.
Mar 4, 8:32 am
Joined: Sep 5, 2010
Interests: make more ivans!
Posts: 430
also, rewrote file compression and decompression code.

reading compressed file now requires only one 64K buffer (and several kb for chunk table). on writing, the chunks are compressed as long as they are ready. it is quite important change, because the previous reading code was decompressing the whole file to memory first. in IVAN, save files are easily tens of megabytes of size. of course, we have plenty of RAM these days, but i still prefer to not waste it.

and the writer was doing essentially the same: collect the whole uncompressed file first, then compress it (allocating conservative second buffer of the same size), then write. twice as much memory. now the writer compresses chunks when they are full, and never keeps the whole uncompressed data. compression is usually 64K -> 7K, so it uses much, much less memory.

sadly, i cannot write compressed chunks to disk immediately, i still have to collect them all first. this is because SQLite cannot change blob size dynamically, it requires blob to be fully allocated before writing. so i need to know the final compressed file size, and i don't have any temporary storage to write into.

of course, it is possible to use either temp file, or temp SQLite db to store compressed chunks until everything is ready. i may rewrite the code later. but for now, i'm ok with using ~64KB RAM for 1MB of compressed data (this is how good IVAN data can be compressed, yeah).

also, my plan for SQLite worked perfectly! i fixed several crashes on saving (including crashes on level transition), and the save was never corrupted! on next load, SQLite magically reverted all unfinished changes. yay.
Mar 4, 11:40 am
Joined: Sep 5, 2010
Interests: make more ivans!
Posts: 430
and now i want a good way to destroy items. there are many items i want to completely get rid of, so monsters will not pick them up. suddenly, bottles with sulphuric acid are a scarce resource! and i started offering almost any trash i found too. any chests are great. and by the way, closing doors now has way more sense: the mosters cannot see items this way (if not spawned inside a room, of course). it's not fun to see a monster wearing ommel armor +20, you know. and they WILL run for it (literally run, monsters are running to get the equipment).

but it is fun to set a trap on some good item too. stupid thing will run for the item, and… traps are not mostly useless anymore!
Mar 5, 10:56 am
Joined: Sep 5, 2010
Interests: make more ivans!
Posts: 430
there is another interesting bit of info the game tells you sometimes: weapon usability. it is that "you have much trouble using this item" prompt (and its various other versions). this is quite important info, and you can always check it by unwielding the weapon and wielding it again… but it is boring.

so i added color codes to paperdoll slots, and textual description to equipment string. slot background will be brown for "somewhat difficult", and progressive brighter red for higher difficulties.

i'm not sure about hit value yet: it is interesting info, and something you can roughly figure out by yourself from weapon stats… but i am too lazy to do it. i may remove this info later, though, or make it depend of PC Int level (so boosting Int will have yet another use).
Mar 5, 11:53 pm
Joined: Dec 3, 2007
Occupation: Chaos Weaver
Location: Standing between all life and death
Posts: 2,922
Hmm, if that's possible, do you think you can tie in the hostiles going for equipment to their int stat as well?
Uchuudonge wrote
creating stable chaos
making patterns where there should be none
sewing order into the chaos
you spit in the face of random numbers, of chaos
Mar 6, 7:35 am
Joined: Sep 5, 2010
Interests: make more ivans!
Posts: 430
chaostrom wrote
Hmm, if that's possible, do you think you can tie in the hostiles going for equipment to their int stat as well?
they partially are: i'm limiting their LOS.
  // do not go too far away
  int range = Max(1, GetLOSRange());
  const int IntStat = GetAttribute(INTELLIGENCE);

       if (IntStat < 5) range = Min(range, 2); // kobolds! ;-)
  else if (IntStat < 10) range = Min(range, 4);
  else if (IntStat < 14) range = Min(range, 6);
  else if (IntStat < 16) range = Min(range, 7);
  else if (IntStat < 20) range = Min(range, 8);
  else if (IntStat < 22) range = Min(range, 11);
  else range = Min(range, 14);
this is basically as much as i can do with the current code. this is because the code itself is quite dumb: the monster re-evaluates everything on each turn, completely from the scratch. so it have to select the best equipment, otherwise poor thing will endlessly oscillate between several items.

i got this bug with dark mage, lol: it's AI doesn't include call to check items on the ground, so it cannot wield things. but finder AI didn't know about it, and forces the mage to go to the sword. as monster position itself is not checked, the mage was dancing around the sword, unable to pick it up.

i just wanted to make the code work first, so it's quite simple. i will prolly make it more advanced later: the monsters will remember what they've seen, prioritize selections, pick unfit weapons sometimes because they look cool, and such. here Int will play a much bigger role.


p.s.: of course, i'd like to hear other ideas too. if you're interested, the algorithm by which the monster selects what it wants to wield is very simple: wield the thing, simulate the fight with the player, select the thing which allows us to last longer/kill faster. i.e. the good old danger level calculation. some monsters have hard-coded weapon preferences (mistresses will only use whips, for example), but that's all. of course, monster weapon skills matters too — due to combat simulation, the monster will choose the weapon it is more skilled with.

this prolly could be extended a little. maybe some monsters can always prefer some weapons over others. hate some weapons. prefer/hate materials. and such.

p.p.s.: ah. i also made the monsters to not pick up amulet of life saving, because it cannot be taken from the dead body. rings of teleport and polymorph are ignored too, unless the monster have a way to control their effects.


also, another fun bug from the first draft of the code. the monster physically wield the thing to simulate the fight. i.e. the code takes the thing, equips the monster, runs the simulation, and puts the thing back. which was using monster coordinates to select the square to drop the thing. yeah, the mistress teleported out half of the shop this way, and nobody noticed.
Mar 6, 8:11 pm
Joined: Sep 3, 2024
Occupation: Childcare Provider
Location: Victoria, British Columbia
Interests: Retro gaming, retro computers, TTRPGS, painting and crafting miniatures and terrain, wargames
Posts: 43
vasiliy wrote
and now i want a good way to destroy items. there are many items i want to completely get rid of, so monsters will not pick them up. suddenly, bottles with sulphuric acid are a scarce resource! and i started offering almost any trash i found too. any chests are great. and by the way, closing doors now has way more sense: the mosters cannot see items this way (if not spawned inside a room, of course). it's not fun to see a monster wearing ommel armor +20, you know. and they WILL run for it (literally run, monsters are running to get the equipment).

but it is fun to set a trap on some good item too. stupid thing will run for the item, and… traps are not mostly useless anymore!

Could include a gelatinous cube enemy. Similar AI to the floating eye but doesn't actually chase the player- just wanders around randomly eating whatever is on the floor. Perhaps slowly enough that it doesn't eat everything on a floor before a player gets to it, or just in specific areas/floors. Throw something at a gelatinous cube and it'll be dissolved.
Mar 6, 8:14 pm
Joined: Sep 3, 2024
Occupation: Childcare Provider
Location: Victoria, British Columbia
Interests: Retro gaming, retro computers, TTRPGS, painting and crafting miniatures and terrain, wargames
Posts: 43
vasiliy wrote
there is another interesting bit of info the game tells you sometimes: weapon usability. it is that "you have much trouble using this item" prompt (and its various other versions). this is quite important info, and you can always check it by unwielding the weapon and wielding it again… but it is boring.

so i added color codes to paperdoll slots, and textual description to equipment string. slot background will be brown for "somewhat difficult", and progressive brighter red for higher difficulties.

i'm not sure about hit value yet: it is interesting info, and something you can roughly figure out by yourself from weapon stats… but i am too lazy to do it. i may remove this info later, though, or make it depend of PC Int level (so boosting Int will have yet another use).

another brilliant qol addition honestly. does it tell you what level of str. etc you need to be able to use a weapon without difficulty?
Mar 6, 9:51 pm
Joined: Sep 5, 2010
Interests: make more ivans!
Posts: 430
new build!

(not so?) brief changelog:
* restored window icon.
* it is now possible to fully configure keybindins via .rc file.
* commands can have more than one keybinding, and it is allowed to use Alt and Ctrl in binds.
* restored screenshot feature (it is bindable command now).
* added visual attack indicator, and visual door action indicator.
* winning text records polymorphed form ("killed Petrus ... while polymorphed into mushroom").
* autokicking doors will ask for hostility action confirmation.
* most yes/no queries will show the actual question too, so you don't have to look into log window.
* implemented butchering with meat cleavers (WIP, should depend on cleaver type and such).
* fixed crash with nerf bat (basically, with any inventory item polymorphing).
* nerfed protection from siren songs a little.
* ported a lot of small improvements from vanilla.
* do not show broken items in "Apply" menu -- they are unusable anyway. (this should be revisited when/if we get usable broken items.)
* added two minimap modes -- normal and small. minimap works mostly like "Look", but you have to press "l" to actually look. F1 works too.
* it is possible to set marks on minimap.
* ectoplasm is a liquid now (and skeleton puppies drool ectoplasm).
* magpies, fruit bats and some other monsters with special attacks should not steal from invisible player.
* monswters will go for gear (and food) if they see it, and if they need it.
* two Petrus' wives will help you to slay Attnam if you will directly attack Petrus. (WIP)
* as we don't have "Hotness", made napalm and lava acidious instead. sorry.
* sell UI in shops will show the selling price for items.
* "Equipment broken!" message replaced with detailed description of what was broken.
* it is now possible to dump only some amount of the liquid from the container.
Mar 6, 10:01 pm
Joined: Sep 5, 2010
Interests: make more ivans!
Posts: 430
Yancakes wrote
another brilliant qol addition honestly.
thank you!

Yancakes wrote
does it tell you what level of str. etc you need to be able to use a weapon without difficulty?
the original game only tells this to you in one case. as this one case is present, i presume that missing info for other cases is not an oversight, but done by design. i am basically not adding anything (well, except hit value, but i may remove it later) which the original game won't tell directly.

anyway, "somewhat difficult" is usually means "you need one more level", and other "rates" mean "do not use this!"
Mar 6, 10:02 pm
Joined: Sep 5, 2010
Interests: make more ivans!
Posts: 430
Yancakes wrote
Could include a gelatinous cube enemy.
NetHack I Smell!
Mar 7, 1:23 am
Joined: Sep 5, 2010
Interests: make more ivans!
Posts: 430
i always find it boring to choose if i want to take or to put something. so i removed the prompt; now you can use Tab to switch between "take" and "put" UI for containers. initially i wanted to implement two-sided list, but i am too lazy to write new list widget. yet i think that it is still better than that stupid prompt.
Jump to