• Welcome to SC4 Devotion Forum Archives.

SC4PIM-X issue

Started by deanva, October 29, 2020, 06:43:43 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

deanva

When I try to drag something to the landmarks keep getting an error window and can not drag it al all. It is in the descriptors on the left menu but not in the resources area to drag it .

twalsh102

What does the error window say?

deanva

#2
Traceback (Most recent call back):
  File "SC4PIMApp.pyo", line 3136, in OnBeginDrag
  File "SC4Data.pyo", line 50, in __getitem__
KeyError

Unless I am not allowed to drag from the descriptor to the landmark menu on the left side of scpim-x. It was created using lot editor which might be the reason and not with the BAT.

twalsh102

Deanva, just to make sure I'm not missing something here; While I'm not an expert in programming-speak, it looks like it's might be saying that you are trying to drag something that can't be dragged

In PIM-X, the only thing that can be dragged to any category under the Descriptors > Buildings menu is a model from one of the sub-folders under Resources. This will create a new Building Exemplar based on the model you drag. Is this what you are trying to do?

deanva

#4
Any way to get a building back into the Resources once it has been place in the landmark menu?

twalsh102

Hi Deanva.
Nothing should ever be "moved" from the list of models.  As long as an .sc4model file is someplace in your Plugins folder, it should always show up in the list of models under Resources, no matter how many times you've used it. You are not limited to using any single model only once. The beauty of Models is that they can be used (or reused) for any type of building you wish. You could use a single model and create a building exemplar for a Landmark of some sort, a police station, a CS or CO building, a residential building, a hi-tech industrial building, or any other kind of building or combinations of buildings.

For that matter, you are not limited to using a model for what anyone might consider traditional roles for the subject of said model. For instance, you could take a model of a tree and use it as the basis for a building exemplar for a police kiosk, or a university should you have some need to do so.

deanva

Is there a way to make a building from the landmark menu into a prop menu item?

twalsh102

Certainly, but the process might not be as direct as you would like. The process will be slightly different depending on whether this is a Maxis Landmark / custom content Landmark that uses a Maxis model, or a custom landmark with a custom model.

The key is finding the model that the landmark uses. Since the process for finding a Maxis model is a little more involved , we'll start with that.

1. You want to find the Landmark you want to use in the Landmark menu in PIM-X. If you have custom Landmarks in your Plugins folder (vs. just the default Maxis Landmarks), or aren't sure, I would go to the file list and click on the "File" header. This will put the paths of all the files in alphabetical order with all the non-Maxis landmarks at the bottom of the list.
2. Once you find your Landmark in the list, click on it to open up the Building Exemplar for that landmark.
3. In the Building Exemplar, scroll down to the Resource Key Type 1 property. The value for this property is the TGI for the model used. Record the last two octets (set of eight characters that start with 0x). These are the GID and IID for your model, and are critical in finding it if it is a Maxis model.
4. Now go click on Standard Models under Resources. Go to the file list and click on the "Name" header. This will put the list in numerical order by GID and IID (all Maxis models have a GID of 0xBADB57F1). Scroll down the list until you find the entry where the second octet listed matches what you recorded from the Building Exemplar.
5. You can now click on that entry to verify that is the model you want, and then drag that model down to the appropriate sub-category under the Prop category under Descriptors. This will create a new Building Exemplar based on the model you chose. Once you have finished with any changes (name, etc.) PIM-X allows you make, make sure you click save at the bottom of the page. Your new Prop Exemplar will be saved to the root of Plugins folder with a ".SC4Desc" file extension.

If the Landmark you want to use uses a custom Model (vs. a Maxis Model), the process to find the model is a bit easier.

1. Follow the first three steps above.
2. To determine if the custom landmark uses a Maxis Model or a Custom Model, look at the GID. If it is anything other than 0xBADB57F1, it is almost certainly a custom Model. In step 4, instead of clicking on "Name," click on the "File" header. Like in step 1, this will put the list in alphabetical order by file path, with the location of your model at the bottom of the list.
3. Follow step 5.

Hope this all makes sense.

twalsh102

Actually, I need to modify my previous answer. I was so focused on the process, that I forgot that changing ALL Maxis buildings into props had already been done.

If the landmark you want to use is using a Maxis Model, then it already exists as a prop. You need either the combination of the Maxis files bldgprop_vol1.dat and bldgprop_vol2.dat, or Maxis Prop Names and Query Fix by T Wrecks (this combines everything from the previous two files mentioned). These files have ALL Maxis Buildings converted to Props. There is a very good chance that you already have the first two files mentioned as they are a common dependency.

If the model in question is a custom Model, then you still need to follow the directions previously provided.