Jump to content
The Dark Mod Forums

Doom 3 modding


General_101

Recommended Posts

I know this forum is for The Dark Mod but this seems to be the only place with an active technical side to Id Tech 4 so I'm kinda not sure where else to look.

 

So I've been trying to compile the Doom 3 source code to make some edits to some game mechanics in Resurrection of Evil. Thing is though I keep running into issues with errors in Visual Studio and I'm not exactly sure on how to solve them. I've been following this guide in order to compile the Doom 3 source code but I get issues with DoomDLL, MayaImport, and Game-D3XP.

 

https://www.katsbits.com/smforum/index.php?topic=896.0

 

MayaImport doesn't matter as the issue for it seems to be that I don't have Maya to begin with and I'm assuming isn't needed for me to compile anyways. DoomDLL fails however with errors about Win_input.cpp with errors about things being in a constat and identifiers. Game-D3XP fails due to a problem with the script_compiler.cpp with it complaining about constant char as well.

 

I can get Game-D3XP to compile if I replace the script_compiler.cpp with the one from Game and it seems to work fine. While I managed to compile a DLL for Doom 3 and ROE they were much larger than the vanilla DLLs that come with the game. I know some things changed like something different about the shadows to avoid a problem with a patent but are they supposed to be almost twice as large? I removed the default DLLs from the game files and used my own which seemed to run fine which gets me on to the point.

 

The goal of this is essential to make some engine changes to allow the player to get ammo_souls like they did in Doom 3. I tried adding the Soul Cube and changing the Artifact to use ammo_souls so that it would be usable in custom maps that don't have the Artifact charge pickups. Killing enemies won't get you souls in ROE even if you have the Soul Cube in your inventory it seems and I've found this in the code.

/*
=============
idPlayer::AddAIKill
=============
*/
void idPlayer::AddAIKill( void ) {

#ifndef _D3XP

	int max_souls;
	int ammo_souls;

	if ( ( weapon_soulcube < 0 ) || ( inventory.weapons & ( 1 << weapon_soulcube ) ) == 0 ) {
		return;
	}

	assert( hud );


	ammo_souls = idWeapon::GetAmmoNumForName( "ammo_souls" );
	max_souls = inventory.MaxAmmoForAmmoClass( this, "ammo_souls" );
	if ( inventory.ammo[ ammo_souls ] < max_souls ) {
		inventory.ammo[ ammo_souls ]++;
		if ( inventory.ammo[ ammo_souls ] >= max_souls ) {
			hud->HandleNamedEvent( "soulCubeReady" );
			StartSound( "snd_soulcube_ready", SND_CHANNEL_ANY, 0, false, NULL );
		}
	}
#endif
}

From what I've been told the #ifndef _D3XP skips the code if D3XP is defined somewhere but I'm not a code expert and this is just my guess from reading what the statement might mean online.

 

The other problem after this is that I want to use Sikkmod on top of these changes with my Doom 3 mod list. While Sikkpin released the source to his mod I'm not 100% on how to use it. I assuming you just plant it on top of the vanilla Doom 3 source code and compile it that way but doing that gives me issues with player.obj and calling external objects.

 

Error 1015 error LNK2019: unresolved external symbol "public: __thiscall idGrabEntity::idGrabEntity(void)" (??0idGrabEntity@@QAE@XZ) referenced in function "public: __thiscall idPlayer::idPlayer(void)" (??0idPlayer@@QAE@XZ) C:\Users\The_OId_AI\Downloads\doom3.gpl-master - Copy\neo\Player.obj
Really, all I want help with is compiling it all properly so that I can look into what I need for the Soul Cube and the Artifact.
TL;DR
1. Is the guide I'm following correct? Are there any extra steps I need to take that the guide may not have mentioned due to maybe the author thinking it was obvious?
2. Is the compiled DLL supposed to be about twice as large as the vanilla counterpart? If not what exactly should I do to make sure it is?
3. How can I resolve the issues I am having with Sikkmod 1.1 ROE edition source? What steps do I need to take in order to compile it.
4. Is it a bad idea to do what I am doing with script_compiler and D3XP? Is there something I should look into for a proper solution?
More info here but I think I covered everything here.
If there is anything I'm missing that you need ask and I'll see if I can give you an answer.

https://www.katsbits.com/smforum/index.php?topic=896.0

Link to comment
Share on other sites

That's a lot to unpack.

 

To start, any Game SDK code used to make Doom 3 DLL mods prior to the GPL release is probably going

to run into problems because the GPL code diverges from Doom 3 (v1.3.1).

 

Best if you diff the mod you are trying to integrate with the vanilla SDK code then identify the changes and translate

to the Game folder code in the GPL source.

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

I didn't even know the SDK was a thing. I downloaded the SDK and now it compiles fine without needed to do any weird file swaps. While that fixes the vanilla compile process I still get the same error when trying to compile Game-D3XP with the Sikkmod source code on top. There is also still that file size difference between the vanilla DLL and the compiled DLL so I'm going to assume at this point that it's normal.

 

3>Player.obj : error LNK2019: unresolved external symbol "public: void __thiscall idGrabEntity::Update(class idPlayer *)" (?Update@idGrabEntity@@QAEXPAVidPlayer@@@Z) referenced in function "private: void __thiscall idPlayer::UpdateWeapon(void)" (?UpdateWeapon@idPlayer@@AAEXXZ)
3>Player.obj : error LNK2019: unresolved external symbol "public: void __thiscall idGrabEntity::Clear(void)" (?Clear@idGrabEntity@@QAEXXZ) referenced in function "public: void __thiscall idPlayer::Restore(class idRestoreGame *)" (?Restore@idPlayer@@QAEXPAVidRestoreGame@@@Z)
3>Player.obj : error LNK2019: unresolved external symbol "public: void __thiscall idGrabEntity::StartDrag(class idPlayer *,class idEntity *,int)" (?StartDrag@idGrabEntity@@QAEXPAVidPlayer@@PAVidEntity@@H@Z) referenced in function "public: void __thiscall idPlayer::PerformImpulse(int)" (?PerformImpulse@idPlayer@@QAEXH@Z)
3>Player.obj : error LNK2019: unresolved external symbol "public: void __thiscall idGrabEntity::StopDrag(class idPlayer *,bool)" (?StopDrag@idGrabEntity@@QAEXPAVidPlayer@@_N@Z) referenced in function "public: void __thiscall idPlayer::PerformImpulse(int)" (?PerformImpulse@idPlayer@@QAEXH@Z)
3>Player.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall idGrabEntity::~idGrabEntity(void)" (??1idGrabEntity@@UAE@XZ) referenced in function __unwindfunclet$??0idPlayer@@QAE@XZ$0
3>Player.obj : error LNK2019: unresolved external symbol "public: __thiscall idGrabEntity::idGrabEntity(void)" (??0idGrabEntity@@QAE@XZ) referenced in function "public: __thiscall idPlayer::idPlayer(void)" (??0idPlayer@@QAE@XZ)
3>../build/windows/release/d3xp/gamex86.dll : fatal error LNK1120: 6 unresolved externals

Error I get if anyone doesn't mind explaining this to the layman. For full understanding I'm just grabbing Sikkmod Roe 1.1 src and placing those files into the Doom 3 1.3.1 SDK D3XP folder and hitting compile.
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 1 reply
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
×
×
  • Create New...