Game Help

Imperian has hundreds of help files to help you learn more about the game and how to play.

7.4 Mob Reactions

Reactions are very basic scripts that offer you the ability to customise the way your loyal mobs react to the world around you. You can make it so that your loyal mobs will greet your loved ones, spit on your enemies, and fawn over you on command.

How Do Reactions Work?
----------------------
Reactions consist of a trigger, an action, and an optional condition. Whenever the mob detects the initiation of the trigger, the mob will perform the action. If the reaction has a condition attached to it, the mob  will only perform the action if the trigger is initiated with the condition met.


What Are Triggers?
------------------
Triggers are events in Imperian that your mob might observe. Some examples of triggers are: hearing something in the room, seeing somebody enter the room, or being attacked. The full list of triggers that you can detect in your mob reactions will be listed in the command summaries below.

Triggers can also have parameters associated with them. These parameters allow you to fine-tune the situations in which your mob will react to a trigger. Parameters are contextually linked to certain triggers and will behave different across different trigger types. The list of trigger parameters that you can use will be listed in the command summaries below.


What Are Actions?
-----------------
Actions are things that the mob can do. Some examples of actions are: saying something, attacking someone, or performing an emote. The full list of actions that mobs can take in reactions will be listed in the command summaries below.


What Are Conditions?
--------------------
Conditions are options that can be applied universally to any trigger. They are similar to trigger parameters, but work the same for all triggers, whereas parameters can work differently for different triggers. Each reaction can only have one condition. Examples of conditions are: reacting only when a personal enemy performs an action, or reacting only when a member of an organization performs an action. The list of reaction conditions will be listed in the command summaries below.


What Mobs Can Use Reactions?
--------------------------------
Reactions can be set on your personal house servants, loyal pets, familiars, and shopkeepers. You can bring your house, shop, and pets to life with an exciting array of mobs who will react to any people who might enter your house. You can only use reactions on mobs that are loyal to you.


How Do I Set Reactions?
-----------------------
First, you must acquire a mob reaction slot. You can purchase slots for credits in a variety of package sizes. Once you have a slot, you then assign a mob and reaction to that slot. You will be able to freely make modifications to that reaction for a 24-hour period. After 24 hours, the reaction will become locked and you will not be able to make any further modifications to it.

You can unlock a reaction slot for 1 credit, which will then give you another 24-hour period during which you can make any modifications you want to the reaction.

If you want to delete a reaction and use its slot for another mob, you can remove the reaction for 5 credits.


Commands
-----------

REACTION SUMMARY
  - See a list of the mobs on which you have set mob reactions.
  - This also shows you your number of free mob reaction slots.

REACTION BUY <number>
  - Purchase some reaction slots. Slot packages and prices:
   1 slot:   25 credits
   3 slots:  50 credits (16.6 credits each)
   5 slots:  75 credits (15 credits each)
   7 slots: 100 credits (14.2 credits each)
   9 slots: 125 credits (13.8 credits each)
  11 slots: 150 credits (13.6 credits each)
  13 slots: 175 credits (13.4 credits each)
  15 slots: 200 credits (13.3 credits each)
  20 slots: 225 credits (11.3 credits each)
  25 slots: 250 credits (10 credits each)

REACTION SLOTS 
  - Lists the number of slots available to you.

REACTION <mob> LIST
  - See the list of reactions assigned to a specific mob.

REACTION <mob> <id> SHOW
  - See the detailed information about a specific reaction.

REACTION <mob> ADD <trigger>
  - Adds a new reaction to one of your loyal mobs.
  - You will be able to freely modify the new reaction for 24 hours before
    it will become locked.
  - Mobs can react to the following triggers:
    - Being attacked
    - Hearing something said in the room
    - Being told something
    - Being given something (this can't be applied to house humgiis, ibexes and gremlins)
    - Seeing someone enter the room
    - Seeing someone leave the room
    - Being targeted by an emote
    - Witnessing an emote made in the room

REACTION <mob> <id> TRIGGER <trigger> 
  - This will change the basic trigger type from when you first 
    created the trigger.

REACTION <mob> <id> ACTION <action>
  - Sets the action that a mob will take when the trigger is matched.
  - Valid actions:
    - Say something in the room
    - Send a tell to someone in the game
    - Emote something in the room
    - Drop an item that has been given to the mob (this action can only
      be used in response to the "give" trigger)
    - Return an item that has been given to the mob (this action can only
      be used in response to the "give" trigger)
    - Attack the person who has triggered the reaction.
  - You can use the following variables in actions to create personalized
    responses.
    - $(who) - The person who performed the trigger
    - $(he), $(him), $(his), $(He), $(Him), $(His).  - Pronouns set according
      to the gender of the person who performed the trigger.
    - $(text) - The text that was said or emotes.
    - $(item) - The description of an item that was returned to the giver.

REACTION <mob> <id> CONDITION <condition>
  - Add a qualifying condition to one of the mobs's existing reactions.
  - Mobs can act based on the following conditions:
    - Members of a specific organization
    - Members of a specific organization above or below a certain rank
    - Enemies of an organization
    - Enemies of the mob's master
    - Allies of the mob's master

REACTION <mob> <id> CHANCE <chance>
  - Gives the mob a random chance to react to the trigger.
  - By default, mob triggers always activate.
  - Chance can be between 1 and 100.

REACTION <mob> <id> ENABLE
  - Enable a mob reaction.
  - This will make the reaction permanent and you will be unable to make any
    further modifications to the reaction.
  - If you wish to make changes to any reactions, you will have to remove the
    reaction from the mob and create a new one with the new changes.

REACTION <mob> <id> DISABLE
  - Prevent a reaction from being triggered.

REACTION <mob> <id> UNLOCK
  - Costs 1 credit.
  - Unlocks the reaction and allows you to freely make any modifications
    you want to it for 24 hours.

REACTION <mob> <id> REMOVE
  - Costs 5 credits.
  - Removes a reaction from a mob and allows you to reuse its slot for
    another mob.

Normally reactions do not require administration approval. However, should yours be decided to be unacceptable, the administration may decide to require all your reactions to go through approval before they can be enabled.

IMPORTANT: Once added, the reaction can only be edited for 24 hours. If you need to edit the reaction again after this time, you can use REACTION <mob> <id> UNLOCK to unlock it for another 24 hours, at the cost of 1 bound Credit.


Triggers
--------

The following triggers are available:

* ENTER - the mob sees a player enter the room

* LEAVE - the mob sees a player leave the room

* SAY - something is said in the room

* SAY <text> - something including the provided text is said in the room

* TELL - someone tells something to the mob

* TELL <text> - someone tells something including the provided text to the mob

* GIVE - something is given to the mob

* GIVE <list> - something from the provided list is given to the mob; the list can include more entries

* ATTACKED - the mob is attacked

* EMOTED - an emote is targetted at the mob

* EMOTED <text> - an emote containing the text is targetted at the mob

* EMOTE_SEEN - the mob sees an emote being used

* EMOTE_SEEN <text> - the mob sees an emote containing the text being used


Actions
-------

Most actions allow the following expansions: $(text), $(who), $(he), $(his), $(him), $(He), $(Him), $(His). These all reference the player performing the action, except for $(text), which is the text being said/emoted/etc. When reacting on an item being given, $(item) references the item.

* SAY <something> - can only be used if the mob is sentient.

* TELL <something> - tells something to the player initiating the action.

* RETURN <emote> - only usable with the GIVE trigger; returns the given item back. If an emote is provided, it is displayed.

* DROP <emote> only usable with the GIVE trigger; drops the given item. If an emote is provided, it is displayed.

* ATTACK - attacks the player triggering the action. The mob will not attack if it cannot normally do so.

* EMOTE <emote> - performs the chosen emote; it can be a built-in or a custom one.


Conditions
----------

* MEMBER OF <org> - player is a member of the provided org

* MEMBER OF <org> RANK Y / Y+ / Y- - player is a member of the provided org at a rank of Y / Y or more / Y or less. Only works for cities, councils, guilds, and sects.

* ORGENEMY <org> - player is an enemy of the organisation. Includes unwanted status.

* ENEMY - player is an enemy of the mob's owner

* ALLY - player is an ally of the mob's owner


Reaction costs
--------------

Reaction costs can be seen on REACTION BUY, and are listed here as well for reference.

1 mob reaction    - 25 Bound Credits (25cr per reaction)
3 mob reactions   - 50 Bound Credits (16.66cr per reaction)
5 mob reactions   - 75 Bound Credits (15cr per reaction)
7 mob reactions   - 100 Bound Credits (14.28cr per reaction)
9 mob reactions   - 125 Bound Credits (13.88cr per reaction)
11 mob reactions  - 150 Bound Credits (13.63cr per reaction)
13 mob reactions  - 175 Bound Credits (13.46cr per reaction)
15 mob reactions  - 200 Bound Credits (13.33cr per reaction)
20 mob reactions  - 225 Bound Credits (11.25cr per reaction)
25 mob reactions  - 250 Bound Credits (10cr per reaction)


Examples
------------

Examples:

Create a reaction on a mob that makes her mob greet people who enter the
room:

REACTION <mob> ADD ENTER
REACTION <mob> <id> ACTION greet $(who)
REACTION <mob> <id> ENABLE

Create a reaction on a mob that makes the mob respond whenever it hears
the word "Garryn"

REACTION <mob> ADD SAY
REACTION <mob> <id> TRIGGER say garryn an impressive coder, isn't he?
REACTION <mob> <id> ENABLE

Create a reaction on a mob that makes the mob slap any enemy of Antioch 
that enters the room.

REACTION <mob> ADD ENTER
REACTION <mob> <id> CONDITION orgenemy of antioch
REACTION <mob> <id> EMOTE slap $(who)
REACTION <mob> <id> ENABLE

Create a reaction on a mob that sends a tell to the owner every time it is
given an item.

REACTION <mob> ADD GIVE
REACTION <mob> <id> ACTION tell jeremy $(who) just gave me a present!
REACTION <mob> <id> ENABLE