So, I would like to mod it so the enemies are more dangerous and deal more damage, perhaps even fire faster or with faster projectiles. This is my first mod so I want something dead simple. A simple script with a couple lines.
Can someone please direct me to some cool tutorials or forum posts which can guide me to do this? I'm using GZ_Doom 4.0 btw
Edit:
Is SLADE still the best? And should I be doing Zscript or Decorate?
I did this and it didn't work: viewtopic.php?f=39&t=64471
Edit3:: NM I figured it out now. Here is my code for posterity:
Note that the mod wont register until you load a new level not from a save.
Code: Select all
// You must add the Cat class to MapInfo as an event handler
class Cat : EventHandler
{
Actor player;
override void OnRegister()
{
super.OnRegister();
Console.Printf("Registering Mod MYMOD");
}
// This doesn't activate for loading saved games.
override void WorldLoaded(WorldEvent e)
{
super.WorldLoaded(e);
self.player = players[consoleplayer].mo;
Console.Printf("Activating Mod MYMOD");
}
// this doesnt work for loading saved games either
override void WorldThingSpawned(WorldEvent e)
{
super.WorldThingSpawned(e);
Actor npc = e.Thing;
if (!npc.bIsMonster
|| npc.IsFriend(self.player)
|| npc.GetClassName() == "Lost Soul")
{
return;
}
npc.Health *= 1.5;
//Random(2.0, 3.0);
//npc.SetDamage(*2.0); // this line doesnt work because projectiles have damage, not npcs.
Console.Printf("%s , DAMAGE = %4.4f\n , HEALTH = %4.4f\n", npc.GetClassName(), npc.Damage, npc.Health);
}
// This doubles the amount of damage received by player.
override void WorldThingDamaged(WorldEvent e)
{
super.WorldThingDamaged(e);
if (e.Thing == self.player)
{
Actor playerThing = e.Thing;
Console.Printf("Player damaged : %4.4f\n", e.Damage);
playerThing.health -= e.Damage;
}
else
{
Console.Printf("%s", "Thing damaged\n");
}
}
}
// this is how you do it but it doesnt work with the brutal mod which levels health
//class MyPlayer : HereticPlayer
//{
//Default
// {
// Health 70;
//}
//}