Building coding question

Please post here for questions and discussion about unit modeling and general game modding. You can also post your new units and modifications here.

Moderator: EagleMountainDK

benpark
Posts: 3072
Joined: Mon Aug 12, 2002 1:48 pm

RE: Building coding question

Post by benpark »

Yeah, that was due to not texturing the bottom of the model. I've removed all of the unnecessary faces from these. I also just tried removing that model (the 3 story urban and pharmacy) from the media file, and the map still won't load. Just when I thought I was at the finish line.
"Fear is a darkroom where the devil develops his negatives" Gary Busey
benpark
Posts: 3072
Joined: Mon Aug 12, 2002 1:48 pm

RE: Building coding question

Post by benpark »

Here are 2 of the MS3D models with textures as a representational sample. All joints etc are there to maybe help illuminate where I lost the plot.
Attachments
BenModels.zip
(621.4 KiB) Downloaded 2 times
"Fear is a darkroom where the devil develops his negatives" Gary Busey
User avatar
Stridor
Posts: 1391
Joined: Sat Sep 08, 2007 11:01 am

RE: Building coding question

Post by Stridor »

Ben,

I took a look at your files.

Several problems

1. The 3story.x model is somehow corrupted and is not legal .X. I suspect a mapping problem like before. All the other models are ok
2. There were several problems with your .xml defines

a. "3storyUrbn" textures wasn't defined correctly
b. There were duplicate "ModFac.dds" defines. PCK doesn't like duplicates.
c. The path is correctly "Mods/Benpark/..." not "Media/Mods/Benpark..."

Here is the corrected file:

Code: Select all

 <resources>
 
 <resource id="3story" filename="Mods/Benpark/3story.x" />
 <resource id="3storyUrbn.dds" filename="Mods/Benpark/3storyUrbn.dds" />
 <resource id="GerHaus1" filename="Mods/Benpark/GerHaus1.x" />
 <resource id="GeGable1.dds" filename="Mods/Benpark/GeGable1.dds" />
 <resource id="GerHaus2" filename="Mods/Benpark/GerHaus2.x" />
 <resource id="GeGable2.dds" filename="Mods/Benpark/GeGable2.dds" />
 <resource id="GerHaus3" filename="Mods/Benpark/GerHaus3.x" />
 <resource id="GeGable3.dds" filename="Mods/Benpark/GeGable3.dds" />
 <resource id="GerHaus4" filename="Mods/Benpark/GerHaus4.x" />
 <resource id="GeGable4.dds" filename="Mods/Benpark/GeGable4.dds" />
 <resource id="ModFac1" filename="Mods/Benpark/ModFac1.x" />
 <resource id="ModFac.dds" filename="Mods/Benpark/ModFac.dds" />
 <resource id="ModFac2" filename="Mods/Benpark/ModFac2.x" />
 <resource id="Pharmacy" filename="Mods/Benpark/Pharmacy.x" />
 <resource id="Pharmacy.dds" filename="Mods/Benpark/Pharmacy.dds" />
 
 </resources>
 

Now if you make those changes above at least you will be able to start inserting those models into your maps in SE and see them in the game.

I didn't test out the mount points, you need to do that in the game itself with a demo scenario. I figured that was step #2.

Your models look great btw. Once they are done we should prep the thumbnails for use in the MM (or you can do it yourself with the instructions I wrote in the map maker beta thread).

Regards

S.
benpark
Posts: 3072
Joined: Mon Aug 12, 2002 1:48 pm

RE: Building coding question

Post by benpark »

Thanks for looking at it, gents.

I made the changes that Stridor listed. I'm still getting the blue screen at load up in the scene editor, which I only see when I have a missing model listed in the .xml. I've tried multiple maps as tests for this.

I followed Stridors "Psychic Moans" (how apt a title) tutorial closely in the jointing and saving of the models. Problem is, I'm doing all of this around 2AM my time. Sleep is indeed the enemy.

Here's the steps I've taken in the editing post model completion-

+added file list to test map .xml under "resources"

+added files to mod folder "Benpark" (in default location)

+start scene editor for placement on map so that I can test model for scaling and entry points- blue screen.

I'm hoping I didn't do anything odd to the models.

Again, thanks for the help! I had never even attempted to make a 3d model before this, so I'm way over my head, but I hope to contribute somefink.

"Fear is a darkroom where the devil develops his negatives" Gary Busey
User avatar
Stridor
Posts: 1391
Joined: Sat Sep 08, 2007 11:01 am

RE: Building coding question

Post by Stridor »

Ben,

Apart from model 3story which is broke, the above xml file works fine for me in SE. I can add your houses no problem.

You don't need to put your resources.xml in the map root directory, just in the mods directory.

Do this:

Ensure this is your only mod for the moment.

In Media/Mods/Benpark put all you new *.X files (except 3story) all your dds textures and the resources.xml file I have provided above (just cut n paste fro the code above).

Ok now go *restart* MM (MM loads up new xml links at startup). Load up a map you want to use. Now rebuild it under a different, new name so that we can be sure your new map root dir is clean. Press yes to open the map in SE at the end of the build process.

SE shoud open with your new map without problems. Next you can try adding your new GerHaus(s) in SE.

If all that works, then make a test scenario with some guys near the house at setup and then run the map in the game and see if they mount correctly.

Don't despair, you are very close to making this work. If you get stuck again I will upload the fixed files so you can take a look at them and see how they work.

If you get a blue screen in SE and don't know why, check out the last log file entry (under Logs/) to see what exactly went wrong.

I will need to add better xml checking features in the next version of MM (at some stage).

Regards

S.
benpark
Posts: 3072
Joined: Mon Aug 12, 2002 1:48 pm

RE: Building coding question

Post by benpark »

Most are now working. It was me adding the .xml info to the map files. I don't know where I got that idea. Thanks for laying that out in plain lingo.

The 3 story crashing is due to the underside texture problem. I'm trying to figure out how to get to the interior of the model, as there are "floors" that I built into it. I deleted the bottom one, but more remain and I can't select them by face.

One model won't load. It's one of the modular factory parts. I've re-sized the models to be larger, as they were too small. I also renamed the texture to avoid conflicts.

The .xml as I have it now is:

<resources>

<resource id="GerHaus1" filename="Mods/Benpark/GerHaus1.x" />
<resource id="GeGable1.dds" filename="Mods/Benpark/GeGable1.dds" />
<resource id="GerHaus2" filename="Mods/Benpark/GerHaus2.x" />
<resource id="GeGable2.dds" filename="Mods/Benpark/GeGable2.dds" />
<resource id="GerHaus3" filename="Mods/Benpark/GerHaus3.x" />
<resource id="GeGable3.dds" filename="Mods/Benpark/GeGable3.dds" />
<resource id="GerHaus4" filename="Mods/Benpark/GerHaus4.x" />
<resource id="GeGable4.dds" filename="Mods/Benpark/GeGable4.dds" />
<resource id="ModFac1" filename="Mods/Benpark/ModFac1.x" />
<resource id="ModFac.dds" filename="Mods/Benpark/ModFac.dds" />
<resource id="ModFac2" filename="Mods/Benpark/ModFac2.x" />
<resource id="ModFac2.dds" filename="Mods/Benpark/ModFac2.dds" />

</resources>

Model attached.
Attachments
Benpark.zip
(472.93 KiB) Downloaded 1 time
"Fear is a darkroom where the devil develops his negatives" Gary Busey
User avatar
Stridor
Posts: 1391
Joined: Sat Sep 08, 2007 11:01 am

RE: Building coding question

Post by Stridor »

Good to hear you got it working. Once you have your remaining issues sorted out then make 256x256 thumbnail bitmaps of each of your models and put them in the appropriate folder under structures under Map Maker and name them per the model name (eg "GerHaus1.bmp"). You will then be able to use your models in the MM.

Regards

S.
benpark
Posts: 3072
Joined: Mon Aug 12, 2002 1:48 pm

RE: Building coding question

Post by benpark »

Alright, I've got all of them in but the 3 story. Units aren't mounting, however. I've coded the buildings on the test map, and moved infantry within mount range, but it doesn't work. I'm pretty certain all of my joints are correct. I'll post a screen up of the positions in MS (hopefully Matrix doesn't shut me down for killing their bandwidth):

Image
Attachments
Untitled1.jpg
Untitled1.jpg (78.67 KiB) Viewed 134 times
"Fear is a darkroom where the devil develops his negatives" Gary Busey
User avatar
Stridor
Posts: 1391
Joined: Sat Sep 08, 2007 11:01 am

RE: Building coding question

Post by Stridor »

Ben something really simple I am sure you have done it, so forgive me if you have.

But you must define a building type if you add new models to a map. By default it is set to none. You need to set it to heavy / light / # squads etc otherwise troops won't mount despite your correct mount points.

Another thing is to get the spelling right

Frame_bone_position01
Frame_bone_position01_dir

etc

I can't see the spelling from the SS above.

Just follow my tut and it should work fine (it worked for me [;)])

Regards

S.

EDIT: The good new is that you *are* making progress [;)]
benpark
Posts: 3072
Joined: Mon Aug 12, 2002 1:48 pm

RE: Building coding question

Post by benpark »

Of course I hadn't done it. Set the building occupancy in the scene editor-simple one would think- to remember. And here I was thinking it was something complicated. Once again, you have illuminated the darkness.

The little guys don't want to change their facing, but they're mounted up. I need to adjust the mount points for the large buildings to make it appear that there is an all-around defense.

After that, I'll try to fix the 3 story and finish off 2 more larger German farm-type houses and fix em up for the MM.

Thanks, Stridor. You are a patient guy.

Image
Attachments
Untitled1.jpg
Untitled1.jpg (69.03 KiB) Viewed 134 times
"Fear is a darkroom where the devil develops his negatives" Gary Busey
User avatar
Stridor
Posts: 1391
Joined: Sat Sep 08, 2007 11:01 am

RE: Building coding question

Post by Stridor »

Ben,

Is that another map I see? Boy you are a map making machine! I hope the new changes I have made to the MM for the next build will both speed up the map making process as well as allow you to make better looking maps.

Don't worry about the little guys facing. You need to define a _dir position bone otherwise it won't work, but the game just ignores it anyway. The facing changes depending on what they are aiming at. So really the _dir bone should be removed from the engine or it should be the default facing if the little guys are not engaged.

Regards

S
Post Reply

Return to “Maps, Models and Mods”