Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 72 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

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 Mapping
Mapping, modeling, scripting, skinning and all forms of editing for the game Soldier of Fortune II
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Next Page
subscribe
Author Topic: Weapon addition problems.
DisposableHero~rb
General Member
Since: Dec 23, 2006
Posts: 8
Last: Dec 23, 2006
[view latest posts]
Level 0
Category: SoFII Mapping
Posted: Monday, Jun. 9, 2003 08:24 am
So for a while i've wanted to make my own secondary version of the m4, while also keeping the regular m4...

Got the 1.03 SDK (the 'unofficial' one from sof2files.com).

First TUT i check out? the one here about adding the OICW. I try it, following word for word... it blows everything all to heck.

Then I retry it, making sure all code I add ends up under the same line of code it seems it should (under the sniper instead of a few since the TUT on the oicw seems to be from ver 1.0)

it still blows it all to heck. Double checked what i did. no typos or errors can I find.

so, i delete my work and again replace it with the clean source. I go thru all the files line-by-line and look for direct mentions of weapons. I then proceed to clone the M4 that way; any line mentioning the M4 i paste below it, only renaming M4 to M4S, being sure not to kludge up any syntax or anything. (animations i left the stock M4 name cos i want to use the same M4 model and anims)

it builts with all.bat... so i edit sof2.wpn and save it into the ext_data dir of the mod dir I added... and it loads the game and when i go to choose weapons... it all blows up.

So, the tut from 1.0 doesn't work on 1.03 (no big surprise there... versions often differ)

I tried google for a 1.03 tut for adding weapons... no dice.

Anything i need to know? I'm not a god at C/C++ but I usually don't have so much trouble merely editing something... can anyone point me to where I may have gone wrong? or is there a tut for adding weaps to 1.03  (multiplayer) that I havent found yet? :s4:
Share |
xmc~rb
General Member
Since: Dec 23, 2006
Posts: 1227
Last: Dec 23, 2006
[view latest posts]
Level 8
Category: SoFII Mapping
Posted: Monday, Jun. 9, 2003 08:51 am
The basics of the tutorial are the same. I don't think the coding is your problem if it crashes when you select the weapon.

Make sure your SOF2.wpn and SOF2.inview are taken from update102.pk3 and modified correctly. The name in inview/wpn should match the name in bg_weapons.c.
Share |
DisposableHero~rb
General Member
Since: Dec 23, 2006
Posts: 8
Last: Dec 23, 2006
[view latest posts]
Level 0
Category: SoFII Mapping
Posted: Monday, Jun. 9, 2003 09:35 am
hrm... havent seen any tut's on the inview file... any idea where i can get info on that to make sure thats not my problem?

(im a newb to sof2 modding... sorry)

oh yeah... got my sof2.wpn from the therest.pk3 cos thats what another tut said i should get it from... is that perhaps where i messed up?

oh and thanks for ur help!
Share |
bone~rb
General Member
Since: Dec 23, 2006
Posts: 230
Last: Dec 23, 2006
[view latest posts]
Level 4
Category: SoFII Mapping
Posted: Monday, Jun. 9, 2003 12:14 pm
try useing the file from update102.pk3

ooops forgot to read...missed that bit..sorry

and about the inview file..best thing to do is read though one its not that difficult to understand..or is it? but if you are only adding a oicw it works fine...i've done it just use the inview and wpn file from update102.pk3
Share |
Merlin45~rb
General Member
Since: Dec 23, 2006
Posts: 1639
Last: Dec 23, 2006
[view latest posts]
Level 8
Category: SoFII Mapping
Posted: Monday, Jun. 9, 2003 01:11 pm
b4 you read the tuts read the docs that come with the sdk
Share |
DisposableHero~rb
General Member
Since: Dec 23, 2006
Posts: 8
Last: Dec 23, 2006
[view latest posts]
Level 0
Category: SoFII Mapping
Posted: Monday, Jun. 9, 2003 07:46 pm
OK... edited both the wof2.wpn and sof2.inview files from update102.pk3, inserted a copy of my m4 into it... now the game runs fine, but there is still only 1 m4 in the selection menu... any other files im supposed to edit? I looked thru the dirs in the update102.pk3 and couldnt find anything that looked like a weapon-specific file
Share |
bone~rb
General Member
Since: Dec 23, 2006
Posts: 230
Last: Dec 23, 2006
[view latest posts]
Level 4
Category: SoFII Mapping
Posted: Monday, Jun. 9, 2003 07:51 pm
have you recompiled the sof2sdk etc. made sure that the weapon is in bg_player.c...you will need to make a new weapon all togeter to get two of the same apearing in the selection options box...
Share |
DisposableHero~rb
General Member
Since: Dec 23, 2006
Posts: 8
Last: Dec 23, 2006
[view latest posts]
Level 0
Category: SoFII Mapping
Posted: Monday, Jun. 9, 2003 07:55 pm
yea, heres a list of the files i edited, cloning what was for the M4 as the M4S:

inv.h
ai_main.c
ai_wpnav.c
bg_misc.c
bg_player.c
bg_weapons.c
bg_weapons.h
g_combat.c
g_main.c

sof2.wpn
sof2.inview
Share |
bone~rb
General Member
Since: Dec 23, 2006
Posts: 230
Last: Dec 23, 2006
[view latest posts]
Level 4
Category: SoFII Mapping
Posted: Monday, Jun. 9, 2003 07:57 pm
you only need to to 5

bg_weapons.c,
bg_weapons.h,
inv.h,
bg_misc.c,
bg_player.c

this worked when i cloned my sig551 and made it 552
Share |
DisposableHero~rb
General Member
Since: Dec 23, 2006
Posts: 8
Last: Dec 23, 2006
[view latest posts]
Level 0
Category: SoFII Mapping
Posted: Monday, Jun. 9, 2003 10:11 pm
Found the solution.

the tut i read didnt say i had to put the gvm's from the ui and the cgame dirs, even if i didnt edit either of them.

and, i had to add a line in g_main.c:

{ NULL, "disable_pickup_weapon_M4", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
{ NULL, "disable_pickup_weapon_AK_74", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },

turned into:

{ NULL, "disable_pickup_weapon_M4", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
   { NULL, "disable_pickup_weapon_M4S", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },
{ NULL, "disable_pickup_weapon_AK_74", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse },


and poof, everything works perfect now.
Share |
Restricted Access Topic is Locked
Page
Next Page
subscribe
MODSonline.com Forums : Soldier of Fortune : SoFII Mapping

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»