Gamestudio Links
Zorro Links
Newest Posts
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
Data from CSV not parsed correctly
by EternallyCurious. 04/25/24 10:20
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 715 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Predefined Materials - Salvaging and converting an old project #415107
01/13/13 21:57
01/13/13 21:57
Joined: Jan 2013
Posts: 63
Loremaster Offline OP
Junior Member
Loremaster  Offline OP
Junior Member

Joined: Jan 2013
Posts: 63
Hello everybody,

I try to recover an old 5000-Lines-Plus project from 2003 in A6 / C-Script. In the end I want to convert to Lite-C, but before, I have to bridge the C-Script-Gap between A6 and A8. So far I was able to remove every error, but now I ran into a wall.

A6 knew "predefined materials", as described here:

Quote:
At the moment there are 9 predefined materials that are automatically assigned to entities dependent on their type and flags, unless the entity has an own material. You can change the overall lighting of a level by adjusting the properties of those materials:

mat_flat for flat map surfaces
mat_shaded for shaded map surfaces
mat_terrain for terrain entities
mat_model for model entities
mat_sprite for sprite entities
mat_particle for particles (not yet used)
mat_sky for dome or scene sprites (not yet used)
mat_metal for any entity with metal flag set
mat_unlit for any entity with unlit flag set
mat_shadow for defining stencil shadow transparency and diffuse color


Unfortunately, though A7 as the step in between showed no problems with that (I tested it with the A7 version available on Conitec), A8 gets the hickups. This code appears to be faulty now:

Code:
if (mca_matnummer == 4) 
{
	str_cpy(mca_MatNameStr, "mat_model");
	mca_Object.material = mat_model;
	mca_Material = mat_model;
}



It results in

Quote:
matcal.wdl 359:0 () Parameter unknown mat_model


So these predefined materials are no longer supported? How can I fix that in C-Script?

Re: Predefined Materials - Salvaging and converting an old project [Re: Loremaster] #415108
01/13/13 22:06
01/13/13 22:06
Joined: Jul 2004
Posts: 785
Serbia
Iglarion Offline
User
Iglarion  Offline
User

Joined: Jul 2004
Posts: 785
Serbia
try with mtl_model


IGRAVISION Page - www.igravision.com
RPG project - The Battle For Forgol 92.75%
Re: Predefined Materials - Salvaging and converting an old project [Re: Iglarion] #415111
01/13/13 22:19
01/13/13 22:19
Joined: Jan 2013
Posts: 63
Loremaster Offline OP
Junior Member
Loremaster  Offline OP
Junior Member

Joined: Jan 2013
Posts: 63
Wonderful. Thank you very much.

Re: Predefined Materials - Salvaging and converting an old project [Re: Loremaster] #442930
07/06/14 02:20
07/06/14 02:20
Joined: Jun 2014
Posts: 97
Lagos, Nigeria
T
tolu619 Offline
Junior Member
tolu619  Offline
Junior Member
T

Joined: Jun 2014
Posts: 97
Lagos, Nigeria
I don't get it. Doesn't mtl_model affect ALL models?
This line of code is taken straight out of the manual yet it doesn't work.
Code:
#include <mtlFX.c>
...
action toon_warrior()
{
  my.skill41 = floatv(50);  // Shadow
  my.skill42 = floatv(50);  // Edgewidth
  my.skill43 = floatv(50);  // Threshold
  my.skill44 = floatv(50);  // Smooth
  my.material = mtl_toon;
  ...
}


After I updated my gamestudio to version 8.10.3, I had to comment out all such lines because while the game still runs, the moment it tries to create any entity that has any material assignment within its code, I get an Error E1520 that says "Structs inconsistent - MATERIAL".

Re: Predefined Materials - Salvaging and converting an old project [Re: tolu619] #442934
07/06/14 08:16
07/06/14 08:16
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
1) Did you change any file from the include folder?
2) Do you have a copy of any file from the include folder in your game folder?
3) Have you tried a clean second GStudio install in some other folder? If you do so make sure to use the correct SED instance for your test runs.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Predefined Materials - Salvaging and converting an old project [Re: Superku] #442937
07/06/14 12:35
07/06/14 12:35
Joined: Jun 2014
Posts: 97
Lagos, Nigeria
T
tolu619 Offline
Junior Member
tolu619  Offline
Junior Member
T

Joined: Jun 2014
Posts: 97
Lagos, Nigeria
In other words, my code is ok, so the problem must be from my installation and/or file paths?

Re: Predefined Materials - Salvaging and converting an old project [Re: tolu619] #443153
07/10/14 09:11
07/10/14 09:11
Joined: Jun 2014
Posts: 97
Lagos, Nigeria
T
tolu619 Offline
Junior Member
tolu619  Offline
Junior Member
T

Joined: Jun 2014
Posts: 97
Lagos, Nigeria
Found it! The include folder was ok, but I had to copy the files from the include folder into my project folder and overwrite the old files. So the code I posted earlier is working perfectly

Re: Predefined Materials - Salvaging and converting an old project [Re: tolu619] #443155
07/10/14 09:26
07/10/14 09:26
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
The files from the include folder should never be copied (or modified) to your own folder (-> 2) ).


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Predefined Materials - Salvaging and converting an old project [Re: Superku] #443502
07/17/14 18:37
07/17/14 18:37
Joined: Jun 2014
Posts: 97
Lagos, Nigeria
T
tolu619 Offline
Junior Member
tolu619  Offline
Junior Member
T

Joined: Jun 2014
Posts: 97
Lagos, Nigeria
Originally Posted By: Superku
The files from the include folder should never be copied (or modified) to your own folder (-> 2) ).

Really? So what am I supposed to do? If I delete all the include files from my game's folder, will the game use the files as they are in the include folder?

Re: Predefined Materials - Salvaging and converting an old project [Re: tolu619] #443505
07/17/14 19:11
07/17/14 19:11
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Sure, see here (esp. the <..> remark): http://www.conitec.net/beta/include.htm


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends

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