Random Mod Notes – Weapons/Effects/World (+ stuff)

Just Cause 2 Mods Forums Mod Creation Random Mod Notes – Weapons/Effects/World (+ stuff)

This topic contains 35 replies, has 8 voices, and was last updated by  AmauryRR 2 months, 4 weeks ago.

  • Author
    Posts
  • #83646

    AmauryRR
    Participant

    PREFACE: (or something like that)
    First off, Hi! I’ve been tinkering around with JC2 since a good friend recommended it to me – wish I’d found it earlier lol! Just want to share some things I noticed, andhaven’t seen them covered directly here. At the least the information will be a good reference for anyone looking for more info on the game. You should be comfortable using gibbed’s tools – r169 (or r171 if building from source): Archive browsing, Extraction, XML conversion, etc…

    NOTE: These are pretty much quick and dirty notes on random things, I’ll clean them up more later on as I get time.

    Firstly, I noticed a melee mod that changes the effects when you, well, melee. Among those effects were the tazer and gore effects. Ripping it apart, I noticed it changed a reference to an effect id. Now, I was curious where they found what ID to stuff in – digging around further in archives_win32 – I saw a effectsettings.bin file. This gem has all the effects used in-game, max number of effects, their effect_id number, and the .bin file the effect references.

    The location of effectsettings.bin is in pc0/effects.

    Another example of how effect ids work in-game, go into weapons.bin(weapons.xml) and look at a random weapon, example: the pump shotty aka: “weapon_4” in-game.

    Inside the weapon definition you’ll see the following present:

    bullet_fire_effect_id – defines a projectile effect, some projectiles this can be a trail, or a muzzle flash type effect
    bullet_impact_effect_id – projectile effect on impact
    fireeffectid – this seems to be the weapon’s muzzleflash

    Going back to the gory effects for a second, you can pull apart other weapon effects – such as these for bullet impacts:
    pc0/effects/bullet_impact_flak.bin
    pc0/effects/bullet_impact_huge.bin
    pc0/effects/bullet_impact_large.bin
    pc0/effects/bullet_impact_medium.bin
    pc0/effects/bullet_impact_medium_pc.bin
    pc0/effects/bullet_impact_small.bin

    these seem to be for general “character” impact effects:
    pc0/effects/character_hit.bin
    pc0/effects/character_hit_headshot.bin
    pc0/effects/character_hit_large.bin
    pc0/effects/character_hit_medium.bin
    pc0/effects/character_hit_rico.bin

    these seem to be related to melee/other type impacts:
    pc0/effects/char_melee_impact.bin
    pc0/effects/hook_impact.bin

    Within those files, you’ll see the effect it uses for each impact. Also you’ll see where the game uses different effects depending on surface type: Flesh, Metal, Stone, Water, etc…

    Some of the bloody effects used:
    fx_bulhit_headsniper_01 – headshot splat for sniper, seems to be the largest
    character_hit_headshot – 2nd largest splat fx, used for normal headshots
    fx_char_explode_01 – seemingly unused gib animation? spawns chunks and muliple splats/blood explosion.
    there are more, but those are the ones I wanted to point out for now.

    In character_hit_medium.bin(character_hit_medium.xml) – in the section where it calls its effects, there’s also 3 variations defined:
    5F3D570B – this block defines the normal headshot fx, I used fx_char_explode_01 for testing
    6E6AB255 – this block defines the sniper headshot fx, I used fx_char_explode_01 for testing
    CBBCC99C – this block defines the “default” bloody fx, fx_bulhit_headsniper_01

    Make those changes above, and recompile the character_hit_medium.xml file back to .bin and test ingame. Most medium bullet impacts (machinegun, assault, etc..) will be bloodier. Headshots should definitely be different, you can tweak further for other effects.

    Other weapon notes:
    E9DA2A3B – Max number of lock-on targets (for lock-on rocketlauncher) – reference the multilock dlc for other aiming changes

    bullettype = int X

    where X is one of the following (so far):
    1 – small bullet? beretta/etc..
    2 – medium bullet? smg,
    3 – large bullet? heavy machine gun,
    4 – shotgun pellet? sawedoff
    6 – grenade launcher, affected by gravity, radius dmg
    8 – large bullet? assault
    9 – signature bullet?
    7 – explosive/rocket type w/ radius dmg, not affected by gravity
    12 – Large bullet? vulcan, minigun, etc..
    13 – SAM
    15 – vehicle weapon? lmg? v039-vhlmg
    16 – flak bullet (explosive)
    18 – clusterbomb, affected by gravity, spawns child-grenades
    19 – airzooka

    Currently working on notes for grappling parameters, as well as ai-relates things: worldspawn, heatspawn/system/params, and hopefully – ragdoll lifetime.

    EDIT: particle-effect related notes (usually applicable to stuff in the “effects” folder, but not limited to..)

    Playing around with some other effects: vehicle burnouts, skidding, water wake, low aerial flying effects.. Noted some have a few “extra” variables. Apparently under variations, you should be able to define a “Default” to work off of..

    For example, in lave_wheel_spinning.bin – this generally controlls your stand-still burnouts effect.
    Go to: ava_effect->effect_components->54236B22->variations (near the top of the .xml file)
    You’ll see thee different materials (Asphault, Default/Mud, Grass, etc..) and within those you may see some of these values (more research needed, but changing these have effect):

    name=”duration” type=”float” – this seems to be a float timed duration of the (extra?) particle effect
    name=”input_id_particles_per_second” type=”int” – base particles per second?
    name=”input_id_start_velocity” type=”int” – base particle velocity?
    name=”input_id_velocity_spread” type=”int” – base particle effect spread?
    name=”kill_when_finished” type=”int” – kill when finished – not sure if its kill the effect or whatever caused it
    name=”low_limit_offset” type=”float” – not sure..
    name=”lower_limit” type=”float” – seems to be minimum particles spawned?
    name=”name” type=”string” – name of particle effect (see effectsettings.bin)
    name=”uid” type=”int” – unique number for the effect(variation)
    name=”upper_limit” type=”float” – maximum (overall?) particles?
    name=”upper_limit_offset” type=”float” – not sure..

    As a test, play with the values and recompile – default the effects are somewhat “skimp” – mainly so it wont bog down everyone’s systems rendering everything. You can have a happy medium, and have some crazy effects – crazy idea: replace the asphault (or whatever) effect with an explosion animation. Increase particle count, velocity, spread..

    (rough) Notes: combining multiple effects:

    -Decompile (convert to .xml) some of the other effects – example: explosion_resource_fueldepot.bin (they’re similar in structure, this one has some extras to note/base/learn from)
    -Inside that specific one, you’ll notice a bunch of subonbjects defined, with unique uid numbers and different types defined also. Similar to other ones.
    -Rough notes on the types; these are whats defined, and what they *seem* to be used for – from what I’ve gathered so far.
    Type 1 – particle fx
    Type 2 – unknown
    Type 3 – decals
    Type 4 – explosion damage/radius/knockback
    Type 5 – unknown
    Type 6 – unknown
    Type 7 – dynamic lighting seems to live here
    Type 8 – unknown
    Type 9 – sound detail (distance, attenuation, etc..)

    -As far as uid goes, seems that they must be unique from eachother.
    -Sub-object uids have to be unique ONLY under the “parent” object.
    -Example of the above
    -primary objects get a unique id (ex: object 54236B22 geta a uid of 0, F75B8111 gets a uid of 6..)
    -within 54236B22, there are a 5 of variations.. they get unique uids from 0-4
    -within F57B8111, there are another 5 variations.. they can also get uids from 0-4
    -Thats important when it comes to the interation_matrix section, an example of one is:

    Code:
    2:0
    1:0
    4:0
    5:0
    3:0
    0:0

    30
    1:4
    3:0
    2:1
    0:4

    30
    1:2
    3:1
    2:2
    0:5

    30
    6:0

    1:3
    3:0
    0:3

    -Here the game defines a default_item, these are the effects called by default
    -The format seems to be:
    -define a value, with the id=hex address of the parent-object
    -the string would be the parent-uid:sub-uid
    -so in the above under default – the 54236B22 1:2 means call parent-object 54236B22 uid 1, sub-object 2
    -if you add a parent object section, you can define it in the default with matching unique uids or…
    -The material_interactions is where you can get funky, you can change what gets called depending on what you hit
    -In the above example, the object “Asphault” changes most of the effects to alternate values.
    -You don’t have to change all the effects, just the ones you wish to use.
    -You can use hex addresses for some materials, theres gotta be a .bin file containing what goes where.
    -WATER_ITEM seems to be explicitly defined water settings/objects (which would be used for water basically)

    Common parent-object ids and typical format (and quick descriptions) – example from bullet_impact
    parent object name – default uid – type
    40D38A94 – 4:0 – 9 – sound attenuation, “special” soundfx – seems to be called automagically?
    54236B22 – 1:0 – 1 – particle fx, each sub-object/variation is named and given a unique uuid.
    Default – 1:0 – uuid of 0, default effect called here (given string name)
    Flesh – 1:5
    Glass – 1:8
    Metal – 1:1 – metal defined effect
    Sand – 1:2 – sand effect
    Snow – 1:3
    Soil – 1:9
    Stone – 1:7
    Water – 1:4
    Wood – 1:6
    1BB6CC1A – 1:10 – steammetal
    570310C8 – 3:0 – 7 – dynanmic lighting?
    584F80D9 – 5:0 – 4 – explosion radius damage goes here
    BBC51E2B – 2:0 – 3 – decals go here, same format as 54236B22 for particle fx naming/uuid
    2:2 – glass
    2:4 – ice
    2:0 – metal
    2:5 – snow
    2:3 – wood
    2:1 – 232359DD
    2:6 – 4f467932
    CA6EC803 – 0:0 – 0 – sound fx (per material subobject naming/uuid)
    0:2 – flesh
    0:5 – glass
    0:1 – metal
    0:4 – stone
    0:3 – water
    0:6 – wood
    0:0 – def9ae75
    0:7 – 4f467932

    You can even combine the effects to create completely new ones. Apply whats already there, differently. Technically even make a functional flame thrower that sets the surroundings on fire….lol..

    Grappling Hook notes (grapplingparams.bin):

    Inside, theres a few interesting things. Mostly different effects, theres a table for assorted effects at object id CA400F12
    Within that are assorted values with hex addresses with int values. Those are the effects, look them up in effectsettings.bin (converted to .xml ofcourse).

    So far these hex values go to these effects (or refer to these actions):

    0820EBCD, -1, null effect (unknown action, could be arm extended firing grapple)
    6BCC7C5A, 213, hook_detach, effect played when hook breaks? (test -1 here see if it disables breaking)
    7C387BC0, 204, char_slingshot_sparks, spark effect when slingshotting
    7D387BC0, 203, char_reelin_sparks – spark effect when reeling (chute or non-chuted?)
    ADB6D249, 410, hook_detach_dual, effect when hook breaks? (test -1 here see if it disables breaking)
    BC79634F, 215, dual_hook_deployed, effect when dual hook gets deployed.
    DB9D6690, 214], hook_miss, effect when hook misses.
    F538A02D, 203, char_reelin_sparks – spark effect when reeling (chute or non-chuted?)

    There is another object within that that seems interesting, its located at 1CB6BA12 in the same grapplingparams.bin

    Within that are 2 int values, and a bunch of floats. Worth investigating to see if its a float value table of wire durability against different situations/materials possibly. Could be nothing, but something about it screams “Hey, over here!!” lol.

    aidifficulty.bin
    Quick Timer Event/Hijack address – inside you’ll find object BD26370E, within that a value of time (float) – set this to how many seconds you wish it to take.
    -Chaos code (unlocks?) – near the end, object id EE46694E you’ll see individual objects for chaos_0* and another value (int) that seems to be when it unlocks the chaos levels.
    -There may be another unused heatlevel, as you get level 1 from the start – and theres 4 usual “upgrades” at 100k (lv2) 200k (lv3) 300k (lv4) and 400k (lv5). The last one could be a 6th level, I’m gonna test by lowering its unlock to something “reasonable” – might have to add a heat_05 and some waves to heatspawn.bin (or maybe not?)

    EDIT:
    -On that 6th heat level, either theres something else missing (besides defining a 6th heatspawn) or it intentionally reverts back to level1 (0?) when you max out the 5th level. Either a debug/test thing (being in the production game its set at 99mil chaos) or something you’d eventually unlock? Like a “beat their asses to the point they back off” heatlevel(for lack of better words), which would be funny lol. At 99mil chaos, thats a lot of whoopins let out on them.

    Hopefully these notes help anyone looking for information – this game is definitely fun to mod – and any “sdk” or “documentation” is community driven, “by us, for us” lol. Have a good one all!

  • #100711

    CoconutFred
    Member

    I noticed that your effects mod has “chance of leaving fire depending on material” for one of the explosions. How were you able to do this?

    BTW, how’d you figure all this out? Extensive guess-and-check, or did you look in the game memory to see how it was using the values?

  • #100783

    AmauryRR
    Participant

    Hey there, basically I looked at a bunch of the effects, then unpacked the particles.blz file (where I noticed all the particle effects lived), and kinda made sense after staring at a bunch of the .xml files.

    What I then tried, was using the existing stuff – but in different ways. Took advantage of the material_interactions section, and figured how to “combo” multiple effects, or parts of them, into one.

    So, with the fire – basically whats happening is the game is looking at the material_interactions – for example – wood, grass, vegitation.. and “enabling” another object block with a unique uid, and its respective sub-uid.

    Basically, the same way the game has multiple sub-uids on a particle fx object (or sound, light, etc..) and can call them depending on what material, I did the same, just a lil differently lol.

    The fire block, you define in the components section (use a unique object name, apparently can be anything). Then give it a unique uid thats not being used in that file, lets say.. 7. Then within that, you can define variations, so define a “default” one with a uid of 0.

    example (inside effect_components, add this):

    1
    6

    1
    0.7
    fx_vehicle_fire_01
    0


    1
    1.5
    fx_vehicle_fire_01
    1

    [/CODE]

    -You’ll notice the object F75B8111 – its used in some other effects, you can just change the last digit, some effects I tweaked have up to F75B8116.
    -The type is set to 1 – this seems to be the particle fx
    -uid, I’m using 6 in my bullet_impact_flak.bin
    -With that, I’ve setup 2 variations – uid0 and uid1 (only difference being the duration, i’ll explain that in a few)

    Now, in the interaction_matrix/default_item you can add this for a quick and dirty test..

    6:0

    Basically that value is set to the object you named, and its string 6:0 indicates parent uid 6, sub-uid 0 (calls the first fire effect in that block).

    You can expand that further by instead of putting it in the default_item section, add it to anywhere in the material_interactions section. Here’s a snippet from my current bullet_impact_flak.bin’s material_interactions – this goes right after the default_item section (also, remove F75B8111 from default, or it will override and get called everytime – even on water, you’ll see why below). I’m calling both version 6:0 and 6:1 depending on what material I hit, and with that – one burns slightly longer than the other. This can be adapted to anywhere to do (almost) anything. The stuff is simple xml comments, they get stripped out when compiling so I include my xml files wherever I can so others can see my (chickenscratch) notes.

    30

    6:0

    28

    6:0

    14

    1:5
    0:2
    6:0

    9

    1:8
    2:2
    0:5

    34

    1:9
    2:6
    0:0
    6:1

    5

    1:3
    2:4
    0:0

    8

    6:0

    21

    6:0

    25

    6:1

    10

    6:1

    11

    6:1

    0

    1:2
    2:6
    0:0
    6:0

    2

    1:3
    2:5
    0:0

    1

    1:9
    2:6
    0:0
    6:1

    2

    1:2
    2:6
    0:0
    6:0

    7

    1:4
    0:3

    17

    1:2
    2:6
    0:0
    6:0

    13

    6:1

    29

    1:9
    2:6
    0:0
    6:1

    6

    1:9
    2:6
    0:0
    6:1


    15

    1:10
    2:0
    0:1
    6:0


    32

    1:3
    2:5
    0:0


    3

    1:9
    2:6
    0:0
    6:1


    33

    1:9
    2:6
    0:0
    6:1

    Basically you can use that to add fire, or any other effect imaginable to the game. Possibly even custom ones, by making your own .psmb (convert them to .xml and edit away). I took apart the mile high explosions and added the shock nova to various explosions the same way.

    The one I uploaded should set some things on fire, if not – I have another version that definitely does that and more lol. Hopefully this makes sense and helps out, you can definitely make some interesting fx this way.

    1
    6

    1
    0.7
    fx_vehicle_fire_01
    0


    1
    1.5
    fx_vehicle_fire_01
    1

    -You’ll notice the object F75B8111 – its used in some other effects, you can just change the last digit, some effects I tweaked have up to F75B8116.
    -The type is set to 1 – this seems to be the particle fx
    -uid, I’m using 6 in my bullet_impact_flak.bin
    -With that, I’ve setup 2 variations – uid0 and uid1 (only difference being the duration, i’ll explain that in a few)

    Now, in the interaction_matrix/default_item you can add this for a quick and dirty test..

    6:0
    [/CODE]

    Basically that value is set to the object you named, and its string 6:0 indicates parent uid 6, sub-uid 0 (calls the first fire effect in that block).

    You can expand that further by instead of putting it in the default_item section, add it to anywhere in the material_interactions section. Here’s a snippet from my current bullet_impact_flak.bin’s material_interactions – this goes right after the default_item section (also, remove F75B8111 from default, or it will override and get called everytime – even on water, you’ll see why below). I’m calling both version 6:0 and 6:1 depending on what material I hit, and with that – one burns slightly longer than the other. This can be adapted to anywhere to do (almost) anything. The stuff is simple xml comments, they get stripped out when compiling so I include my xml files wherever I can so others can see my (chickenscratch) notes.

    30

    6:0

    28

    6:0

    14

    1:5
    0:2
    6:0

    9

    1:8
    2:2
    0:5

    34

    1:9
    2:6
    0:0
    6:1

    5

    1:3
    2:4
    0:0

    8

    6:0

    21

    6:0

    25

    6:1

    10

    6:1

    11

    6:1

    0

    1:2
    2:6
    0:0
    6:0

    2

    1:3
    2:5
    0:0

    1

    1:9
    2:6
    0:0
    6:1

    2

    1:2
    2:6
    0:0
    6:0

    7

    1:4
    0:3

    17

    1:2
    2:6
    0:0
    6:0

    13

    6:1

    29

    1:9
    2:6
    0:0
    6:1

    6

    1:9
    2:6
    0:0
    6:1


    15

    1:10
    2:0
    0:1
    6:0


    32

    1:3
    2:5
    0:0


    3

    1:9
    2:6
    0:0
    6:1


    33

    1:9
    2:6
    0:0
    6:1

    Basically you can use that to add fire, or any other effect imaginable to the game. Possibly even custom ones, by making your own .psmb (convert them to .xml and edit away). I took apart the mile high explosions and added the shock nova to various explosions the same way.

    The one I uploaded should set some things on fire, if not – I have another version that definitely does that and more lol. Hopefully this makes sense and helps out, you can definitely make some interesting fx this way.
    6:0

    Basically that value is set to the object you named, and its string 6:0 indicates parent uid 6, sub-uid 0 (calls the first fire effect in that block).

    You can expand that further by instead of putting it in the default_item section, add it to anywhere in the material_interactions section. Here’s a snippet from my current bullet_impact_flak.bin’s material_interactions – this goes right after the default_item section (also, remove F75B8111 from default, or it will override and get called everytime – even on water, you’ll see why below). I’m calling both version 6:0 and 6:1 depending on what material I hit, and with that – one burns slightly longer than the other. This can be adapted to anywhere to do (almost) anything. The stuff is simple xml comments, they get stripped out when compiling so I include my xml files wherever I can so others can see my (chickenscratch) notes.

    30

    6:0

    28

    6:0

    14

    1:5
    0:2
    6:0

    9

    1:8
    2:2
    0:5

    34

    1:9
    2:6
    0:0
    6:1

    5

    1:3
    2:4
    0:0

    8

    6:0

    21

    6:0

    25

    6:1

    10

    6:1

    11

    6:1

    0

    1:2
    2:6
    0:0
    6:0

    2

    1:3
    2:5
    0:0

    1

    1:9
    2:6
    0:0
    6:1

    2

    1:2
    2:6
    0:0
    6:0

    7

    1:4
    0:3

    17

    1:2
    2:6
    0:0
    6:0

    13

    6:1

    29

    1:9
    2:6
    0:0
    6:1

    6

    1:9
    2:6
    0:0
    6:1


    15

    1:10
    2:0
    0:1
    6:0


    32

    1:3
    2:5
    0:0


    3

    1:9
    2:6
    0:0
    6:1


    33

    1:9
    2:6
    0:0
    6:1

    [/CODE]

    Basically you can use that to add fire, or any other effect imaginable to the game. Possibly even custom ones, by making your own .psmb (convert them to .xml and edit away). I took apart the mile high explosions and added the shock nova to various explosions the same way.

    The one I uploaded should set some things on fire, if not – I have another version that definitely does that and more lol. Hopefully this makes sense and helps out, you can definitely make some interesting fx this way.

    30

    6:0

    28

    6:0

    14

    1:5
    0:2
    6:0

    9

    1:8
    2:2
    0:5

    34

    1:9
    2:6
    0:0
    6:1

    5

    1:3
    2:4
    0:0

    8

    6:0

    21

    6:0

    25

    6:1

    10

    6:1

    11

    6:1

    0

    1:2
    2:6
    0:0
    6:0

    2

    1:3
    2:5
    0:0

    1

    1:9
    2:6
    0:0
    6:1

    2

    1:2
    2:6
    0:0
    6:0

    7

    1:4
    0:3

    17

    1:2
    2:6
    0:0
    6:0

    13

    6:1

    29

    1:9
    2:6
    0:0
    6:1

    6

    1:9
    2:6
    0:0
    6:1


    15

    1:10
    2:0
    0:1
    6:0


    32

    1:3
    2:5
    0:0


    3

    1:9
    2:6
    0:0
    6:1


    33

    1:9
    2:6
    0:0
    6:1

    Basically you can use that to add fire, or any other effect imaginable to the game. Possibly even custom ones, by making your own .psmb (convert them to .xml and edit away). I took apart the mile high explosions and added the shock nova to various explosions the same way.

    The one I uploaded should set some things on fire, if not – I have another version that definitely does that and more lol. Hopefully this makes sense and helps out, you can definitely make some interesting fx this way.

  • #100784

    mandella644
    Member

    I’m suspicious that there are some Avalanche team members on the forums, like that guy who found the civilian hash! :huh:

    I know how trial and error / guessing games work when it comes to JC2 modding, and it’s not a fun process. Best attempted while under the influence of spiked amaretto balls. :P

  • #100787

    AmauryRR
    Participant

    @mandella and @ Coconut – actually I learned this stuff by studying your mods! I must say thanks to you guys! And yes, its definitely tedious and time consuming when we have no notes.

    I didn’t expect Avalanche to give a SDK for this game, but atleast tell us what all (or some?) the hashes do lol.

    I’m still recovering from my kidney surgery, so I’m putting my brainpower to work lol. (as best I can anyways :P)

    EDIT: got a random idea for adding damage to the fire fx, some of the other “vent pop’ effects used when some of the fuel tanks get to a low enough health.. there may be something there that causes damage for x.. seconds (or maybe adding a duration flag to something that does damage in a small radius, no impulse, or maybe.. negtive impulse).

    One of the things I want to add (a friend of mine suggested it) – add a water hose to the firetruck, technically I can use the watersplash sprite for the trail, and give it gravity (grenade bullettype), and on impact do little to no damage, and good impulse/knockback with some water fx.. Technically do-able, might try this later on the weekend.

    Also – theres a random effect I noticed used – fx_bulhit_headremove_01 – Im trying to see if it actually does what it says. Originally its used in one of the character_hit_* files, I’ll report more when I test (or break it) some more.

  • #100788

    mandella644
    Member

    I’m a bit out of it right now lol but I will say one advice… Jc2 has TON of unused AI code, from air combat to NPC, even some unused ped AI assets and events like one of every fifteen-20 drivers will drive recklessly and try to pass others on the road, theirs code for taxi drivers and faction chopper escorts and other AI interactions (farms worth touch on this in 2010 but didn’t explore full potential (CRAZY CIVIL AI :D which is basically the application of the reckless driver / racing parameter code merged so the AI don’t disappear when they spawn and still drive fast and crazy)…but WHY did avalanche leave all the code in the game? because they forgot it was there. And…why did they ditch those awesome AI stuff?? There are lines of dialogue for ms. Demonica (race challenger girl) for NPC races and AI code buried. I’ve discovered this…but what if there is unused code in fields that aren’t my specialty? we may never know….

    http://www.youtube.com/watch?v=DZnk7LGBp9g

  • #100792

    AmauryRR
    Participant
    mandella644 wrote:
    I’m a bit out of it right now lol but I will say one advice… Jc2 has TON of unused AI code, from air combat to NPC, even some unused ped AI assets and events like one of every fifteen-20 drivers will drive recklessly and try to pass others on the road, theirs code for taxi drivers and faction chopper escorts and other AI interactions (farms worth touch on this in 2010 but didn’t explore full potential (CRAZY CIVIL AI :D which is basically the application of the reckless driver / racing parameter code merged so the AI don’t disappear when they spawn and still drive fast and crazy)…but WHY did avalanche leave all the code in the game? because they forgot it was there. And…why did they ditch those awesome AI stuff?? There are lines of dialogue for ms. Demonica (race challenger girl) for NPC races and AI code buried. I’ve discovered this…but what if there is unused code in fields that aren’t my specialty? we may never know….

    http://www.youtube.com/watch?v=DZnk7LGBp9g

    Interesting, you pretty much verified some stuff I was wondering about while digging through the various .bin files – in the “UNKNOWN” batch – lots of code that looks similar to the pursuit code, worldsim.aiteam and other stuff burried in the mix.

    Same thing with the effects, I can identify most of them – from cutscenes to various misc in-game things/mission effects, but theres some other ones that are either plain unused/incomplete and waiting to be put to some type of use. Kinda how they left the .ee and .eez files in, they could have left the other stuff as well.

    The air fighting ai sounds interesting, they probably made it but didn’t use it as it might not have worked how they wanted in the time they had to put the game out (or, maybe for another type of expansion?). I’m testing something out in heatspawn.bin for factions to also show up with choppers, might be doable as the military already has this capability.

    I played around with CCAI and traffic mods, got the ai to stop acting dumbfounded occasionally (without touching memory limits.bin). Still trying to figure out the proper draw distance where they fade in/out, and how to increase that slightly. Seems if I increase it, the vehicles/peds are more spread out – so I’d have to increase the area density, but also keep it within some other limit the game has that we haven’t cracked yet else potential crashes happen.

    All in due time I suppose. Thanks, gave me some ideas on where to explore and more stuff to play with on my downtime!

  • #100793

    CoconutFred
    Member

    About applying damage to fire, when you destroy horizontal gas tanks ingame, the burning wreckage deals fire damage to Rico when you stand on top of it.

    Might be material worth checking out.

    EDIT: As for factions with choppers, numerous mods already have this capability. See Can’t Stop the Factions mod for a good template.

    Mandella and I have extensive experience working with heatspawn, ask away if you have any questions.

  • #100795

    AmauryRR
    Participant

    Thanks! I’ll take a look at those mods for references. I got the friendly choppers working similar to how I got the normal choppers showing up outside bases (and when you’re on foot) for higher levels. There was a variable that I changed from 1 to 0 (64747c9e) – when I applied that to the gov’t airwaves (usually wave2/3) choppers would show up outside bases (wether you were in any vehicle or on foot).

    Don’t know if I’m missing anything there, but the same method worked with the faction guys – gave them wave0/1/2 in heat_00 and set that 64747c9e to 0

    I’ll poke around the gas fire effect, hopefully I’ll get something working soon. I don’t think the game recognizes damagetypes/deathtypes, but its a start! I’m suspecting its similar to how the other effects do splash/radius damage, but it might have a duration assigned to it? Back to digging lol.

    PS. Any other cool tricks in heatspawn? I’m curious about the ai for air fighting, maybe give a heat_04/wave3/4 with some fighter jets and assign 64747c9e to 1 (so it would spawn near bases or when you’re in a vehicle).

  • #100712

    AmauryRR
    Participant

    Here’s a random (albeit long) video of the mod I’m playing with, shows some of the increased/”combo” effects (hopefully). HD should be available later, youtube’s being.. funny lol.

    Other stuff in the video (and some notes ofcourse):
    -Civilians from CCAI (their land-racing ai); Used only the aiparameters (tweaked), and the civilian worldsim.aiteam file here. Works great!! (one of my fav mods from here). No conflicting with normal enemy ai (they don’t “stand around clueless”).
    -Military Vehicles Upgrade pack; tweaked handling variables, some boyancy and weapon loadout.
    -Proper Sports Car pack; tweaked handling further for more “fluid” movements, made metro awd.
    -Camera mods (freecam, lave car-cam w/ dash)
    -Custom weapons; spent a lot of time messing with these, using modded in-game effects and other random stuff.
    -Custom heatspawn; using more vehicles, factions upgraded also (land/sea/air waves)
    -Custom worldspawn; orig based off traffic increase mod (rewrote), including various (dlc included) vehicles depedning on area.
    -Lots of effects touched. Lots of them. (weapons, explosions, gore, grappling, vehicle, etc..)
    -Textures; couldn’t find the awesomeface sun – so I made one. Also did some other random things (8-bit coin stars, rageface moon, modded rico on drugs skyline – extra gradient and hue shift, and some trippy dented clouds).

    linky: http://youtu.be/c-Q26AJor18

  • #100816

    CoconutFred
    Member

    Those are some insane effects. Linky for download?

    Also, I see all your weapon names are references to Just Cause 1. I likey.

    1 user thanked author for this post.
  • #100818

    AmauryRR
    Participant

    Thanks, I haven’t uploaded anything yet (relevant to the mod atleast). Still polishing out some minor things, got most all bugs fixed. It started off as a compilation of mods, then when I started rewriting things.. turned into that lol.

    Here’s a working dropbox link to the files I’m running:
    https://www.dropbox.com/sh/0paecyuyuvyw9g9/Mf2WVjVM1W

    It should work fine, heres some notes on the files in that folder/install.
    -Backup your dropzone, best to start with a fresh (empty) dropzone. Just for compatability’s sake.
    -Backup your dlc folder, I’ve touched these as well. “Verify game cache” should also revert these back to stock if you wish to return to stock later or play multiplayer.
    -I use 7zip, it’s pretty nice. Very very compact.
    -jc2-acemod-dropzone.build##.7z – thats the main mod file, unpack this to dropzone. Source included, I added comments wherever possible. Current version should be build46 as of this writing.
    -jc2-dlc-mod.7z – these are the mod’s dlc files, unpack this to your dlc folder. Overwrite existing.
    -jc2-vaas-acemod.7z – modded version of the rico military belt model (Jusupov i think?), I did a quick-n-dirty Vaas’ face blend and tweaked the camo.

    The “Ninja Laser Airstrike” weapon was kind-of based off the weapon used against you in the boss fight. Couldn’t think of a better name, still gotta tweak that thing lol.

    I also included the dubstep cannon (the sfx anyways), I reskinned the airzooka (stickerbombed).

    Other dlc weapons/items are reskinned (red/blue/green skull camo), louie-v flak rifle (got bored), and some of the “carbon trim” on the vehicles (more paint.net boredom).

    Either way, give it a shot – I update it very frequently, I’ll always leave a “stable” version up and a “tester/beta” one in the mix usually. Should work fine, atleast on my rig (Win 7 x64, x3220 @ 3.0ghz, gtx460 and 8gb ram) your mileage may vary.

    EDIT: The weapon names, I felt they kind of “dumbed” things down (example: kind of how they did with Borderlands 1 vs Borderlands 2) – started looking at the JC1 weapon’s set and picked/tweaked them for JC2. I’ll have some fun playing with the text :)

    EDIT2: Hopefully with JC2-MP, they let those of us who run dedicated servers to use their own dropzone mods. With how so many games have done that before this (think: Quake series, UT series, etc..) – players can join a server running a mod, and have a clean dropzone mod sync’d over for that server (enabling way more in addition with the Lua scripting). There are things that can be added, or made use of (like the wierd Flare-grenade things in-game). For example, getting those to spawn a env_shaft_poisongas effect looks nice for a smoke grenade (for those playing faction wars online). And similarly to how adding damage to the fire fx works, can be turned into a small area poison gas bomb. Pretty neat stuff that the game is capable of here, props to Avalanche for the engine!

    EDIT3: Adding effects to the game, as in – new effects from scratch doesn’t seem to far fetched. Looking at things (read: testing this right now), basically add your definition to effectsettings.bin – simply define an object as such (add this to the object listing in effectsettings.bin): JC2 barfs when moddiing that, more homeworks needed there.

    EDIT4: adding effects DOES work, Just Cause 2 defines 467 effects in effectsettings.bin. To add a new one, define whatever way you want (I used object name=”something”) – then give it the “next” free uid, so 468, 469, etc… DO NOT SKIP ANY, that causes crashes (allocating space for an effect that is NULL). Also testing fire damage by creating a seperate damage object with a duration the same as each fire effect (per uid).

    Hopefully you get the idea.. Now to finish working on that flamethrower :P (eventually)

  • #100713

    AmauryRR
    Participant

    Found another interesting file to look at, this one is for focusing and misc post processing/weather effects (heat haze, blur, etc..).

    landscape_effects.bin

    Inside here you can find stuff for fog visibility, and probably more weather params(fog, etc..). Most of them are all hex hashes, but plug away..

    Of interest here is object id=”D69D4965″ – this contains stuff like focal_distances, heat haze, etc.. within that look for this object id=”E691F700″ that sub-object seems to be for zooming. Stock looks like this:

    2000

    150

    8

    150

    2000

    [/CODE]

    As you can see, I changed the original max_params for focal_distance from 1500 to 2000. Nice bump over “stock”, higher values work but thats a happy medium. Still plenty good for seeing farther with a scope vs ironsights.. Test away!

    EDIT: Notes on creatures.bin

    -File is pretty straight forward to edit
    -Has all the creatures you see in-game, birds/fishes/etc.. Similar layout to worldsim.bin
    -You can seeminly combine effects/params from other “creatures” for interesting effects (6-legged dragon eagle thing anyone?)
    -The params are pretty straight forward, most have been unhashes
    -You can easily control the ammount, drawdistance, spawndistance, hit effect (yes, make them all killable. or atlease define it.)
    -And more!!
    -I’ve exploited this file to add some “Easter eggs”, like rare giant birds/dragonflies that live 250+ meters above the ground, or giant fish/freaky scorpions/etc.. Testing adding “legs” to one of the giant flying things for kicks..

    EDIT2: some resourceitem notes (detection range)

    I mentioned in another post, but I’ll include it here for completion: Saw an old thread where users were trying to crack the resource item range, some suggesting the outline increase also (same thing I wound up doing in the resoruce item mod). Another user brought up a entry in player.bin:

    In player.bin there’s a setting called “ResourceItemPickupRange” and it’s default is set to 150. Whap that up to 500 or so and you can extend the range of the scanner.

    This needs more testing, it should affect the detection range. Upped it from the normal 150 to 400-ish and when you get close to a resource item, the radar icon blinks. No arrows, but don’t really need it at that point – the (modded) glow will give it away. Try it in your player.bin file and it should help hunting down those pesky items hidden behind walls/crates/etc..

    EDIT3: More weapon notes (grenades,mines,etc..)

    Near the top of the weapons.bin you’ll find all the grenades/triggered mines/flares/cluster grenades defined (before the normal weapons).

    Inside those you’ll find these variables/hashes:

    speed = how far/fast you toss the grenade
    range = splash damage per level
    52ED688C = explosion effect (see effectsettings.bin[/i])
    5A9B3B81 = trail effect
    7b655f19 = max ammo per level

    these are also in there, need more testing but quick search through the files lead to these..

    targetable = can it be targeted? (needs more testing)
    641d73f0 = default_destruction?
    692808C5 = default_explosion?
    14B862D2 = on-screen warning (normal)
    8D6FE1BE = on-screen warning (ai thrown)

    Nothing on the grenade timers yet, suspecting one of the float variables to be it.

    EDIT4: Note for later, inside the weapon_pickup.bin grenade_pickup.bin and triggered.pickup.bin – each has a COutline section, same as the resource and faction items. Changing the width increases how wide these pickups are from a distance (the glow grows further you are, and shrinks to normal when you get close). Also noted here is the color, which seems to use a vec4 (floating 4 point vec) that has R,G,B,A defined.

    Interesting trick also, took the idea from weapon_upgrades.bin – create an object called “color” and set values for each level (level_0 – level_5) and define a different vec4 color for each. Although buggy, and not intended – the game seem to try to get the level’s color right for pickups (per level, as you – the player upgrades them. good for spotting a weapon you’ve upgraded higher in the mix). For the most part it works great, there’s few times it will drop with a different “level color” (still works normally). Still cool to toy with and fun spoof at Borderlands, might be more to it.. (different object name besides color?)

    That last idea, doesn’t work as predictably as it seems – rather something else triggers the “levels” for color drops. Seems almost random at times, or might be tied into the weapon that did the killing. Or the heat level, lol. Either way, nice idea – definitely more to it, too bad none of it is fully documented 😛

    2000

    150

    8

    150

    2000

    As you can see, I changed the original max_params for focal_distance from 1500 to 2000. Nice bump over “stock”, higher values work but thats a happy medium. Still plenty good for seeing farther with a scope vs ironsights.. Test away!

    EDIT: Notes on creatures.bin

    -File is pretty straight forward to edit
    -Has all the creatures you see in-game, birds/fishes/etc.. Similar layout to worldsim.bin
    -You can seeminly combine effects/params from other “creatures” for interesting effects (6-legged dragon eagle thing anyone?)
    -The params are pretty straight forward, most have been unhashes
    -You can easily control the ammount, drawdistance, spawndistance, hit effect (yes, make them all killable. or atlease define it.)
    -And more!!
    -I’ve exploited this file to add some “Easter eggs”, like rare giant birds/dragonflies that live 250+ meters above the ground, or giant fish/freaky scorpions/etc.. Testing adding “legs” to one of the giant flying things for kicks..

    EDIT2: some resourceitem notes (detection range)

    I mentioned in another post, but I’ll include it here for completion: Saw an old thread where users were trying to crack the resource item range, some suggesting the outline increase also (same thing I wound up doing in the resoruce item mod). Another user brought up a entry in player.bin:

    c411umh wrote:
    In player.bin there’s a setting called “ResourceItemPickupRange” and it’s default is set to 150. Whap that up to 500 or so and you can extend the range of the scanner.

    This needs more testing, it should affect the detection range. Upped it from the normal 150 to 400-ish and when you get close to a resource item, the radar icon blinks. No arrows, but don’t really need it at that point – the (modded) glow will give it away. Try it in your player.bin file and it should help hunting down those pesky items hidden behind walls/crates/etc..

    EDIT3: More weapon notes (grenades,mines,etc..)

    Near the top of the weapons.bin you’ll find all the grenades/triggered mines/flares/cluster grenades defined (before the normal weapons).

    Inside those you’ll find these variables/hashes:

    speed = how far/fast you toss the grenade
    range = splash damage per level
    52ED688C = explosion effect (see effectsettings.bin)
    5A9B3B81 = trail effect
    7b655f19 = max ammo per level

    these are also in there, need more testing but quick search through the files lead to these..

    targetable = can it be targeted? (needs more testing)
    641d73f0 = default_destruction?
    692808C5 = default_explosion?
    14B862D2 = on-screen warning (normal)
    8D6FE1BE = on-screen warning (ai thrown)

    Nothing on the grenade timers yet, suspecting one of the float variables to be it.

    EDIT4: Note for later, inside the weapon_pickup.bin grenade_pickup.bin and triggered.pickup.bin – each has a COutline section, same as the resource and faction items. Changing the width increases how wide these pickups are from a distance (the glow grows further you are, and shrinks to normal when you get close). Also noted here is the color, which seems to use a vec4 (floating 4 point vec) that has R,G,B,A defined.

    Interesting trick also, took the idea from weapon_upgrades.bin – create an object called “color” and set values for each level (level_0 – level_5) and define a different vec4 color for each. Although buggy, and not intended – the game seem to try to get the level’s color right for pickups (per level, as you – the player upgrades them. good for spotting a weapon you’ve upgraded higher in the mix). For the most part it works great, there’s few times it will drop with a different “level color” (still works normally). Still cool to toy with and fun spoof at Borderlands, might be more to it.. (different object name besides color?)

    That last idea, doesn’t work as predictably as it seems – rather something else triggers the “levels” for color drops. Seems almost random at times, or might be tied into the weapon that did the killing. Or the heat level, lol. Either way, nice idea – definitely more to it, too bad none of it is fully documented :P

  • #100819

    AmauryRR
    Participant

    Was playing trying to find chaos unlocks for missions/etc.. and wound up finding payouts for various things! Still finding more payouts and what they do but here’s some to play with and look at (hopefully test, I’ll eventually start a new game and check).

    missiondata.bin
    -seems to have payouts for fixed things (settlements, key missions, faction missions, race events, etc..)
    known/tested:
    314B5CDE – race event payouts
    5C63149F – this is object group for settlements it seems with 3 subgroups.
    263987CA – medium settlements
    33DECF89 – small/easy settlements
    A8D43BC6 – large/hard settlements
    E5B4E435 – faction missions (normal difficulty?)
    EB00E73C – faction missions (harder?)
    860EAC9B and A0F6792B seem to be for giving resource items, not sure what does what..

    unknown/untested:
    2AFEC29A – seems to be a mission of sorts?
    gives 7500 chaos, $17500, and 2 resource items (weapon and armor?)
    42FBDDAC – some random payout?
    gives 500 chaos $2500
    93891035 – see 42FBDDAC
    CDB1D09B – another random mission?
    gives 10k chaos $20k
    F0F41244 – see 42FBDDAC

    achievements.bin
    This one has payouts for sabatoge items, and other misc things. I’ve just copied the “important” snippet out of that file I’m working with so compare this code block to the one in your file. I’ve commented where I can, and left the original values commented also (this is a snippet copied from my own dropzone/achievements.bin file).

    Code:

    150
    2500
    1
    act_type_txt_01
    1


    250
    7500
    1
    act_type_txt_10
    10


    100
    1500
    1
    act_type_txt_11
    11


    500
    7500
    1
    act_type_txt_12
    12


    10
    50
    0
    act_smallfuelcon_tin_txt_01
    13


    250
    1500
    1
    act_type_txt_14
    14


    250
    7500
    1
    act_type_txt_15
    15


    500
    5000
    1
    act_type_txt_16
    16


    250
    1500
    1
    act_type_txt_17
    17


    250
    2500
    1
    act_type_txt_18
    18


    250
    5000
    1
    act_type_txt_19
    19


    500
    5000
    1
    act_type_txt_02
    2


    1000
    10000
    1
    act_message_txt_06
    act_type_txt_20
    20

    0
    0
    0
    act_type_txt_21
    21


    500
    5000
    1
    act_type_txt_22
    22

    50
    1000
    0
    Military Vehicle Destroyed
    23

    25
    1000
    0
    Bomb Expert Assassinated
    24

    0
    50
    0
    Elite Assassinated
    25

    15
    250
    0
    Ninja Assassinated
    26

    10
    100
    0
    Shielder Assassinated
    27


    1500
    15000
    1
    act_message_txt_08
    act_type_txt_28
    28


    500
    7500
    1
    act_type_txt_29
    29


    1000
    5000
    1
    act_message_txt_01
    act_type_txt_03
    3


    500
    12500
    1
    act_type_txt_30
    30


    500
    10000
    1
    act_type_txt_31
    31


    1500
    10000
    1
    act_message_txt_02
    act_type_txt_04
    4


    500
    20000
    1
    act_message_txt_07
    act_type_txt_05
    5


    1000
    5000
    1
    act_message_txt_03
    act_type_txt_06
    6


    500
    5000
    0
    gui_txt_265
    7


    1000
    25000
    0
    act_message_txt_04
    act_type_txt_08
    8


    1000
    15000
    1
    act_message_txt_05
    act_type_txt_09
    9

    EDIT: Some quick heatspawn.bin and spawnsettings.bin observations

    Looked around heatspawn.bin and one of my questions was “Where the did they define/get the templates on some units” – and then I was looking at spawnsettings.bin (in .xml ofcourse) and was put off originally because of the “debug_menu” thing. Eventually might wanna look into this more, seems to have some cool stuff in here (maybe editor related/debug testing somehow). One thing I noticed, was it had vehicles and some hashes with different “upgrade” levels or “trims” it seems.

    Inside spawnsettings.bin for example, it defines some things you’d find in templates used in heatspawn for those vehicles. So I poked around, and found some of the vehicles I used/added had templates that weren’t being used. So I did, there’s also some unique/interesting ones – like WeaponUpgrades for motocross (and vehicles that didn’t seem to have any). Alter versions most likely used in a cutscene/mission somewhere. The armed version of the civilian helicopter, and other cool stuff.

    Basically try out whatever you want, and see if it works for you. Seems like some can be “combo’d” for compound/randomized versions. Not sure how to get these to trigger via blackmarket or worldsim yet, but it’s a start! So far in my heatspawn.bin – Government uses almost all available vehicles, and depending on area – slightly randomized template. Higher heatlevels, some vehicles exclusively come armed. Government gets motorcycles (less of them, lol) and Factions show up sometimes on a motocross (with random template upgrades). Government uses armed military grade choppers, Factions use armed civilian type choppers. Government uses their military/attack boats – Factions use “unused” weaponized boats. Just some random things for experimentation.

    Hopefully this stuff is usefull to somebody!

    -l8r

  • #100822

    AmauryRR
    Participant

    Inside this file – game_materials.bin

    Seems to have all the game’s materials, inside is a “friendly name” or some kind of description. Also in here, is all the physics reactions it seems.

    Ranging from using the material for:
    -a model
    -terrain
    -bullet friction
    -broken object friction
    -offroad friction
    -chance of playing effect
    -uid (might be usefull for effects, material_interactions uid there).

    Now with bullet_friction, basically its what it sounds like. The friction from 0-1 (float, so everything in between also) tells the chance that the bullet will collide with said material. The game seemingly uses 0 (pass right through) or 1 (stop in its tracks). Being as its a float, I tried some materials (wood, wood hollow, flesh, etc..) and gave them a chance of piercing. Ranging from 0.75, 0.6 to 0.25 – seems like it works for those materials. The game will randomly (lower the number) let bullets pass through. It shows an impact, and decal (if necessary) and passes through.

    Now, if theres only a way to let a single weapon do that (aka: Railgun effect). But I’ll take it as-is for now. Recompile your game_materials.bin and changes should be noticeable. ie: I set the Wood used on trees to 0.6-0.75 and either way some bullets randomly pass through and hit both the tree and the ground behind it. Same for flesh it seems, shoot one guy and theres a chance the guy behind will get hit along the path as well.

    Happy modding!

    EDIT: Something else to test, inside the projectile’s material_interaction section, see if the bullet_friction float can be overridden. Ie: set different values within each bullet impact effect, higher caliber weapons get less “bullet_friction” so they can pass through objects.

  • #100714

    AmauryRR
    Participant

    This one might be hard to follow, but I’ll try my best to document it.

    Upon looking through Jusupov’s notes on adding things to the map (here) – and looking for an alternative to MiniBolo (didn’t want to downgrade my .exe) – Stumbled across this very useful script from Arnie for JC2-MP (here). I’ve also made a quick-and-dirty excel spreadsheet that helps calculate the Mins/Maxs for the spawning area (I’ll attatch it here).

    For reference, inside world.bin(convert to xml ofcourse)
    -File will be your .nlz file used for spawning things (this references the .ee file you wish to spawn, more on that later)
    -Your “Maxs” would be value 2B5EF194 (type VECtor)
    -Your “Mins” would be value 7DF7F859 (type VECtor)

    The idea of using the XYZScript works awesome (especially as JC2-MP is both fun AND free).
    -You need to run your own dedicated server with the script, copy it to your server’s “scripts” folder (create or rename if you haven’t done it already).
    -Then connect to your own server with your client (drop the console with ~ and type connect localhost ).
    -Once in the map, navigate to wherever you want and type /pos in chat. This will fill a Stats.log file inside the XYZScript folder on your server with the XYZ locations, not to mention also output to the server’s console directly.
    -After, exit the JC2-MP (and your dedicated server if you’re not hosting one), go to that Stats.log file in the XYZScript folder.
    -Open the world item calculator spreadsheet
    -Copy each coordinate INDIVIDUALLY to the spreadsheet under “origin” for the X Y and Z cells.
    -Set your bounding box size in the spawnbox cell, 1500 units seems to be good for smaller stashes, 5000+ seem to be much better for larger objects (I used 10k+ on my submarine/spacerocket tests)
    -The spreadsheet will calculate the Maxs/Mins for the bounding box. These are the coordinates you use for world.bin.

    Now, that’s one part of the equation. The other part is putting your .nlz together (that’s the “filename” world.bin used, without its .nlz extension). I can upload some “template” ones to use, important things to not inside a .nlz file:
    -spawn_distance seems to work for spawning entities
    -D57278D7 (type float) seems to work for drawing models (seems like this should be set a good amount higher than spawn_distance).

    sample nlz file (name it something.nl.xml and compile with BinConvert) this is one of the files I used to add things to Salad Island. This should spawn a Bering in the beachside, a MV V880 with increased health, and a signature gun next to the MV V880. This was hybridized/modified from Jusupov’s mods. Code first, notes later.

    Code:

    CSpawnSet
    -1405054647
    -247874940
    1
    1
    sps.dcs.vehicle
    0
    0
    4500
    -0.5350879,0,0.8447964, 0,1,0, -0.8447964,0,-0.5350879, 14693.264648,201.279419,-12922.559570
    0
    0
    0
    0
    4
    0
    0
    9001
    CVehicleComponent1
    0

    CPlacementComponent
    0
    -1097919422
    PlacementComponent1
    1
    1,0,0, 0,1,0, 0,0,1, 0,0,0
    2
    0
    SSpawnPoint1
    0.5

    SSpawnPoint
    -752194702
    SpawnPoint1
    1,0,0, 0,1,0, 0,0,1, 0,0,0
    1

    CVehicleComponent
    1099771729
    0
    0
    1
    VehicleComponent1
    0
    vehiclesarvearve.v072_cargo_plane.ee
    1
    0
    0
    2
    0
    0

    CSpawnSet
    -1405054647
    965223717

    1
    1
    sps.vehicle
    0
    0
    3000
    1,0,-0.4999999, 0,0.9999999,0, 0.4999999,0,0, 14752.521484,202.029053,-13038.179688
    0
    0
    0
    0
    3
    0
    0
    CVehicleComponent1
    6000
    CPlacementComponent1
    0

    CPlacementComponent
    0
    -1015172993
    plc.vehiclePlacement
    1
    1,0,0, 0,0.5,0, 0,0,1, 0,0,0
    2
    0
    SSpawnPoint1
    0.5

    SSpawnPoint
    1745324429
    spp.vehiclePoint
    1,0,0, 0,1,0, 0,0,1, 0,0,0
    0

    CVehicleComponent
    2049193592
    6000
    0
    1
    vec.vehicle

    0
    vehicleslaveLAVE.V017_MILITARY_JEEP.ee
    1
    0

    0
    2
    0
    0

    CSpawnSet
    CTeamComponent1
    -322802977
    -247874942
    1
    0
    sps.stash
    0
    0
    200
    -0.9996987,0,0.02454874, 0,1,0, -0.02454874,0,-0.9996987, 14754.521484,202.029053,-13039.179688
    0
    0
    0
    0
    4
    0
    0
    400
    CExportedEntityComponent1
    0

    CExportedEntityComponent
    -1583305280
    e{mod.heavydrop.siggun({8A7336FD-6425-4472-870D-433EF252FE62})}::event
    eec.stash
    0
    mod.heavydrop.siggun.ee

    So how to turn that into something we can add to the game?
    -In that code, you can save that file as xtra-salad-plane1.nl.xml, in a folder of the same xtra-salad-plane1 name.
    -convert it using BinConvert (use R169 or R171). This will make a xtra-salad-plane1.nl.blo file.
    -take the folder you put those files in and SmallPack them, rename the new .sarc to xtra-salad-plane1.nlz
    -Then you can add this code to your world.bin file

    Code:
    <object id="FFB586C1
    xtra-salad-plane1
    20693.264648,6201.279419,-6922.55957
    8693.264648,-5798.720581,-18922.55957

    -Basically to get those values for 2B5EF194 and 7DF7F859 – you find a origin point you used, one kinda center is cool. Then either using the excel calculator (or brainpowah) add 1500 (or I believe I used 5-6k on these) and come up with “box corners”. Whenever you travel inside the “box” that .nlz file gets loaded, and any _object_id/_instance_ids used will be active.
    -If you’re having trouble spawning multiple things, change the _instance_id/_object_id’s to something “unique” (trial and error, usually works by switching a #)

    If you’ve done that successfully, when you arrive on Salad island – you should be greeted by some vehicles and a signature gun for pickup. Adding other stuff like this seems to make them respawnable, so you can theoretically go nuts adding space rockets, submarines, giant silo’s, sam sites, etc.. (anything you can find a .ee/.eez file for pretty much). Ok, Hopefully that mess makes sense to those that read it all.

    Here’s some random videos of stuff I’ve added/played with recently:
    http://youtu.be/u5OMirZwgeQ
    http://youtu.be/XeFF-kfa2NM
    http://youtu.be/6hQptsXnes0

    EDIT: Forum won’t let me post attatchments? So here’s a dropbox link to the excel spreadsheet (.xls and .xlsx versions) packed with 7zip.

  • #100859

    AmauryRR
    Participant

    Notes on Messing with the MiniMap (and other Hud-related stuff):

    frontend.blz – seems to have the main menu gfx/titlescreen/etc..
    – Good place to mod the title screen, various effects, alpha masks/etc.. can pull off some cool stuff
    main_menu.blz – seems to have the in-game stuff
    – You can mod the map icons here
    – You can also mod the sniper overlay here (I’ve changed mines to be a little more see-through in the center)
    pda.blz – seems to cover all other pda related things

    EXAMPLE MOD:
    -UnPack up main_menu.blz
    -look for pda_icons.dds
    -Open it in Paint.net (or whatever you prefer)
    -You can make collectible items only show up on the minimap by literally removing the icon for it from this image.
    -The top batch of icons seems to be for the larger map, so from the top-left – 1st column, 2nd row blue dot would be the icon to delete (or modify).
    -Save your DDS image (I used DXT5 – gave it a nice smooth OEM look)
    -Repack your modified main_menu.blz into your dropzone and launch the game.

    PS. I may release this as a sample mod to test with, works great with my increased visibility mod (have fun hunting :P)

    SIDENOTE: I’ve noticed a problem, and there might be a fix:
    -There seems to be a problem with SmallPack and large files (large as in > 4MB)
    -I’ve noticed this with pda.blz – only way to get it to load in-game is by reducing its filesize (it includes “duplicate” images used for title/hud screens so those can be removed).
    -Look at other “HUD MODS” on how they did this also.

    Since we have the source to Gibbed’s toolkit – maybe we can continue improving this, so it can actually work with larger files. I’ll try and have a poke around, but if anyone else has experience with this then it might be something worth looking into.

    If the > 4MB bug gets fixed, then we should be able to repack any of the larger .blz/.eez files (including areasets, general.blz, larger mission exported entities – submarine mod, etc..).

  • #100861

    CoconutFred
    Member

    The 4MB bug applies to all BLZ archives, unfortunately. It was one of the compelling reasons for my tutorial on reskinning weapons – if the bug didn’t exist, you could simply unpack and edit the contents of general.blz.

    For now, my tutorial appears to be the only (practical) method of editing the contents of large archives. The main issue with it is that the game takes time to realize that the specified models don’t exist in the default path, and so edited models and textures initially show up as invisible.

  • #100863

    AmauryRR
    Participant
    CoconutFred wrote:
    The main issue with it is that the game takes time to realize that the specified models don’t exist in the default path, and so edited models and textures initially show up as invisible.

    I’ll go back over the tut, I was hoping I missed something but that seems to be the case :/

    I tried reskinning all weapons before, just to try out the tut you posted. Initial load wouldn’t render the weapon, but if I reloaded with it equipped it would show up fine – skin and all. Then when I’d switch to another weapon I reskinned, it would then show up as invisible..

    You game me an idea CoconutFred, the game defines a list of exportedentities, and vehicletypes – I’m wondering if theres an obscure file that “precaches” (lol, quake days :P) the models prior to loading them? (or, that could just be weapons.bin referencing the files in general.blz).

    Since there seems to be a problem with opening files > 4MB, might be worth looking into the smallpack/unpack utils as we do have source (would be a fun learning project anyways lol). There also seems to be a problem with some bin files, larger ones – like recompiling some of the mission scripts/bigger exported entities.

    PS. Wonder if the guys @ JC2-MP would know how to modify the larger SArc/BLz/EEz files as they know some “inner workings” of the engine.

  • #100715

    Isi
    Member

    I need help please! I cant start the game unless the dropzone folder is empty. Need Help!!

  • #100864

    AmauryRR
    Participant
    isi9464 wrote:
    I need help please! I cant start the game unless the dropzone folder is empty. Need Help!!

    I replied to your other comments/pm you left, try verifying game cache in steam. Make sure you’re running the latest version of JC2.

    This is the article for verifying game cache. I don’t know of any other versions aside the steam one, but that should work.

    https://support.steampowered.com/kb_article.php?ref=2037-QEUH-3335

    Also, this thread is about documenting mod notes for this game. If it’s about anything else, please start a new thread (or just use a pm). It’ll probably work out better, Thanks.

  • #100865

    AmauryRR
    Participant

    Here’s some general links for modding JC2:

    http://www.justcause2mods.com/
    http://www.justcause2mods.com/forum/index
    http://www.justcause2mods.com/forum/13-just-cause-2-mods
    http://justcause.wikia.com/wiki/Current_Tools
    http://justcause.wikia.com/wiki/File_Extensions
    http://justcause.wikia.com/wiki/Category:Modding
    http://justcause.wikia.com/wiki/How_to_mod_the_DLC

    Also attatched is an Excel spreadsheet that can be used for calculating spawnbox offsets (maxs/mins) for adding things to the game (via world.bin with custom .nlz files).

    EDIT: For whatever reason, the forum still won’t let me attach files (seems to be looking for 7zip not 7z extension)? Here’s a dropbox link for now..
    https://www.dropbox.com/s/m8j36t7vwzgx35c/world-item-spawn-calculator.7z

  • #100885
    voxbox13
    voxbox13
    Participant
    box-o-aces wrote:
    Here’s some general links for modding JC2:
    EDIT: For whatever reason, the forum still won’t let me attach files (seems to be looking for 7zip not 7z extension)? Here’s a dropbox link for now..
    https://www.dropbox.com/s/m8j36t7vwzgx35c/world-item-spawn-calculator.7z

    Hey Aces – Will it let you upload a .rar or a .zip?

  • #100888

    AmauryRR
    Participant

    Hey Vox, haven’t tried zip/rar yet – I’m partial to 7z lol. I’ll probably include it with the tool pack and/or upload it on its own to keep it documented better here.

    I’ll also update my “test/compilation mod” later on with some thing I’ve been playing with. If I get some time, I’ll try posting about some vehicle mods/settings and some misc camera related stuff.

    One thing I’m trying to see, similar to how the “Bering Xtreme” mod has the badass underbelly camera – add a similar functionality to (some of) the attack choppers. Only thing I’m kinda stuck on is making it so its a 180 degree view – probably make a dedicated camera setting that locks viewangle similar to the mounted guns/turrets. More on that later, have a good weekend all!

  • #100862

    MiKeL
    Member

    Are you guys still working on this

  • #100944

    AmauryRR
    Participant

    Yeah, as I find/test things I post them. Anything specific you working with?

  • #100945

    MiKeL
    Member

    I’m playing with the usually weapons.weapons upgrades, grapple,parachute,yadda yadda,
    But I’m currently looking into the worldsim.ai stuff, and the in general environment settings.to be honest i like this game for its own world raise hell style.i work 12 1/2hrs a day with Korean managers and when i get home i want to sit back and f^ck sh!t up and do crazy stuff for a little bit before i hit the bed lol. So im trying to make this game a little more crazy and cool. I’m currently putting together a program to take the constant moving of files and searching for code out of this process so any notes anyone can share will surely. Speed this up. This will be a freely distributed program with extreme Open minded to suggestions as well but I’m going for a simple select the file select what you want to add and define its variables i.e. ammo type ammo effect, speed range ect. I just downloaded the xmls and binsfrom the above drop box link and i will be studying them in the morning. I work 7days a week with no vacating time for another 4months so may be a bit slow at first.but please any one with notes or ideas please pitch in

  • #100946

    AmauryRR
    Participant

    There’s a lot covered in this thread (and a few others here). This thread is more for notes on modding the .bin files and their values, so it may help you there.

    As far as the auto-editing program, you can probably look @ Gibbed’s sources for the toolkit and go from there. Normally the programs are separate:

    -BinConverter for converting binary files to .xml and back (not just .bin files)
    -SmallPack/Unpack – for unpacking .eez/blz/sarc compressed files
    -ArchiveViewer – for viewing the .arc/.tab container files.

    Seems like you’re trying to combine them all, you can also check out JCCE and see how it was done for some other ideas. If going for the AIO route, might want to add some other things: Text editor, and possibly an image/.dds importer/exporter.

    Here’s a link to Rick/Gibbed’s last SVN update for the toolkit:
    http://svn.gib.me/public/avalanche/trunk/

    Best of luck!

  • #100947

    MiKeL
    Member

    Yeah i actually have the source for gibbs avalanche engine and have it worked out already but basically my idea is

    Open app
    Select what you want to edit ie char, weapon,car etc

    Then that is opened in a text editor with significant values highlighted.with notes/tags identifying it

    When you select the item it loads all the available items for you to replace it with and so on

    What I’m looking for is help identifing all these damn UN labeled values.. i can get most of it on my own with trail and error but to mod convert load figure out what i just modded exit game then make a note in my available 4hrs will take a lifetime

  • #100860

    Can you release the minimap with collectibles?

  • #100716

    cbthnkydrlpn
    Member

    I will it when on a trip, go looking for beijing tiananmen ~ it and cannot be said to have gained nothing. replica louis vuitton bags online louis vuitton tote angelina jolie Our analytical tools, screening techniques, rigorous research methods and committed staff provide solid information to help subscribers make the best possible investment decisions. louis vuitton pochette twin gm replica louis vuitton laptop bag It is truly high time that you invest on your clothing apparel especially on ones which are classic and fashionable at the same time. louis vuitton replica luggage sets replica louis vuitton speedy 40 The kids did ok, daughter had chips every night but it was only for a week. louis vuitton sunglasses limited edition Fate, you should in your tracks in the walk, he said in his day. louis vuitton noe bag vintage louis vuitton replica monogram canvas Helpless outcome will occur sooner or later, what i give you to bring up, is relieved, relieved, and later you can be true to yourself, don’t be arrogant, do not let your own belonging to others, understand? replica louis vuitton bags online louis vuitton handbags in paris Happiness is a personal mood performance, it is can be infected, because if you are happy, the people around you will feel your happiness. most popular louis vuitton bag louis vuitton monogram glace bobby Hope is alive, the people around him better, such as lost time when it is too late. louis vuitton replica suhali bags
    abfbufmr http://www.jopca.com/aboutjopcamarine/louis-vuitton-clutch/lv-louis-vuitton-replica-wholesale-handbags-sale754.asp vlmqqljo

  • #169295

    AmauryRR
    Participant

    Uber necro-bump, but figure I’d post on my old thread to add/update some info (atleast for documentations sake lol)

    RESPAWNING SABATOGE OBJECTS (gas stations, cranes, chimneys, etc..)
    -Very experimental stuff, but it works! Each game load, whatever modified will respawn.
    -Tested with gas pumps in panau city, I made a thread for that (kinda) – dropbox link (w/ readme file):
    https://www.dropbox.com/sh/c92rfj9zr95estr/AAAEU0rBb-PLGeAIicTxctbua?dl=0
    -I was going to abandon this, because it would crash untill I made these changes (this is basically what I did for gas pumps, can apply to anything 1-time also)
    *get .nlz files from the location/* folders in the archive files, put them in your dropzone folder.
    *unpack the .nlz file you want to work on.
    *bin2xml the .blo file inside.
    *now, find the object you want to eneable (look for the >geo.pump< named object)
    *you’ll see the disable event string in there, comment it out or remove it so its empty
    *below that, addd a (int) “enabled” value, set it to 1. This is important.
    *look for that object’s CEventRouter and CCreationTrigger, comment them out or remove them
    *recompile and test, to find the object you just modded – look @
    the geo.pump’s world value, the last vector – add 16384 to the x
    and z values, those will be your in-game x/y values.
    -This is loosely based on what I did to make the mod.age.eez (and 5xmod.age.eez) to respawn when placed in-game

    BULK-EDITING FILES:
    Thanks to this thread:
    http://stackoverflow.com/questions/8397674/windows-batch-file-looping-through-directories-to-process-files

    -Notepad++ (or equivalent) is what I used for this, look into regexes for searching
    wildcards and doing bulk replace. I’ll try to update some examples of what I searched
    for later on, but use the bottom search option for regexes, copy and paste the block
    of code you want to edit. change the instance/object ids to .* (wildcard) and same
    for the hex values example, search for this:

    gb192b.*disable

    now, these windows batch files are what I used (based off the thread above) to mass
    unpack all the .nlz files, and then bin2xml the .blo files (same batch files can be
    tweaked to rebin/repack everything)

    nlzunpack.bat

    
    @echo off
    call :treeProcess
    goto :eof
    
    :treeProcess
    rem Do whatever you want here over the files of this subdir, for example:
    for %%f in (*.nlz) do echo %%f
    for %%f in (*.nlz) do call C:\path\to\Gibbed.Avalanche.SmallUnpack.exe %%f
    for /D %%d in (*) do (
        cd %%d
        call :treeProcess
        cd ..
    )
    exit /b
    

    -the above batch file, change the path to your smallunpack executable.
    -also, copy the batch file, change the .nlz to .blo, and smallunpack
    to your bin2xml executable and rerun it. now it will make all blo files
    into xml files so you can notepad++ mass edit and edit whatever.

    Using grep to scan through the .blo files:
    -figured worth a mention, I have the linux subsystem so had the command accessible
    -ran the folliwing in the terminal, in the parent directory where the .nlz fils are
    $ grep -r 'gb192' . | grep blo
    -that made a list of what .blo files had the gb192 (gas pump/station) models/files/something
    referenced in it. greatly helps narrowing down what you want. add this to make a .txt copy
    of what you’re looking for, one directory level up.
    > ../nameofsomefile.txt

    I’ll update with more, so atleast it’s on record. Hopefully this helps someone wondering if its doable!

  • #169297

    AmauryRR
    Participant

    Minor update, messing around with the files again. Here’s a quick reference of what model/entity
    name/etc.. means what, I used it to grep the files and find them (most likely model name referenced
    in .blo file). Some are notes on the folder names (locations/generalinterests).

    -generalinterests/dfd = destroyable fuel depot, small ones in “unmarked locations” like x23237 y5938
    -generalinterests/dcs = destroyable retractable antennae masts
    -generalinterests/bwc = bloated whale carcas
    -wc* files = misc world files, seems to contain everything else that spawns (normalish)
    -go050 = fuel depot (small)
    -gb217 = large fuel depo/silo
    -gb004 = radars
    -gb002 = part of crane arm
    -gb097f = chimney
    -gb221 = windmills!!! 4×40

    I’m attatching .txt files that show which files in the strongholds and wc/*
    folders have whatever the object in question is. It’s late, and figure I’d
    brain dump before getting rest lol.

    This 7z file has the .txt lists, grab them and get to modding
    (the modded batch file from above and notepad++ helps do this
    quickly and a lot easier than imagined)

    boxoaces-sab-objlist-by-type-wc-strongholds

    One “bug” I’ve noticed, might have missed a “save” = 0 somewhere,
    but the first time loading into panau city takes longer than usual.
    It won’t crash, but takes longer at first. Flying around and saving
    (I’m guessing to clear disabled on all the the objects?) seems to make
    reloads back to normal. On that note, happy modding (if anyone’s
    reading this). I may upload something in my dropbox at somepoint,
    depending on file size and time. I’ve got cranes and windmills done,
    I’ll attempt the gas pumps at some point (bulk edit).

    When completed, basically any object in the game will respawn
    when you reload your game.

    • This reply was modified 3 months ago by  AmauryRR. Reason: 2 years later and I broke the game, again (in a good way, lol)
    Attachments:
    You must be logged in to view attached files.
  • #169343

    AmauryRR
    Participant

    Minor update, found something that may be interseting
    for the Small Archive files Just Cause (2) uses.

    http://forum.xentax.com/viewtopic.php?t=2105

    There’s similarities to other formats, the header is different, would have to
    adapt it to test on other tools. More sidetracking than needed for now, so I’ll
    stick to < 4MB nlz files.

    • This reply was modified 3 months ago by  AmauryRR.
  • #169409

    AmauryRR
    Participant

    Update on info on “how to make sabotage” stuff respawn. Hopefully this is usefull to anyone looking to mod the game.

    This attatchment has batch files I tweaked (based on this: http://stackoverflow.com/questions/8397674/windows-batch-file-looping-through-directories-to-process-files)
    batch-file-helpers

    -I recommend looking at the batch files, PLEASE DO NOT BLINDLY RUN THEM!
    -Edit paths to SmallPack, SmallUnpack, Bin2XML, etc…
    -UnpackNLZ batch – I run r128 of it, it doesn’t output the folders with _unpacked (I may compile a r171 version with that omitted if I get some time)
    -SmallPack,Bin2xml – I run r171 (just to run the newer code branch mainly)
    -The way these work, create a working folder to put the batch files in.
    -Unpack your NLZ (no FLZ meeded) files from your pc* arc files to the work folder (keep the original locations/wc/* layout)
    -Once you adjusted the batch files, here’s what you can run:
    unpacknlz – this will go through all folders and run SmallUnpack on any nlz files it comes across.
    bin2xmlall – this will go through all the folders (unpacked nlz files from above) and run bin2xml on the blo files for you
    xml2binall – this will compile all the xml files into blo (or any xml file in the subfolders for that matter)
    nlzclean – once you compiled everything, this removed the old nlz files from the subfolders
    xmlclean – once you compiled everything, this removes the xml files (to reduce size of the sarc)
    repacknlz – once done, run smallpack and it will compile the folders listed inside (these are the wc folders that are under 3MB and safe to mod to your hearts content) NOTE: I specified -c (compressed) in here, if you have any problems try removing that switch.
    sarc2nlz – after you ran repacknlz, it will make a bunch of sarc files. this batch renames them to nlz.

    other batch files:
    eezunpack – like nlzunpack, but works on eez files found in subfolders (good for batch unpacking a bunch of stuff)
    aiswap – I made this to swap modified aiteam files (from folder defined in batch file) to any matching aiteam file in the subfolders
    unpack – this calls nlzunpack and bin2xmlall to “prep” everything for you
    repack – if you can run bin2xmlall (and get no errors), run this – it reassembles the wc files listed in repacknlz for you nice and clean (check script first).
    clean – THIS WILL CLEAR ANY SUBFOLDERS OF NLZ/XML FILES, BE CAREFUL AND MAKE SURE YOU WANT TO RUN THIS.

    These batch files can also be used if anyone wants to batch decompile a bunch of nlz files and search for ::event tags for use in JC2-MP.

    Other Notes:
    -There’s a lot that can be customized in here, currently playing with SamSites making them fire different weapons (can be defined by weapon’s name string), as well as make them respawn or be friendly on a certain trigger event (like faction strongholds).

    I’m off to work, but wanted to post this (so atleast its documented somewhere if I need to look thru notes when modding this game later on lol).

    This attachment, has a quick list I made (grep -r ‘modelname’ . | grep blo) of what nlz files have what in them.
    In the decompiled .blo files, search for these and you’ll come across a common geo.*
    name that you can make a RegEx to mass search/modify anything (Notepad++).
    gb217 = fuel depot (Vert) model
    go050 = fuel depot (side) model
    gb002 = crane model
    go043 = generators(?)
    gb192 = gas pumps/stations
    gb221 = windmills
    go129 = standing verticle tank that flies up when shot
    acelist

    I want to look into fixing that bug with repacking archives that have more than 3MB of data, compressed or not – 3MB+ causes the game to act funky (very slow loading, or plain crashing).
    If anyone has any ideas on the issue, lmk I’m down to help! *crickets lol*

    Jokes aside, I think I saw something on early version of JC3 using sarc files, gonna see if there’s any tools (and if they work w JC2). Hopefully can come up with a way to get these larger files packed and back into the game, then more explosion noises for everyone!

    Attachments:
    You must be logged in to view attached files.
  • #169412

    AmauryRR
    Participant

    I also noticed a bunch of old posts got screwed up, IIRC they had code tags around them..
    I’ll try and go back as time permits and fix what I can, so things make more sense. Kinda
    Reminda me that time I tried converting a bunch of non-standard Mugen characters to UTF-8
    text lol! (Editing a hundred or so def/cmd/st files was so fun :P)

You must be logged in to reply to this topic.