Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 18,435 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 3 of 4 1 2 3 4
Re: Saving a modified model ingame as mdl [Re: TechMuc] #385333
10/16/11 22:21
10/16/11 22:21
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline OP
Senior Expert
Pappenheimer  Offline OP
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Thank you very much for your offer!
I will remember you in about two weeks! laugh

Re: Saving a modified model ingame as mdl [Re: Pappenheimer] #386353
11/02/11 00:26
11/02/11 00:26
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline OP
Senior Expert
Pappenheimer  Offline OP
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Reminder! wink

Re: Saving a modified model ingame as mdl [Re: Pappenheimer] #386359
11/02/11 02:01
11/02/11 02:01
Joined: Apr 2008
Posts: 650
Sajeth Offline
User
Sajeth  Offline
User

Joined: Apr 2008
Posts: 650
I'll drop in a few bucks if you include a hassle-free function to save modified hmp terrains.


Teleschrott-Fan.
Re: Saving a modified model ingame as mdl [Re: Sajeth] #386393
11/02/11 12:13
11/02/11 12:13
Joined: Jul 2008
Posts: 894
T
TechMuc Offline
User
TechMuc  Offline
User
T

Joined: Jul 2008
Posts: 894
ah nice - i remember now tongue - will work on it tomorrow while studying.

Re: Saving a modified model ingame as mdl [Re: TechMuc] #386418
11/02/11 16:18
11/02/11 16:18
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline OP
Senior Expert
Pappenheimer  Offline OP
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Originally Posted By: TechMuc
will work on it tomorrow while studying.

Uh, that's what I call multitasking! wink

Re: Saving a modified model ingame as mdl [Re: Pappenheimer] #387051
11/13/11 19:48
11/13/11 19:48
Joined: Jul 2008
Posts: 894
T
TechMuc Offline
User
TechMuc  Offline
User
T

Joined: Jul 2008
Posts: 894
Hi,

as promised here the first version of the mdl resave dll. Please always be aware that i've done this code in around 2 hours, so do NOT expect really good quality (good quality is not for free tongue ) - espcially as big parts of this code are from my old project GED. So there will be probably a lot of bugs to fix, as i just do not have the time currently to check the code with a lot of different models and configurations. Espcially the speed & the memory consumtpion of the project is far from beeing optimal laugh I did NOT have the time to test a free plugin properly, so:
BACKUP YOUR MODELS BEFORE USING THIS PLUGIN and read the bug section before committing bugs.

Enough warnings. Very short tutorial:

Folder Structure
Basically there are two folders:
1) bin: Contains DLL File mdl_resave.dll. Copy this file to your acknex_plugins folder to get things runnings
2) mdl_resave: Contains Source of the DLL. There are not dependencies besides the MDL and the Gamestudio SDK, so everyone should get this code running.

Get Plugin working
As already said, copy the mdl_resave.dll out of the "bin" folder into your acknex_plugins (or any PRAGMA_PLUGIN) folder. Open SED and add the following six function definitions anywhere to the top of one of your headers:

Code:
void* LoadModel(ENTITY* ent);
void* LoadModelFromFile(STRING* str);

BOOL SaveModel(ENTITY* ent);
BOOL SaveModelWithLoader(ENTITY* ent,void* loader);

BOOL FreeLoader(void* loader);



You can find a very basic example how to use the resave plugin in the mdl_resave folder (file: test.c).

Available Functions

Probably you'll only need the function SaveModel(ENTITY* ent). You pass an ENTITY to the function and the entity will be saved.
The functions LoadModel and LoadModelFromFile will return an internal loader object. In future - if anyone needs it - this loader object COULD be used to change any option in the mdl file you wish (e.g. even ADDING or REMOVING vertices or changing bones / lod-settings etc.). In the case you want to use the SaveModelWithLoader / LoadModel functionalities - PLEASE: use the FreeLoader function, otherwise there will be giantic memory leaks. The plugin is not clever enough to detected entity removal, and will therefore NOT clear up on it's own.

What does the Plugin change?

At the moment the only thing which is changed are the vertices. So any changes you make to your skins are NOT accepted or changed by the mdl resave plugin.

Where to download

http://www.dev-software.com/mdl_save.rar

How to submit bugs

Yep - as already said there will be bugs with a lot of models, as i do NOT have the time to test properly. If you have a model where the resaving crashs and / or changes please do NOT say: "blabla - does not work - blabla" but upload the model and send a link to this model via pm. Reproducing problems should be just a matter of time.


best regards,
Timo

Re: Saving a modified model ingame as mdl [Re: TechMuc] #387052
11/13/11 19:57
11/13/11 19:57
Joined: Jul 2008
Posts: 894
T
TechMuc Offline
User
TechMuc  Offline
User
T

Joined: Jul 2008
Posts: 894
@Sajeth: Please send me a pm if you still need this functionality (resaving hmp). I'm afraid i just do not have the time to do this for free right know, but if you're willing to spend some bucks, i'm pretty sure i can help you out wink

regards,
Timo

Re: Saving a modified model ingame as mdl [Re: TechMuc] #387058
11/13/11 20:45
11/13/11 20:45
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline OP
Senior Expert
Pappenheimer  Offline OP
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Your efforts are very much appreciated! laugh
I tried "SaveModelToFileFile(ENTITY* ent,void* loader,STRING* new_fl);", because I want to save a modified model under a different name, but it doesn't work, error message 'empty prototype'.
EDIT: In case this is a dump question or request, don't be shy, tell me my fault! blush

Last edited by Pappenheimer; 11/13/11 21:03.
Re: Saving a modified model ingame as mdl [Re: Pappenheimer] #387064
11/13/11 21:49
11/13/11 21:49
Joined: Jul 2008
Posts: 894
T
TechMuc Offline
User
TechMuc  Offline
User
T

Joined: Jul 2008
Posts: 894
New Header. Please redownload.

Code:
void* LoadModel(ENTITY* ent);
void* LoadModelFromFile(STRING* str);
BOOL  FreeLoader(void* ld);

BOOL SaveModel(ENTITY* ent);
BOOL SaveModelToFile(ENTITY* ent,STRING* str);
BOOL SaveModelWithLoader(ENTITY* ent,void* loader);
BOOL SaveModelWithLoaderToFile(ENTITY* ent,void* loader,STRING* new_fl);



Re: Saving a modified model ingame as mdl [Re: TechMuc] #387081
11/14/11 02:52
11/14/11 02:52
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
God-damn typos.... They'll be the death of us awll. wink


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Page 3 of 4 1 2 3 4

Moderated by  aztec, Spirit 

Gamestudio download | 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