Changing how monsters view other monsters

Dridmar

Old Skool Apostle
MSC Developer
Socialist Guild
Alpha Tester
Joined
Feb 2, 2007
Messages
2,251
Reaction score
72
I'm using orcs and I want them to be hostile to a monster they're friendly to, how do you do that? I remember it was done on ww3d with the trolls and the skeletons.
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
Use the "Additional Parameters" (params) property in msmonster_xxx and add:
xxx_race

Where xxx is the desired race.

eg. demon_race = demon

races.script said:
{
//Set up race relationships for the game
//New races can be added here

local reg.race.name human
local reg.race.enemies all;hated
local reg.race.allies human;beloved
registerrace

local reg.race.name hguard
local reg.race.enemies orc;goblin;undead;rogue;hated;evil;demon
local reg.race.allies hguard;beloved
registerrace

local reg.race.name wildanimal
local reg.race.enemies human;orc;spider;hated;evil
local reg.race.allies wildanimal;vermin;beloved
registerrace

local reg.race.name undead
local reg.race.enemies human;orc;goblin;good;hated;rogue;hguard;spider
local reg.race.allies undead;spider;vermin;beloved;demon;evil
registerrace

local reg.race.name vermin
local reg.race.enemies human;orc;goblin;hated
local reg.race.allies vermin;undead;spider;wildanimal;beloved;evil
registerrace

local reg.race.name spider
local reg.race.enemies all;hated
local reg.race.allies undead;spider;beloved;evil;demon
registerrace

local reg.race.name orc
local reg.race.enemies all;hated
local reg.race.allies goblin;orc;beloved;demon;evil
registerrace

//same as orc - redundant faction - dun do again
local reg.race.name goblin
local reg.race.enemies all;hated
local reg.race.allies goblin;orc;beloved;demon;evil
registerrace

local reg.race.name rogue
local reg.race.enemies all;hated
local reg.race.allies rogue;beloved
registerrace

local reg.race.name demon
local reg.race.enemies all;hated
local reg.race.allies undead;demon;goblin;orc;beloved;evil;vermin;spider
registerrace

local reg.race.name evil
local reg.race.enemies all;hated
local reg.race.allies evil;demon;goblin;orc;beloved
registerrace

local reg.race.name good
local reg.race.enemies hated;evil;demon;orc;goblin;undead
local reg.race.allies beloved;human;good;hguard
registerrace

local reg.race.name nothing
local reg.race.enemies none;hated
local reg.race.allies none;beloved
registerrace

local reg.race.name hated
local reg.race.enemies all;hated
local reg.race.allies none
registerrace

local reg.race.name beloved
local reg.race.enemies none
local reg.race.allies all;beloved
registerrace
}

Do not use "hated" - because they'll also attack each other, it serves primarily as an agro function (as "beloved" serves as the opposite.)
 
Top