Search Results
Searched for posts by vasiliy in all forums

Showing results 181 - 190 out of 431 total
Modify your search
Posted by vasiliy, Feb 7 at 9:57 pm
in aslonawizard AI, there is this code:
  //k8: i believe that it meant to be `RAND_4`
  if (NearestEnemy && NearestEnemy->GetPos().IsAdjacent(Pos) &&
      (!(RAND() & 4) || StateIsActivated(PANIC)))
i suspect that what really should be here is `RAND() % 4` (or `RAND_4`, or `RAND_N(4)`), because `RAND() & 4` is the same as `RAND() & 1`, actually — it simply selects another bit, but it is still only two possible values.
Posted by vasiliy, Feb 7 at 8:30 pm
yep, i thought about that too, and it definitely looks easier to do. there is no need for a dungeon to be on the worldmap, those squares are simply entrances (and dungeon configs). and it doesn't even need to be permanent, i can regenerate it each time (i.e. it would be a kind of random encounter).

yes, this definitely looks like the good way to implement it.

eh, this way we may end up having more content than vanilla. i have some… uncertain feelings about it. it somewhat looks like i waited for red_k to create some great content, and then simply pull it into k8I. unfair competition.

but vanilla works on 64-bit systems, and k8I not. ok. fair competition.
Posted by vasiliy, Feb 7 at 3:33 pm
vertical teleport, like NetHack cursed scroll of teleport does? hm…

as for strange places… it is harder to implement, because adding a level to a dungeon in runtime is not trivial. have to think about that.
Posted by vasiliy, Feb 7 at 10:32 am
btw.
SPOILER ALERT. Click here to see text.
great idea with the shortcut path in Goblin Fortress. i firstly not realised that there are two ways to get the kid. i even managed to mostly get him out this way. great work!

and i did one very questionable thing in GC: added second exit from Enner level. it is near the river too, but you can get away without killing the beast. somehow i always felt… sympathatetic for the poor thing. he only wanted some fish, and somebody to talk with, it's not his fault that everybody around dies! of course, there are many ways to not kill him, but i felt that i should explicitly hint the player.

and had to change leave/return code a little. the game is not really ready for multiple exits to the same level. they work as expected when leaving, but on returning, the game always selected first generated one. which is wrong in case of Beast Level. so i added support for multiple exits, and the game selects "most recently used" for returning.

this is not fully correct too, because if we'll have several returning stairs too, they will all lead to the same exit one. prolly need a way to link exit/enter pairs too. but i will think about it when there will be maps with such bizarre exit configurations.
Posted by vasiliy, Feb 7 at 10:17 am
oh, i read about it, and then forgot. prolly because one of the decisions i am not fully sold to. i mean, if original devs wanted it to be that way, they could easily implement it, just like they implemented zombies. yet ghosts stayed ghosts. i now remember that i thought about it, and decided to not follow. i mean, i have no sane arguments for "old ghosts", and had to resort to "The Original Devs…", but… eh. maybe i just love the ghosts as they are, that's all.

p.s.: just realised… The Devs prolly made ghosts non-humans simply for them to use less RAM. they have that… how it is called… "distorting animation", and internally the game is not rendering such distortions in realtime, but creates cached animation frames. devs prolly deided that it would too much to create 16+ frames for each possible character. not a problem these days, but… i just love ghosts as they are.
Posted by vasiliy, Feb 7 at 2:04 am
also, added console commands to manipulate states and edit attributes. yes, this is totally cheating without wizard mode, i know. yet the console is disabled by default, one need to use CLI arg to enable it. i prolly won't bother to introduce "console cheater" flag — after all, anybody (lol) can recompile the code with any cheats enabled. or just edit the scripts. and i sometimes want the game to believe that i am not a cheater — strictly for debugging purposes!

by the way, frying pan is great starting weapon. i wonder how far i could go if i'll take two frying pans, and enchant them to +3/+4. it would be a shame for Elpuri to be killed with a frying pan, isn't it? maybe the game should somehow record the fact that some boss was killed with… let's say, unusual weapon…
Posted by vasiliy, Feb 7 at 1:56 am
chaostrom wrote
So what you're telling me, is that IVAN zombie code is spat out by eddies in space-time continuum.
basically, the whole IVAN code.
Posted by vasiliy, Feb 6 at 11:54 pm
also, there is the bug with xinrochghost both in k8I and in vanilla: it is the subclass of ghost, and ghosts are not humanoids. therefore the sprite is not composite, it is taken from "Char.png". yet the script specifies humanoid composite form for it, which it totally wrong, and the game displays random gfx instead. i believe that it should use `TorsoBitmapPos = 128, 16;`, for example, for spooky ghost-like face.
Posted by vasiliy, Feb 6 at 11:14 pm
…a-a-a-and… i was COMPLETELY wrong about Eldritch Zombies! it is way more interesting.

the game actually never creates zombies for the base configuration, that was the wrong analysis. what really happens is zombies for farmers and housewives are wrong. because for farmers and housewives head bitmap position is random and hardcoded in C++, it is not taken from the script. but zombie class doesn't know about this, and takes head position from the database… and it is `(0,0)` there, because it is unused. the vanilla might have the same problem, btw, if zombies of farmers and housewives are allowed there.

i need to find the way to tell zombie creator about random head positions. or disable zombies for those classes.


p.s.: workarounded by adding explicit `HeadBitmapPos` properties. non-zombies ignores them, and zombies will have non-randomized heads. it's sad that random heads feature is lost for zombies, but much better than zombies with legs instead of heads.

p.p.s.: this whole randomizing thing looks very suspicious. i think (not sure, though) that it is possible for farmers and housewives to switch their heads when the game needs to regenerate their bitmaps. i don't know if character bitmaps are ever regenerated, though — it is very hard to make heads or tails from the OOP code, especially from IVAN OOP code. so let's use the above "gum solution" for now.
Posted by vasiliy, Feb 6 at 11:08 am
Dark-Star2018 wrote
If you wanted to implement actual short 'books' in the game, as in the screen changes to text and SPACE progresses, feel free to borrow "Treatise on the Lights of Legifer"
oh, sorry! i was sure that i wrote "thank you" for that — yet i didn't. so thank you a lot! will steal it, for sure.