Main Menu
Home:
News

Mafia I General:
The Story
The Characters
The City
The Missions
The Cars
The Secret Cars
The Music
Reviews

Mafia I Tips & Tutorials:
Tutorials
Game Tips
Easter Eggs
Freeride Extreme Guide
Car Model Names List
Car Top Speed List
Car Photo Gallery

Members:
Member List
Private Messaging
Hall of Fame

Community:
Contact Us
 Forums
Last 20 Forum Posts:
 
Post: 1
Tommy hands
Last post by AMadeMan in Mafia Mod Help on Nov 24, 2017 at 02:39:37

Post: 2
Mafia Actually Really Remastered (By You, Not Yet)
Last post by AMadeMan in Mafia Mods on Nov 24, 2017 at 01:48:09

Post: 3
Mafia Freeride-Expansion Country+city
Last post by Abradox in Mafia Mods on Nov 23, 2017 at 23:46:16

Post: 4
Mafia is now back on Steam!!!
Last post by flovivi in Mafia 1 Game on Nov 23, 2017 at 16:42:18

Post: 5
Ikarus mod 3.0
Last post by liaz6212 in Mafia Mods on Nov 23, 2017 at 03:33:36

Post: 6
Crashing with RCF
Last post by PtyIersworId in Mafia Mod Help on Nov 20, 2017 at 02:15:27

Post: 7
Mafia 1 - change the sky texture in a single misssion?
Last post by ASM. in Ask a Modder - Modding on Nov 19, 2017 at 16:05:43

Post: 8
1957 Ford Thunderbird from 60's Mod v2
Last post by VCTaxiDriver in Mafia Mods on Nov 19, 2017 at 06:34:32

Post: 9
Real Car Facing MOD v1.6
Last post by spartaque12 in Mafia Mods on Nov 18, 2017 at 21:33:28

Post: 10
M1 - a problem with visibility of objects
Last post by falkvard in Ask a Modder - Modding on Nov 18, 2017 at 19:13:21

Post: 11
Compatibility issues with MafiaCon + Behar's widescreen fix
Last post by Muggy in Mafia 1 Game on Nov 18, 2017 at 13:06:33

Post: 12
Looking back: Mafia hype in the year 2000
Last post by PtyIersworId in Mafia 1 Game on Nov 18, 2017 at 03:39:54

Post: 13
Mafia Freeride Extended Mod
Last post by Abradox in Mafia Mods on Nov 17, 2017 at 16:57:22

Post: 14
Problem in mission moonlighting
Last post by AsaSK in Mafia I Help on Nov 12, 2017 at 17:22:48

Post: 15
Converting a car to Mafia 1 using 3DS Max
Last post by huckleberrypie in Ask a Modder - Modding on Nov 11, 2017 at 12:40:38

Post: 16
I need help with windows and doors
Last post by Numero8 in Ask a Modder - Modding on Nov 09, 2017 at 19:42:27

Post: 17
PC audio devices! Help!
Last post by Muggy in Off-Topic on Nov 07, 2017 at 07:33:42

Post: 18
missions .4ds to .3ds question
Last post by R_J_V in Ask a Modder - Modding on Nov 06, 2017 at 11:53:02

Post: 19
Model T video
Last post by Hunter in Mafia 1 Game on Nov 06, 2017 at 09:39:29

Post: 20
Mafia LHMP
Last post by Bogdans30 in Mafia 1 Game on Nov 06, 2017 at 02:02:41


MafiaScene.com Forums
 
Up Down

Posts since last visit
View your posts
Unanswered posts
 Gallery
arrow Last 5 Pictures:
 
 
Up Down

Last 10 Comments:
LOST HEAVEN CHRO...
LOST HEAVEN CHRO...
Having a drink w...
Having a drink w...
Having a drink w...
Having a drink w...
MAFIA box conten...
MAFIA box conten...
Limited Edition ...
Headlights

Gallery Statistics:
480 pictures
10 albums
367 comments
84596 views
 Facebook
 Basic scripting tutorial  
Introduction:
This tutorial lists the functions and usages of some of the more common scripting terms. It also provides a do-it-yourself guide which uses all of these functions.

Part 1: The Terms
These are the common scripting terms you will learn to use in this tutorial.

findactor #, "name"
Most of your scripts will revolve around actors. Actors can be anything in the game world. For the purposes of this tutorial we will choose a trash can as an actor.

Open Capone, and load the mission entitled FREERIDE. Pick your favorite trash can on the street. Once you've picked on out, hold down Ctrl and left-click the object to select it. In the right hand corner of the screen
there will be several dropdown menus. Click the one that says "Description." The name here is the unique name of your actor. Write this into your findactor script.

I chose the trash can called "popel." "Popel" is located behind Lucas Bertone's. My findactor script now looks like this:

findactor #, "popel"

Now choose a number for your trash can. It is not recommended to use 0 an actor number. I chose 2 as my number. Now my script looks like this:

findactor 2, "popel"

*From now on I can refer to this actor as 2 in all my other scripts.

dim_act #
This determines the number of actors allowed in your script. It does not have to be exact. It must be equal or larger than the total number of actors you will actually use.
To ensure that you won't go over the allowed number, put this in your script:

dim_act 99

*This allows 99 actors, which you probably will not be using.

dim_flt #
This allows for the total number of variables in your script. This is for more advanced modders, and beginners need not bother with it. It operates the same way as dim_act, however, so you might as well put it in your script.

dim_flt 99

*Variables are very complex, and will not be covered in this tutorial, as I myself do not fully understand them.

dim_frm #
This sets the number of frames in your script. Again, this works the same way as the first dim_ scripts. Apply it in the same way.

dim_frm #

*You may be wondering what frames are. You've just determined how many you will have, but you do not know what they do yet. They are covered below.

findframe #, "name"
This works in essentially the same way as the findactor script. Frames are measures of location in Mafia, and they determine where an object will spawn. In this tutorial we will learn how to spawn new objects, so this is a useful
command.

In order to set your frame's location, you must first choose an object from the Capone map. I chose a yellow steel drum behind Lucas Bertone's. Its name is "xbarel 25." "Xbarel 25" will set the location for my frame, but it needs a number.

Since the number 2 is already taken, I will use 3. Now my script looks like this:

findframe 3, "xbarel 25"

*You should write down the names and numbers of all your actors and frames if you intend to use a lot of them.

commandblock #
This sets whether several commands can be processed at the same time, or must go frame by frame.

It toggles between On and Off. Setting the number as 1 turns it on. 0 turns it off.

findnearactor xx, yy, zz
xx is the actor that the command searches from. yy is the new actor's ID. zz is the type of actor it will be. The list of actors that can be chosen are as follows:

Player, Enemy, Car, Detector, Door, Railway, Box, Bottle, Traffic_person, Traffic_car, Bridge, Dog, Airplane, Turnout, Pumper, Race camera

I do not know what some of these actors are. I don't know:

Detector, Turnout, Race camera

Let's say you want to spawn a new pedestrian, and you want the pedestrian to be near "popel," the trash can behind Lucas'. xx would equal 1, because 1 is the number assigned to "popel." yy would be a number of your choosing. For my new actor, I've chosen 3. For zz simply fill in the type of actor you want from the list. I want a dog, so I'll choose Dog. Now my script looks like this:

findnearactor 1, 4, Dog

*Now you're halfway there. You've selected what type of actor you want, but you don't have it yet. The next command covers that.

actor_duplicate xx, yy, zz
This duplicates the actor xx and makes the duplicate number yy. zz must be set to 0 or the new actor will be frozen.

Since I picked a Dog actor and named it 4, I'll duplicate 4 and make the duplicate named 5. Now my script looks like this:

actor_duplicate 3, 4, 0

*Now I have a dog behind Lucas Bertone's! From now on the new actor will be referred to as its duplicate number. The actor it is copied from is now useless.

actor_setplacement xx, yy
This sets the frame (yy) that an actor (xx) will be in. I want my dog near the yellow steel drum behind Lucas, which is named "xbarel 25." Since I determined that the frame around "xbarel 25" is 3, I'll place my dog (5) by the drum (3). Now my script looks like this:

actor_setplacement 5, 3

*My dog is now waiting behind Lucas Bertone's, and near the yellow steel drum.

getactiveplayer #
This is a simple one. The # is the number you associate with Tommy. This is why I said not to name any other actors 0. I want Tommy to be 0. It's very simple. Now my script looks like this:

getactiveplayer 0

human_changemodel xx, "yy"
xx is the actor whose model is being changed, and "yy" is the model xx is being changed to. I want Tommy to change into a hooligan when the script is initiated, so my "yy" is "Hoolig02.i3d". To choose a model, find the .4ds file you like in the Models folder (after you've extracted it). Then, just change the .4ds to .i3d, and you've got your model. Now my script looks like this:

human_changemodel 0, "Hoolig02.i3d"

*Remember, 0 is the number assigned to Tommy by getactiveplayer. For the player ID you do not need a findactor script.

human_talk xx, ######, zz
This makes a character talk by playing a sound file from the game's archives. xx is the ID of an actor. ###### is a sound file's 6 digit number. zz is not needed. I want Tommy to say "OK, I'll do it," when the script starts. The sound ID for that phrase is 14010530. The ID for the Tommy is 0. Now my script looks like this:

human_talk 0, 14010530

"OK, I'll do it."

human_addweapon ww, xx, yy, zz
ww is the actor ID in this case, not xx. I repeat, WW is the actor ID here, NOT XX. yy is the amount of ammo the gun spawns with. zz is the extra ammo. So, if I want Tommy to spawn with a Colt 1911 that has 5 shots in the clip and 3 bullets in Tommy's pocket, I'll make yy=5 and zz=3. I'll also need to know the Colt 1911's ID. The IDs for all the weapons in the game are as follows:

0- Empty hands
1- Special Action
2- Knuckleduster
3- Knife
4- Baseball Bat
5- Molotov cocktail
6- Colt Detective Special
7- S&W model 27 Magnum
8- S&W model 10 M&P
9- Colt 1911
10- Thompson 1928
11- Pump shotgun
12- Saw off shotgun
13- US Rifle M1903 Springfield
14- Mosin-Nagant 1891/30
15- Grenade
16- Key
17- Bucket
18- Flashlight
19- Documents
20- Bar
21- Papers
22- Bomb
23- Door keys
24- Safe key
25- Crowbar
26- plane ticket
27- package
28- Wooden plank
29- Bottle
30- Small Key
31- Sword
32- Dog's Head
33- Thompson 1928 no sound
34- Pump action shotgun no sound

As you can see, the Colt 1911 is number 9. Now my script looks like this:

human_addweapon 0, 9, 5, 3

I have a gun. Not bad, huh?

human_getowner xx, #
This makes the car owned by actor xx whatever number you should choose. I want the car Tommy's in to be 10. Tommy's ID is 0, as mentioned previously. Now my script looks like this:

human_getowner 0, 10

This means that whatever car Tommy is currently in is labeled as 10, not just the one he starts Free Ride in.

enemy_move_to_car xx, yy[, zz]
This makes a character move to a car. xx is the car the character moves to. Despite the script name, the character in question does not have to be an enemy. yy is the seat that the character moves to. Note: this does not mean that the character will ENTER the car, simply that he will approach the specified window. The numbers for different seating positions are as follows:

0- driver?s door
1- front passenger
2- rear left
3- rear right

zz is whether or not the character will move running or walking. The defualt is walking, but it can be made to run by entering ,run.

You'll note that this script does not require an actor ID. This is because this command automatically detects what actor's script this is. I want this to happen when I approach a passenger in a taxi. I want him to walk. Now my script looks like this:

enemy_move_to_car 10, 0

*Remember that 10 is the ID of the car Tommy is currently in.

freeride_scoreadd xx
xx is the amount of money to add to your Free Ride counter. It's that simple. When I talk to my taxi passenger I want to get $10,000. Hey, if you bother to learn the script I think you deserve to cheat! Now my script looks like this:

freeride_scoreadd 10000

Bling bling!

enemy_vidim #
Toggles between on and off whether the player can see and hear his enemy. 1 is On, 0 is off. Now my script looks like this:

enemy_vidim 1

I wanna SEE my opponents!

Part 2: The Script
Now we have everything we need to compile a basic script. When we put these pieces together they should look like this:
[NOTE: Everything in brackets is there for your help, and should not be included in the actual script.]

?? [debug_me]

commandblock 1
enemy_vidim 1

dim_act 99
dim_flt 99
dim_frm 99

findframe 3, "xbarel 25"

getactiveplayer 0

human_getowner 0, 10
findactor 2, "popel"
findactor 11 <--[NOTE: Actor 11 is left blank so you can determine an actor for it later.]

//[NOTE: The slashed ensure that whatever is behind them will not be registered in the game.]
enemy_move_to_car 10, 0

human_talk 0, 14010530
human_addweapon 0, 9, 5, 3
human_changemodel 0, "Hoolig02.i3d"
freeride_scoreadd 10000

findnearactor 1, 4, Dog
actor_duplicate 3, 4, 0
actor_setplacement 5, 3


Part 3: Implementing the Script
This is the easiest part. Just copy all that script. Then open the "taxi_pas.dat" file in the Mafia Systems folder (providing, of course, that you've extracted it). You don't have the proper tool to open "taxi_pas.dat," so use notepad. Then, delete everything in the file and replace it with the script above.

Credits
This tutorial is made by Troy Zuniga.

 User Menu
User Avatar

Username:

Password:

Remember Me

Register a free account!

Members:
• Latest: fjollumi...
• Today: 0
• Total: 5228

Online:
• Total: 3
• Guests: 2
• Members: 1
  • AsaSK

 
Since:
17th October 2003
 Shout Box
Muggy shouts:
He gives a very good review of both the original lincensed version and the GOG one as well.

Shouted at: 5:56am GMT on Thu 16th Nov 2017

 
AsaSK shouts:
Do you know I did wonder whether that was the same Mack, still haven't watched his review because I'm a coward.

Shouted at: 5:33am GMT on Thu 16th Nov 2017

 
Muggy shouts:
Yeah that was the first ever Mafia site before LH. Mack who does Worth a Buy was the Webmaster of Mafia World; created before the game was released - originally there was supposed to be multiplayer apparently.

Shouted at: 4:54am GMT on Thu 16th Nov 2017

 
AsaSK shouts:
This made me laugh, oh hindsight LOL - Laugh out Loud [http://archiv e.kontek.net/m afia.3dactionp lanet.gamespy. com/multifeat. htm]

Shouted at: 4:32am GMT on Thu 16th Nov 2017

 
AsaSK shouts:
LOL - Laugh out Loud

Shouted at: 3:30am GMT on Sun 12th Nov 2017

 
Muggy shouts:
reledozmed - two to be taken before meals.

Shouted at: 1:10am GMT on Sat 11th Nov 2017

 
AsaSK shouts:
medzodeler

Shouted at: 12:12am GMT on Sat 11th Nov 2017

 
Numero8 shouts:
zmodeler

Shouted at: 7:44pm GMT on Thu 9th Nov 2017

 
Muggy shouts:
Couldn't believe it, my Palit Geforce GTX 970 just died. Fortunately still had my EVGA GTX 760 in my old PC so installed that until I get another GPU.

Shouted at: 4:28pm GMT on Wed 1st Nov 2017

 
AsaSK shouts:
We took a blow around 2010 when the host went down and in the 3-year gap that followed we lost the forums, gallery, downloads & most of our site traffic. We've been slowly but surely climbing back up since then! Some of the best Mafia minds are here Wink

Shouted at: 12:38pm GMT on Sun 29th Oct 2017

 
Okcaz shouts:
I havent been on this site since 2004. Looks like it hasnt changed a bit.

Shouted at: 4:50am BST on Mon 23rd Oct 2017

 
AsaSK shouts:
COMING SOON TO THE GALLERY: Something rather cooooooooooooo oool?

Shouted at: 9:55am BST on Thu 12th Oct 2017

 
AsaSK shouts:
I had forgotten this! I did know that he was voicing Hey Arnold! The Movie at the same time his 23-year-old son was playing Tommy LOL - Laugh out Loud

Shouted at: 7:33am BST on Wed 4th Oct 2017

 
Muggy shouts:
Interesting fact Asa - Also his father Paul Sorvino starred in Goodfellas which was a big influence on the development of the game as well.

Shouted at: 7:48am BST on Thu 28th Sep 2017

 
AsaSK shouts:
Fun fact: Michael Sorvino recorded Tommy's lines at 2K's New York studio in 2001 - aged 23!

Shouted at: 7:26pm BST on Wed 20th Sep 2017

 
ZaKlaus shouts:
Heyo!

Shouted at: 2:06pm BST on Wed 6th Sep 2017

 
lostinmafia_heav... shouts:
It's downright scary sometimes.

Shouted at: 9:27am BST on Wed 23rd Aug 2017

 
Mnich shouts:
Time flies so fast. It's crazy!

Shouted at: 6:06pm BST on Wed 9th Aug 2017

 
Muggy shouts:
It's a pity Chris K is not around to alter your join date in the database.

Shouted at: 4:25pm BST on Wed 9th Aug 2017

 
AsaSK shouts:
Thank you Tim!

Shouted at: 11:45pm BST on Tue 8th Aug 2017

 
- History -


Log-in to Post a Shout
 Affiliates
 Downloads
arrow Last 10 Downloads:
 
 
Up Down

Downloads statistics:
532 downloads
15 category's
tickling-videos.net
Important Legal Notice
Design Mafiascene.com.