Page 1 of 1

Make new 3D model for resource objects

Posted: Thu Jul 11, 2019 12:11 pm
by Petas
Hi.
I plan to do a 3D model resource object.
I don't know how to add an animation when resources are exhausted.

Can you help me with that?
Tell me how to do it.


And edit .fpd file

Re: Make new 3D model for resource objects

Posted: Thu Jul 11, 2019 6:25 pm
by Secg
Petas wrote: Thu Jul 11, 2019 12:11 pm I don't know how to add an animation when resources are exhausted.
If I were not wrong, you do not need to add any. Just make a 3D model, convert it to .god & make its texture in .tga format

You can see from lines 28-29 from the Ball's codes below; the effects for resources' depleting & depleted statuses already exist in the base.x data archival file

Code: Select all

///////////////////////////////////////////////////////////////////////////////
//
// Pandemic Studios
//

#includeonce "fx_resource.cfg"


CreateObjectType("resource.ball", "Source")
{
  GameObj()
  {
    Properties()
    {
      Add("Filter::Resource");
    }
  }

  MapObj()
  {
    GodFile("resource_ball.god");
    PhysicsModel("building");
    TractionType("ground");
    ShowSeen(1);

    GenericFX()
    {
      Add("Source::Depleting", "resource.depleting.plastic");
      Add("Source::Depleted", "resource.depleted.plastic");
    }
  }

  SourceObj()
  {
    Mode("StaticDepleting");
    Resource("Plastic");
    Capacity(3000);
    LoadRate(5);
  }
}

Re: Make new 3D model for resource objects

Posted: Fri Jul 12, 2019 8:45 am
by Petas
So I created a 3D model for extracting raw materials and ran out of me
an error that causes a failure of the game.
Can you help me? idk :PB
Bez názvu.jpg

Re: Make new 3D model for resource objects

Posted: Fri Jul 12, 2019 9:04 pm
by Secg
Petas wrote: Fri Jul 12, 2019 8:45 am So I created a 3D model for extracting raw materials and ran out of me[-mory (?)]
Bez názvu.jpg
Have you included the .cfg file for your new resource in your object_resource.cfg yet?

Re: Make new 3D model for resource objects

Posted: Sat Jul 13, 2019 5:39 am
by Petas
Have you included the [color=#00FF00 wrote:.cfg[/color] file for your new resource in your object_resource.cfg yet?
Yes.
Error has been fixed

When I want 4 DumpTrucks to start sucking out the electrics, it always sucks one at a certain point.
How to solve it to benefit together?
Bez názvu.jpg
[/color]

How to edit foot Print? (.fpd)

Re: Make new 3D model for resource objects

Posted: Sat Jul 13, 2019 12:12 pm
by TommyCD1
In order to make more than one spot for dumptruck to mine, you need to edit the model itself, before it is converted into .god format.

If you have the mesh and a 3DS Max, then first you'll want to make some hardpoints. The way I create them is first by drawing a generic cube object, and then after I position it where I need it to be, I then make it as small as possible, so as it cannot be seen ingame.

Once you are comfortable with making hardpoints, you'll need to add hardpoints to your resource object. The first hardpoint you'll create should be named 'HP-RESOURCE1'. Place this anywhere on the resource that you want dumptrucks to aim at when they fire their beam. The second hardpoint should be named 'HP-RESOURCE1-MOVE'. You'll place this hardpoint where you want to dumptruck to move to on the map before he will begin extracting from HP-RESOURCE1. The hardpoints don't have to align perfectly with the map grid, they can be anywhere you like and the dumptruck will simply pick the closest cell that contains a hardpoint.

If you want to have more than one spot to extract from, then you'll need to name your hardpoints sequentially, like so:
  • HP-RESOURCE1
  • HP-RESOURCE2
  • HP-RESOURCE3
  • HP-RESOURCE4
  • HP-RESOURCE1-MOVE
  • HP-RESOURCE2-MOVE
  • HP-RESOURCE3-MOVE
  • HP-RESOURCE4-MOVE
Lastly, I don't remember the max limit, but you can only have so many HP-RESOURCE hardpoints on one model before the game will crash. I think it's 30 iirc...

Sorry I can't provide any screenshots atm, but my 3DS Max at home stopped working a while ago and I still have no internet at the house.

Re: Make new 3D model for resource objects

Posted: Sat Jul 13, 2019 1:25 pm
by Petas
TommyCD1 wrote: Sat Jul 13, 2019 12:12 pm Sorry I can't provide any screenshots atm, but my 3DS Max at home stopped working a while ago and I still have no internet at the house.
Screenshots would help me. :W
I Cannot much in the 3D models program yet . :COFE:

Re: Make new 3D model for resource objects

Posted: Tue Jul 16, 2019 2:04 pm
by TommyCD1
Sorry for no screenshots, but one more thing I wasn't aware of when posting;

The HP-RESOURCE1-MOVE hardpoints should be children of the HP-RESOURCE1 hardpoints in the hierarchy. And the HP-RESOURCE1 hardpoints should be direct children of the top root of the model.