Jump to content

Open Community  ·  25 members

Far Cry

Guide on rearm pirates and mercs


inakrin

Was this info useful for you?  

29 members have voted

  1. 1. Was that info useful?

  2. 2. Should I continue to write other guides?



Recommended Posts

Hi! This is my second guide for far cry 3 modding. In this guide I will show how how to surge weaponsService.xml.

 

Main features:

NPC

• set the weapon type depends on bearer's class

• set the ammo gain from the weapons on the ground

Player

• set the initial ammo

• allow or restrict using some kind of gadgets or syringes.

 

So we're looking for the weapons type.

 

Firstly and mainly - remember: there's 7 similar parts in the document, descriptioning each kind of gameplay. We need only first part! For the single player.

 

So the working area will be at the range between string 1 and 6806.

 

 

SO LET"S BEGIN!

1. PREPARATIONS

Make some preparations:

• Convert nomadobjecttemplates.fcb and entitylibrary.fcb using Gibbed.Dunia2.ConvertBinaryObject.exe

• Download and install toolset. You'll need 2 tools: notepad++ available at the home site and RaZoR's BinHex -> Readable Converter

 

lil' preparation. Open notepad++ and go to the macros -> shortcut mapper -> plugin command. Find there string ASCII -> HEX and set it to the button combination you'd like. Same there find string HEX -> ASCII and set it to the button combination you'd like (i set it to the Alt+Shift+A, but you're free to set it however you'd like)

 

2. Find and open WeaponsService.xml located in the nomadobjecttemplates.fcb file

3. You'll face a bunch of binhex junk seem unable to even understand, but that's ok.

 

4. Find this string

<object hash="37ECF11D">

This is header for every gun bearer profile. So this is our landmark we'll use to navigate document

 

5. Two string lower there's string

<field hash="FE11D138" type="BinHex">4E50435F446566656E6465725F5661617300</field>

This is text name of the gun bearer profile. Highlight entire binhex and press your defined HEX -> ASCII button combination. You'll see this kind of text

before conversion:
<field hash="FE11D138" type="BinHex">4E50435F446566656E6465725F5661617300</field>
after conversion:
<field hash="FE11D138" type="BinHex">NPC_Defender_Vaas|NUL|</field>

 

Check it and do not forget to undo the changes! We won't need this text to save.

 

6. Yeah, we've got Pirate Defender profile. So we need now it's gun.

Check the string

<field hash="C246D853" type="BinHex">194E35ACE5062003</field>

setting weapon's archetype.

 

7. Copy binhex into the Razor's Converter windown and select UInt64 variable type. You'll get "225187564874976793" archetype number and this is what we're looking for!

 

8. Make a search in the entitylibrary folder with the text searching where you should place you archetype. Bingo! We've got our match in the AK47.AK47_NPC.xml located in the "weapons" folder. And this is where we'll get our archetypes.

 

9. As we've already known, Pirate Defender (suffix Vaas means pirates, suffix Hoyt means mercs) is bearing ak47, it's AI version. So what we need to rearm him?

 

10. GATHERING AND REARMING - common way

 

 

the only thing we need to rearm NPC is just replace it's weapon archetype to something we'd like to. But we can't just copy-paste it because of different type of variables. Se we should cook'em.

 

Let's take Galil as example. Open entitylibrary/weapons/galilace.xml and find there string

<field name="disLibItemId" type="Id64">7681075439447</field>

This is our needed archetype. Copy it and paste into the nomadobjecttemplates/weaponsService.xml near the old archetype

 

So it would seems like

<field hash="C246D853" type="BinHex">194E35ACE5062003</field>7681075439447

 

Now you should convert your decimal converter into the Int64 value (Hex 8 byte). I'm using cheat engine, place my integer into the searching area, choose 8 bytes and check "HEX" switch.

 

In the end I've got this: 000006FC63C5E757

 

Made this value mirrored

ed
00 00 06 FC 63 C5 E7 57 => 57 E7 C5 63 FC 06 00 00 =>  57E7C563FC060000

 

And replace with ending value initial archetype in the weaponsService.

 

It should like

before:
<field hash="C246D853" type="BinHex">194E35ACE5062003</field>

after:
<field hash="C246D853" type="BinHex">57E7C563FC060000</field>

 

11. Pack your nomadobjecttemplates.fcb back again, make patch and check. VOILA! Pirate Defender is now bearing Galil as his main weapon!

 

 

 

Alternate way from the step 10 (testing!).

 

 

10. Open weaponsService.xml and replace this string

<field hash="C246D853" type="BinHex">194E35ACE5062003</field>

with this

<field hash="C246D853" type="UInt64">225187564874976793</field>

 

What have we done? We reset variable type to let converter know kind of variable and it's value we've gained from the Razor's Converter.

 

11. Find desirable archetype you'd like to replace your ak47_npc, in the entitylibrary/weapons folde. Let's take Famas as example. It's archetype is 7656527669248

 

So all we need is replace this string

<field hash="C246D853" type="UInt64">225187564874976793</field>

with this one

<field hash="C246D853" type="UInt64">7656527669248</field>

 

12. Save, convert and pack. Enjoy!

 

 

Edited by inakrin
Link to comment
Share on other sites

Seems like alternate way is working as well. Add merc's heavygunner a new toy named m249. Works well. Unfortunatelly it's dam mess with the weapon handling positioning. I'm still looking for the variable whis is setting weapons handling.
Link to comment
Share on other sites

Very useful guide. Thank you Inakrin. Keep up the good work and experimenting! :)

 

PS - a tip from me to you (in case you haven't figured this one out yet):

 

\entitylibrary\FC3_Interactive\Pickups\Weapons

 

In these files under < components > look for the unconverted weapon number # (for example 194E35ACE5060003). The 2 fields below this control minimum and maximum ammo when player passes over weapon (or picks it up)

 

For example the ak47.xml entry looks like this:

 

<field hash="15880CC8" type="BinHex">194E35ACE5060003</field>
<field hash="E85AE9F6" type="BinHex">0F000000</field>
<field hash="EBA909B9" type="BinHex">0F000000</field>

 

Player is always picking up 15 rounds of ammo.

 

Set it to this:

 

<field hash="15880CC8" type="BinHex">194E35ACE5060003</field>
<field hash="E85AE9F6" type="BinHex">05000000</field>
<field hash="EBA909B9" type="BinHex">0F000000</field>

 

The player picks up a random amount between 5 to 15 rounds of ammo when walking over dropped AK47s

 

But shhhhh that's our little secret :wink:

 

I'm still digging away unlocking hidden things as I find them...

Link to comment
Share on other sites

Altering ammo pickips using WeaponsService.xml

 

find and sting headed by hash 4FBDD114. This hash is setting any ammo pickups from the weapons your target dropped after his death.

 

We're looking for something like this

<field hash="8F0F5FF7" type="BinHex">0000803F</field>
<field hash="2B928622" type="BinHex">706973746F6C00</field>
<field hash="2CECF817" type="BinHex">BB2CD1A2</field>
<field hash="010653F2" type="BinHex">0A270000</field>
<field hash="2A0F1CC2" type="BinHex">00000000</field>
<field hash="C7DA96EA" type="BinHex">00000000</field>
<field hash="EF3C58C3" type="BinHex">00000000</field>
<field hash="DE33B3EC" type="BinHex">00000000</field>

 

after some conversions it looks like

<field hash="8F0F5FF7" type="Float32">1</field> --does this block enable during loot generating
<field hash="2B928622" type="String">pistol</field>
<field hash="2CECF817" type="BinHex">BB2CD1A2</field> -- unneeded value
<field hash="010653F2" type="Byte">10</field>  -ammo pickup from the dropped weapon
<field hash="2A0F1CC2" type="Byte">0</field> - enable ammo count for NPC (yeah, leave'em empty!) easy mod
<field hash="C7DA96EA" type="Byte">0</field> - enable ammo count for NPC (yeah, leave'em empty!) mid mod
<field hash="EF3C58C3" type="Byte">0</field> - enable ammo count for NPC (yeah, leave'em empty!) hard mod
<field hash="DE33B3EC" type="Byte">0</field> - enable ammo count for NPC (yeah, leave'em empty!) insane mod

 

This is not hardcoded random loot generator, but hey, at least NPC're starting to become depleted (=

Link to comment
Share on other sites

Knew about it, but as I've already said in the OP, weaponsService can do the same..absolutely the same way. Lol. Well, your method is a bit more prefable due to lack of new game requirements.

 

Aww too bad. I was hoping to teach you something for a change LOL. Ah well. Good to know that it can be altered in weaponservices as well.

 

So what happens if an NPC runs out of ammo? Will they charge the player and melee or just run around from cover to cover?

Link to comment
Share on other sites

Knew about it, but as I've already said in the OP, weaponsService can do the same..absolutely the same way. Lol. Well, your method is a bit more prefable due to lack of new game requirements.

 

Aww too bad. I was hoping to teach you something for a change LOL. Ah well. Good to know that it can be altered in weaponservices as well.

 

So what happens if an NPC runs out of ammo? Will they charge the player and melee or just run around from cover to cover?

They're just standind and looking for untill you cut the distance and after that they're louding CHAAAARGE and go melee. Testing that during attempting to add mp5 and kriss to NPC.

Link to comment
Share on other sites

  • 2 months later...
  • 3 months later...

Just voted (no) in the poll. I'm sure your material is good, however it assumes a base level of modding knowledge that far exceeds mine. While I'm familiar with notepad ++ (meaning I know what it is), I really have no idea how to use it (your reference to macros and such blew right by me). And, I have NO idea how to use a hex editor. If I had someone competent sitting here with me, to coach me through it a couple of times; correcting mistakes, I'm sure I'd be OK at it. Hope this feedback was useful. BTW: I've enjoyed your mods used in the 30 Days FC 3 mod compilation. Thanks for the great work!

 

BTW: My fallback position on this thread/mod topic is to scope out your instructions, find the FC 3 file that contains the instructions for which pirate/merc carries a given weapon type. I'm going to take that file from a different mod compilation, over write the same file in 30 Days, then repack everything and see if it works. None of my weapon tweaks, or this weapon type effort here will ever leave my HDD in anyway. They're for my personal only.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...