Author Topic: Destroy Mesh Questions  (Read 305 times)

0 Members and 1 Guest are viewing this topic.

Offline embx61

  • Modders
  • Banished Expert
  • *****
  • Posts: 1641
  • Country: us
  • You are always on my mind, Forever in my heart
Destroy Mesh Questions
« on: July 20, 2018, 10:58:19 AM »
While working on the Village Quarry I run into a problem.

The quarry can be upgraded to a resort. That works fine.
The quarry can also be demolished and turn into a destroyed mesh with just filled with water and that works fine.

But if I want to demolish the Resort area I end up with just a hole in the ground and no destroy mesh is seen.  :o
Code is the same as in the quarry template file.

I tried with even a different mesh, renamed a copy of the SVRockQuarryDestroyMesh.rsc to SVRockQuarryDestroyedMesh.rsc and updated the references but I keep getting just the hole after demolishing the resort area.

Picture left shows the quarry demolished by demolishing the quarry directly. 2nd is the resort area after upgrading a quarry. 3rd The hole after demolishing the resort area.
I was expecting to see the same as the most left.

Is the modkit limited so that a upgraded building can not be destroyed and show a destroyed mesh?

I like to add that builders are demolishing the quarry but the moment I demolish the resort it instantly leaves the hole.

http://worldofbanished.com/gallery/474_20_07_18_10_54_03.jpeg
Destroy Mesh Questions

Destroy Mesh Questions
« Last Edit: July 20, 2018, 11:51:12 AM by embx61 »
My beloved Kathy
As you were you will always be
Treasured forever in my memory


For my list of Mods with download links go here

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 9595
  • Country: ca
Re: Destroy Mesh Questions
« Reply #1 on: July 20, 2018, 01:19:55 PM »
i personally would think the resort can have its own destroymesh too and i dont see why the destroy mesh dont work for the upgrade building. maybe something wrong with the code you set up ?

although i never made a destroyedmesh of my life so far, but i dont understand why there is a bug.
> > > Support Mods Creation developments with Paypal Donations < < <
Click here to PayPal Donate.

Offline embx61

  • Modders
  • Banished Expert
  • *****
  • Posts: 1641
  • Country: us
  • You are always on my mind, Forever in my heart
Re: Destroy Mesh Questions
« Reply #2 on: July 20, 2018, 01:34:41 PM »
I have even used a complete separate fbx for the destroy mesh but it just won't work.
I have a quarry fbx with a destroy mesh and a quarryresort mesh with a different destroy mesh inside it.

The quarry destroy works fine but it seems after a building is upgraded the destroy mesh won't work for whatever reason.
The code is beside some name changes the same in both template files.
Template file
Code: [Select]
ComponentDescription destroyed
{
// how often to update
UpdatePriority _updatePriority = None;

// declare types that will be used
Description _descriptions
[
"ui",
                "map",
"zone",
"decal",
"modeldestroy",
"radius",
"happiness",
]
}

DestroyDescription destroy
{
ComponentDescription _replaceEntity = "destroyed";
}

ModelDescription modeldestroy
{
MeshGroup _meshes
[
{
GraphicsMesh _mesh
[
"Models\EBSVQuarryDestroyQuarryMesh.rsc",
]
}
]
int _displayIndex = 0;
int _subIndex = 0;
bool _randomIndex = false;
}


That is all the code beside AO mapping and a DestroyMesh.rsc file for each destroyed mesh so is not complicated.
All this code is the same in the template files. I only have a different DestroyMesh.rsc file what references to the right FBX and stuff.
Maybe it is just a bug.




My beloved Kathy
As you were you will always be
Treasured forever in my memory


For my list of Mods with download links go here

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 9595
  • Country: ca
Re: Destroy Mesh Questions
« Reply #3 on: July 20, 2018, 01:48:32 PM »
i think it is all the setup about making a specific destroyed template. if you check the quarry, it doesnt have a template for it, and doesnt even call a
      "modeldestroy", in the description of the entity.

of course we cannot prevent any player to go destroy the building with remove structure button and force people to use the upgrades button....
i would go for no special destroyed template (only go for the destroyed mesh call). i can test but i would have to take hours to make a mesh and make a mod to do some testing.....
> > > Support Mods Creation developments with Paypal Donations < < <
Click here to PayPal Donate.

Offline embx61

  • Modders
  • Banished Expert
  • *****
  • Posts: 1641
  • Country: us
  • You are always on my mind, Forever in my heart
Re: Destroy Mesh Questions
« Reply #4 on: July 20, 2018, 01:57:06 PM »
I can leave it in for the quarry it self as that works.
But not for upgraded buildings. If I look at Discrepancy's code he has no modeldestroy code in the template for his upgraded buildings either.
But has it for the mine itself so maybe he could not make it work either for upgrades?

My beloved Kathy
As you were you will always be
Treasured forever in my memory


For my list of Mods with download links go here

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 9595
  • Country: ca
Re: Destroy Mesh Questions
« Reply #5 on: July 20, 2018, 02:11:03 PM »
I can leave it in for the quarry it self as that works.
But not for upgraded buildings. If I look at Discrepancy's code he has no modeldestroy code in the template for his upgraded buildings either.
But has it for the mine itself so maybe he could not make it work either for upgrades?

i dont know. i can check all your things if you send me the package by personal messaging or i ll do a setup tonight and get you back on this tomm.... it is 32C presently and very hot...
> > > Support Mods Creation developments with Paypal Donations < < <
Click here to PayPal Donate.

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 9595
  • Country: ca
Re: Destroy Mesh Questions
« Reply #6 on: July 20, 2018, 04:32:42 PM »
i sent you back your mod fixed and with recomendations :)
> > > Support Mods Creation developments with Paypal Donations < < <
Click here to PayPal Donate.

Offline embx61

  • Modders
  • Banished Expert
  • *****
  • Posts: 1641
  • Country: us
  • You are always on my mind, Forever in my heart
Re: Destroy Mesh Questions
« Reply #7 on: July 20, 2018, 05:16:30 PM »
Thanks Red :)

It works now. the ui and modeldestroy was just a test to see if that maybe worked but it made no difference.
Just did not delete those yet when i sent you the package.

It was the build requirement in the two template files what stopped it from working.

Now it all works. Thanks a bunch Red  :D
My beloved Kathy
As you were you will always be
Treasured forever in my memory


For my list of Mods with download links go here

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 9595
  • Country: ca
Re: Destroy Mesh Questions
« Reply #8 on: July 20, 2018, 05:20:07 PM »
Thanks Red :)

Now it all works. Thanks a bunch Red  :D

sometimes it only need a fresh pair of eyes.... and a fresh rested mind ^^
> > > Support Mods Creation developments with Paypal Donations < < <
Click here to PayPal Donate.