HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Author Topic: No callback from propbucket spec  (Read 1771 times)

GlorianLanTarini

  • General Accounts
  • *
  • Posts: 148
    • View Profile
No callback from propbucket spec
« on: Oct 06, 16, 04:16:03 AM »

Hello again.

I found strange problem with one specific prop bucket spec.
It is a particle emitter. And it's never makes callback.

I add specs to prop bucket through this code.

Code: [Select]
method InitializePropSpecs()

me.Bast_pandingPropSpecs[AddAssetSpecToPropBucketCB("FORTS","\world\livecontent\resources\bastion\basttower.hgm", me)] = "NorthFort"
  me.Bast_pandingPropSpecs[AddAssetSpecToPropBucketCB("FORTS","\world\livecontent\resources\bastion\basttowercore.hgm", me)] = "NorthFortCoreMain"
  me.Bast_pandingPropSpecs[AddAssetSpecToPropBucketCB("FORTS","\world\livecontent\resources\bastion\baststrikesphere.hgm", me)] = "NorthFortSphereMain"
  me.Bast_pandingPropSpecs[AddAssetSpecToPropBucketCB("FORTS","\world\areas\9223372061780021595\cristall.prt", me)] = "NorthFortCore"
  me.Bast_pandingPropSpecs[AddAssetSpecToPropBucketCB("FORTS","\world\areas\9223372061780021595\rayglow.prt", me)] = "NorthFortCore"
  me.Bast_pandingPropSpecs[AddAssetSpecToPropBucketCB("FORTS","\world\areas\9223372061780021595\spherlights.prt", me)] = "NorthFortSphere"
  me.Bast_pandingPropSpecs[AddAssetSpecToPropBucketCB("FORTS","\world\livecontent\resources\bastion\mebiusknot.hgm", me)] = "NorthPortalMain"
.

method AssetSpecReady(spec as NodeRef of Class HBSpec, loadFailed as Boolean)
  if not loadFailed
    if IsAssetSpecBroken("FORTS", spec)
      ScriptErrorAndContinue("Asset spec " + spec + " is broken!")
      return
    .
    if me.Bast_pandingPropSpecs has spec
      when me.Bast_pandingPropSpecs[spec]
        is "NorthFort"
          add back spec to me.Bast_NorthFortTowerSpecs
          remove spec from me.Bast_pandingPropSpecs
        .
        is "NorthFortSphereMain"
          insert spec to me.Bast_NorthTowerSphereSpecs at 1
          remove spec from me.Bast_pandingPropSpecs
        .
        is "NorthFortSphere"
          add back spec to me.Bast_NorthTowerSphereSpecs
          remove spec from me.Bast_pandingPropSpecs
        .
        is "NorthFortCoreMain"
          insert spec to me.Bast_NorthTowerCoreSpecs at 1
          remove spec from me.Bast_pandingPropSpecs
        .
        is "NorthFortCore"
          add back spec to me.Bast_NorthTowerCoreSpecs
          remove spec from me.Bast_pandingPropSpecs
        .
        is "NorthPortalMain"
          insert spec to me.Bast_NorthPortalPropSpec at 1
          remove spec from me.Bast_pandingPropSpecs
        .
      .
    else
      ScriptErrorAndContinue("Asset spec is ready, but no needed!")
    .
  else
    ScriptErrorAndContinue("Asset spec " + spec + " is fail to load!")
  .
.

After code is worked, CLI show me this:


/sn for this ID:


So, it's look like spec was loaded, but it don't made callback. And I tested it many many times. It's still same.
If I add this emitter manually - it's work fine. Another emitters loading to bucket without problems.

What it can be???
Logged

ToY-Krun

  • General Accounts
  • *
  • Posts: 677
  • Support Volunteer
    • View Profile
Re: No callback from propbucket spec
« Reply #1 on: Oct 06, 16, 09:44:48 PM »

check the FX spec in the fx editor and see if the Group timeout is causing the emitter to time out too quickly.  also, see if the fx stop event is using a unique named control within the group.

if you're sure its loading, sounds like its stopping almost imediately. 
The spec  would show up in the CLI after its loaded one time, until you exit the area or close the blade.
This doesnt tell you for sure if a new instance of it is loaded or not however.

other than that, im not sure why the others would load and this one will not.
Try checking the timers in the FX editor first and see if thats where the problem is, if not, we can dig deeper.

GlorianLanTarini

  • General Accounts
  • *
  • Posts: 148
    • View Profile
Re: No callback from propbucket spec
« Reply #2 on: Oct 08, 16, 12:04:29 AM »

I don't use FX editor to create this emitter. It was created via "Create" menu. Then added to propbucket and made instance. (actually - no, because don't made callback)

For now I has solved problem by recreating this .prt file. Just delete old one and create new, absolutely same. And new one load normally, with callback.

So, I don't know what was wrong with old .prt file. And how to avoid this situation in future.
Logged

GlorianLanTarini

  • General Accounts
  • *
  • Posts: 148
    • View Profile
Re: No callback from propbucket spec
« Reply #3 on: Oct 08, 16, 12:43:49 AM »

Well... Recreated .prt working before world spinning down. After sleep and wake up - no callback again. And I can't find something wrong or strange in the properties of this emitter.

Screenshots of emitter properties:

https://yadi.sk/i/quswae4OwTDKS
https://yadi.sk/i/RYaNtrBtwTDNK
https://yadi.sk/i/bo-G6HktwTDPa
Logged

Thazager

  • General Accounts
  • *
  • Posts: 1138
  • Never stop learning
    • View Profile
    • Heroes and Villains MMORPG
Re: No callback from propbucket spec
« Reply #4 on: Oct 08, 16, 01:54:11 PM »

Something working before world spin down and then world spin up stops it from working. I am thinking this might be from client side data making it work, and not saved to server and reloaded back to client side on world spin up.

I had something similar with things working, then world sleep and nothing works again. I had to save data of things that needed to be there, and reload them to have them work again after world sleeps.
Logged

ToY-Krun

  • General Accounts
  • *
  • Posts: 677
  • Support Volunteer
    • View Profile
Re: No callback from propbucket spec
« Reply #5 on: Oct 08, 16, 02:25:24 PM »

Quote
I don't use FX editor to create this emitter. It was created via "Create" menu. Then added to propbucket and made instance. (actually - no, because don't made callback)

then you should :P

the FX system is designed to be used to load your FX (in this case your emitter)
then you only have to call the FX system with the ID of the FX you want to display.

However, yes you "can" do it yourself via hsl, but you might have issues like this. 
the world spinning down shouldnt create an issue as the emitter doesnt exist on the world or area server, only on the client.  each client loads the emitters from the local repo/ dat files.

If it worked once, then that proves your .prt saved to the repo correctly.
If it "then" doesnt work aftewards, its an issue of the .prt not getting loaded in a timely manner and the operation to load it times out and there is no callback.

There are some ways to test to see if that is indeed whats happening.

Which .prt is not working?  lets start with that.

GlorianLanTarini

  • General Accounts
  • *
  • Posts: 148
    • View Profile
Re: No callback from propbucket spec
« Reply #6 on: Oct 08, 16, 11:15:15 PM »

This two guys don't work if I try to load them through script, but work if I create instance manually.
\world\areas\9223372061780021595\hellcristall.prt
\world\areas\9223372061780021595\lighttowercristall.prt

And this two is same in 50% cases.
\world\areas\9223372061780021595\hellspherelights.prt
\world\areas\9223372061780021595\helltowerray.prt

By the way - I try to use FX system for this four. If they already don't work by script, FX sys can't force them to work too.
Logged

ToY-Krun

  • General Accounts
  • *
  • Posts: 677
  • Support Volunteer
    • View Profile
Re: No callback from propbucket spec
« Reply #7 on: Oct 13, 16, 03:08:30 PM »

Quote
By the way - I try to use FX system for this four. If they already don't work by script, FX sys can't force them to work too. 

Hi Glorian, its fine if it works for you.  Using the FX system just gives you more options, both in loading / preloading specs as well as locating possible reasons for it not working.  For example the FX system should give an error and a hint as to why it cant load the spec.  you can use the "preview" button to test them and if they fail to load it should say why.

At any rate, if you're more comfortable handling it in script thats fine :)

At the moment, the only way to offer any more advise would be to actually test your emitters and code to see
whats going on.

The obvious: if it loads once or "50%" of the time it should load 100% of the time, so there's definitely an issue with the spec loading, at least on the two that work 50% of the time. 

I'll check, but i'm not sure how capable the propbucket system is of handling emitters, the FX system was designed just for that task, so, it may be that your emitters take just long enough to load that the propbucket system times out before it can callback.  This is just a guess as i said, I'll ask about it.


GlorianLanTarini

  • General Accounts
  • *
  • Posts: 148
    • View Profile
Re: No callback from propbucket spec
« Reply #8 on: Oct 14, 16, 10:56:50 PM »

Quote
For example the FX system should give an error and a hint as to why it cant load the spec.  you can use the "preview" button to test them and if they fail to load it should say why.

Well...

Quote
I try to use FX system for this four. If they already don't work by script, FX sys can't force them to work too.

And not got Error Message. Not any. Not in error tab, not in script error tab, not in console.
Logged

ToY-Krun

  • General Accounts
  • *
  • Posts: 677
  • Support Volunteer
    • View Profile
Re: No callback from propbucket spec
« Reply #9 on: Oct 15, 16, 01:35:05 AM »

let me rephrase that a bit, the FX system has alot more opportunities to diagnose issues, and the nodrefs/specs are kept in lists etc so its just easier (for me at least) to track them/debug them.

I'm waiting for word on the use of the propbucket system as far as how compatible it is with instances such as emitters.  To be honest this is the first example i've seen of someone doing so, so I don't really have a reference :P

But it definitely is an issue of your spec either not loading properly or not loading in time.

Bear with us, we'll figure something out :)

GlorianLanTarini

  • General Accounts
  • *
  • Posts: 148
    • View Profile
Re: No callback from propbucket spec
« Reply #10 on: Jan 16, 17, 11:27:45 PM »

After the holidays and worked on other things, I came back to this problem. Need to finish this now.

So, the situation has not changed since my last post. Several emitters is still not loading as it should.

Today during testing I found out some interesting details. Maybe it will help to understand the problem.

I decided to test not working emitter using the FX System. I created a FX spec and tried the "preview" at the place where it should be. Nothing happened.
https://yadi.sk/i/AKDIp9eu39Nnxe (btw - this crystal node was created by script from prop bucket)

Then I create instance of emitter via Create menu. And this instance don't work too.
https://yadi.sk/i/_8jpxkIA39NpYc
https://yadi.sk/i/tdj5g88l39Npg4

I tried different things on this emitter, and accidentally found - if I change mesh file to any another and back to needed - then all start work.
https://yadi.sk/i/4RgutI5G39Nrqs

Then I deleted this instance and check FX Spec - and it working too.
https://yadi.sk/i/wC3t2qat39Nsu2

I tried this for another broken emitters and it's work for them too.

Then, I re-login to area and all .prt which was fixed this way start added to area via script from propbucket.

Now I logoff and waiting until world sleeping.


Logged

GlorianLanTarini

  • General Accounts
  • *
  • Posts: 148
    • View Profile
Re: No callback from propbucket spec
« Reply #11 on: Jan 17, 17, 05:59:53 AM »

Well, after sleeping and waking up of the world - most of emitters added to area via HSL from propbucket. But, not all. For example, this one which I show in screenshots, don't working again. So, this "fix" don't resolve problem totally. And I haven't any guaranty that other .prt don't become broken after next world sleeping.

And, yes, now I am sure - this happens with emitter_mesh type only.
Logged