another one IVAN fork

Today, 4:09 am
Joined: Sep 5, 2010
Interests: make more ivans!
Posts: 138
also, i am pretty sure that you should be able to rest when paniced if the surroindings seem to be safe. previously you was able to rest in dead ends (long-time k8ivan feature). now i implemented more of it: you will be able to rest in the corridor, or in `[`-shaped place, if there are no hostile monsters around. this is because everybody just keep "." pressed until panic passes anyway (in case there are no other means to remove the state, of course), and to do that the player will find a "safe" space. so let the game help us here a little!
Today, 7:41 am
Joined: Sep 5, 2010
Interests: make more ivans!
Posts: 138
implemented long-time-awaited feature: it is now possible to chat through windows and bar walls. in the future we might have bars with bartenders, for example.

p.s.: also, it is possible to rest when paniced in small rooms with all doors closed and nobody inside.
Today, 12:18 pm
Joined: Sep 5, 2010
Interests: make more ivans!
Posts: 138
some k8ivan trivia, lost in the depth of the thead.

do you know that k8ivan has new array syntax?
arr := { … }
the difference is `:=`, and you don't need any counter, the game is able to count items on its own.

do you know that it is not only possible to include .dat files with `Include` command, but you can extend existing classes AND overworld terrains?
Extend owterrain
{
  Config ASLONA_CASTLE;
  {
    Probability = 100;
    CanBeSkipped = false;
    //NameSingular = "Alien Vessel";
    BitmapPos = 96, 128;
    NameStem = "mighty seaside castle";
    UsesLongArticle = false;
    AttachedDungeon = ASLONA_CASTLE;
    CanBeGenerated = true;
    NativeGTerrainType = LEAFY_FOREST;
    WantContinentWith = ATTNAM;

    RevealEnvironmentInitially = true; //for debug
  }

  Config REBEL_CAMP;
  {
    Probability = 100;
    BitmapPos = 16, 64;
    NameStem = "hidden camp";
    UsesLongArticle = false;
    AttachedDungeon = REBEL_CAMP;
    CanBeGenerated = true;
    NativeGTerrainType = STEPPE;
    WantContinentWith = ATTNAM;

    RevealEnvironmentInitially = true; //for debug
  }
}
this creates two new POIs for Alsona and Rebels. you still need C++ code to actually implement quests, but the dungeons are accessible with wizard mode.

and some new configurations too:
Extend smith
{
  Config ASLONA_CASTLE;
  {
    DefaultName = "Khalybs";
    TorsoBitmapPos = 48, 192;
    HeadBitmapPos = 112, 480;
    ArmBitmapPos = 64, 64;
    LegBitmapPos = 0, 96;
    HairColor = rgb16(44, 34, 43);
    ClothColor = rgb16(100, 100, 100);
    TotalVolume = 90000;
    TotalSize = 200;
    Cloak = SELKIE_SKIN cloak(CLOAK_OF_FIRE_RESISTANCE) { Enchantment = 1; }
    RightGauntlet = SELKIE_SKIN gauntlet(GAUNTLET_OF_DEXTERITY) { Enchantment = 4; }
    RightWielded = CHROME MAHOGANY_WOOD meleeweapon(HAMMER);
    LeftWielded = CHROME MAHOGANY_WOOD meleeweapon(HAMMER);
    Sex = FEMALE;
  }
}

k8ivan includes "Alien Mod", and it is competely optional. you can comment `Module "zone69";` in "scripts/module.dat", and there will be no Alien Nest dungeon. note that Alien Nest has unique monsters which never appears in other dungeons. there are some new features to support this: you can not only restrict monsters to some dungeons (which is possible in mainline too), but you can assign a "tag" to any level, and restrict monsters to levels with that tag. that's how Alien Queen is done. also, Enner Beast uses this system too.

this was already done 7 years ago, and while this won't allow you to create new quests and new monster classes (because doing that still requires C++ support code), you can extend existing classes, and easily design new optional dungeons, all without ever touching C++ compiler!
Today, 4:32 pm
Joined: Apr 2, 2014
Occupation: Navastating
Location: Aslona
Posts: 781
vasiliy wrote
implemented long-time-awaited feature: it is now possible to chat through windows and bar walls. in the future we might have bars with bartenders, for example.

Today, 5:33 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: 10
Would it be possible to pour gunpowder from the backpack on to the floor? Which could be used to like, make a wall of fire or a fuse or something.
Today, 8:04 pm
Joined: Sep 5, 2010
Interests: make more ivans!
Posts: 138
red_kangaroo wrote
actually, there is nothing really complicated there:
character *character::CheckWindowInDir (int dir) const {
  if (dir < 0 || dir >= 8) return 0;

  v2 pos = GetPos() + game::GetMoveVector(dir);
  if (!GetLevel()->IsValidPos(pos)) return 0;

  lsquare *lsq = GetNaturalNeighbourLSquare(dir);
  if (!lsq) return 0;
  if (!lsq->IsTransparent()) return 0;

  // if it is a window, check if there is somebody over there
  pos += game::GetMoveVector(dir);
  if (!GetLevel()->IsValidPos(pos)) return 0;
  lsq = GetLevel()->GetLSquare(pos);
  if (!lsq) return 0;

  return lsq->GetCharacter();
}
what this does is check if the square in the given direction is transparent (i.e. the player can see through it), and if it is, then check next square in the same direction to find a char. and Talk command becomes:
COMMAND(Talk) {
  if (!Char->CheckTalk()) return false;
  character *ToTalk = 0;
  int Characters = 0;
  for (int d = 0; d < 8; ++d) {
    lsquare *Square = Char->GetNaturalNeighbourLSquare(d);
    if (Square) {
      character *Dude = Square->GetCharacter();
      if (!Dude) Dude = Char->CheckWindowInDir(d);
      if (Dude) {
        ToTalk = Dude;
        ++Characters;
      }
    }
  }

  if (!Characters) {
    ADD_MESSAGE("Find yourself someone to talk to first!");
    return false;
  }

  if (Characters == 1) {
    return ToTalk->ChatMenu();
  }

  int Dir = game::DirectionQuestion(CONST_S("To whom do you wish to talk to? [press a direction key]"), false, true);
  if (Dir == DIR_ERROR || !Char->GetArea()->IsValidPos(Char->GetPos()+game::GetMoveVector(Dir))) {
    return false;
  }

  character *Dude = Char->GetNearSquare(Char->GetPos()+game::GetMoveVector(Dir))->GetCharacter();
  if (!Dude) Dude = Char->CheckWindowInDir(Dir);

  if (Dude == Char) {
    ADD_MESSAGE("You talk to yourself for some time.");
    Char->EditExperience(WISDOM, -50, 1<<7);
    Char->EditAP(-1000);
    return true;
  }

  if (Dude) return Dude->ChatMenu();

  ADD_MESSAGE("You get no response.");
  return false;
}
i just added two calls to the new method. that's it.

p.s.: side-effect: it is possible to chat while standing one square away from any character. i consider this as a good feature, but it is possible to check for windows specifically:
character *character::CheckWindowInDir (int dir) const {
  if (dir < 0 || dir >= 8) return 0;

  v2 pos = GetPos() + game::GetMoveVector(dir);
  if (!GetLevel()->IsValidPos(pos)) return 0;

  lsquare *lsq = GetNaturalNeighbourLSquare(dir);
  if (!lsq) return 0;
  if (!lsq->IsTransparent()) return 0;

  // if it is a window, check if there is somebody over there
  // >>>HERE<<<
  olterrain *terra = lsq->GetOLTerrain();
  if (!terra) return 0;
  if (!(terra->GetConfig() & WINDOW)) return 0;

  pos += game::GetMoveVector(dir);
  if (!GetLevel()->IsValidPos(pos)) return 0;
  lsq = GetLevel()->GetLSquare(pos);
  if (!lsq) return 0;

  return lsq->GetCharacter();
}
Today, 8:10 pm
Joined: Sep 5, 2010
Interests: make more ivans!
Posts: 138
Yancakes wrote
Would it be possible to pour gunpowder from the backpack on to the floor? Which could be used to like, make a wall of fire or a fuse or something.
it's great idea! but sadly, k8ivan has no fire system at all. i'd really like to see a wall of fire, though, so maybe i will hack something for it in the future. thank you!
Today, 8:18 pm
Joined: Sep 5, 2010
Interests: make more ivans!
Posts: 138
as for "distant chating": priests should prolly check if the player is in adjacent square before healing him. or maybe not. tbh, i implemented it because i wanted to talk with prisoners in Attnam prison cells: it is strange that i cannot talk to them through bars. i haven't decided if "distant chats" should be limited to science talks only. for now any interaction is possible. also, it looks quite natural for me to talk with the smith standing before the anvil, not on it!
Jump to