Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (VoroneTZ, AndrewAMD, TipmyPip), 918 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Save changed skin of an entity? #430400
09/27/13 16:46
09/27/13 16:46
Joined: Nov 2005
Posts: 204
Bavaria
HellThunder Offline OP
Member
HellThunder  Offline OP
Member

Joined: Nov 2005
Posts: 204
Bavaria
Hi there!

I got a small problem with my Map Editor.
It has the ability to create Tiles as "*.wmb" with

Code:
ent_create("Tile.wmb",a Vector,null);



After that the user can change the skin of the tile Object with

Code:
ent_setskin(TileEntity,Texture,1);



So far, so good.
This is the result of the ingame mapeditor.



After using "wwmp2wmb.exe" in order to save my map, I reload my map and all changed skins got lost.



Perhaps the ent_setskin function isn't the right way to my solution - I really don't know. I didn't found anything in the manual about this problem.

Is there any way to save the changed skin?
Or is there a way to place WMP file Format into a Map via Lite C?

Thanks in advance.
Marco


Create your own JRPG and join our community: https://www.yrpgtoolkit.com
Re: Save changed skin of an entity? [Re: HellThunder] #430402
09/27/13 17:04
09/27/13 17:04
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
I think it is because of wmb format. but don't know why it worked before compilation... because as I know, all entities within a level created of the same wmb map entity, or model, share their textures by default. you can use ent_clone to make each created entity unique after ent_create, but it makes slower the rendering, and increases nexus very much. imo it is more desirable to use different models or wmb map entities for each different tiles.

Last edited by sivan; 09/27/13 17:04.

Free world editor for 3D Gamestudio: MapBuilder Editor
Re: Save changed skin of an entity? [Re: sivan] #430406
09/27/13 18:09
09/27/13 18:09
Joined: Oct 2011
Posts: 1,082
Germany
C
Ch40zzC0d3r Offline
Serious User
Ch40zzC0d3r  Offline
Serious User
C

Joined: Oct 2011
Posts: 1,082
Germany
Well, if you load the wmb as entity and change the skin, how would the compiler know that you changed the skin? It simply recompiles the wmb file..
So make the tiles better a model, use the mdl SDK and export it as mdl file wink

Re: Save changed skin of an entity? [Re: Ch40zzC0d3r] #430559
09/28/13 17:40
09/28/13 17:40
Joined: Nov 2005
Posts: 204
Bavaria
HellThunder Offline OP
Member
HellThunder  Offline OP
Member

Joined: Nov 2005
Posts: 204
Bavaria
Thanks for the answers!

I thought about the SDK solution - but the engine didn't load the included dll. Perhaps I don't know how to handle with plugins or it's the fact, that I use the LiteC Free Version. I really don't know. I have also read the manual about SDK.

After that I tried the ent_clone function. Ent_Clone function works with SED but if I use the C# Wrapper the engine throws an error 'E2005 - Can't create DirectX texture mtl_shaded.' Did I forget to implement some shaders?

Indeed the easiest solution would be to create an own wmb file for every tile . But I think this solution isn't felxible enough for the user. It would take a lot of time to create them.

I will go on and try to solve the problem with ent_clone.

Nevertheless, I would appreciate further help. =)
Regards Marco.


Create your own JRPG and join our community: https://www.yrpgtoolkit.com
Re: Save changed skin of an entity? [Re: HellThunder] #430911
10/04/13 23:27
10/04/13 23:27
Joined: Nov 2005
Posts: 204
Bavaria
HellThunder Offline OP
Member
HellThunder  Offline OP
Member

Joined: Nov 2005
Posts: 204
Bavaria
I solved the problem. It's a very simple solution.
With ent_next I'm able to iterate through the list of entities.
I'm using XML-Serialization to save all textures (a list of strings) into a file - 'mapname.tex'.
After saving/closing the map, every texture will be saved into 'mapname.tex'.
By reloading the 'mapname.wmb', the application will search the '*.tex' file of the map in order to reload every single texture with an ent_next loop.


Create your own JRPG and join our community: https://www.yrpgtoolkit.com
Re: Save changed skin of an entity? [Re: HellThunder] #430925
10/05/13 15:07
10/05/13 15:07
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
ahh, I could give you this hint before, I use it too for some special settings when compiling a level from MapBuilder, but I use the 1st 20 skills for numeric, and the 2 entity strings for character based information (like its decal shadow name when applied)... anyway, good to hear you solved it laugh


Free world editor for 3D Gamestudio: MapBuilder Editor

Moderated by  HeelX, Spirit 

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