GTA: Modification Area

A website for the GTA modding scene


Display results as :

Rechercher Advanced Search

Latest topics
» Big-game starts raising Schneider's profile
Decision Makers EmptySun Mar 04, 2012 2:28 am by lavivi

» [Help] cleo created lighting
Decision Makers EmptyThu Oct 14, 2010 1:03 am by findmy012

» Mission Question
Decision Makers EmptyThu Oct 14, 2010 1:02 am by findmy012

» [IV] Spoiler Script
Decision Makers EmptyThu Oct 14, 2010 1:02 am by findmy012

» Mission mod [help]
Decision Makers EmptySat Sep 18, 2010 5:50 pm by jayd00

» Bc7 Mod Help
Decision Makers EmptyFri Aug 20, 2010 11:19 am by pengpeng

» Found a bug
Decision Makers EmptyFri Dec 18, 2009 4:22 am by _CJ360_

» [IV] Novitec Rosso 599 GTB
Decision Makers EmptyTue Nov 17, 2009 4:22 pm by Kotton

» Hello/Guidance Request
Decision Makers EmptyMon Oct 12, 2009 6:45 am by Adler














----- Русский -----

Если ваш сайт содержит большую коллекцию SCM/CLEO-скриптов (больше 16), напишите на мой e-mail, и я добавлю его в список. Приветствуются скрипты, которые не встречаются на других сайтах ... Спасибо. ))))

----- English -----

If your website has a big enough collection of SCM/CLEO scripts (more than 16) notify me by e-mail
, and I will add it to the list. The unique scripts are preferable ... Thank you. ))))
Log in

I forgot my password

August 2019

Calendar Calendar

You are not connected. Please login or register

Decision Makers

Go down  Message [Page 1 of 1]

1Decision Makers Empty Decision Makers on Sat Apr 04, 2009 9:53 am

While I'm finishing my PC, I will do this, now in San Andreas we have many decision markers. The following opcode work with patterns that you can
create, destroy, alter, assign to the actors and groups of actors. I am aware that many people do not understand how decision markers and such work
so thus, I decided to make this topic.

Decision Maker 0 - the behavior of the actor in the group
Decision Maker 1 - Model behavior
Decision Maker 2 - the usual model
Decision Maker 3 - brave behavior
Decision Maker 4 - cowardly behavior
Decision Maker 5 - Fire behavior
Decision Maker 6 - train driver (?)

Create the decision maker(parameter 1 is the type and the second is the varible to store to) :


060A: create_decision_maker_type 0 store_to 0@ // see pedstats.dat

You can then set it with this opcode:


060B: set_actor 1@ decision_maker_to 0@

The decision maker is no longer needed, - so you can actually release it:


065C: remove_references_to_decision_maker 0@

Create a group decision maker:


06AE: create_group_decision_maker_type 0 store_to 1@ // see pedstats.dat

Set the group decision maker, note: $PLAYER_GROUP is already defined as the
player group in the original main.scm. Code:


06AD: set_group $PLAYER_GROUP group_decision_maker_to 1@

Add decision maker opcode:


0708: add_decision_maker 1@ event 28

Write to the model of an event (see the file PedEvent.txt).
Apparently when an event of this model will work.

Same code as above, - though made for the "groups":


0749: add_group_decision_maker 1@ event 28

Set_decision_maker event:


0709: set_decision_maker 1@ on_event 36 taskID 1022 chance_if_acquaintance respect 0.0 hate 100.0 unk 0.0 unk 0.0 in_car 1 on_foot 1

, set of behaviors when an event some 36 flags. These flags have an exact match with what is written in.
Ped files in the folder "Decision" located in the San Andreas/data/ dir.


074A: set_group_decision_maker 1@ on_event 54 unknown_info 1513 100.0 100.0 100.0 // see *.ped files

Event 54 when something will happen to the behavior of group.

In group behavior using special events:


0749: add_group_decision_maker 0@ event 54 // EVENT_LEADER_ENTERED_CAR_AS_DRIVER
0749: add_group_decision_maker 0@ event 55 // EVENT_LEADER_EXITED_CAR_AS_DRIVER

You can thus specify a group, what to do if the leader (e.g., CJ) got into his car and got out of it.


07BC: set_actor 0xFFFFFFFF decision_maker_to 0@ // AS_pack_version

With this opcode set to -1(0xFFFFFFFF) the actor will maybe do random things, perhaps fight, then run, cower, and etc.

These are unknown - do not seem to do anything:


07E5: unknown_set 65543 decision_maker 0@
0978: unknown_set 65543 decision_maker 0@
07E5: unknown_set 65543 decision_maker 0@

Communications and DM. PED,. GRP files
The default behavior of all pedov taken from the folder data\Decision\ Allowed from *. ped files.
When you create a model of behavior in the basis of a script, too *. ped file in the folder data\Decision\Allowed.

parameter specifies *. ped file, which is taken as a basis.


* 0 - m_empty.ped
* 1 - m_norm.ped
* 2 - m_tough.ped
* 3 - m_weak.ped
* 4 - m_steal.ped

The model of group behavior is stored in the *. grp files.
parameter defines the *. grp file, which is taken as a basis. The parameter can have only one meaning:

* 0 - MISSION.grp

Let's get acquainted more with the format *. ped and *. grp files.
Parameters are separated by a comma, after the last parameter is also a comma. On the same line lists the reactions to certain events.

The first line says "data values2:".
The first parameter - the event on which the actor responds, followed by an integer (function unknown is always 4)
and six groups of parameters. In each group of parameters the first parameter - the code problem, four fractional numbers that determine
the chances for different ways to an object event, then go two flags, the first - the reaction is, if the ped in the car,
the second - the reaction worked if the ped foot (these parameters in accurate copy opcode 0709), followed by six integers,
the purpose of which is unknown. Groups from each other is not divided.

Note: The format *. ped and *. grp files in the folder data\Decision and in the folder data\Decision\Alloweddiffer.
The game uses some files in the folder data\Decision\Allowed.

To make the actor dumb(he does not do anything, even if you smash his head in with a weapon) - you can set the marker to 32:


060B: set_actor 0@ decision_maker_to 32

Example using decision a simple marker:



  $PLAYER_CHAR: Player

while true
wait 250
          $ONMISSION == 0
              00E1:  player 0 pressed_key 10 // -- no


  while not #ARMY.Available
  wait 0
00A0: store_actor $PLAYER_ACTOR position_to 5@ 6@ 7@
04C4: store_coords_to 2@ 3@ 4@ from_actor $PLAYER_ACTOR with_offset 0.0 8.0 0.0
060A: create_decision_maker_type 4 store_to 1@ // brave
009A: 0@ = create_actor_pedtype 4 model #ARMY at 2@ 3@ 4@
0223: set_actor 0@ health_to 500
035F: actor 0@ armour += 500
0446: set_actor 0@ immune_to_headshots 0
04D8: set_actor 0@ drowns_in_water 0
03FE: set_actor 0@ money 50000
0946: set_actor 0@ actions_uninterupted_by_weapon_fire 0
060B: set_actor 0@ decision_maker_to 32 // -- stupid
060B: set_actor 0@ decision_maker_to 1@

wait  0
jf @DCC_03
      8118:  not actor 0@ dead
  jf @DCC_03
        00FE:    actor 0@ sphere 0 in_sphere 5@ 6@ 7@ radius 380.0 400.0 400.0
jf @DCC_04
jump @DCC_02

01C2: remove_references_to_actor 0@ // Like turning an actor into a random pedestrian
065C: remove_references_to_decision_maker 1@ 
jump @DCC_01

034F: destroy_actor_with_fade 0@
065C: remove_references_to_decision_maker 1@
jump @DCC_01

View user profile

Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum