MODSonline
  Welcome Guest to MODSonline Home | Forums | Register | Login
Main-Menu
Home
Login
Register
Add Download
Add News
Add Tutorial *
Forums

Advertise
Affiliate Store US *
Affiliate Store UK *
Affiliate Store CA *
Angry Letter Generator
Avatar Upload
Calendar of Games
Contact
Downloads
FAQs
Forums
Member List
Member Projects
News
News Grabber *
Policy
Polls
Private Messages
Reviews
Screenshot Gallery
Search
Servers - Game
Store - Shirts *
Subscribe
Topics
Tutorials
Weblinks
Wiki *
Tutorials
CoD Mapping
CoDUO Mapping
CoD2 Mapping
CoD4 Mapping
CoDWW Mapping
CoD FAQs
HL2 Mapping
HL2 FAQs
SOF1 Mapping
Crysis Mapping
Q4 Mapping
Doom 3 Mapping
Doom 3 FAQs
UT2K3 Mapping
SOF2 Mapping
SOF2 FAQs

Lightray Modeling
General Modeling
General Modding
Adobe Photoshop
Common Mapping Errors

Readme.txt Generator
Members-Online
Kill_me_now [Forum]
{PADZ}grim... [Forum]
Papik [Today]
Tally [Forum]
lazygit [Forum]

5 Members and 14 Guests
Chat MODSonline
0 People Now Chatting
MODSOnline TeamSpeak

download TeamSpeak

In-The-News
Monday, Dec. 1st
A message from foyleman
Sunday, Nov. 30th
MODSonair 156 Live
Friday, Nov. 28th
MODSonair Episode 155
Wednesday, Nov. 26th
MODSonair Forum Buttons
Monday, Nov. 24th
Holiday Gift Guide 2008 - PC
Latest Poll
Single or Multiplayer maps for World at War?
Single-Player 30.12%
Multiplayer 61.45%
WHAT!? The tools are out? 8.43%
Read More...
10 comments

Newsletter
Name:
Email:
Newsletter Archives
Your Membership
User Name:
Password:
Register.
In The Forums
FX help
CoD:WW Scripting.. Posts: (19) Views: (205) by Tally
A message from foyleman
In The News.. Posts: (32) Views: (171) by gopherchucks
nazi_zombie problem with map : (
CoD:WW Level Des.. Posts: (1) Views: (11) by Papik
Sharks!!!!!!!!!
CoD:WW Level Des.. Posts: (8) Views: (188) by SparkyMcSparks
Art of War Central Quake 4 Mods for Dummies
CoDWW Download
Forums
MODSonline.com Forums

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Soldier of Fortune
Category: SoFII Editing, Gaming, and Design
Mapping, modeling, scripting, skinning and all forms of editing for the game Soldier of Fortune II
Moderators: foyleman, narc, ReverendTed, rEdrUmMDK, Foxhound, PleaseMYOB, batistablr, Welshy
Latest Posts
Subscribed Posts
Search
Restricted Access Restricted Access
Page
Next Page
subscribe
Author Topic: [mini-tut]Compiling qvm's
Sevensins~rb
General Member
Since: Dec 23, 2006
Posts: 274
Last: Dec 23, 2006
[view latest posts]
Level 5
Category: SoFII Editing, Gaming, and Design
Posted: Friday, May. 24, 2002 03:21 pm
Ok, so now you have your qvm's compiled...what do you do with them?

The vm's should have been placed in the base/vm dir in the mod sdk directory.

You'll need to create a folder for your mod in the main sof2 dir. I'll use the example mymod. You would have c:\program files\sof2dir\mymod.

There are two ways to place the qvm's in that directory.
You can pull the /vm dir and place it in your mod directory. However, this way means that any server that is run is a unpure server.
c:\program files\sof2dir\mymod\vm\[all your qvm's]
you should set, +set sv_pure 0 , in the shortcut command line; if you do it this way.

Or you can put the /vm dir in a pk3 file. A pk3 file is just a .zip file renamed. To do this, just zip the vm dir with your program of choice and rename it to .pk3. Make sure that qvm files are in the /vm path inside the .pk3/zip file. After you do that, just place the .pk3 file in your mod directory.
c:\program files\sof2dir\mymod\vmfiles.pk3

Now to run your mod, you should create a new shortcut to the sof2mp.exe file and add this to the command line: +set fs_game mymod   Where mymod = your mod directory name

hmmm...that should be it.
Sevensins~rb
General Member
Since: Dec 23, 2006
Posts: 274
Last: Dec 23, 2006
[view latest posts]
Level 5
Category: SoFII Editing, Gaming, and Design
Posted: Friday, May. 24, 2002 03:22 pm
Ok, now to touch on the different file prefixes. There are 6 I count.

Prefix - explanation

q_ - These files contain essential parts to all the code, ie client, server, ui, and even engine. For q3 modding, it was good practice to not modify these files at all, because it usually ended up in strange problems. Its probablly the same with sof2, just a warning.

bg_ (both game)- These contain code that is visible to client and server. If you change anything to these, you'll most likely need to compile both client and game code.

g_ (game)- These files contain code only visible to the server, the client code cannot use things defined within them.

cg_ (cgame) - These files contain code only visible to the client, the server code cannot use things defined within them.

ui_ - These files, of course, are code for the user interface (ie hud, menus). This code works with the .menu script files.

gt_ - These are gametype files. These files are where the events from the .gametype scripts are handled.
Sevensins~rb
General Member
Since: Dec 23, 2006
Posts: 274
Last: Dec 23, 2006
[view latest posts]
Level 5
Category: SoFII Editing, Gaming, and Design
Posted: Friday, May. 24, 2002 03:23 pm
now - Adding new files to be compiled...

You'll need to edit the .bat files so that your new file is compiled with the existing files. Obviously, you'll need to edit the one that goes with which code you have added (ie cgame, game, ui).

game.bat looks a little like this
Code Sample

%cc%  ../g_active.c
@if errorlevel 1 goto quit
%cc%  ../g_antilag.c
@if errorlevel 1 goto quit
%cc%  ../g_bot.c
@if errorlevel 1 goto quit
%cc%  ../g_client.c
@if errorlevel 1 goto quit


so just add your new file in the same way as the others to the end of the list.

[edit]I also forgot to mention, you have to add the filename to the asm file so it will go through the assembler

in each of the code section there is a q3asm file, ie game.q3asm, cgame.q3asm etc.

You should be able to just open them up with any text editor. After you open them up, you'll notice all the different files for that part of the code. Just add yours to the bottom in the same manner as the other ones.
rickmus~rb
General Member
Since: Dec 23, 2006
Posts: 342
Last: Dec 23, 2006
[view latest posts]
Level 5
Category: SoFII Editing, Gaming, and Design
Posted: Friday, May. 24, 2002 03:39 pm
One additional thing:  never ever modify any of the functions that are in g_syscalls.c, cg_syscalls.c, or ui_syscalls.c.  These are all the interface calls to the engine, and if you change them in any way, you will get undefined results / crashes.
Ter Roshak~rb
General Member
Since: Dec 23, 2006
Posts: 3
Last: Dec 23, 2006
[view latest posts]
Level 0
Category: SoFII Editing, Gaming, and Design
Posted: Friday, May. 24, 2002 08:59 pm
the very MORE faster way is to add in every batch you are running the following line at the very top !

set path=%path%;x:\path\to\the\sdk\root

for win2k users!!!

win9x have just to make a new batch file and just run it once or your env %path will explode!

win2k (xp etc...) has the very annoying feature to store the path changing just for the current running dos box!
after exiting the window and entering a new one all changes will be removed :)!

for all lazy ppl thats the more fast version
all others can make the changes in the env path
but you have to reboot in the most cases (win9x)...

cya ter
Sevensins~rb
General Member
Since: Dec 23, 2006
Posts: 274
Last: Dec 23, 2006
[view latest posts]
Level 5
Category: SoFII Editing, Gaming, and Design
Posted: Monday, May. 27, 2002 01:50 am
bump

pin maybe?  ??? ???
GODh~rb
General Member
Since: Dec 23, 2006
Posts: 1228
Last: Dec 23, 2006
[view latest posts]
Level 8
Category: SoFII Editing, Gaming, and Design
Posted: Friday, May. 31, 2002 04:26 pm
This line is giving me a syntax error in WinME :s17:

Quote
set cc=..\..\..\..\bin\sof2lcc -A -DQ3_VM -DMISSIONPACK -S -Wf-target=bytecode -Wf-g -I..\..\..\gametype -I..\..\gt_gold -I..\..\..\game %1


Does anyone know a solution?? Please...
GODh~rb
General Member
Since: Dec 23, 2006
Posts: 1228
Last: Dec 23, 2006
[view latest posts]
Level 8
Category: SoFII Editing, Gaming, and Design
Posted: Friday, May. 31, 2002 04:37 pm
Problem is caused by the = from =bytecode... but my question remains the same: how to solve this? (I am using WinME) :(
Sevensins~rb
General Member
Since: Dec 23, 2006
Posts: 274
Last: Dec 23, 2006
[view latest posts]
Level 5
Category: SoFII Editing, Gaming, and Design
Posted: Friday, May. 31, 2002 04:42 pm
well thats obviously a new gametype you create gt_gold. The line appears to be exactly the same as the other bat files.

Do you the original bat files get that same error?
GODh~rb
General Member
Since: Dec 23, 2006
Posts: 1228
Last: Dec 23, 2006
[view latest posts]
Level 8
Category: SoFII Editing, Gaming, and Design
Posted: Friday, May. 31, 2002 06:05 pm
Yes, i am getting a syntax error caused by the = sign in the line where the cc environment variable is set (from =bytecode). When i replace that = with a space, the syntax error is gone, but then ofcoz the compile won't work... i can compile by replacing all %cc% with the full command, but that's a real pain in the *ss :(
Restricted Access Restricted Access
Page
Next Page
subscribe
MODSonline.com Forums : Soldier of Fortune : SoFII Editing, Gaming, and Design
All logos and trademarks and information in this site are property of MODSonline LLC © 2008.
The comments are property of their posters.
RSS news feeds for MODSonline can be found News.php.
Art of War Central
Partners
XoXide
Call of Duty Headquarters
Frag Universe
Battle for Europe COD2
CODAddicts - Call of Duty News & Downloads
modbase.be
The Firing Box
Ask About
Advertising
Friends
The Clan Database
CoD 4 Base
ModTheater
Ask About
Advertising
Link to Us
MODSonair
View in iTunes
Please help us to raise in the ranks of podcasting and subscribe to our itunes feed using the link above.
MODSonair Releases
MODSonair Episode 155
MODSonair Episode 154
MODSonair Episode 153
MODSonair Episode 152
MODSonair Episode 151
Next Show
The next MODSonair show will air LIVE on:

Time remaining:
Copyright © 2008 MODSonline
Tresware Content Management System Copyright © 2008 Tresware
Website Designed and Hosted   Tresware