Fighting between factions

Started by Vaatho, February 23, 2016, 08:35:35 AM

Previous topic - Next topic

0 Members and 4 Guests are viewing this topic.

Vaatho

Everyone knows there are two factions, but that's only because the game tells you so. Their only enemy seems to be, and only you. This has bugged me for quite a while, and I'd like to change it, but I don't know how. First off, let's have a look at something in gamemodesconfig.xml:

(edited/Art) click to enlarge as the code goes ultra widescreen
<ReinforcementArchetypes>
<Archetype name="enemy_archetypes.Red_Faction.Assault_Caucasian" type="redmerc" />
<Archetype name="enemy_archetypes.Blue_Faction.Assault_Caucasian" type="BlueMerc" /> <!-- Changed from Red_Faction -->
<Archetype name="vehicle.Land.Rover" type="vehicle" />
</ReinforcementArchetypes>
<MapArmy>
<Item world="1" name="W1_A_1" army="red"/>
<Item world="1" name="W1_A_2" army="red"/>
<Item world="1" name="W1_A_3" army="red"/>
<Item world="1" name="W1_A_4" army="red"/>
<Item world="1" name="W1_A_5" army="red"/>                                     
<Item world="1" name="W1_B_1" army="red"/>
<Item world="1" name="W1_B_2" army="red"/>
<Item world="1" name="W1_B_3" army="red"/>
<Item world="1" name="W1_B_4" army="blue"/>
<Item world="1" name="W1_B_5" army="blue"/>                                             
<Item world="1" name="W1_C_1" army="red"/>
<Item world="1" name="W1_C_2" army="red"/>
<Item world="1" name="W1_C_3" army="blue"/>
<Item world="1" name="W1_C_4" army="blue"/>
<Item world="1" name="W1_C_5" army="blue"/>                                             
<Item world="1" name="W1_D_1" army="red"/>
<Item world="1" name="W1_D_2" army="red"/>
<Item world="1" name="W1_D_3" army="blue"/>
<Item world="1" name="W1_D_4" army="blue"/>
<Item world="1" name="W1_D_5" army="blue"/>                                             
<Item world="1" name="W1_E_1" army="blue"/>
<Item world="1" name="W1_E_2" army="blue"/>
<Item world="1" name="W1_E_3" army="blue"/>
<Item world="1" name="W1_E_4" army="blue"/>
<Item world="1" name="W1_E_5" army="blue"/>                                             
<Item world="2" name="W2_A_1" army="blue"/>
<Item world="2" name="W2_A_2" army="blue"/>
<Item world="2" name="W2_A_3" army="blue"/>
<Item world="2" name="W2_A_4" army="blue"/>
<Item world="2" name="W2_A_5" army="blue"/>                                               
<Item world="2" name="W2_B_1" army="red"/>
<Item world="2" name="W2_B_2" army="blue"/>
<Item world="2" name="W2_B_3" army="blue"/>
<Item world="2" name="W2_B_4" army="blue"/>
<Item world="2" name="W2_B_5" army="blue"/>                                               
<Item world="2" name="W2_C_1" army="red"/>
<Item world="2" name="W2_C_2" army="red"/>
<Item world="2" name="W2_C_3" army="blue"/>
<Item world="2" name="W2_C_4" army="blue"/>
<Item world="2" name="W2_C_5" army="blue"/>                                               
<Item world="2" name="W2_D_1" army="red"/>
<Item world="2" name="W2_D_2" army="red"/>
<Item world="2" name="W2_D_3" army="red"/>
<Item world="2" name="W2_D_4" army="red"/>
<Item world="2" name="W2_D_5" army="blue"/>                                               
<Item world="2" name="W2_E_1" army="red"/>
<Item world="2" name="W2_E_2" army="red"/>
<Item world="2" name="W2_E_3" army="red"/>
<Item world="2" name="W2_E_4" army="red"/>
<Item world="2" name="W2_E_5" army="red"/>

First, look at the first object, ReinforcementArchetypes. I made a small change, so the enemy archetype (which exists) actually matches the bluemerc type. No clue why they left the same line there. Unfortunately, that didn't change anything, so I don't even know if that was a good change or not.

Next, we have MapArmy. Looks promising, right? Well... meh. I experimented a little and interchanged the colors, so I'd have red, blue, red, blue, etc. But that also didn't do anything. Or did it?

See, the proximity of both objects, <ReinforcementArchetypes> and <MapArmy>, leads me to believe that the first is what is spawned (one or two dudes from either side with a jeep) when a camp asks for help. It then checks where on the map it was spawned, to see what color it is. If it's a red camp in a red area (defined in <MapArmy>), the guys will come and help. But what if it's a red camp in a blue area? Maybe they intended the player to shoot a flare to spawn a reinforcement from the opposite faction, to f@#k up the other guys' camp. I haven't had the chance to test it, but I'll try it this evening. Could take a while though, since we don't know what part of the map is blue and what part is red.

Also note that we can deduce the two maps are actually 5*5 squares, and not 3*3 like on the in-game map. What does that tell us? Nothing! But it might be useful some day, I guess.

Something else. I noticed that some people made mods where they modified the patrols and/or checkpoints, so there would be more infighting between factions. Does anyone know how they did that exactly? The mods are RealMod and Jackal Mod on Moddb.com.


Art Blade

No idea. I left FarCry2 a far cry behind.
[titlebar]Vision without action is a daydream. Action without vision is a nightmare.[/titlebar]What doesn't kill us, makes us weirder.

PZ

I don't know either, but in the vanilla game when you go past one of the main areas with a guard post nearby, you can entice the mercs to chase you and they will erupt in a war.  I'm sure the people that did the mods you mentioned capitalized on that behavior perhaps by increasing their sphere of awareness regarding their own kind.

Vaatho

I have a found a way to make the world a bit more violent, though all credit should go to StoatOats, whose mod (the RealMod, check it out on Moddb if you haven't already) I dissected to find this out.

Go to 10_Ghostpatrols.xml, which lists all patrol types in the game. Here's one of the entries you'll find:

Spoiler
<object hash="256A1FF9">
    <value name="Name" type="String">Patrols.Rover</value>
    <object type="Entity">
      <value name="hidName" type="String">GhostPatrols.Patrols.Rover</value>
      <value name="disEntityId" type="Int64">405</value>
      <value hash="D2B3429E" type="String">CGhostEntity</value>
      <value name="hidEntityClass" type="Hash">000F2744</value>
      <value name="hidResourceCount" type="UInt32">0</value>
      <value name="hidPos" type="Vector3">
        <x>0</x>
        <y>0</y>
        <z>0</z>
      </value>
      <value name="hidAngles" type="Vector3">
        <x>0</x>
        <y>0</y>
        <z>0</z>
      </value>
      <value name="hidPos_precise" type="Vector3">
        <x>0</x>
        <y>0</y>
        <z>0</z>
      </value>
      <value name="hidConstEntity" type="Bool">False</value>
      <object type="Components">
        <object type="CPersistComponent">
          <value name="hidHasAliasName" type="Bool">False</value>
          <value name="selLevel" type="UInt32">1</value>
          <object type="enumLevel">
            <object type="enum">
              <value name="Value" type="String">None</value>
            </object>
            <object type="enum">
              <value name="Value" type="String">Limited</value>
            </object>
            <object type="enum">
              <value name="Value" type="String">Full</value>
            </object>
            <object type="enum">
              <value name="Value" type="String">Critical</value>
            </object>
          </object>
        </object>
      </object>
      <object type="Ghost">
        <value name="archVehicle" type="String">vehicle.Land.Rover</value>
        <value name="entPathToFollow" type="Int64">-1</value>
        <value name="vectorBBoxMin" type="Vector3">
          <x>-1.5</x>
          <y>-4.5</y>
          <z>0</z>
        </value>
        <value name="vectorBBoxMax" type="Vector3">
          <x>1.5</x>
          <y>4.5</y>
          <z>3</z>
        </value>
        <value name="bIsPersistent" type="Bool">False</value>
        <value name="bInvertPathDirection" type="Bool">False</value>
        <value name="fSpeed" type="Float">8</value>
        <value name="bIsEnabled" type="Bool">True</value>
        <object type="Passengers">
          <object type="Passenger">
            <value name="archPassenger" type="String">enemy_archetypes.Blue_Faction.Assault_Caucasian</value>
          </object>
          <object type="Passenger">
            <value name="archPassenger" type="String">enemy_archetypes.Blue_Faction.Assault_Caucasian</value>
          </object>
          <object type="Passenger">
            <value name="archPassenger" type="String"></value>
          </object>

        </object>
      </object>
    </object>
  </object>

The interesting stuff is the part in bold. What I noticed in StoatOats' mod is that he just changed the Blue word to Red. And it makes the patrols hostile to everyone else on the map. I changed almost every entry from Blue to Red (except the first three since they are mission spawns, so don't touch them) and five minutes in while testing, I heard a fight break out on the other side of a hill. And sure enough, there was a wrecked car and everything was on fire when I arrived, and some dudes were still fighting. Now that's what I call a civil war! ;D

That's already awesome, but there is more. You can actually add passengers into some cars; look at the code, and you'll see an empty passenger entry where you can paste an enemy archetype. Example:

Spoiler

<object type="Passengers">
          <object type="Passenger">
            <value name="archPassenger" type="String">enemy_archetypes.Red_Faction.ShotgunMan_Caucasian</value>
          </object>
          <object type="Passenger">
            <value name="archPassenger" type="String">enemy_archetypes.Red_Faction.RocketMan_Caucasian</value>
          </object>
          <object type="Passenger">
            <value name="archPassenger" type="String">enemy_archetypes.Red_Faction.Assault_Caucasian</value>
          </object>
So basically, instead of having two boring assault rifle dudes, you can now have a machine gunner, a rocketeer and a shotgunner in the same car for added variety and challenge. The weapons they are carrying are defined in gamesmodesconfig.xml, the part with all the probabilities and stuff (you know the one).

One last thing, a bonus of sorts. Here you'll find the two world maps where the different factions reside according to gamemodesconfig.xml, and they show why there's so little infighting. In another thread, someone mentioned that you could easily start a fight in Cock Fights when setting off an IED, since dudes from the nearby checkpoint will come see what's up, and start murderin'. The map shows why: it's right on the border of the faction territories.

Now I wonder what'll happen if a convoy meets a patrol vehicle...

OWGKID

Nice find  :-D Going to update my mod  >:D Kudos to you, 1+  ;) :-X
LEGACY

Art Blade

[titlebar]Vision without action is a daydream. Action without vision is a nightmare.[/titlebar]What doesn't kill us, makes us weirder.

PZ

Excellent - this is the extra kick my game needs

+1 Vaatho  :-X

OWGKID

For the sake of experimenting, I decided to add a red and blue guy in the same vehicle. Wonder what will happen next when I fire up my game  :laugh: :angel:
LEGACY

Art Blade

my best bet is that those patrols won't get very far. And, as they tend to respawn, that you'll hear where those patrols are before you can see them.  :-D
[titlebar]Vision without action is a daydream. Action without vision is a nightmare.[/titlebar]What doesn't kill us, makes us weirder.

PZ

I wonder if you can change respawn rate, or increase their sphere of patrol  ????

Vaatho

Quote from: OWGKID7891 on March 07, 2016, 11:26:00 AM
For the sake of experimenting, I decided to add a red and blue guy in the same vehicle. Wonder what will happen next when I fire up my game  :laugh: :angel:

Hehe, I think the moment they spawn, they'll stop the vehicle and start shooting eachother. Please tell me you gave each of them bazookas. Or mortars. ;D

Quote from: PZ on March 07, 2016, 02:11:12 PM
I wonder if you can change respawn rate, or increase their sphere of patrol  ????

Respawn rate, probably not. I believe they're loaded when the map chunk is loaded, so if the patrol is destroyed, you'll have to walk a few hundred meters and come back for them to respawn, just like the checkpoints.

As for the sphere of patrol, it could technically be done, although it would be extremely annoying. Their routes are defined in worlds.fat\worlds\world1\generated\world1.mapdata.fcb , but they're entirely in xyz coordinates. Without proper tools, mapping a new route would take hours upon hours of trial and error to see if the coordinates are working, since you don't have a reference point in the ingame map.



Oh yeah, one more thing. For some reason, all the enemy patrol models are caucasian. If you want to give equal shooting and being shot rights to everyone, you can always replace some of the "Caucasian" with "Nubian" in the bolded code lines above.

PZ

Ah yes, I recall something about leaving the area represented by a square on the map and returning to see the mercs respawned

OWGKID

Quote from: Vaatho on March 07, 2016, 02:45:07 PM
Hehe, I think the moment they spawn, they'll stop the vehicle and start shooting eachother. Please tell me you gave each of them bazookas. Or mortars. ;D

I have added shotgunners and rocketeers armed with IEDs  >:D
LEGACY

fragger

Quote from: Vaatho on March 07, 2016, 02:45:07 PM
If you want to give equal shooting and being shot rights to everyone, you can always replace some of the "Caucasian" with "Nubian" in the bolded code lines above.

Way to promote racial equality :laugh: :-X

Art Blade

[titlebar]Vision without action is a daydream. Action without vision is a nightmare.[/titlebar]What doesn't kill us, makes us weirder.

OWGKID

Quote from: Vaatho on March 07, 2016, 02:45:07 PM
If you want to give equal shooting and being shot rights to everyone, you can always replace some of the "Caucasian" with "Nubian"...

:laugh: :-D I have changed the convoy faction to Red along with the assassination target section. The convoys attacked every checkpoint on its way  :-D Having a red and blue guy in the same vehicle made them shoot eachother  :-()

One thing, I don't find them patrolling in their vehicles anymore, the guys tend to leave their vehicles and walk on foot. It happens near the checkpoints so I'm not surprised why ;)

I'm currently trying to add snipers in the vehicles, I'm not sure if that would be "SniperMan_" or simply "Sniper_
LEGACY

PZ

Sounds like you're having loads of fun, GKID  :-X

OWGKID

Yep, I also changed the faction IDs in the Gamemodesconfig.xml to see what happens  ^-^
LEGACY

PZ

I think this fighting between factions is another game changer - the FC2 world was almost devoid of civilians, and every merc on the planet was against you.  Now with changed weapons and the factions fighting each other, it makes for a much more interesting place.  You can watch their battles with each other from afar.

When I built my new PC, I reinstalled FC2 fresh without the updates.  This meant that I can listen to the tapes (without the "boots bug"), but it also means that Gibbed's tools don't w@&k.  Now I'm interested in patching up to 1.3 just so I can do the faction changes.  :-X

Vaatho

Quote from: OWGKID7891 on March 09, 2016, 04:02:21 AM
I'm currently trying to add snipers in the vehicles, I'm not sure if that would be "SniperMan_" or simply "Sniper_
I believe it's just Sniper. Have a look in the enemy_archetypes file, the exact string should be in there somewhere.


Quote from: PZ on March 09, 2016, 10:33:48 AM
I think this fighting between factions is another game changer - the FC2 world was almost devoid of civilians, and every merc on the planet was against you.  Now with changed weapons and the factions fighting each other, it makes for a much more interesting place.  You can watch their battles with each other from afar.

When I built my new PC, I reinstalled FC2 fresh without the updates.  This meant that I can listen to the tapes (without the "boots bug"), but it also means that Gibbed's tools don't w@&k.  Now I'm interested in patching up to 1.3 just so I can do the faction changes.  :-X

Yes, I have no clue why Ubisoft didn't include more fighting in the first place. This game was probably more of an experiment to begin with, with Far Cry 3 being the final product, but with a radical change of setting and pace.

The best thing is that when you start fighting, sometimes they'll be attracted by the gunfire and start messing the place up.

Also, I've been trying to figure out what's causing the tape bug, but no luck thus far. It was introduced with the 1.3 patch, that much is certain. Here's what I gathered:
- The tapes are mentioned in gamemodesconfig.xml, but that file was already in there with patch 1.1 and 1.2, where they worked.
- They're also present in OA_Missionpickups.xml in worlds, interestingly named "CarverTapes", but there was no apparent change made to the file with the mod, except the entity ID. This however doesn't seem to do anything when I revert it back to its original value.
- Other things I did was look around in the Unknown files (nothing really interesting in there), and excluding every single file that was introduced with the 1.3 patch, except those from previous patches. The bug was still present.
- Interestingly, the bug was still there when I copied a 1.2 patch file on my 1.3 game (GOG version). Maybe you have to do a clean install and remove everything, from game options to save files. I dunno.

I always used the same save file, the Andre one in the download page, which is just before Bowa Seko and its glitchy tapes.

OWGKID

Yeah, it''s just "Sniper_" I found other strings for a Mortar guy and LMG guys, "MortarMan_" and "LightMachineGunner_" I have given the Mortar dudes flamethrowers so maybe I should replace the passenger vehicle entries with "MortarMan"  >:D
LEGACY

PZ

That's a good idea - would be cool to see an assault truck screech to halt, mercs jump out and start flaming other mercs.

PZ

Just tried to create a new patch and ran into a problem - my 10_ghosts does not read the same as Vaatho's - here's mine

Spoiler
  <object hash="256A1FF9">
    <value name="Name" type="String">Patrols.Rover</value>
    <object type="Entity">
      <value name="hidName" type="String">GhostPatrols.Patrols.Rover</value>
      <value name="disEntityId" type="UInt64">405</value>
      <value hash="D2B3429E" type="String">CGhostEntity</value>
      <value name="hidEntityClass" type="Hash">000F2744</value>
      <value name="hidResourceCount" type="UInt32">0</value>
      <value name="hidPos" type="Vector3">
        <x>0</x>
        <y>0</y>
        <z>0</z>
      </value>
      <value name="hidAngles" type="Vector3">
        <x>0</x>
        <y>0</y>
        <z>0</z>
      </value>
      <value name="hidPos_precise" type="Vector3">
        <x>0</x>
        <y>0</y>
        <z>0</z>
      </value>
      <value name="hidConstEntity" type="Bool">False</value>
      <object type="Components">
        <object type="CPersistComponent">
          <value name="hidHasAliasName" type="Bool">False</value>
          <value name="selLevel" type="UInt32">1</value>
          <object type="enumLevel">
            <object type="enum">
              <value name="Value" type="String">None</value>
            </object>
            <object type="enum">
              <value name="Value" type="String">Limited</value>
            </object>
            <object type="enum">
              <value name="Value" type="String">Full</value>
            </object>
            <object type="enum">
              <value name="Value" type="String">Critical</value>
            </object>
          </object>
        </object>
      </object>

There does not appear to be a Passengers section - any ideas?  :-\\

OWGKID

This is what you're looking for. By the way, download Wobatt's hash converter tool, the Passenger entries are all in BinHex :)


Spoiler
<object hash="AC0A8D5A" type="Passengers">
          <object hash="B91E6A7E" type="Passenger">
            <value name="archPassenger" hash="4071905F" type="String">enemy_archetypes.Red_Faction.ShotgunMan_Nubian</value> <!-- type="BinHex" value="656E656D795F617263686574797065732E426C75655F46616374696F6E2E41737361756C745F43617563617369616E00" -->
          </object>
          <object hash="B91E6A7E" type="Passenger">
            <value name="archPassenger" hash="4071905F" type="String">enemy_archetypes.Red_Faction.Sniper_Nubian</value> <!-- type="BinHex" value="656E656D795F617263686574797065732E426C75655F46616374696F6E2E41737361756C745F43617563617369616E00" -->
          </object>

Seems like you're also looking on the wrong section, you may want to scroll down a bit :-()  :angel:
LEGACY

Vaatho

Quote from: OWGKID7891 on March 13, 2016, 11:53:09 PM
This is what you're looking for. By the way, download Wobatt's hash converter tool, the Passenger entries are all in BinHex :)

Yup, what he said. I use Wobatt's tool by default so I forgot to mention it.

Tags:
🡱 🡳