2 registered members (AndrewAMD, NeoDumont),
761
guests, and 1
spider. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Save as .wmb
[Re: Emre]
#393490
02/03/12 23:19
02/03/12 23:19
|
Joined: Oct 2007
Posts: 5,210 İstanbul, Turkey
Quad
Senior Expert
|
Senior Expert
Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
|
Awesome, i was using a custom xml level format(that only saves same stuff as you). This was just what i needed.
3333333333
|
|
|
Re: Save as .wmb
[Re: Quad]
#393639
02/05/12 19:41
02/05/12 19:41
|
Joined: Mar 2011
Posts: 3,150 Budapest
sivan
Expert
|
Expert
Joined: Mar 2011
Posts: 3,150
Budapest
|
one tiny happy thing: if you remove the wait(1); from the end of the while loop, it works fine, but much faster.
moreover, I wrote a small addition that creates the compilation option string based on actual sun ambient and fog colors. I will post it here tomorrow, really simple.
and finally I could integrate it into my MapBuilder editor. I made a short script that recreates bounding boxes and attached decals shadows too, using the tricky approach I mentioned here earlier.
but as I see lod models do not work (having the same name with different endings: *_0.mdl, *_1.mdl, *_2.mdl, *_3.mdl), but don't know why, I think they should work.
|
|
|
Re: Save as .wmb
[Re: sivan]
#393675
02/06/12 10:10
02/06/12 10:10
|
Joined: Mar 2011
Posts: 3,150 Budapest
sivan
Expert
|
Expert
Joined: Mar 2011
Posts: 3,150
Budapest
|
hi again, here is my options string maker script (put after file close instead of the current exec). does anyone know how to run the compiler in background? if I use exec_wait instead of exec, and include -close among options, it is nearly okay, compilation is done while my application is fullscreen and displays a please wait message, but when ready it gets minimized... so at the moment it is better to use simply exec and no -close. //---------------------------------------------------------- // rgb values are iterated from 0..255 to 0..100 !!! and from BRG to RGB !!! // create string for exec options - to set sun pos, sun color, ambient color, fog colors, and default settings str_cpy(temp_str,"export.$$M -pal expalette.pcx "); // sun azimuth str_cat(temp_str," -az "); str_cat(temp_str,str_for_int(NULL,(int)sun_angle.pan)); str_cat(temp_str," "); // sun elevation str_cat(temp_str,"-el "); str_cat(temp_str,str_for_int(NULL,(int)sun_angle.tilt)); str_cat(temp_str," "); // sun color str_cat(temp_str," -sunrgb "); str_cat(temp_str,str_for_int(NULL,integer(sun_color.red/2.55))); str_cat(temp_str," "); str_cat(temp_str,str_for_int(NULL,integer(sun_color.green/2.55))); str_cat(temp_str," "); str_cat(temp_str,str_for_int(NULL,integer(sun_color.blue/2.55))); str_cat(temp_str," "); // ambient str_cat(temp_str," -ambrgb "); str_cat(temp_str,str_for_int(NULL,integer(ambient_color.red/2.55))); str_cat(temp_str," "); str_cat(temp_str,str_for_int(NULL,integer(ambient_color.green/2.55))); str_cat(temp_str," "); str_cat(temp_str,str_for_int(NULL,integer(ambient_color.blue/2.55))); str_cat(temp_str," "); // fog1 str_cat(temp_str," -fog1 "); str_cat(temp_str,str_for_int(NULL,integer(d3d_fogcolor1.red/2.55))); str_cat(temp_str," "); str_cat(temp_str,str_for_int(NULL,integer(d3d_fogcolor1.green/2.55))); str_cat(temp_str," "); str_cat(temp_str,str_for_int(NULL,integer(d3d_fogcolor1.blue/2.55))); str_cat(temp_str," "); // fog2 str_cat(temp_str," -fog2 "); str_cat(temp_str,str_for_int(NULL,integer(d3d_fogcolor2.red/2.55))); str_cat(temp_str," "); str_cat(temp_str,str_for_int(NULL,integer(d3d_fogcolor2.green/2.55))); str_cat(temp_str," "); str_cat(temp_str,str_for_int(NULL,integer(d3d_fogcolor2.blue/2.55))); str_cat(temp_str," "); // fog3 str_cat(temp_str," -fog3 "); str_cat(temp_str,str_for_int(NULL,integer(d3d_fogcolor3.red/2.55))); str_cat(temp_str," "); str_cat(temp_str,str_for_int(NULL,integer(d3d_fogcolor3.green/2.55))); str_cat(temp_str," "); str_cat(temp_str,str_for_int(NULL,integer(d3d_fogcolor3.blue/2.55))); str_cat(temp_str," "); // fog4 str_cat(temp_str," -fog4 "); str_cat(temp_str,str_for_int(NULL,integer(d3d_fogcolor4.red/2.55))); str_cat(temp_str," "); str_cat(temp_str,str_for_int(NULL,integer(d3d_fogcolor4.green/2.55))); str_cat(temp_str," "); str_cat(temp_str,str_for_int(NULL,integer(d3d_fogcolor4.blue/2.55))); str_cat(temp_str," "); // remaining default values str_cat(temp_str," -hiprec -litmapsonly -writelog -mesh -mergeacross -tesselate -solidsky -nodetail -threads 1 -gamma 1.50 -phongangle 120 -lmambient 50 -sizeshaded 236 -litres 1.00 -litcomp 0.50 -litmax 196 -litscale 0.50 -radsubdiv 64 -radbounce 0 -noportals -nobsp -bound 56000 -fat 64 48 8 -narrow 32 32 0 "); exec( "%EXE_DIR%\\wwmp2wmb.exe" , temp_str );
|
|
|
Re: Save as .wmb
[Re: gamers]
#393903
02/08/12 11:54
02/08/12 11:54
|
Joined: Aug 2007
Posts: 1,922 Schweiz
Widi
Serious User
|
Serious User
Joined: Aug 2007
Posts: 1,922
Schweiz
|
How can we use this code ? Please explain it step by step...
Is this a joke? If not, copy the code in your script and call save_wmb(); That is all you have to do
|
|
|
Re: Save as .wmb
[Re: Widi]
#394041
02/09/12 14:36
02/09/12 14:36
|
Joined: Dec 2008
Posts: 1,218 Germany
Rackscha
Serious User
|
Serious User
Joined: Dec 2008
Posts: 1,218
Germany
|
@Emre: maybe you can add a paremeter(FileName) so users can decide the name/location by themself?
MY Website with news of my projects: (for example my current Muliplayer Bomberman, GenesisPrecompiler for LiteC and TileMaster, an easy to use Tile editor) Sparetime-Development
|
|
|
Re: Save as .wmb
[Re: Rackscha]
#394052
02/09/12 15:58
02/09/12 15:58
|
Joined: Mar 2011
Posts: 3,150 Budapest
sivan
Expert
|
Expert
Joined: Mar 2011
Posts: 3,150
Budapest
|
I just did it today afternoon And also I solved to place them to a subfolder. It could cause problems during compilation and when opening with WED, if the subfolder is set in the beginning. Thus I apply compiling locally, and moving the 4 files afterwards to the right place. The code is a bit messy, and specific for my application, but I will clear and finalize it to be publishable in the near future...
|
|
|
|