Search Results
Searched for posts by vasiliy in all forums

Showing results 71 - 80 out of 434 total
Modify your search
Posted by vasiliy, Mar 6 at 10:01 pm
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!"
Posted by vasiliy, Mar 6 at 9:51 pm
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.
Posted by vasiliy, Mar 6 at 7:35 am
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.
Posted by vasiliy, Mar 5 at 10:56 am
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).
Posted by vasiliy, Mar 4 at 11:40 am
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!
Posted by vasiliy, Mar 4 at 8:32 am
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.
Posted by vasiliy, Mar 3 at 1:57 pm
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.
Posted by vasiliy, Mar 3 at 12:56 pm
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.
Posted by vasiliy, Mar 2 at 3:17 pm
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.
Posted by vasiliy, Mar 2 at 1:32 pm
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.