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

Members Online

»
0 Active | 8 Guests
Online:

LATEST FORUM THREADS

»
warfare
CoD4 Map + Mod Releases
Voting menu on maps
CoD+UO General
Hauling 911
CoDBO3 General

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 : Call of Duty 4
Category: CoD4 Scripting
Scripting and coding with Call of Duty 4.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Next Page
subscribe
Author Topic: Adding weapons to CAC
ZedX
General Member
Since: Mar 22, 2010
Posts: 12
Last: Sep 3, 2010
[view latest posts]
Level 1
Category: CoD4 Scripting
Posted: Monday, Mar. 22, 2010 10:04 pm
I have created a few new weapons using the single player weapon models and I wish to add them to the multi-player create a class menus. What files do I need to edit to do this? So far I have edited and added to my mod.csv: rankTable.csv, statsTable.csv, cac.inc, cac_ingame.inc and weaponinfo.menu

No luck so far getting them to show.

Also, while I beta test this on my server I would like to keep all of the scripts serverside, how do you compile a clientside ff without the server gsc's in it?
Share |
DemonSeed
General Member
Since: Apr 30, 2009
Posts: 1362
Last: Feb 19, 2018
[view latest posts]
Level 8
Im a fan of MODSonair
Category: CoD4 Scripting
Posted: Monday, Mar. 22, 2010 10:44 pm
Those are all the right files, and are exactly the same ones I edited to get my custom weapons and perks ingame.

Now, lets ask some questions so that we can determine where the problem starts:

1. do they show on the menu at all? Even if they show but are locked, are they there but unavailable? Because if they are showing on the menu, then the problem lies in unlocking them rather than in them not showing at all.

2. How have you entered the stat in statstable.csv? Does the weapon precache at all via _weapons.gsc? Can you spoof it and use giveWeapon() and get the weapon in game?
Share |
ZedX
General Member
Since: Mar 22, 2010
Posts: 12
Last: Sep 3, 2010
[view latest posts]
Level 1
Category: CoD4 Scripting
Posted: Monday, Mar. 22, 2010 11:00 pm
DemonSeed writes...
Quote:
Those are all the right files, and are exactly the same ones I edited to get my custom weapons and perks ingame.

Now, lets ask some questions so that we can determine where the problem starts:

1. do they show on the menu at all? Even if they show but are locked, are they there but unavailable? Because if they are showing on the menu, then the problem lies in unlocking them rather than in them not showing at all.

2. How have you entered the stat in statstable.csv? Does the weapon precache at all via _weapons.gsc? Can you spoof it and use giveWeapon() and get the weapon in game?


1. No they do not show up at all. Perhaps my statsTable entry is missing something because I only entered 3 fields worth of data because they don't have attachments or camo etc. Now that I think about it, I didn't add them to the rankTable anywhere..

2. Yes they get precached fine and I can give them and use them no problem.
Share |
DemonSeed
General Member
Since: Apr 30, 2009
Posts: 1362
Last: Feb 19, 2018
[view latest posts]
Level 8
Im a fan of MODSonair
Category: CoD4 Scripting
Posted: Monday, Mar. 22, 2010 11:11 pm
If they precache but dont show on the menu, it will probably be because you are missing the image file data in column 6.

And you dont have to have any attachment, just leave column 8 blank. The deagle and golddeagle dont have an attachment either, and there is simply no data in column 8 for them.

I think the best thing you can do is put all the files in a zip folder and pass it to me and I'll check them over, and see whats wrong. I dont need the weapons file and models - just the menu stuff and statstable.csv.
Share |
ZedX
General Member
Since: Mar 22, 2010
Posts: 12
Last: Sep 3, 2010
[view latest posts]
Level 1
Category: CoD4 Scripting
Posted: Tuesday, Mar. 23, 2010 12:03 am
Ok attached are the files. I think it's something stupid for sure. As an aside, how do I compile a server side mod? I mean make the ff with all of the client stuff in it but no server scripts and still have it work? This way clients don;t get my buggy beta code and run off to create a server with it.

edited on Mar. 22, 2010 11:21 pm by ZedX
Share |
DemonSeed
General Member
Since: Apr 30, 2009
Posts: 1362
Last: Feb 19, 2018
[view latest posts]
Level 8
Im a fan of MODSonair
Category: CoD4 Scripting
Posted: Tuesday, Mar. 23, 2010 01:04 am
Well, there's your problem - you dont have any class menu edited. You will need either cac_assault.menu, cac_specops.menu, etc, to use as the basis of your weapon slots.

You cannot compile cac.inc without a menu file, as its the only way to compile an .INC file.
Share |
ZedX
General Member
Since: Mar 22, 2010
Posts: 12
Last: Sep 3, 2010
[view latest posts]
Level 1
Category: CoD4 Scripting
Posted: Tuesday, Mar. 23, 2010 01:48 am
What I just did was add two incudes to the weaponinfo.menu in order to get those .inc's compiled.

Code:

#include "ui_mp/cac.inc"
#include "ui_mp/cac_ingame.inc"


Now when I compile I get the following errors:

Code:

Menu load error: ui_mp\cac.inc, line 24: expected float but found COLOR_FOCUSED

Menu load error: ui_mp\cac.inc, line 24: couldn't parse menu keyword focuscolor


Problem is that if I add one of the other menus like suggested I run into the menu limit.. ugh.
Share |
DemonSeed
General Member
Since: Apr 30, 2009
Posts: 1362
Last: Feb 19, 2018
[view latest posts]
Level 8
Im a fan of MODSonair
Category: CoD4 Scripting
Posted: Tuesday, Mar. 23, 2010 02:03 am
Never thought of adding the .inc files like that. It might get around the problem of not being able to compile more than 1 cac menu.

However, the reason it is returning the errors is because you need to include common_macro.inc as well.

Try this at the very end of weaponinfo.menu:

Code:
#include "mp_ui/commmon_macro.inc"

{
	#include "mp_ui/cac.inc"
}


You wont need to include cac_ingame.inc as that is called in cac.inc.

I dont know if the above code will work at the end of the file, but if it doesnt it will only be a question of where you put it, so just try it in different locations in the file.
Share |
ZedX
General Member
Since: Mar 22, 2010
Posts: 12
Last: Sep 3, 2010
[view latest posts]
Level 1
Category: CoD4 Scripting
Posted: Tuesday, Mar. 23, 2010 03:19 am
Well looks like I will have to cut out some menus if I want this because no matter where I put the includes it throws errors at me since so much is in the cac.inc undefined.

Good news is that the stuff does show up in the menus once I disable a few menus to get passd the 640 limit.

Thanks for the help DemonSeed, much appreciated.
edited on Mar. 22, 2010 11:19 pm by ZedX
Share |
deltaonexxxx
General Member
Since: Apr 4, 2010
Posts: 1
Last: Apr 4, 2010
[view latest posts]
Level 0
Category: CoD4 Scripting
Posted: Sunday, Apr. 4, 2010 11:44 pm
DemonSeed writes...
Quote:
Those are all the right files, and are exactly the same ones I edited to get my custom weapons and perks ingame.

Now, lets ask some questions so that we can determine where the problem starts:

1. do they show on the menu at all? Even if they show but are locked, are they there but unavailable? Because if they are showing on the menu, then the problem lies in unlocking them rather than in them not showing at all.

2. How have you entered the stat in statstable.csv? Does the weapon precache at all via _weapons.gsc? Can you spoof it and use giveWeapon() and get the weapon in game?


well just wanted some help ? wich mods do you have and
can you help me And i can pay you to help me email.oskar.300@hotmail.com or skype deltaonexxx iam looking for a moder how can help my Makeing a mod for me i WILL PAY $$$$
Share |
Restricted Access Topic is Locked
Page
Next Page
subscribe
MODSonline.com Forums : Call of Duty 4 : CoD4 Scripting

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

»