Author Topic: Help me port Quake 4 assets to Doom 3  (Read 544 times)

0 Members and 1 Guest are viewing this topic.

EoceneMiacid

  • Jr. Member
  • **
  • Posts: 74
  • Karma: +4/-15
  • Doom Newbie
    • View Profile
Help me port Quake 4 assets to Doom 3
« on: June 01, 2016, 11:33:28 AM »
Hi,

I've spent the last couple of days working on a Quake 4 mod for Doom 3.

My primary goal is to get the character models and weapons up and running. The secondary goal is to have the mod import these assets directly from /q4base, so it won't piss Raven off, and can be distributed.

It certainly has been educational thus far, but it isn't as straightforward as I hoped.
The main problem is that the file structure is slightly different. For example, Doom 3 requires weapon scripts, but Quake 4 doesn't have them - it has this functionality hardcoded in the library instead (which, apparently, is officially recommended by Carmack, for performance reasons).

So, I'm forced to use those from Doom 3. In some cases, this appears to work - I mean, parameters aside, the d3 and q4 shotgun work the same.

It's still a bit early to show screenshots and such, but I already have all the weapons defined, and I can spawn them in-game. Some of the world models are correctly textured and everything, and I can even pick them up, and see a (mangled and untextured) view model of the gun, with animations.

I've put that aside for now, and I would like to focus on the basics first, which is crafting a fully functional main script and player model definition.

So I've been tweaking player.def, fixing the numerous errors that pop up in the console.

However, this one has me stumped:

ERROR: Joint '' not found for 'head_joint' on 'player1' which appears after loading a map.

Here's the player definition from quake 4:

Code: [Select]
entityDef player_doommarine
{
    "spawnclass"                "idPlayer"
    "hud"                       "guis/hud.gui"
    "mphud"                     "guis/mphud.gui" // mphud is overlayed on hud in multiplayer
    "cursor"                    "guis/cursor.gui"
    "cinematicHud"              "guis/cinematic.gui"
    "wristcomm"                 "guis/wristcomm.gui"
    "blink_min"                 "0.5"
    "blink_max"                 "4.8"
    "bleed"                     "1"
    "gib"                       "1"
    "joint_head"                "chest"
    "joint_hips"                "hips"
    "joint_chest"               "chest"
    "joint_eyeOffset"           ""
    "joint_chestOffset"         "chest"
    "model"                     "model_player_marine"
    "articulatedFigure"         "player"
    "ragdoll"                   "player"
    "def_head"                  "char_marinehead_kane2"

I've got both the marine and head models in their respective locations, but the problem remains.

Can anybody help?

Cheers!








The Happy Friar

  • Happy Happy Joy Joy
  • Administrator
  • Hero Member
  • *****
  • Posts: 866
  • Karma: +42/-4
  • Semi-Newbie.
    • View Profile
    • EarthQuake
Re: Help me port Quake 4 assets to Doom 3
« Reply #1 on: June 01, 2016, 11:59:23 AM »
It says it's looking for "head_joint" but the Q4 model has "joint_head."  I'm guessing that's it.

EoceneMiacid

  • Jr. Member
  • **
  • Posts: 74
  • Karma: +4/-15
  • Doom Newbie
    • View Profile
Re: Help me port Quake 4 assets to Doom 3
« Reply #2 on: June 01, 2016, 01:22:31 PM »
You're right. D'oh. It simply didn't occur to me to try renaming it.

Okay, after fixing a couple more errors, I'm stuck on this one:
ERROR: Missing 'AI_FORWARD' field in script object 'object'

This is defined in doom3's ai_base.script, which is loaded in doom_main.script.

Code: [Select]
#include "script/ai_base.script"
I copied the original doom 3 script to make sure, but it doesn't work.

motorsep

  • Hero Member
  • *****
  • Posts: 972
  • Karma: +74/-128
  • Artist
    • View Profile
    • Kot in Action Creative Artel
Re: Help me port Quake 4 assets to Doom 3
« Reply #3 on: June 01, 2016, 01:41:31 PM »
You are going to have to create new def/script files for Quake 4 models from scratch, because Doom 3 and Quake 4 have somewhat different engines and Quake 4 defs are not compatible with Doom 3 game code.

EoceneMiacid

  • Jr. Member
  • **
  • Posts: 74
  • Karma: +4/-15
  • Doom Newbie
    • View Profile
Re: Help me port Quake 4 assets to Doom 3
« Reply #4 on: June 01, 2016, 05:45:35 PM »
You are going to have to create new def/script files for Quake 4 models from scratch, because Doom 3 and Quake 4 have somewhat different engines and Quake 4 defs are not compatible with Doom 3 game code.

It's definitely an ambitious project to pick as my starter project, but it's feasible.

I've already created some of the weapon scripts, copying and modifying those from Doom 3, but the guns don't work yet. Maybe I could use existing Doom character scripts and adapt them to use the Quake 4 resources too?

So any idea how to resolve this particular error?
« Last Edit: June 01, 2016, 05:50:26 PM by EoceneMiacid »