Gamestudio Links
Zorro Links
Newest Posts
CSV to Tick import problem
by pcz
Today at 16:40
An Introduction to Algorithmic Trading: Basic to Advanced Strate
by yosoytrader
Today at 16:25
Square Root Rule & Additional Investment
by DdlV
Today at 15:15
What are you working on?
by painkiller
Today at 12:55
Support and Resistance Zones/Cluster
by sdh309795gaas
Today at 05:22
AUM Magazine
Latest Screens
Triton Wing
ZeaL
Computer Repair Simulator
Collider (working title)
Space Rider
Who's Online
15 registered (Denn15, painkiller, MatPed, Fiber, alibaba, firecrest, 3dgamelight, Iglarion, Matt_Aufderheide, pcz), 465 Guests and 5 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
Marce, pascalx, SpaceNL, onlinejack, johnnyp
17716 Registered Users
Topic Options
Rate This Topic
#465362 - 04/21/17 15:49 [S] how to bind all used models / textures to .wrs / resources ?
Reconnoiter Offline
Serious User

Registered: 12/26/11
Posts: 1742
Loc: 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)


Edited by Reconnoiter (04/22/17 16:34)

Top
#465363 - 04/21/17 17:11 Re: how to bind all used models / textures to .wrs / resources ? [Re: Reconnoiter]
Iglarion Online
User

Registered: 07/09/04
Posts: 767
Loc: 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.

Top
#465371 - 04/21/17 19:14 Re: how to bind all used models / textures to .wrs / resources ? [Re: Iglarion]
Reconnoiter Offline
Serious User

Registered: 12/26/11
Posts: 1742
Loc: 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).


Edited by Reconnoiter (04/21/17 19:16)

Top
#465372 - 04/21/17 19:23 Re: how to bind all used models / textures to .wrs / resources ? [Re: Reconnoiter]
Iglarion Online
User

Registered: 07/09/04
Posts: 767
Loc: 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.

Top
#465376 - 04/21/17 21:44 Re: how to bind all used models / textures to .wrs / resources ? [Re: Iglarion]
txesmi Offline
User

Registered: 06/13/07
Posts: 994
Loc: Hiporope and its pain
Have you tried to set original resources paths as project paths?


Edited by txesmi (04/21/17 21:49)

Top
#465377 - 04/21/17 21:59 Re: how to bind all used models / textures to .wrs / resources ? [Re: Iglarion]
Reconnoiter Offline
Serious User

Registered: 12/26/11
Posts: 1742
Loc: 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.

Top
#465378 - 04/21/17 22:21 Re: how to bind all used models / textures to .wrs / resources ? [Re: Reconnoiter]
EVO Offline
Junior Member

Registered: 02/09/13
Posts: 70
Loc: 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
_________________________
evoeon.com - Worlds Away - Evoeon 2D Game Builder Beta

Top
#465379 - 04/21/17 22:46 Re: how to bind all used models / textures to .wrs / resources ? [Re: Reconnoiter]
Iglarion Online
User

Registered: 07/09/04
Posts: 767
Loc: 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

Top
#465384 - 04/22/17 16:32 Re: how to bind all used models / textures to .wrs / resources ? [Re: Iglarion]
Reconnoiter Offline
Serious User

Registered: 12/26/11
Posts: 1742
Loc: 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

Top



Gamestudio download | chip programmers | Zorro platform | shop | resources | magazine | manual | support faq | bugs | beta features

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) 3dgamestudio.net