Page 1 of 1

Maybe I missed it

Posted: Sun Jan 15, 2006 10:14 pm
by foodstamp
But I have searched the manual and forums on how to get a enemy AI model into the level

Posted: Sun Jan 15, 2006 10:18 pm
by AndyCR
Welcome to the forums!

Look up Pawns in the Online Help, it should have everything you need. There are some sample scfripts included in the scripts folder (they may be in a subsfolder) of the default RF installation.

Posted: Sun Jan 15, 2006 10:29 pm
by foodstamp
hmm
online says this
Pawn
The Pawn entity is used to make scriptable friendly nonplayer characters. They work in conjunction with the ScriptPoint entity, which provides paths for the Pawn to travel on.

Field Descriptions
The fields for the Pawn entity are:

Field
Description

Angle
direction pawn will face when spawned

ChangeMaterial
Name of section containing material change info.

ConvOrder
name of conversation run at the start of a conversation

ConvScriptName
name of script file used for conversations

HideFromRadar
If true then does not show on radar

PawnType
name of the pawn type as defined in Pawn.ini

ScriptName
name of the script file used by this pawn

SpawnOrder
name of the Script Order run at spawn time

SpawnPoint
name of a ScriptPoint associated with this pawn

SpawnTrigger
trigger name used to spawn this entity

szEntityName
Name of this entity


The details of the Pawn's actor are defined in a file called Pawn.ini, which is stored in the Install folder. Each Pawn type is defined by a section in the file defined by enclosing its name in square brackets. A Pawn type called 'BigRat' would be defined by a section like the following:

[BigRat]

actorname = rat.act - name of actor to use

actorrotation = 0 180 0 - rotation, in degrees to stand actor up

actorscale = 1 - scale of actor

actoralpha = 255 - initial alpha of actor, default is 255

animationspeed = 1 - multiplier for speed of actor animation

fillcolor = 255 255 255 - color of actor

ambientcolor = 255 255 255 - brightness of actor

subjecttogravity = true - true if subject to gravity

boundingboxanimation = idle1 - name of animation used for bounding box

shadowsize = 0 - size of shadow bitmap

shadowalpha = 128 - transparency of shadow bitmap

shadowalphamap = shadowalpha.bmp - name of alpha bitmap for shadow

shadowbitmap = shadow.bmp - name of bitmap used as shadow

projectedshadows = false - whether this pawn casts a projected shadow or not

stencilshadows = false - whether this pawn casts stencil shadows or not

icon = man.bmp - name of the bitmap used as the conversation icon

environmentmapping = true - if true then apply environment mapping to actor material

allmaterial = true - if true apply environment mapping to all actor materials

percentmapping = 75 - percentage of mapping to apply to material (0 to 100)

percentmaterial = 75 - percentage of material to use while mapping

icon is optional and is used to identify the Pawn on the conversation screen. It uses color 255 as the transparent color.

If environmentmapping is set to true and allmaterial is false then only those actor materials whose name starts with 'env_' will have environment mapping applied to them.

If actoralpha is not specified a value of 255 is used.

To make a Pawn with no bounding box and that is invisible (used for camera movement) use

boundingboxanimation = nocollide

Shadows are disabled for Pawns of this type.

See the document on Pawn Scripting for details on controlling the Pawn at run time.

Pawn Weapons
You can define weapons in the Pawn.ini file that can be attached to the Pawn actor similar to the 3rd person weapons for the player. These weapon actors must have the same skeleton as the Pawn actor and require no animations, as they are animated by the Pawn actor's current animation. A Pawn weapon called '9mmAR' would be defined as follows

[9mmAR]

actorname = 9mmar.act - name of actor to use

actorrotation = 0 180 0 - rotation, in degrees to stand actor up

actorscale = 1 - scale of actor

fillcolor = 255 255 255 - color of actor

ambientcolor = 255 255 255 - brightness of actor

type = weapon

environmentmapping = true - if true then apply environment mapping to actor material

allmaterial = true - if true apply environment mapping to all actor materials

percentmapping = 75 - percentage of mapping to apply to material (0 to 100)

percentmaterial = 75 - percentage of material to use while mapping

If environmentmapping is set to true and allmaterial is false then only those actor materials whose name starts with 'env_' will have environment mapping applied to them.
Does not say how too bring in the mesh or anything

Posted: Sun Jan 15, 2006 10:50 pm
by AndyCR
actorname = rat.act - name of actor to use
in that case, they are using rat.act as the mesh.

Posted: Mon Jan 16, 2006 1:29 am
by Spyrewolf
Ah hang on, do you mean into the level editor?

looks like everything is defined ok, you need to drop a pawn in the level editor then put the name of the .act file in the PawnType
entry i.e rat

then hit the refresh button in the mesh should appear in the editor

Posted: Mon Jan 16, 2006 2:33 am
by hike1

Posted: Sun Mar 12, 2006 3:49 pm
by incenseman2003
AndyCR did a really great tutorial for this.

Here are the steps outlined in the tutorial:

"Open the level you wish to add it to

make sure Template mode button on the toolbar is selected (looks like a purple box around the cursor)

look for the combobox that says Entities. Select it, and choose Pawn from the list.

In the 3D View, click on the curface you wish to put your pawn. A light bulb should move there. Hit Enter.

Next, choose Modify Brushes and Faces mode from the toolbar

select the pawn you just created in any view (the 3D view is easiest) (it will turn green).

On the right, you should see a series of controls appear.

Double-click PawnType, and type Idler (this was the section title we used in Pawn.ini, remember?). Hit OK.

Double click on ScriptName, and type idler.s. Hit OK. This is the script we saved in the Scripts folder.

Finally, double-click SpawnOrder. This field denotes which order in the script you wrote will be executed first (when the pawn comes into the level, AKA "spawns"). In our case, it is Spawn. Hit OK.


Run your level as you normally would. you should have a guy standing in your level breathing slightly. Congratulations, you've just created your first pawn!

For more information on pawns, see the various sections in the manual and Dan Valeo's excellent ebook."

There is no reference to entering Pawn.ini into anywhere.

Can you post a link to "an Valeo's excellent ebook"?

Again in foodstamps post about the online help, there is no mention of where to enter the Pawn.ini.

Im half way to understanding this process and just need a little more info.

The entity atribte are as follows:
Angle= 000
ChangeMaterial= blank
Convo Order= blank
ConvoScriptName= blank
HideFromRadar=False
origin=-456 -82 -4
PawnType=dancer.act
ScriptName=idler.s
SpawnOrder=Spawn
SpawnPoint=blank
SpawnTrigger=blank
szEntityName=blank

There are alot of people saying follow this tutorial and read this source, they are all good sources, but none of what I have read gives what I need. Did I miss it in the things I read? It is very common that the person that knows the most writes a tutorial and leaves something out. Later someone says that what was left out is just common sense or something like that. If this is obvious in the above settings, please make me look silly and point it out. I am in front of my PC between 5-6AM and read and practicing till around midnight-2AM. I still havent found what I have been looking for.

There is no atitude intended and I feel that all that have given information have done so to the best of there ability.

The question still remains.

Where does one enter Pawn.ini?

Posted: Sun Mar 12, 2006 5:31 pm
by AndyCR
its actually kind of funny, because the tutorial was made because foodstamp was having trouble. :)

the book in question is found here. http://www.realityfactory.info/cms/inde ... umentation

i posted similar to this in your topic, but rf uses .ini (configuration, most programs used to use it but now most have moved on to the registry or xml files instead) files to store information on things like pawns(people), the player, weapons, etc.

they are found in realityfactory/install. the one you want to enter the information given in the tutorial into is named pawn.ini. open it, enter the information at the top, save it, and all should work.

Posted: Sun Mar 26, 2006 8:48 pm
by incenseman2003
I have succeeded in getting a new character into the game. However, after giving it a texture it does not show one in the game. The actor also lays on its back and I cannot get it to stand up. It also doesnt use the animation that I give it. It does use any script that I give it. I used milkshape to give it a texture. In milkshape, I assign all the vertices to thier respective joints but when I rotate the mesh the bones wont rotate with it.

So my issues in a nutshell are:
1) Actor wont use a texture.
2) Actor wont stand up.
3) Actor wont use animation.
3) Bones and mesh do not seem to stay together in Milkshape.

I also have 3dS Max8, Gmax and 3D Canavas and can use them to do simple stuff.

Any ideas?