Vomit Attack?

https://attnam.com/topics/Vomit-Attack

The Cathedral of Attnam > Other Coding

#1 Oct 7, 2017, 11:36 am Hide

Chiko

Hey, so I tried the new versions of IVAN and I've been playing it a lot again. I eventually got the urge to start modding it again and I noticed there are at least 2 creatures that use vomit as a way to attack.

I tried looking at their stuff in the char.dat and see if I could enable it for other creatures but I have been unable to do so.

I kinda want to make some new enemy variants to do that to attack.
#2 Oct 7, 2017, 12:30 pm Hide

red_kangaroo

All non-standard monster attacks are specified in human.cpp or nonhuman.cpp, so you would need to specify a completely new creature there to amke it use vomit attacks.
#3 Oct 7, 2017, 12:39 pm Hide

Chiko

Hmm... I'll have to do some digging, then. I'm not familiar with that type of file. Thanks for the quick response!
#4 Oct 7, 2017, 6:46 pm Hide

4zb4

The files red_kangaroo is pointing to are C++ (programming language) files.
The easiest way to have a look through them is to browse through the Github repository for IVAN.

If you know any other programming language it shouldn't take you too long to get acquainted with the code - keep in mind though that IVAN was ported to C++ from C at some point in the distant past so there's a LOT of old artifacts sitting around in there.
Making any changes in there is quite a lot more difficult than those you can make with the script files, and you'd need to compile the game yourself each time to check.

On a side note, thinking about it wouldn't it be a good idea to let people define additional methods of attack under char.dat rather than having to go into the source code? It would make fan modding a lot easier.
#5 Oct 8, 2017, 12:38 pm Hide

Ischaldirh

4zb4 wrote
IVAN was ported to C++ from C at some point in the distant past

Oh shit, I wonder if that's my work. I remember doing that at one point, something like eleven years ago...
#6 Oct 8, 2017, 2:37 pm Hide

Chiko

Externalization of more source code sounds like an excellent idea.

I think I'll just leave the vomiting attack thing alone, then. I'll just leave the changes I made in the char.dat so a polymorphed player can at least use the vomit attacks.

Also, I noticed there's a baby sprite in the Item.pcx file and I got a kinda evil idea... some housewives might carry them so killing one might grant you the finest communist meal! Babies. xD
#7 Oct 8, 2017, 3:44 pm Hide

red_kangaroo

The babies are already scripted, a fisrtborn son/daughter. In the not-yet-released next version, one of the Petrus' wives has a baby.
#8 Oct 8, 2017, 4:06 pm Hide

Chiko

Oh nice. So it's a quest thingy.

Also:


Tehehe...

Housewives have a chance to carry them and I also added kobold snatchers that also have a chance to spawn with them. You can eat them for evilness and nourishment, offer them to whatever god likes human flesh, sell them to shopkeepers or donate them. :3

Edit: Oh, I didn't noticed it was in the files already. I based mine off the banana item. xD
Imma use part of its code for the bundled babies. Or maybe I should just use the "firstbornchild" one as base instead of bananas, lol.

banana /* materialcontainer-> */
{
  Possibility = 150;
  WeaponCategory = BLUNT_WEAPONS;
  DefaultMainVolume = 40;
  DefaultSecondaryVolume = 150;
  StrengthModifier = 75;
  Category = FOOD;
  BitmapPos = 0, 112;
  FormModifier = 25;
  DefaultSize = 20;
  NameSingular = "banana";
  MainMaterialConfig == BANANA_PEEL;
  SecondaryMaterialConfig == BANANA_FLESH;
  Alias == "gun";
  Roundness = 15;
  CanBeBroken = true;
  /* MinCharges & MaxCharges overridden */
  AttachedGod = NEFAS;
  WieldedBitmapPos = 160, 320;
  AllowEquip = false;
  IsValuable = false;
  IsSadistWeapon = true;
  AllowedDungeons = { 4, NEW_ATTNAM, ATTNAM, UNDER_WATER_TUNNEL, ELPURI_CAVE; }

  Config BROKEN;
  {
    Possibility = 10;
    BitmapPos = 32, 272;
    WieldedBitmapPos = 176, 320;
  }
  
  Config BABY;
  {
  Possibility = 0;
  Category = MISC;
  DefaultSize = 60;
  DefaultMainVolume = 253;
  DefaultSecondaryVolume = 2768;
  BitmapPos = 80, 146;
  NameSingular = "baby";
  NamePlural = "babies";
  Adjective = "bundled";
  MainMaterialConfig == PINEAPPLE_FLESH;
  SecondaryMaterialConfig == HUMAN_FLESH;
  BreakMsg = "gibs into a bloody mess";
  IsPolymorphable = false;
  Roundness = 60;
  Alias == baby;
  }
  
  Config BROKEN|BABY;
  {
    Possibility = 0;
    BitmapPos = 15, 192;
	Adjective = "mutilated";
  }
}
#9 Oct 10, 2017, 9:46 pm Hide

fejoa

Ischaldirh wrote
Oh shit, I wonder if that's my work. I remember doing that at one point, something like eleven years ago...

Really? How fascinating! I thought you said your sole contribution was the acid shield?


Chiko wrote
Externalization of more source code sounds like an excellent idea.

IVAN could've done with a Lua script engine from the beginning
#10 Oct 11, 2017, 1:49 am Hide

chaostrom

One way to find out. Is the basic script course by the original devs in C++?
#11 Oct 11, 2017, 11:05 am Hide

Ischaldirh

fejoa wrote
Really? How fascinating! I thought you said your sole contribution was the acid shield?

The two would have happened at about the same time. According to my memory, I was in a "Computer Maintenance and Repair" course at the local community college at the time. I was operating on ... some machine, I'm not sure which, and got it in my mind to flex some of my recently-acquired C++ knowledge (had taken a course... two courses? ... the previous year) on IVAN. I wanted to write the aforementioned acid shield. Some discussion with the original Devs (let me see if I can find the link...) indicated that a functional acid shield would require some source-work, which meant I needed to be able to compile IVAN. Now, I did not know C, only C++, and likewise I had only a C++ compiler. Fortunately C and C++ are pretty similar languages so, ultimately it didn't take a WHOLE lot of work - I just kept compiling and chasing down syntax/index/etc errors until it worked, and away I went!

I'm not 100% that any C++-ported code you work with is a result of my work. I don't know for sure that I ever uploaded it anywhere, this happened a very long time ago (10-12 years). But I do remember doing the work at some point.

Huh. I am no longer able to find anything from the original forums, so I can't corroborate my story. This is disappointing. However in my hunting I found this, which should probably be preserved somewhere!
#12 Oct 11, 2017, 8:45 pm Hide

chaostrom

I just linked that in the post above yours Izzy. Which is itself a link, but it's there.