How to start with modding?

Discussions about modding, questions, mod requests or just show off what you're working on.
Post Reply
dziablo
Posts: 7
Joined: 23 Mar 2015, 23:22

How to start with modding?

Post by dziablo »

Hello, i want to start modding (1.04version),
Is there jk2 source code prepared for modding? That compiles on newer visual studio and maybe with cleaned code?
If not, then what source is the best to start with? :idea:
User avatar
ouned
Administrator
Posts: 596
Joined: 23 Feb 2015, 13:03
Location: Gliese581c

Re: How to start with modding?

Post by ouned »

The source you need:
http://mrwonko.de/jk3files/Jedi%20Outca ... hers/2888/

However, it's not cleaned and has project files for visual studio 2003 or something similar.
(You can convert them and with some minor exceptions it will work)

Daggolin is working on what you are asking for.
User avatar
Daggolin
Administrator
Posts: 794
Joined: 23 Feb 2015, 13:05

Re: How to start with modding?

Post by Daggolin »

ouned wrote:Daggolin is working on what you are asking for.
That's going to be part for the mvsdk. The mods you built based on that cleaned up source code are going to work in 1.02, 1.03 and 1.04. At the moment I have working game/cgame/ui modules and the gameplay of each version seems to work just fine. However things need to be properly tested and the code needs cleanup. I am currently working on a local repository, because I keep changing lots of things, renaming files, functions, etc. Once it's in a cleaned up and stable state I am going to commit the code into a public repository.
User avatar
Valar
Posts: 67
Joined: 16 Aug 2015, 18:17
Location: Loading, please wait..

Re: How to start with modding?

Post by Valar »

Daggolin wrote: That's going to be part for the mvsdk. The mods you built based on that cleaned up source code are going to work in 1.02, 1.03 and 1.04.
That's epic!
Kevin
Administrator
Posts: 393
Joined: 07 Jun 2015, 08:36

Re: How to start with modding?

Post by Kevin »

Daggolin wrote:
ouned wrote:Daggolin is working on what you are asking for.
That's going to be part for the mvsdk. The mods you built based on that cleaned up source code are going to work in 1.02, 1.03 and 1.04.
Once I am done with the 1.04 version of my mod, I am most likely going to "port" it to the mvsdk (Possible going to end up rewriting some stuff as I port it over), rather than porting it to both the 1.03 and 1.02 sources :D It will take less time and be a more clean base at the same time :3 :D
dziablo
Posts: 7
Joined: 23 Mar 2015, 23:22

Re: How to start with modding?

Post by dziablo »

Awesome news Daggolin, can't wait! :D , but for now i'm trying to run buildvms.bat and it fails
http://pastebin.com/YDUafH9T
any ideas? I'm on windows 10 and i tried it on other computer with windows 8.1 and it works
User avatar
ouned
Administrator
Posts: 596
Joined: 23 Feb 2015, 13:03
Location: Gliese581c

Re: How to start with modding?

Post by ouned »

are you running this from git shell?
looks weird
dziablo
Posts: 7
Joined: 23 Mar 2015, 23:22

Re: How to start with modding?

Post by dziablo »

i'm using cmder: http://cmder.net/, but i also tried to compile using windows shell (cmd.exe), same errors :(
User avatar
ouned
Administrator
Posts: 596
Joined: 23 Feb 2015, 13:03
Location: Gliese581c

Re: How to start with modding?

Post by ouned »

these errors look like its not processed by q3lcc (the qvm compiler)
I can't remember it being so smart. These errors almost look like clang
User avatar
fau
Staff
Posts: 433
Joined: 16 Aug 2015, 01:01
Location: Warsaw / Poland
Contact:

Re: How to start with modding?

Post by fau »

More like GCC:

Code: Select all

$ gcc -DWIN32 -D__LCC__ g_main.c
In file included from g_local.h:5:0,
                 from g_main.c:4:
q_shared.h:782:0: warning: "ID_INLINE" redefined
 #define ID_INLINE static
 ^
Looks like some environmental variable madness or batch file doesn't get interpreted properly on win10.
User avatar
Boothand
Administrator
Posts: 986
Joined: 24 Feb 2015, 08:21
Contact:

Re: How to start with modding?

Post by Boothand »

I have compiled on Windows 10 without any issues, just for the record.
User avatar
Daggolin
Administrator
Posts: 794
Joined: 23 Feb 2015, 13:05

Re: How to start with modding?

Post by Daggolin »

Boothand wrote:I have compiled on Windows 10 without any issues, just for the record.
With old an new lcc versions as I recall?
User avatar
Boothand
Administrator
Posts: 986
Joined: 24 Feb 2015, 08:21
Contact:

Re: How to start with modding?

Post by Boothand »

Daggolin wrote:With old an new lcc versions as I recall?
Yep!
User avatar
Tr!Force
Posts: 433
Joined: 26 Feb 2015, 12:25
Location: Chile
Contact:

Re: How to start with modding?

Post by Tr!Force »

Dude, this will help u, i fixed the .bat files to work properly with any the source code.

ive read u need the 1.04 one. so i just attached the 1.04 one.

the zip contains: (u need follow the structure)
  • bin (contains cpp.exe, lcc.exe, q3asm.exe and rcc.exe)
  • CODE-mp (this is where game, cgame and ui and the rest of the stuff is)
  • - game - game_2.bat (this is to compile the server-side part)
  • - cgame - cgame_2.bat (this is to compile the client-side part)
  • - uigame - ui_2.bat (this is to compile the user-interface part)
The final QVM's will save in the VM folder (CODE-mp -> base -> vm)

I hope this will help you. tell me if works fine :)

PD: This is only for the 1.04 source code, if u want it for 1.02 or 1.03 just PM me
PD2: idk what source code u have, but if urs have an "jk2mp.dsw u will need visual c++ 2003 or 2008, so, if u have with jk2mp.sln u will need 2010 or highter... i recommend u to work with these project files, because inside they have everything linked (game,cgame,ui,etc...)

In my opinion, if u want start to modding jk2 u should start with:
  • the first thing! go to g_local.h and change the "base" in GAMEVERSION to your mod name, u will see in the server info (server list in-game)
  • change, increase or decrease values like weapon ammo speeds, force power distance or duration, etc...
  • look how cvars, commands and server commands are made
  • look how entire functions works and how they are called to work
  • use the search tool (ctrl + F i think) to look for every what u want, u can search in the curren document or in the entire solution
  • use right click over functions and variables to find theirs references, where they are called, declarations, etc...
Remember, all g_XXX are from server-side, cg_XXX from client-side and ui_XXX from user-interface
.h files are "headers", thats means there are the main functions relations, declarations and definitions...
.c are "codes", where the functionallity is applied.

EDIT; oh i forgot to say, u need create the mod folder into gamedata -> mymod and place the .qvm u generated into a vm folder inside "mymod" (gamedata -> mymod -> vm).

thats all. tried to say everything in the most basic words for your understanding :D
Attachments
jk2104code.zip
(358.29 KiB) Downloaded 1282 times
Image
"The dark side? I've been there. Do your worst." - Kyle Katarn
  • JK2 & JK3 Code-Mod Developer
  • Jedi Knight Plus Mod Project: Click Here
  • E-Mail: triforce@gznetwork.com
  • Discord: TriForce#8785
User avatar
Daggolin
Administrator
Posts: 794
Joined: 23 Feb 2015, 13:05

Re: How to start with modding?

Post by Daggolin »

Triforce, some of your tips are quite nice, but if dziablo can wait a bit longer I would suggest to wait for the mvsdk. It's going to come with fixes an improvements for basejk, as well as the ability to use the resulting qvms in 1.02, 1.03 and 1.04.
User avatar
Tr!Force
Posts: 433
Joined: 26 Feb 2015, 12:25
Location: Chile
Contact:

Re: How to start with modding?

Post by Tr!Force »

Daggolin wrote:Triforce, some of your tips are quite nice, but if dziablo can wait a bit longer I would suggest to wait for the mvsdk. It's going to come with fixes an improvements for basejk, as well as the ability to use the resulting qvms in 1.02, 1.03 and 1.04.
of course, but he can do some test to start :D
anyways, im waiting for the mvsdk too, im not coding today, i stopped my jk2 project, i will continue it with mvsdk :P
Image
"The dark side? I've been there. Do your worst." - Kyle Katarn
  • JK2 & JK3 Code-Mod Developer
  • Jedi Knight Plus Mod Project: Click Here
  • E-Mail: triforce@gznetwork.com
  • Discord: TriForce#8785
dziablo
Posts: 7
Joined: 23 Mar 2015, 23:22

Re: How to start with modding?

Post by dziablo »

Thank You Tr!force for explaining everything! I'm using Ubuntu now and source compiles successfully via wine. I will be using mvsdk when it will be released, but for now i'll practise with old source. :)
User avatar
ouned
Administrator
Posts: 596
Joined: 23 Feb 2015, 13:03
Location: Gliese581c

Re: How to start with modding?

Post by ouned »

nice tutorial triforce.
If you have never programmed before, the best step would be to go though some basic C tutorials.
Saves you a lot of time compared to just trial and error how I learned it. :lol:
User avatar
Daggolin
Administrator
Posts: 794
Joined: 23 Feb 2015, 13:05

Re: How to start with modding?

Post by Daggolin »

ouned wrote:nice tutorial triforce.
If you have never programmed before, the best step would be to go though some basic C tutorials.
Saves you a lot of time compared to just trial and error how I learned it. :lol:
I agree. And a tutorial makes sense, as it is quite hard to get help if you don't know what a function is, what a variable is, ... (just like triforce said).
User avatar
fau
Staff
Posts: 433
Joined: 16 Aug 2015, 01:01
Location: Warsaw / Poland
Contact:

Re: How to start with modding?

Post by fau »

dziablo wrote:I'm using Ubuntu now and source compiles successfully via wine.
I wrote a Linux Makefile for my own distraction (and to practice writing makefiles). Shared Objects crash with jk2mv, haven't investigated why yet.
https://bpaste.net/show/30edbaf34057

Make's main goal is to update only necessary files when rebuilding your project. Also allows for parallel compilation with "-jX" option, where X is the number of concurrent threads.
User avatar
ouned
Administrator
Posts: 596
Joined: 23 Feb 2015, 13:03
Location: Gliese581c

Re: How to start with modding?

Post by ouned »

Shared Objects crash with jk2mv
does the same one work with the old jk2ded?
User avatar
Daggolin
Administrator
Posts: 794
Joined: 23 Feb 2015, 13:05

Re: How to start with modding?

Post by Daggolin »

When compiling qvms on Linux I usually use a linux version of lcc instead of wine. :|
User avatar
fau
Staff
Posts: 433
Joined: 16 Aug 2015, 01:01
Location: Warsaw / Poland
Contact:

Re: How to start with modding?

Post by fau »

Improved and fixed shared objects: https://bpaste.net/show/e326b9ee7910

edit: added instructions for native lcc and q3asm
Post Reply
Created by Matti from StylesFactory.pl and Warlords of Draenor (modified by jk2.info)
Powered by phpBB® Forum Software © phpBB Limited
 

 

cron