Vomit Attack?

Oct 7, 11:36 am
#1
Joined: Nov 22, 2013
Occupation: Unemployed bastard
Location: Chile
Interests: Gaming, Modding
Posts: 62
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.
Oct 7, 12:30 pm
#2
red_kangaroo's avatar
goblin prince


Joined: Apr 2, 2014
Location: North Tyris
Posts: 371
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.
Oct 7, 12:39 pm
#3
Joined: Nov 22, 2013
Occupation: Unemployed bastard
Location: Chile
Interests: Gaming, Modding
Posts: 62
Hmm... I'll have to do some digging, then. I'm not familiar with that type of file. Thanks for the quick response!
Oct 7, 6:46 pm
#4
Joined: Dec 11, 2008
Posts: 1,752
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.
Oct 8, 12:38 pm
#5
Ischaldirh's avatar
Ex-Tyrant of the IVANers


Joined: Dec 8, 2007
Occupation: Student
Location: California
Interests: Physics
Posts: 2,679
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...
Oct 8, 2:37 pm
#6
Joined: Nov 22, 2013
Occupation: Unemployed bastard
Location: Chile
Interests: Gaming, Modding
Posts: 62
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
Oct 8, 3:44 pm
#7
red_kangaroo's avatar
goblin prince


Joined: Apr 2, 2014
Location: North Tyris
Posts: 371
The babies are already scripted, a fisrtborn son/daughter. In the not-yet-released next version, one of the Petrus' wives has a baby.
Oct 8, 4:06 pm
#8
Joined: Nov 22, 2013
Occupation: Unemployed bastard
Location: Chile
Interests: Gaming, Modding
Posts: 62
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";
  }
}
Oct 10, 9:46 pm
#9
Joined: Sep 8, 2010
Occupation: Petty Functionary
Location: Drinking pea soup in the world map
Interests: Mangoes
Posts: 893
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
Oct 11, 1:49 am
#10
Joined: Dec 3, 2007
Occupation: Chaos Weaver
Location: Standing between all life and death
Posts: 2,752
One way to find out. Is the basic script course by the original devs in C++?
Oct 11, 11:05 am
#11
Ischaldirh's avatar
Ex-Tyrant of the IVANers


Joined: Dec 8, 2007
Occupation: Student
Location: California
Interests: Physics
Posts: 2,679
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!
Oct 11, 8:45 pm
#12
Joined: Dec 3, 2007
Occupation: Chaos Weaver
Location: Standing between all life and death
Posts: 2,752
I just linked that in the post above yours Izzy. Which is itself a link, but it's there.
Jump to