Jump to content
Sign in to follow this  
otrebla_snake_ita

How use a downloaded model and texture in OPF?

Recommended Posts

Hi, I downloaded some OPF vehicles and weapons but I don't know how use them in the game: for example, I downloaded a AK47 model (.pbo name's is: AK47CS.pbo) and I put the model in \res\addons

I putted the model too in

\addons

and

\@ak47

nothing, in the game I have the old AK47, yes, too the base model is well but this new is better...I want know how can I use in the game (using how AK47 default in the game) or when can I find a AK47 ("classic" edition) to download

and install...

thank you

PS: Sorry for ortography errors but I'm not english\American biggrin_o.gif

Share this post


Link to post
Share on other sites

This AK47 doesn't overwrite the original one. If you want to use it, you have to equip the soldier in missioneditor... you have to type the following into the init line:

removeallweapons this; this addweapon AK47name; this addmagazine AK47magname; this add magazine AK47magname; this add magazine AK47magname; this addmagazine AK47magname; etc.

The weapon and magazine name should be in the readme of the addon.

You also can use a total conversion. For me best one is FFSX2007. Every unit, weapon and vehicle from the original game is changed with community made addons. I think it would be the best solution for you.

Share this post


Link to post
Share on other sites

Well, I want try other mods, I played the FFSX ever but I want change...and, FFSX doesn't add new faces textures and models, I'd rather play GRAA+SLX+ECP+High island res. pack

biggrin_o.gif

I must modify\add a config.cpp file for replace the original ak47?...I will know you if all will be ok biggrin_o.gif

EDIT: Sorry, I extracted AK47CS.pbo and in the .pbo file there's a file

config.cpp

I must insert here the lines? I must insert the lines in a precise field or where I want? Thank you

Share this post


Link to post
Share on other sites

I take it you have a ready-to-use addon, packaged into a .pbo file.

If that is true, then you do not need to edit any config files to use it!

Put it to OFP\Addons or to OFP\Res\Addons. Usually with an addon comes a readme.txt file which explains where to put the addon file and how to use it. If that is not the case with this addon then it is the addon maker's fault.

Panzergrenadier3 already told you how you can get an addon weapon for your soldier. Nowhere did he say you need to edit config.cpp!

It is not enough to just put the .pbo file into an addons folder. You must tell the game to give that specific weapon to a soldier. Otherwise chances are very low for you to see the addon in-game, as you already found out.

You must be able to use the in-game mission editor. Create a new mission. Put a soldier into the mission. Make it the player. First, make sure the Mission Editor is in advanced mode! In the user-interface panel of the mission editor, there is a word "Easy". Click on it to make it say "Advanced". Otherwise you won't see the initialization field I am talking about next. When you double-click on the unit placed to the map, you get a dialog in which you have an "Initialization" field. Now, you must insert into that field similar text as what Panzergrenadier3 told you. But in order to be succesful, you need to know the classname for the addon! Classnames for the default objects can be found for example from:

http://www.ofpec.com/COMREF/weapons.php

http://www.ofpec.com/COMREF/vehicles.php

Now, I will give you an example of what I would write to an initialization field of a unit in the in-game mission editor, if I wanted to give that unit a Hunting Rifle:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">removeAllWeapons this; this addMagazine "HuntingRifleMag"; this addMagazine "HuntingRifleMag"; this addMagazine "HuntingRifleMag"; this addMagazine "HuntingRifleMag"; this addWeapon "HuntingRifle"

Now, when I would preview the mission, and if that unit was the player unit, then my in-game character would have the Hunting Rifle as the main weapon.

Add the weapon in the code line after the magazines and the weapon will be loaded when you start the mission. Otherwise it is not loaded for you.

You must now find out the classname for your addon weapon, and for its magazine, in order to be able to use it in the game. Just replace the "HuntingRifle" and "HuntingRifleMag" in the code example with the classnames of your specific weapon and magazine.

If you do not want to start creating new missions for the addons you downloaded, or to modify existing missions to use those weapons and units (this is not hard to do, mission.sqm in the mission directory is only file you would need to edit), then there are existing "mods" which give you different weapons, soldiers and vehicles and you do not need to edit anything to use them.

In addition to what mods were already mentioned, there is the FDF Mod ( http://www.fdfmod.org/ ) which is in my honest opinion the most comprehensive and most well balanced with the original game content.

Share this post


Link to post
Share on other sites

well, I want know how can I use the model in Single player campaigns: Reistance and Cold War Cryisis, I must do what you saw?

EDIT: i tried do this in on my player but I have an error

no entry config.cpp/cfgWeapons.AK47CSmag

huh.gif Here's

cfgWeapons code part

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgWeapons

{

class Default {};

class MGun: Default {};

class Riffle: MGun {};

class AK47CS: Riffle

{

scopeWeapon=2;

scopeMagazine=2;

valueWeapon=0;

valueMagazine=1;

model="\ak47cs\ak47cs.p3d";

modelOptics="\ak47cs\optika_ak47cs.p3d";

picture="\AK47CS\pic\w_ak47cs.paa";

optics=1;

opticsZoomMin=0.350000;

opticsZoomMax=0.350000;

displayName = AK47;

displayNameMagazine = AK47 Mag;

shortNameMagazine = AK47;

drySound[]={"weapons\AK47Dry",0.010000,1};

modes[]={"Single","Burst","FullAuto"};

magazines[]={"AK47CSMag"};

class Single

{

ammo="AK47";

multiplier=1;

burst=1;

displayName="AK47";

dispersion=0.000200;

sound[]={"\AK47CS\AK47b.wav",1.000000,1.00};

soundContinuous=0;

reloadTime=0.100000;

ffCount=1;

recoil="riffleSingle";

autoFire=0;

aiRateOfFire=5.000000;

aiRateOfFireDistance=500;

useAction=0;

useActionTitle="";

};

class Burst

{

ammo="AK47";

multiplier=1;

burst=3;

displayName="AK47 Burst";

dispersion=0.000400;

sound[]={"\AK47CS\AK47a.wav",1.000000,1.00};

soundContinuous=0;

reloadTime=0.100000;

ffCount=3;

recoil="riffleBurst3";

autoFire=0;

aiRateOfFire=5.000000;

aiRateOfFireDistance=500;

useAction=0;

useActionTitle="";

};

class FullAuto

{

ammo="AK47";

multiplier=1;

burst=1;

displayName="AK47 Auto";

dispersion=0.000800;

sound[]={"\AK47CS\AK47b.wav",1.000000,1.00};

soundContinuous=0;

reloadTime=0.100000;

ffCount=30;

recoil="riffleBurst3";

autoFire=1;

aiRateOfFire=5.000000;

aiRateOfFireDistance=500;

useAction=0;

useActionTitle="";

};

};

class AK47CSMag: AK47CS

{

scopeWeapon=0;

scopeMagazine=2;

picture="\AK47CS\pic\m_ak47cs.paa";

};

Share this post


Link to post
Share on other sites

You say you have a PBO file of the addon.

That means to me that you should not have to open it, but just put it to an Addons folder and take it into use in the missions.

For the campaign missions, this would mean you would have to edit all of them to use the new units/weapons/vehicles.

Or alternatively, replace the default addon with this new one by modifying it to look like the default (same classname). Is that what you are trying to do?

Share this post


Link to post
Share on other sites

well, for me, all options are ok: I want use the units, weapons and vehicles, all ways are ok for me but I'd rather modify this mod for look like the default....

what I must do for look like default? here's download link

http://ofp.gamepark.cz/index.php?showthis=3383

maybe now you can give me a lot of helps?

:DD

tnx

Share this post


Link to post
Share on other sites

There are two ways to do that.

1. You have to edit the cfg file of OFP it self can be found in C:\Programme\Codemasters\OperationFlashpoint\Dta\data.pbo. Be sure you edit the C:\Programme\Codemasters\OperationFlashpoint\Res\Dta\data.pbo if you use resistance. There you have to search the units wich are using your rifle. Look for class CfgVehicles. There you can find the

               weapons[]={ AK47,...};

               magazines[]={ AK47mag,...};

Replace the "AK47" with "AK47CS" and replace "AK47mag" with "AK47CSmag".

2. You have to edit the mission.sqm from the mission you want to play. There you replace the unit (wich uses the AK47) and replace him with the unit of that addon.

Take a look at the readme file. There you can find all you need.

The complex way to use this weapon in mission editor explained before, it not necessary. If you place the first unit on the map (this is the player) you have to choose east under side, than men and than you can find Soldier (AK47). This is a normal sovjet OFP unit using "your" addon.

3. Why do you not using the "High Detailed Weapon" pack from Inquisitor? There you can find a very nice ak47 and much more nice made guns. And:

It replaces the original weapons!!!!

You can find it on his page: HERE.

I think you have to going to learn how to use the mission editor and/or making missions. You can find a lot of nice tools for creating missions out there and also many nice missions wich you can use as example and learn from them. Go and take a look into the different sections from ofp.info and the other sides.

Share this post


Link to post
Share on other sites

thank you!

EDIT: do you know what file I must modify in these mods=

ECP

SLX

GRAA

DMA

for toggle the ak47 used by the mod (default model and skin) and use INQ weapons?

I think I found the file...thank you! wink_o.gifwink_o.gifwink_o.gif

Share this post


Link to post
Share on other sites

sad_o.gif

I'm sorry, but for my big Noob experience but I saw: only without mods activateds the Inquisitor weaponpack works but I've activated DMA animations, SLX, ECP, GRAA and another but isn't important (high resolution island textures)....I tried too create new folder for look like a mod folder but nothing is happened: weapons models, with these mods activated don't work, I have only new 2d images in the briefing...nothing other...

HELP! sad_o.gif

Share this post


Link to post
Share on other sites

I've no experiences with GRAA, ECP and SLX. But I think they have their own mod-folder. Maybe there is a addon folder. Try to put the INQ weapons into there. Hope that helps....

Share this post


Link to post
Share on other sites

I inserted in addons folders and i created new folders in mods folder:

dta\addons

dta\res

dta\bin

and I putted here the files

but nothing is happened.

Please, make an example, maybe I can know at 100% what do you want say biggrin_o.gif

Share this post


Link to post
Share on other sites

I can only explain it on the FFUR mod as example. On this total conversion you can find an addon folder:

C:\Programme\Codemasters\OperationFlashpoint\ffsx2007\Addons

So if you put you addon in there, it should work with ffur. But I don't know nothing about GRAA and ECP.

Share this post


Link to post
Share on other sites

I DONE IT!!! YEAH yay.gifyay.gifyay.gif

I must only end modify CONFIG.cpp file in SLX directory

biggrin_o.gif

do you know why with GRAA and SLX mods, there isn't the blood?

Share this post


Link to post
Share on other sites

Sorry for digging. I have little question about replacing weapons. I'm playing with GRAA + ECP mod and I want to replace few weapons from GRAA, for example sniper rifle. I've changed few lines in GRAA config to use M40 sniper rifle from ww4 mod also made by Sanctuary:

weapons[]={"ww4_M40","Throw","Put"};

magazines[]={"WW4_W762Sniper_20mag","WW4_W762Sniper_20mag"};

This weapon is working only for one unit (and in mission where I start as this unit for example "Sniper Team"), I would like to use it also in missions where i can choose weapons before mission. But thats not main problem, when mission starts I'm getting error "Cannot load mission, missing addons: ww4_weaponry" but of course mission starts after pressing "ok" (yes, ww4_weaponry.pbo is in addons folder of the mod I'm using, otherwise model/weapon would'nt be in the game). I only want to get rid of the message. :D Anyone can help?

Share this post


Link to post
Share on other sites

Addon dependancy works in special ways.

For addons dependancy on other addons, there is no problem, the classes are well defined, but the problem is that you have added addon classes in the main config :

weapons[]={"ww4_M40","Throw","Put"};
magazines[]={"WW4_W762Sniper_20mag","WW4_W762Sniper_20mag"} ;

The game has no idea where to look for because in the main config you have not declared from which CfgPatches these weapons/ammos are defined, and that's why the error appears.

To declare addon dependancy in a main mod config, you need to look for

	class PreloadAddons

And inside of this class you need to add an entry the to CfgPatches needed for these weapons (WW4_Weaponry from the WW4_Magazines.pbo) so just after

	class ResistanceBIStudio
		{
		list[]={"Noe"};
		};

add the following :


	class WW4things
		{
		list[]={"WW4_Weaponry"};
		};

So the game will know where to look for.

Edited by Sanctuary

Share this post


Link to post
Share on other sites

So BIG thanks! Error message does not appear anymore. :)

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×