Error with objects created for game

Modders can post their questions on scripting and more.

Moderators: Slitherine Core, BA Moderators

Post Reply
Anyman
Lance Corporal - Panzer IA
Lance Corporal - Panzer IA
Posts: 17
Joined: Fri Jan 20, 2012 2:39 am
Location: Yelm WA

Error with objects created for game

Post by Anyman »

O.k. folks it is time for me hit the forum for help before I hit my head on something solid. :?

I am trying to create a couple of objects, Town Square Monuments, a Cross on a pedestal and a shrine to the Maddona. Thought these would add flavor to a town square or as a roadside shrine.

I created them using Gmax, textured them with .tga files and exported them using the Slitherine exporter. Using the script listener I copied it to Notepad using the "any file" selection and ANSI naming the files Cross_0.s3f and Maddona_0.s3f. Then I converted the textures to .dds (with mipmaps included) using Gimp with a plugin.

Then I put it in a folder named Objects with a sub-folder named Town Square Monuments in the Campaign folder in the BBCBA directory.

I have a "_M" texture included for each texture as well as a objects.txt. When the error occured I tried changing the object file name by taking out the "_0" in the name and running with no objects.txt. Still received an error.

Here is the error message:
"Empty string trying to find string value: MAP in C:/Users/kristi/Documents/My Games/BBCBA/CAMPAIGNS/Northern France/ OBJECTS/Town Square Monuments/Cross.s3f(0)"

Best regards,
Anyman
junk2drive
BA Moderator
BA Moderator
Posts: 1478
Joined: Sun May 23, 2010 4:47 pm
Location: Arizona USA -7GMT

Post by junk2drive »

There are some tips in the Manual Additions thread. Might help.
You can call me junk - and type that with one hand.
Anyman
Lance Corporal - Panzer IA
Lance Corporal - Panzer IA
Posts: 17
Joined: Fri Jan 20, 2012 2:39 am
Location: Yelm WA

No Luck finding Manual Additions thread

Post by Anyman »

Couldn't find a Manual Additions thread though I searched each Forum area and tried the search box. Found a posting that referenced when converting images from Gimp to dds you should compress the images. Still will not work. Same error message comes up!

Stumped in Object Limbo Land :shock: ,
Anyman
junk2drive
BA Moderator
BA Moderator
Posts: 1478
Joined: Sun May 23, 2010 4:47 pm
Location: Arizona USA -7GMT

Post by junk2drive »

You can call me junk - and type that with one hand.
pipfromslitherine
Site Admin
Site Admin
Posts: 9872
Joined: Wed Mar 23, 2005 10:35 pm

Post by pipfromslitherine »

My guess is that there is a material applied to the object which doesn't have a texture on it. You need to ensure that only one texture is applied to the object, and it should not be (IIRC) a submaterial. At least that is how I think it should work!

Cheers

Pip
Richcat
Sergeant - 7.5 cm FK 16 nA
Sergeant - 7.5 cm FK 16 nA
Posts: 219
Joined: Sun Nov 07, 2010 10:09 pm

Post by Richcat »

Hi Anyman
Link to STUB engine docs if you have not found them already.
http://www.slithdata.net/files/bbc_ba/m ... e_Docs.pdf

Have a look from around page 18 for info "Adding Assets to Game"

Glad to hear someones trying out the Gmax exporter other than Merr.
Never had the error your getting , only ones I had is if I forget to uv map it. Pips probably on the right track.

If your still having problems may be we could get hold of the Gmax file some how, then we could try it and maybe find out whats wrong - but I'm no expert like the rest.(I just looked around and you can't use attachements in this forum)

Anyway back to trying to get a Fragmotion exporter to work (long term project)- still at very very early stages and its not going well at the moment

Richcat (Tims1966 brother)
Anyman
Lance Corporal - Panzer IA
Lance Corporal - Panzer IA
Posts: 17
Joined: Fri Jan 20, 2012 2:39 am
Location: Yelm WA

Still same error

Post by Anyman »

Look kids, Big Ben, Parliament... (National Lampoon's European Vacation)

Stuck in the roundabout of object limbo still!

I am using only one texture per object. Same texture converted to dds. Texture has the _0.s3f naming as per on screen instructions in gmax and saved to notepad as "all files" option. The dds has the same name as the object without the _0.s3f naming. The text1 I used the example in Junk2Drive's Pacific_Campaign and it reads as follows:
IDS_CAMPAIGN_NAME, "normandy",
IDS_CAMPAIGN_TEXT, "normandy",
IDS_O_Town Square Monuments_Cross, "Cross",
IDS_O_Town Square Monuments_Madonna, "Madonna",

And this way:
IDS_CAMPAIGN_NAME, "normandy",
IDS_CAMPAIGN_TEXT, "normandy",
IDS_O_Town Square Monuments, "Cross",
IDS_O_Town Square Monuments, "Madonna",

The error happens each time I select the Campaign I want to add these objects to and click on the "check mark", it starts to load the Campaign and then locks up with the error message showing after I give the three finger Vulcan nerve pinch (control-alt-delete).

The Objects folder is in the Campaign folder i.e. "Campaigns/France/Objects"
The object with the most poly's is the Cross on a Pedestal at 207, so no problems there.

So I hope in this post and in previous ones I have been through enough in describing my problem.

Thank you all for pitching in to help me try and solve it,
Anyman
pipfromslitherine
Site Admin
Site Admin
Posts: 9872
Joined: Wed Mar 23, 2005 10:35 pm

Post by pipfromslitherine »

Does the object show up when you attempt to add it in the editor? Or did you replace an existing object?

I think it is an issue with how you have applied the texture in MAX. It cannot be a subtexture.

If you look at the s3f file (which is text, so you can check it in notepad) there should be a single MAP entry at the top with the texture name in it.

Cheers

Pip
Merr
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 903
Joined: Mon Aug 16, 2010 2:00 pm

Post by Merr »

Anyman,

I think I've seen your error before but it's hard to troubleshoot without a look at the s3f.

The empty string could mean an object (defined in your s3f) doesn't have a material assign to it. If you have more than object it might have ommitted the part defining this when it exported.

Here's an examply of the an s3f (tim1966's pillbox) ... Does your s3f kinda look like this ;

Code: Select all

VERSION 2
frames 101f
framerate 30
MATS 1
MAT 01 - Default
MAP C:\Documents and Settings\Home\My Documents\Battlefield Academy\Pillbox\pillbox.dds


[pillbox]
MAT 01 - Default
facecount 16
vertcount 12
If all else fails, PM your s3f and your DDS. I have alot of experience reading an s3f and spent many hours manually editting the darn things.

Btw ... Did you create an OBJECTS.TXT file in your objects folder defining the object?

- Merr
Anyman
Lance Corporal - Panzer IA
Lance Corporal - Panzer IA
Posts: 17
Joined: Fri Jan 20, 2012 2:39 am
Location: Yelm WA

And so continue the Days of our Lives

Post by Anyman »

Thanks for all the help folks!

Great suggestions!
I changed the material location line from:
VERSION 2
frames 101f
framerate 30
MATS 1
MAT 1
MAP C:\gmax\Scenes\Battle Academy\Cross\Cross.tga

>>TO THIS:

VERSION 2
frames 101f
framerate 30
MATS 1
MAT 1
MAP C:\Users\kristi\Documents\My Games\BBCBA\CAMPAIGNS\France\Objects\Town Square\Cross\Cross.DDS

[Cross]
MAT 1
facecount 226
vertcount 442

>>Did the same with the Madonna object:

VERSION 2
frames 826f
framerate 30
MATS 1
MAT Mtl 1
MAP C:\Users\kristi\Documents\My Games\BBCBA\CAMPAIGNS\France\Objects\Town Square\Madonna.dds


[Madonna]
MAT Mtl 1
facecount 236
vertcount 145

Now when I run Editor to try and insert these objects I get a NEW ERROR! :roll: This one states that the madonna.dds is a non-square texture.

When I take Madonna out of Objects and try to edit the France Campaign, it goes in to Editor mode now no stalling. Then I select the scenario I want to edit. Now when the objects button is clicked a entry for a Cross selection appears under the other selections. Yet when you select Cross nothing appears on the screen just that Arnhem bridge like when you first select French objects.

Curiouser and curiouser, as Lewis Carol wrote... So Merr I am going to PM you the s3f, DDS and Gmax with texture files. I'll have to figure that out next. I really appreciate the help because my next project will be a kubelwagon with a MG34 windshield bar mounted. My first foray into the world of emitters and animation (other than train wheels). :shock:
Anyman
pipfromslitherine
Site Admin
Site Admin
Posts: 9872
Joined: Wed Mar 23, 2005 10:35 pm

Post by pipfromslitherine »

The non-square texture thing should be simple to fix (you just have to resize the texture to be square and a power of 2 (e.g. 32x32, 64x64, etc)).

It looks like the original file should have been fine though (it ignores the path, as it expects the texture to be in the same folder as the object file).

Cheers

Pip
Merr
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 903
Joined: Mon Aug 16, 2010 2:00 pm

Post by Merr »

Anyman,

I emailed you and hopefully we can sort out your error.

I noted that you're showing the madonna having 826 frames :shock: . It's a not a problem but for a static object you can get away with just a few frames. This makes the file size smaller.

Pip's correct about the material path .... You only need a minimum of the drive and the filename ... eg, MAT C:\madonna.dds
A long winded path still works as long as the minimum items are correct (drive path and filename).

Since your texture size is wrong then this could be the original problem. Can you copy/paste a known DDS from the game and rename it to the working dds?

Another tip ..... I usually create a clean, new campaign when fiddling with new stuff. If you throw all you stuff into one pot it expontentially increases your error log :wink: . Take baby steps and set your object up in a stand alone campaign (clean, empty map, etc).

- Merr
Anyman
Lance Corporal - Panzer IA
Lance Corporal - Panzer IA
Posts: 17
Joined: Fri Jan 20, 2012 2:39 am
Location: Yelm WA

Post by Anyman »

I got the objects to work! :D

Perseverance paid off as well as everyones helpful suggestions. Pips observance of x2 materials helped solve the "non square" fault. In Auran Trainz Simulator you can have a .tga that is 128 high by 256 wide. Not so in this modding, it has to be 256x256. Also solved the "empty string in the MAP" error. I looked at Junk2Drives' s3f files for the Pacific Campaign and "ding" the light came on!

I had in my s3f the following entries. I corrected the s3f from looking in Gmax to the new folder location for the dds:

MAP C:\Users\kristi\Documents\My Games\BBCBA\CAMPAIGNS\France\Objects\Town Square

However I didn't tell the s3f WHAT dds to look for and by tacking this on the end it worked!

MAP C:\Users\kristi\Documents\My Games\BBCBA\CAMPAIGNS\France\Objects\Town Square\Cross.dds

Also changed text1 to read like this:

IDS_CAMPAIGN_NAME, "normandy",
IDS_CAMPAIGN_TEXT, "normandy",
IDS_O_Objects_Town Square, "Cross",
IDS_O_Objects_Town Square, "Madonna",

Have to clarify next manual update that it's a letter O not a zero. Not that it confused me, it just might someone else.

Also I went back over the Madonna gmax file and got her down to 188 faces, had a division right down the middle which added a whole lot of faces till I moved the division edge to the back and welded the vertices together.

The objects text now refers to [cross_0] and [madonna_0] so the characteristics now work. The text is set so the objects fade when a unit enters the hex and the Cross blocks LOS. The

Attached is three screenshots of the objects. First is size comparison, then the cross in a town square, last the fade when a unit is in the same hex.
Image
Image
Image

Once I read the post on how to package these items I will post them for download!

Thank you very much for everyones help, especially Merr!

With Respect,
Anyman (if a Polock from Chicago can do it any man/women can!)
"People that hate cats, will come back as mice in their next life..." Unknown
Merr
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 903
Joined: Mon Aug 16, 2010 2:00 pm

Post by Merr »

Very well done Anyman!

You figured it out before I could actually help :).

Holler again if you get stuck!

- Merr
Post Reply

Return to “Battle Academy : Modders Corner ”