I can't get my custom particle effect to work when packed into the map

Discussion in 'Mapping Questions & Discussion' started by Acegikmo, Jul 24, 2009.

  1. Acegikmo

    aa Acegikmo

    Messages:
    555
    Positive Ratings:
    493
    I have no idea what I'm doing wrong.
    When the files are in their folders, the particle effect works great.
    But when I move them into the bsp, they stop working.
    Here's how I packed them in pakrat:
    [​IMG]

    When I launch the map, the console show this error:

    Code:
    Unable to read particle definition particles/snow.pcf! UtlBuffer is the wrong type!
    Then the console spams loads of these:

    Code:
    Attempting to create unknown particle system 'env_snowflakes' 
    Attempting to create unknown particle system 'env_snowflakes_small'
    Here is the content of the manifest:

    Code:
    particles_manifest
    {
    		"file"		"!particles/snow.pcf"
    }
    Do you guys have any idea what could be wrong?
     
  2. Psy

    aa Psy The Imp Queen

    Messages:
    1,705
    Positive Ratings:
    1,468
    I do mine like this...

    Code:
    yourmapname_particles
    {
    		"file"		"!particles/rain_with_collision.pcf"
    }
    
     
  3. Acegikmo

    aa Acegikmo

    Messages:
    555
    Positive Ratings:
    493
    Icarus was able to pack his particles into ctf_vector and his manifest looks like this:

    Code:
    particles_manifest
    {
    		"file"		"!particles/vector_core.pcf"
    		"file"		"!particles/vector_core_charge.pcf"
    }
     
  4. jpr

    aa jpr

    Messages:
    1,095
    Positive Ratings:
    507
    I did that too and it didn't work... Or so I thought.
    Then we played it at a gameday and it worked great, dunno what the problem was
     
  5. Acegikmo

    aa Acegikmo

    Messages:
    555
    Positive Ratings:
    493
    I managed to solve this now; Pakrat was corrupting one file at random every time I saved it.
    So I repacked everything and now it works great :)
     
  6. Icarus

    aa Icarus

    Messages:
    2,246
    Positive Ratings:
    1,182
    Wait, what? Is this something I should be worried about?
     
  7. Mokagogo

    Mokagogo L1: Registered

    Messages:
    32
    Positive Ratings:
    1
    I was gonna say file corruption was the likely culprit.

    A couple of custom materials for menu thumbnails and so on got corrupted by PakRat when I was packing a new release.

    What happened in my case was that there were a couple of files whose addresses had not been corrected to turn them into relative addresses in PakRat. I did 'Edit' and then fixed the addresses, and that actually corrupted those files.

    When I finally figured out what was going on I just started the pack from scratch again and it worked.
     
  8. Icarus

    aa Icarus

    Messages:
    2,246
    Positive Ratings:
    1,182
    I thought thumbnails could'nt be packed in anyways, since they aren't precached.
     
  9. Mokagogo

    Mokagogo L1: Registered

    Messages:
    32
    Positive Ratings:
    1
    Yeah, I think the thumbnails have to be loaded from the server by a .res file. I meant the .vtf file that loads as 'polaroids' on the map summary screen before you play. I did also pack the 'quick map' menu thumbnails in, too -- just on the offchance that Valve updates their tech at some stage to handle them in PakRatted bsps.
     
  10. Nineaxis

    aa Nineaxis Quack Doctor

    Messages:
    1,767
    Positive Ratings:
    1,404
    They won't, that would require TF2 to load every BSP in your maps folder every time the Map List is refreshed to get to the thumbnails... which is never going to happen, for obvious reasons.
     
  11. Terr

    aa Terr Cranky Coder

    Messages:
    1,591
    Positive Ratings:
    405
    Bumping this rather than a new thread... Having problems too.

    Did it just drop letters from the front of the file? :(

    What's the best way to detect/avoid Pakrat's bug? I noticed it had a thrown exception when doing certain auto-scan tasks, but I added everything item-by-item manually. Should I just use BSPZIP? Or decompile the damn thing and fix it myself? :p
     
    Last edited: Aug 22, 2009
  12. Terr

    aa Terr Cranky Coder

    Messages:
    1,591
    Positive Ratings:
    405
    Yeah, it must've been pakrat... Making some batch files to run bspzip appears to solve the problem.