Error adding a 3d model
#1 Posted 26 September 2020 - 08:33 AM
I'm trying to add some models to the game and I am running into an error.
So I created duke3d.def and put the following into it
// sandbagwall (752)
model "MODELS/sandbagwall2.md3" {
scale 1 shade 0
skin { pal 0 file "MODELS/sandbags.png" }
frame { name "frame_1" tile 752 }
but when I try to run the game I get an error in the logs
duke3d.def:4: error: parameter `model' is undefined.
duke3d.def:4: error: parameter `' is undefined.
duke3d.def:4: error: parameter `MODELS/sandbagwall2.md3' is undefined.
duke3d.def:4: error: expected a keyword but found `'.
I'm sure it's just me being dumb, but I tried to follow the instructions on the wiki and I'm kinda stuck
Any help is greatly appreciated.
#2 Posted 26 September 2020 - 09:26 AM
Are you using a double quote ( " ) or two single quotes ( 2x ' ). The first one would be the right way.
#3 Posted 26 September 2020 - 09:44 AM
blizzart, on 26 September 2020 - 09:26 AM, said:
Are you using a double quote ( " ) or two single quotes ( 2x ' ). The first one would be the right way.
I'm using the double quote.
I've got it to the point now where the only error is
duke3d.def:2: error: expected a keyword but found `model'.
#4 Posted 26 September 2020 - 12:05 PM
This post has been edited by NightFright: 26 September 2020 - 12:05 PM
#5 Posted 26 September 2020 - 12:45 PM
#6 Posted 26 September 2020 - 04:24 PM
Mark, on 26 September 2020 - 12:45 PM, said:
Yeah that was dumb of me, I don't know how I missed that. I fixed it and still no joy strangely enough.
I noticed with the current version of eduke it pulls the GRP from my steam version of the game rather then my old original copy, and I'm unable to get it to pick up the old GRP. Not sure if that is causing any issue.
Edit
OK so it def has something to do with the GRP file, I threw the code and folder into my ww2gi folder from steam and it doesn't throw me that error, now I'm just gettin
Invalid frame name on line ww2gi.def:7
Removing model 0 due to errors.
The frame line still being "frame { name "frame_1" tile 752 }"
Thanks again!
This post has been edited by 11bush: 26 September 2020 - 04:40 PM
#7 Posted 26 September 2020 - 07:09 PM
I've got the code as follows;
dummytile 3999 20 100
model "MODELS/beerbottle.md3"
{
scale 1 shade 0
skin { pal 0 file "MODELS/beerbottletext.png" }
frame { name "FRAME1" tile 3999 }
}
and I have all my files in the correct places, it doesn't throw any errors at me. I even downloaded an MD3 viewer to ensure that my model was ok, but still can't get it working.
This post has been edited by 11bush: 26 September 2020 - 07:11 PM
#8 Posted 26 September 2020 - 11:09 PM
#9 Posted 26 September 2020 - 11:16 PM
Based on your code snippet this is how mine looks
model "MODELS/beerbottle.md3" { scale 1 shade 0 skin { pal 0 file "MODELS/beerbottletext.png" } frame { name "frame1" tile 3999 flags 0 } }
I'm not sure how essential the "flags 0" command is. Coding isn't my strong hand.
#10 Posted 26 September 2020 - 11:48 PM
#11 Posted 27 September 2020 - 04:27 AM
Its worth a try.
#12 Posted 27 September 2020 - 05:04 AM
Or post the md3 file here.
This post has been edited by Tea Monster: 27 September 2020 - 05:08 AM
#13 Posted 27 September 2020 - 05:37 AM
I have a zip file with my bit of code as well as the file and texture.
Thanks again.
Attached File(s)
-
bottle.7z (256.61K)
Number of downloads: 159
#14 Posted 27 September 2020 - 07:34 AM
// beerbottle (3999) this is a comment model "MODELS/beerbottle.md3" { scale 1 shade 0 skin { pal 0 file "MODELS/beerbottletext.png" } frame { name "frame1" tile 3999 } }
Check that the folder for models is actually in uppercase ('MODELS', instead of 'models').
This post has been edited by Tea Monster: 27 September 2020 - 07:36 AM
#15 Posted 27 September 2020 - 08:54 AM
The origin point of your model is in the center of the model, it has to be at the base.
This post has been edited by Tea Monster: 27 September 2020 - 08:59 AM
#16 Posted 27 September 2020 - 09:28 AM
Tea Monster, on 27 September 2020 - 08:54 AM, said:
The origin point of your model is in the center of the model, it has to be at the base.
Thanks for the help, I still cant get it to work for some reason, if I attempt to use it in my duke folder I still get "duke3d.def:2: error: expected a keyword but found `model'."
And when I try to use it in WW2GI just for the sake of it, it doesn't throw and error it just doesn't work. I don't know what the hell I'm doing wrong here, It's set to polymer with 3d models enabled.
*Edit
Oh my God, I actually got it working, I moved the origin point and then I deleted the caches again and it worked!
Thanks a lot for all the help!
This post has been edited by 11bush: 27 September 2020 - 09:45 AM
#17 Posted 27 September 2020 - 10:16 AM
This post has been edited by Mark: 27 September 2020 - 10:16 AM
#18 Posted 27 September 2020 - 10:23 AM
Mark, on 27 September 2020 - 10:16 AM, said:
Haha, 50/50
thanks again!
#20 Posted 27 September 2020 - 11:54 AM
Also is there anything i need to do to get it to show up in mapster?
OK so it was 2 questions
#21 Posted 27 September 2020 - 07:16 PM
This post has been edited by Mark: 27 September 2020 - 07:18 PM