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
3 registered members (Edgar_Herrera, VoroneTZ, Akow), 973 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
[S] how to bind all used models / textures to .wrs / resources ? #465362
04/21/17 13:49
04/21/17 13:49
Joined: Dec 2011
Posts: 1,823
Netherlands
Reconnoiter Offline OP
Serious User
Reconnoiter  Offline OP
Serious User

Joined: Dec 2011
Posts: 1,823
Netherlands
[SOLUTION: use PRAGMA_BIND and use EVO's autobind script below]

Hi,

For some reason only a few of my used models/textures in my game are added to the .wrs / resources files on publish. So I am trying to add the other models and textures too through a .wdl/starter file. The starter file itself works (custom loading etc, and its the latest version). I checked in the manual how bind models/textures to resource files and came across this:
Quote:
LEVEL"levelname";
All entities from this map file are automatically included into the published game folder or the resource. Use this to make sure that sub-entities of levels or map entities are included.

So I added it to my .wdl/starter file (besides PATH statements):

LEVEL"DatamyMap.wmb";

But it seems to only add the .wmb file to the published folder but not the models + textures used in that map.
Anyone know how I can effectively add all the models and textures to the resource files? (a few hundreds of files I believe)

ps: dont know if this is a problem for resources, but I use external textures for my models (/so multiple models can use the same texture)

Last edited by Reconnoiter; 04/22/17 14:34.
Re: how to bind all used models / textures to .wrs / resources ? [Re: Reconnoiter] #465363
04/21/17 15:11
04/21/17 15:11
Joined: Jul 2004
Posts: 785
Serbia
Iglarion Offline
User
Iglarion  Offline
User

Joined: Jul 2004
Posts: 785
Serbia
I forgot (not compile nothing a long time) but i think you need just put all game files in root folder and then compile. Compiler will take all files called from wmb, script and mdl.
I'm not sure but i think this not work from path.

Re: how to bind all used models / textures to .wrs / resources ? [Re: Iglarion] #465371
04/21/17 17:14
04/21/17 17:14
Joined: Dec 2011
Posts: 1,823
Netherlands
Reconnoiter Offline OP
Serious User
Reconnoiter  Offline OP
Serious User

Joined: Dec 2011
Posts: 1,823
Netherlands
Hey Iglarion, ty for replying. I tried that and also tried loose level_load("someMapName")'s etc but for some reason the .wrs/resource file stays very small (only bmaps that I declared in code like e.g. BMAP* icon_item = "icon_item.bmp"; seem to be put in the resource file).

Last edited by Reconnoiter; 04/21/17 17:16.
Re: how to bind all used models / textures to .wrs / resources ? [Re: Reconnoiter] #465372
04/21/17 17:23
04/21/17 17:23
Joined: Jul 2004
Posts: 785
Serbia
Iglarion Offline
User
Iglarion  Offline
User

Joined: Jul 2004
Posts: 785
Serbia
I also have this problem before but i can't remember clear what is was reason. Did you sure that all your files is in the one folder? Check also in map properties did the main script is attached.

Re: how to bind all used models / textures to .wrs / resources ? [Re: Iglarion] #465376
04/21/17 19:44
04/21/17 19:44
Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
txesmi Offline
Serious User
txesmi  Offline
Serious User

Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
Have you tried to set original resources paths as project paths?

Last edited by txesmi; 04/21/17 19:49.
Re: how to bind all used models / textures to .wrs / resources ? [Re: Iglarion] #465377
04/21/17 19:59
04/21/17 19:59
Joined: Dec 2011
Posts: 1,823
Netherlands
Reconnoiter Offline OP
Serious User
Reconnoiter  Offline OP
Serious User

Joined: Dec 2011
Posts: 1,823
Netherlands
Originally Posted By: txesmi
Have you tried to set original resources paths as project paths?
, in the the wdl / starter with PATH you mean?

Originally Posted By: Iglarion
I also have this problem before but i can't remember clear what is was reason. Did you sure that all your files is in the one folder? Check also in map properties did the main script is attached.
, hmm I found 1 thing that sort of works, publishing from a map in Wed that has every model in it. Though it is a bit of a pain to add every model to it.

Re: how to bind all used models / textures to .wrs / resources ? [Re: Reconnoiter] #465378
04/21/17 20:21
04/21/17 20:21
Joined: Feb 2013
Posts: 122
Maysville, Ga
Evo Offline
Member
Evo  Offline
Member

Joined: Feb 2013
Posts: 122
Maysville, Ga
I had these issues with many projects. Especially with "create" functions using external resources - entities, images, etc. I have an example of an Auto-Bind script that searches through all resource folders within a project and writes the file names of each file into a new bind script that can be included before publishing.

Edit the script to target the folders that hold the resources that are external and this will make sure that all used assets will be written into bind statements.

Can be easily edited to create a .WDL BIND script as well if wdl is what you need.

Here is the code and example. Maybe this can help.
https://evoeon.com/freeDownloads/autobind_example.zip

Re: how to bind all used models / textures to .wrs / resources ? [Re: Reconnoiter] #465379
04/21/17 20:46
04/21/17 20:46
Joined: Jul 2004
Posts: 785
Serbia
Iglarion Offline
User
Iglarion  Offline
User

Joined: Jul 2004
Posts: 785
Serbia
This must work. I know problem is when extern texture and model are in diferent folder beacuse path for extern texture is only defined in mdl file, if we do not have texture in folder where is the model then compiler can't find this file. Same things for other files, if file is not defined in wmb or script, compiler will not find this file. I think for some things like ent_create, ent_morph,... you must use BIND function. First check did you include script in map from where you compile game. Check this topic

Re: how to bind all used models / textures to .wrs / resources ? [Re: Iglarion] #465384
04/22/17 14:32
04/22/17 14:32
Joined: Dec 2011
Posts: 1,823
Netherlands
Reconnoiter Offline OP
Serious User
Reconnoiter  Offline OP
Serious User

Joined: Dec 2011
Posts: 1,823
Netherlands
@EVO, tnx alot that is so far the only way for me that works and isn't a pain in the ass to do! laugh (So weird that only PRAGMA_BIND works for me, BIND in wdl etc just does nothing for me it seems.)

@Iglarion, that's good to keep in mind, in my case I already had both in 1 the same folder so that saves me a headache grin


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