Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (Imhotep, opm), 785 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 3 of 4 1 2 3 4
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 Offline
Senior Expert
Quad  Offline
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 Offline
Expert
sivan  Offline
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.


Free world editor for 3D Gamestudio: MapBuilder Editor
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 Offline
Expert
sivan  Offline
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.

Click to reveal..
//----------------------------------------------------------

// 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 );



Free world editor for 3D Gamestudio: MapBuilder Editor
Re: Save as .wmb [Re: sivan] #393860
02/07/12 19:40
02/07/12 19:40
Joined: Jan 2012
Posts: 108
G
gamers Offline
Member
gamers  Offline
Member
G

Joined: Jan 2012
Posts: 108
How can we use this code ? Please explain it step by step...

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 Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
Quote:

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 Offline
Serious User
Rackscha  Offline
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 Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
I just did it today afternoon laugh 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...


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: Save as .wmb [Re: sivan] #394663
02/15/12 13:57
02/15/12 13:57
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
Hi Emre!
I realized that alpha value of entities is saved always as 50, more exactly I cannot find where it is saved (maybe not saved at all). This setting is independent of the TRANSLUCENT flag's actual state, so for transparent object it produces a bad result. Of course alpha can be stored in a skill as a secondary solution.


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: Save as .wmb [Re: sivan] #398113
03/28/12 07:52
03/28/12 07:52
Joined: Jul 2007
Posts: 619
Turkey, Izmir
Emre Offline OP
User
Emre  Offline OP
User

Joined: Jul 2007
Posts: 619
Turkey, Izmir
Alpha value isn't saved, but albedo saved with this line.


if(your.material!=mat_model&&your.material!=NULL&&your.material!=mat_terrain)
{ file_var_write (wmb_handle,your.albedo);skipline;
file_var_write (wmb_handle,0);skipline; //path
file_var_write (wmb_handle,0);skipline; //attach
str_cpy(temp_str,_chr(your.material.link.name));
file_str_write (wmb_handle,temp_str); skipline;
}

Re: Save as .wmb [Re: Emre] #398440
04/02/12 07:43
04/02/12 07:43
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
thanks,
I don't know yet whether it is useful or not to save albedo for each entity, but good to know to have the possibility (I'm setting it by the corresponding material). I solved the alpha problem by using a skill. Not perfect but works.
Good luck for your editor!


Free world editor for 3D Gamestudio: MapBuilder Editor
Page 3 of 4 1 2 3 4

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1