Jump to content
Sign in to follow this  
-IT-Q-

OFPReplacer

Recommended Posts

well i am somewhat surprised that no one has noticed this nice tool  rock.gif

Quote[/b] ]

Softreg has sent us his simple but efficient OFP Replacer tool; which allows you to replace units in mission.sqm file by the one you want (by example for updating BI missions by replacing original addons by community's ones without editing directly the sqm with a text editor).

There are so many cool addons for OFP its just a shame to play with original ones that come with OFP. I for instance like to play original campagin missions with new addons but its easy to figure out changing all thoes units on the mission editor or even note pad can be very painfull. Well not any more. This utilty allows you to replace units in mission.sqm file to one you want. All you have to do is first specify "template".

Old unit: unit you want to replace

New Unit: unit you want to be in mission

Addon: any addons that your new unit uses (you can separate addons by comma)

This utility will:

Replace all units that you have replacement for in a template file (empty New units are ignored)

Add addons only if specified unit was found in the mission

Software req: Windows XP, Microsoft .NET Framework 1.1

ofprelacer.jpg

home site

ofp info news and download links

personal note:

~ did some testing and it seemed to work fine so far

~ you can exchange units and vehicles (no weapons and ammo (yet?))

~ this programm has even more potential if it also adds these features:

+ exchaning weapons and ammo

+ not only sqm file but also sqs and ext files support

+ more than 1 file selectable at the same time (like to convert 1000mission at the same time)

i really hope the auther is willing to enhance to programm and

that mods and maybe even addons will add an xml file every time!

(short summary: you can exchange units in a mission with this programm if you do know the class of the original unit and exchanged one (also requiredAddons class))

Share this post


Link to post
Share on other sites

this sounds very interesting, will try it out later.

Could make Replacement mods a thing of the past.

Do you have to unpbo the mission files? If you set up a template does it work for all missions, ie in a campaign?

Share this post


Link to post
Share on other sites

yea u have to unpbo missions.

i am trying to contact the auther to get this thing developed further. more suggestions very welcome.

the cool things is that the replacement tables are stored in a xml file, which can easily be edited and crated. biggrin_o.gif

Share this post


Link to post
Share on other sites

[iT|Q] can you give me a few more details on how to use this. The description I got with the program is a bit vague.

Sorry to seem dense, but any help would be appreciated.

Share this post


Link to post
Share on other sites

yea no worries mate - the prog isnt very easy for sure, you have to have at least basic knowledge about addons and their structure

it works like this

a.) first of all you have to make an xml file with the changeslist and an unpbo'ed mission

you have to know the class name (<Unit> / <UnitNew>):

like for m1a1, its M1Abrams

you can look about this stuff in the config.cpp of the addon

(for the basic ofp classes have a look a the commented config from BIS for example)

you have to know addon dependency (<AddonName>):

you can find this out in cfgPatches.hpp/.cpp of config.cpp i think (not certain myself in every case) - watch out for "requiredAddons[]", that is what you need

this is not always needed !

example of the xml file with Wargames stuff

Quote[/b] ]

<Units>

 <Unit>M113</Unit>

 <UnitNew>WGL_M113A3</UnitNew>

 <AddonName>wgl_veh</AddonName>

</Units>

b.) secondly select the mission.sqm with the prog

c.) finally repack / pbo the mission again

d.) you are done

tools which extracting and packing stuff are ofp editor, pbo_decryptor 1.5 / 7makepbo, PboX_v1.0 or winpbopack

Share this post


Link to post
Share on other sites

Thanks mate, much clearer now. Hope the improvements you have thought of are implented. It will be great to be able to change missions completely in the future.

Share this post


Link to post
Share on other sites

well i just recognized that currently that search and replace inbuilt option by the program is case-sensitive, so take care about the correct writing of the classes

hopefully this bug will be squased in the next release smile_o.gif

Share this post


Link to post
Share on other sites

[iT|Q]

Great work! I have been waiting for it for ages...

Some suggestions :

1. Add ability to replace not only units, but weapons wink_o.gif

For ex. I tried to edit original Resistance for Lib's ww2 units: Stingers in the ammo crates seems to be not appropriate...

2. It's a bit difficult to get addon unit name. I was lucky , Liberation mod has a great reference, but its exception.

It would be great to have some tool that gets units/weapons names from addon's configs.

Share this post


Link to post
Share on other sites

And where is GUER units ?

update original XML please...

"New" button is unavailable for me sad_o.gif

And author's webpage seems to be down

Share this post


Link to post
Share on other sites
Quote[/b] ]Great work! I have been waiting for it for ages...

hehe thanks, but Softreg has made this nifty tool smile_o.gif

Quote[/b] ]replace weapons

yea good suggestion. yet this one is much more difficult (sqm-sqs differances, different commands - weapons and ammo are very context sensitive.

its seems Softreg has left the scene huh.gif

though i am planning to write such a tool on my own (as training) ... but eta not before ArmA i think confused_o.gif

regarding addon scanning i can recommend you Mikero's site. i does only scan of addons so far, not classes. yet sometimes very useful too.

well the best way is to get a good editing programm (editpad pro for example) and search for

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">vehicle=" with regexp. (and excluding already found stuff)

you can edit the xml files with any regular editor too.

there should a unitlist (with the GUER units) floating somewhere in this forum. try to find it with the search. wink_o.gif

if u need any more help, just ask thumbs-up.gif

Share this post


Link to post
Share on other sites
Quote[/b] ]hehe thanks, but Softreg has made this nifty tool

...

though i am planning to write such a tool on my own

Let's think I thank you in advance smile_o.gif

Mikero'ds AddonScanner just checks mision addOns[]=

section , for example it didn't find any addons in the officiall Liberation missions ,cause its sqms are clear.

OFPReplacer of my dream should be able to

1. make templemates just like

Softreg's replacer does

2.work with campaigns i.m search-replace in all sqs,sqm in the dir.

3. search for units class names in missions. For example , I want to replace not onlystandart units , but

addons I do not like or have

4.pick up units names from addons

configs (search for vehicle=" and show full list )

And don't think about AA wink_o.gif Release date can be a fake ( BIS pins up Codemasters ) and AFAIK AA will be very similiar to VBS1 wink_o.gif

In any case we will such an utility

for AA too. This experience will help you to do one

I can't find full list of BIS units , so it wwould be great if you give me a link wink_o.gif

Share this post


Link to post
Share on other sites

[iT|Q], if you have this book can you just give me this list?

I don't want to download it:(

Share this post


Link to post
Share on other sites

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

Jeep

JeepMG

HMMWV

Truck5t

Truck5tOpen

Truck5tRefuel

Truck5tReammo

Truck5tRepair

M113Ambul

Bradley

M113

M1Abrahams

M60

Vulcan

UAZ

---

BRDM

Ural

Scud

---

UralRefuel

UralReammo

UralRepair

BMPAmbul

BMP

BMP2

T72

T80

ZSU

GJeep

UAZG

---

---

TruckV3SG

---

TruckV3SGRefuel

TruckV3SGReammo

TruckV3SGRepair

SGUAZG

---

T55

---

A10

A10LGB

OH58

AH64

Cobra

UH60

UH60MG

CH47D

BoatW

CarrierW

M2StaticMG

ReammoBoxWest

HeavyReammoBoxWest

SU25

---

MI24

MI17

---

BoatE

M2StaticMGE

ReammoBoxEast

HeavyReammoBoxEast

---

---

---

---

---

---

ReammoBoxGuer

HeavyReammoBoxGuer

---

SoldierWB SoldierEB SoldierGB

SoldierWXMS --- ---

SoldierWG36a ---- ---

SoldierWSteyr --- ---

SoldierWG SoldierEG SoldierGG

HeavyGW HeavyGrenadier ---

SoldierWMG SoldierEMG SoldierGMG

SoldierWMortar --- ---

SoldierWMiner SoldierEMiner ---

SoldierWMedic SoldierEMedic SoldierGMedic

SoldierWLAW SoldierELAW SoldierGLAW

SoldierWAT SoldierEAT SoldierGAT

SoldierWAA SoldierEAA SoldierGAA

SoldierWSniper SoldierESniper SoldierGSniper

OfficerW OfficerE OfficerG

OfficerWNight OfficerENight OfficerGNight

SoldierWSaboteurDay --- ---

SoldierWSaboteurPipe SoldierESaboteurPipe ---

SoldierWSaboteurLaser --- ---

SoldierWSaboteurXMS SoldierESaboteurBizon ---

SoldierWPilot SoldierEPilot SoldierGPilot

ParachuteW ParachuteE ParachuteG

SoldierWCaptive --- ---

SoldierWCrew SoldierECrew SoldierGCrew

--- --- Hunter

--- --- GeneralE

--- --- Angelina

thats why  confused_o.gif

Share this post


Link to post
Share on other sites

What's this ? units names from german version ?

I'd like to see english list...

Share this post


Link to post
Share on other sites

here u go ... show some effort by yourself too wink_o.gif

Share this post


Link to post
Share on other sites

Hopefully it doesn't require .net framework? As it's the refried bean burrito skidmark on the underpants of satan himself...

EDIT...

NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO

OOOOOOOOOOOOOOOOOOOOO  banghead.gif

Goddamned Dot-fucking-Net. I want to stab Bill Gates in the eye with a pencil. Virtual machine sucks the life out of your pc. Couldn't this have been written in VB? I mean really!?!!?

Share this post


Link to post
Share on other sites

Can somebody tell me exactly where to place the .XML file when its done? I can never get it to work confused_o.gif

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  

×