View Full Version : Problem creating a damageable object
xavierb
June 7th, 2005, 20:15
Hi,
Silvia Borja and me are trying to create a set of damageable objects and we are having problems. We would like some help.
We have tried two techniques to create the damageable objects designed with Gmax:
a) Using crashaz tutorial as in the sticky thread of the old forums.
b) Using rhumbaflappy's procedure in using the tool raw2sca.
I attach the .sca file that results of implementing the a) method if anybody is willing to help. It makes scasm to give a "too many errors" message. Curiously, in another experience I had using EOD objects and crashaz tutorial I had success at the first trial.
Thank you in advance,
Xavier
The code looks OK to me, but on compilation I get this error:
Scenery Assembler Vers. 2.96
Copyright(C)1995-2005 by Manfred Moldenhauer, Manfred.Moldenhauer@t-online.de
Any unauthorized distribution prohibited
Error in line 2151
-> EndObj
-> -> Linebuffer (20478) overflow, line 32/400 truncated !
-> fatal error, code: 32767
Scasm compilation status: aborted
Ok, the "buffer overflow" error above can occur when compiling complex objects. This can be fixed by adding the following at the beginnning of your source file:
Set( LINBUF 1024 )
Set( BUF 600 )
Set( AREAMX 600 )
Then, the Scasm file compiles, with a couple of errors (I think more warning then error). Opening the BGL with Fsregen indicates the compilation went OK, but I haven't tried it in the sim as I'm at work at the moment.....
C:\Documents and Settings\Sander de Cocq\Desktop\sbx_hangars.BGL
This is a Visual/Default data file
Old file format (pre fs-7)
Lat bounds : -90* 0.0015 to 90* 0.0015
Lon bounds : -179* 60.0 to 179* 60.0
UNCOMPRESSED file (FL_Spare2=0)
no object data
>> LIBRARY data at offset A0
no terrain data
no msa data
no VOR data
no ADF data
no facility data
no dynamic data
no Ecxeption data
no misc data
no mag.var.data
no afd data
=============================================
Library Objects : 1
0BA05BA09h,023505517h,0552822A9h,0E7212666h, 0.5 0 0 Hangar_wooden_large_1
=============================================
xavierb
June 8th, 2005, 18:50
Many thanks, Sdc (ex-RedWulf:-). I will try with the settings you describe and get back soon.
xavierb
June 8th, 2005, 19:32
Harder than expected, as usual. The following error happens when compiling with scasm:
found sections: 0x00000400
Error in line 2155
-> EndObj
-> destination ":L0027F3" out of range (38064), source line 19
LibObj. -> entrys: 1 mem: 40547
Linebuffer 55232/4194304
Maxlabels 1/1500 Maxpatches 2/2000
Scasm compilation status: error(s) 1
The bgl created results in an invisible object in CFS2... Any possible ideas of the reason of this problem?
Thanks in advance,
Xavier
crashaz
June 9th, 2005, 03:00
Going to have to use Rhumba's method Xavier. This looks like a too complex a model for SCASM to handle. Problem is we cannot access the old forum right now. Will look to the mods to give me access to get back in there and sticky it in here.
Besides been converting to Rhumba's method with all my library objects... got even my ships which are 6-8K polys per to compile with damage models using Rhumba's method.
Martin
June 9th, 2005, 05:16
The IfVarAnd jump is too far.
Replace
IfVarAnd( :L0027F3 0024 0040 )
with
IfVarAnd( :NEXT 0024 0040 )
Jump( :MAIN )
:NEXT
Jump32( :L0027F3 )
:MAIN
This should solve the destination out of range error by using a 32 bit jump
rhumbaflappy
June 9th, 2005, 19:13
Hi all.
I reposted my RAW2SCA method for including Gmax-produced ASM in a SCASM-coded Object Library bgl.
See Gmax to SCASM:
http://72.36.178.76/sohforums/showthread.php?t=339
I think it really is the best way to put ASM code into a CFS2 Library. Nothing is lost in translation, and we don't have the complications of a program like FSREGEN.
crashaz has been using it without problems... and it's pretty simple.
Dick
SdC
June 10th, 2005, 03:27
I've been using Rhumba's method last night and it is indeed THE way to go: I've written a little batch file to compile a collection of buildings into a single bgl, that I can run whenever I make a change to one of the buildings to recompile.
On a more complex building however, SCASM produces an error. I will post the error later today when I get home, but it looks a lot like Xavier's problem. It would be annoying to have to manually edit the .sca file each time I recompile...
xavierb
June 10th, 2005, 06:06
Thanks to everybody. I will retry again using rhumbaflappy method and martin's technique for using the jump32() command this weekend, as soon as some "real-life" matters permit me.
SdC
June 10th, 2005, 14:53
martin's solution did the trick for me! From this it seems that for complex objects the jump32 is almost required! I'll post the modified scasm code to Rhumbaflappy's thread on the bgl2sca method.
When Rhumbaflappy and MNWright join forces:jawdrop:
:redfire: :redfire: :redfire: WOW
Thanks guys!
xavierb
June 10th, 2005, 17:13
Martin and Rhumba: many many thanks. Combining your procedures, now the objects work wonderfully, scasm compile and both get damage!
Now I have only problem with the textures not showing but I think is a different problem.
Best regards,
Xavier
SdC
June 10th, 2005, 17:20
Martin and Rhumba: many many thanks. Combining your procedures, now the objects work wonderfully, scasm compile and both get damage!
Now I have only problem with the textures not showing but I think is a different problem.
Best regards,
Xavier
Double Whammy!
Xavier, your textures have to be mipmapped DXT1 with or without alpha channel.Dxtbmp and imagetool can both do this.
xavierb
June 10th, 2005, 19:25
Yes, SdC: it was that. Now it's done! Here are the results!
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.