View Full Version : Source code modification
primus1236
October 4th, 2004, 01:41 PM
I'm wondering if there's a tutorial on doomsday source modding. First of all I'm trying to add actions, but I think I'll be looking to do other things in the future. If anyone know's how to add actions that'd be very helpfull, but a full tutorial would help more.
Also, does anyone know a good skybox rescource? I really like the jDEP, but I need a desert like skybox for a mod that I will hopefully actually finish this time *bliss* .
If I do actually finish this modding of the source this should be helpfull to modders, I hope to add actions with a greater ammount of options for damage, so you could have a pistol action but instead of A_FirePistol (Think that's it) You could have A_FirePistol_10 as in power 10. Is this doable? if so it would certianly help my in my quest to actually make this mod, and I think it may be the solution to xerxes' sniper *grin* .
I've looked through the source, but as of now I've seen things that look like the way to do it, but I can't fully figure it out. I'm beginning to feel a bit like this *plop* . If anyone could help that would be greatly appreciated. :)
Sycraft
October 4th, 2004, 01:53 PM
Well, ummmmm, editing source code is just hard. Kinda how it goes. Not easy to modify the internal workings of a program and you really need to be a programmer.
sLydE
October 4th, 2004, 02:05 PM
well, the source itself isn't too bad, but compiling it is. i've been working for a week or so now trying to compile it in a windows xp + vs.net environment with no luck.
lord-noctrun
October 4th, 2004, 02:16 PM
I've looked through the source, but as of now I've seen things that look like the way to do it, but I can't fully figure it out. I'm beginning to feel a bit like this *plop* . If anyone could help that would be greatly appreciated. :)
do you know any c or c++?
well, the source itself isn't too bad, but compiling it is. i've been working for a week or so now trying to compile it in a windows xp + vs.net environment with no luck.
compiling is not at all hard, under linux that is I have seen so much problems (not with doomsday though) with both visual studio and devcpp that won't even try compiling anything on windows, the hardest part is that you'll have understand how the programm works (and being a able to read and understand the source code and the programming language are requirements for that)
draconx
October 4th, 2004, 02:17 PM
Yeah i havent gotten it to compile on windows either. Works great on linux though :)
However the configure script wasnt working right a while back, it didnt properly check for a bunch of needed libraries, but i havent compiled it lately so that might have been fixed.
primus1236
October 4th, 2004, 02:28 PM
Yes, I know C\C++. I too have had problems compiling on windows. I plan to try this on linux first. I think recall xerxes saying that he would probably be able to compile the source if I got it to a state at which it looked like it would work. If you didn't say that, or can't, then I also recall someone on the forums saying that they were able to compile it, so if they could help me out, that'd be nice too.
I've looked through the source and gotten an idea about how this game works. I'd just like to have a tutorial to help me work with this better. If a tutorial doesn't exist, mabye I could create one. I remember several times on the forums, people saying that they wanted, or thought they needed to modify the source to make something they wanted to work.
In many places the comments in the source are very helpfull, and allow me to understand fully what's going on, but on other parts, like the action, I'm still lost. :(
Again, if anyone could help, i'd be very thankfull. :)
EDIT: What IDE did Jaakko use to make jDoom on windows?
DaniJ
October 4th, 2004, 02:45 PM
I really doubt you'll find any tutorials on how to edit the Doomsday source, as Skyjake does all the work himself.
From what I've read of the source so far the engine is far better laid out and easier to follow than the dlls (blame ID and Raven for that :)).
It totally depends on what you want to do with the actions, what had you in mind?
primus1236
October 4th, 2004, 02:57 PM
Being able to copy/modify actions so I could have different ammounts of power for hitscan weapons. Instead of A_FireCGun It could be A_FireCGun_D for default, or A_FireCGun_20 for default +20. I got the idea from xerxes sniper, but I think this could be helpfull in other mods as well.
Also, if I actually get this all to work, would anyone want a source modding tutorial based on what I accomplished? It probably wouldn't be much, but perhaps it could go on the wiki and pepole could add as they tried different things?
draconx
October 4th, 2004, 02:58 PM
What IDE did Jaakko use to make jDoom on windows?Judging by the presence of a ".vcproj" file and the other stuff i've read here, I'd say he used VS.net
Jimi
October 4th, 2004, 09:38 PM
If you just want add a new action, first make the action(s) into p_pspr.c or p_enemy.c, then add the new action(s) into AcFnLink.c and AcFnLink.h in the same way as the other actions are there(Does not have to be in alphabetical order). Skyjake had written somekind of tutorial to Doomsday source modificating, but I don't know where to get it and I think it wasn't the kind of tutorial you're looking into...
primus1236
October 5th, 2004, 01:50 PM
I see a lot of actions there, but I don't see anything like A_FireCGun, which is the type of thing I'm trying to modify/add to. In fact, I just did a grep on the entire dir, and it can't find it in any file. Am I just supposed to add the action anyway? And if I am, where is A_FireCGun defined anyway?
Slide
October 5th, 2004, 03:22 PM
If you want to compile Doomsday you'll need the source from Sourceforge, and several external libraries (most of which should be available on the fourwinds ftp server). Ideally you'll use Visual Studio 2002/2003 (or even 2005 beta 1) but you should be able to use the free, fully featured Visual C++ 2003 Compilier from microsoft:here (http://msdn.microsoft.com/visualc/vctoolkit2003/).
I haven't tried recompiling the new 1.8 branch so I'm not sure exactly what libraries are still needed, but I imagine in addition to the one's on the FourWinds you will still need the DirectX SDK.
I'd recommend playing with some tutorials on C though first - the Doom sourcecode ain't your modern friendly object oriented C#/Java friendly code.
primus1236
October 5th, 2004, 03:26 PM
Thanks for the link slide. This should help a lot.
I have gone through quite a few C tutorials, I've learned how to say hello world about 20 different ways :-P
primus1236
October 8th, 2004, 03:01 PM
Jimi, I don't see some of the already defined actions in the code, like A_FireCGun, is something wrong?
Jimi
October 8th, 2004, 04:49 PM
That A_FireCGun should exist in p_pspr.c, AcFnLink.c and AcFnLink.h. If not, someone must have erased them from the files and if that's happend, then chaingun shouldn't fire anything.
primus1236
October 8th, 2004, 08:38 PM
Hmm, strangest thing, apperantly the source i was looking at was not the full source, I re-downloaded it and now I see it there. Thanks for everything so far, I can only hope this works. *grin*
EDIT: Visual C++ uses a command line, not that visual :p
EDIT AGAIN: Ignore the edit above. It appears that the link you gave me was just the vc++ compiler, it can't read the project files :(, do you have a link to the VC++ IDE? Or do I have to buy that? Perhaps I could make this mod for linux first and someone could help me port it over? I've had much more success on *nix. I do, finally see the functions I need to edit and how it needs to be done, if only I could actually get it to comile. . . *grin*
primus1236
October 12th, 2004, 03:01 PM
Please? Can anyone help me? The link doesn't give me something to work with project files. Does anyone know where I can find something to compile this on windows? or mabye find me VC++ for cheap, as in very very cheap?
sLydE
October 13th, 2004, 07:10 AM
if you or someone you know is a college student, you can probably get ahold (legally) of a copy for $10-$20 of vs.net.
primus1236
October 15th, 2004, 08:52 PM
Is there any way to export the VC++ project file to say a makefile? If so, could someone do that for me? :o I can't get this without it and currently, my linux box won't work at all because the proccessor's fried. *bawl*
vBulletin® v3.8.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.