Modding weapons

Please post here for questions and discussion about scenario design and general game modding.

Moderator: Gil R.

Post Reply
PanzerHue
Posts: 22
Joined: Wed Nov 21, 2007 3:20 pm
Location: Chile

Modding weapons

Post by PanzerHue »

Hi,

I wanted to add the Tyler Texas Rifle to the Guns.txt but the game wouldnt load. Is it possible to add new weapons?

When I was searching the Data-folder I found 2 Guns.txt files (Guns.txt and Guns_V1.9.17). Wich one is the one used by the game?

Thanx for a great game!

Kind regards...

User avatar
Gil R.
Posts: 10820
Joined: Fri Apr 01, 2005 4:22 am

RE: Modding weapons

Post by Gil R. »

Guns.txt is the file that's used. The other looks like a back-up of the older version of the file, based on its name.

What exactly did you do when modding? One thing that might have caused a crash is if you used actual spaces between words rather than underscores: "Tyler_Texas_Rifle" rather than "Tyler Texas Rifle." If you didn't use underscores that might cause a crash.
Michael Jordan plays ball. Charles Manson kills people. I torment eager potential customers by not sharing screenshots of "Brother Against Brother." Everyone has a talent.
PanzerHue
Posts: 22
Joined: Wed Nov 21, 2007 3:20 pm
Location: Chile

RE: Modding weapons

Post by PanzerHue »

Hi Gil,

Thanx for your reply. The game still crash (not responding) when I use the modified Guns-file.
I have written "Tyler_Texas_Rifle", I gave the rifle the ID number "59" (after "58" breechloader), "0" in the pre-requested-upgrade and "7777" in check.
I have run through the other categories and I cant see any errors.

It work well with the original and I must do something wrong.

Kind regards...
User avatar
cesteman
Posts: 811
Joined: Sun Feb 15, 2004 4:40 am
Location: San Luis Obispo, CA

RE: Modding weapons

Post by cesteman »

Strange... Being I'm not a programmer I'm always reluctant to mess with any of these files. I always leave that to someone who has way too much time on their hands!
User avatar
Gil R.
Posts: 10820
Joined: Fri Apr 01, 2005 4:22 am

RE: Modding weapons

Post by Gil R. »

I'm looking at the file, and have another theory. When you added the gun, did you erase the seemingly pointless line at the end of the file that begins with a '-1' and is filled with zeroes? If so, the smart money is on that having caused the crash. That line lets the computer know it's reached the end of the file.
Michael Jordan plays ball. Charles Manson kills people. I torment eager potential customers by not sharing screenshots of "Brother Against Brother." Everyone has a talent.
PanzerHue
Posts: 22
Joined: Wed Nov 21, 2007 3:20 pm
Location: Chile

RE: Modding weapons

Post by PanzerHue »

Hi Gil,
 
I have the "-1" line at the end of the file and everything seems ok. I will do a new try with a fresh copy of the Guns.txt. There must be something I mess up.
 
Kind regards...
PanzerHue
Posts: 22
Joined: Wed Nov 21, 2007 3:20 pm
Location: Chile

RE: Modding weapons

Post by PanzerHue »

Hmm... It seems I can change the stats of any existing weapon, but not add any. When I add the Tyler Rifle it crash again.
 
Kind regards...
User avatar
Gil R.
Posts: 10820
Joined: Fri Apr 01, 2005 4:22 am

RE: Modding weapons

Post by Gil R. »

Sounds to me like Eric's code might have a fixed number of guns that it knows to read, and if one goes over the limit the gun is ignored. I'll ask him, but that's probably it.

If it's a gun that we should have he might be interested in adding it.
Michael Jordan plays ball. Charles Manson kills people. I torment eager potential customers by not sharing screenshots of "Brother Against Brother." Everyone has a talent.
Mutation2241
Posts: 35
Joined: Thu Sep 25, 2008 4:31 pm

RE: Modding weapons

Post by Mutation2241 »

How then did member RyanCrierie manage to add the AK-47 in his Guns of the South mod?

If it's a gun that we should have he might be interested in adding it

Please add the Colt Revolving Rifle first. The first repeating rifle employed in the Civil War. Saw extensive use during the conflict and performed superbly in combat.

Leonard Target Rifle would be nice as well
User avatar
Gil R.
Posts: 10820
Joined: Fri Apr 01, 2005 4:22 am

RE: Modding weapons

Post by Gil R. »

How then did member RyanCrierie manage to add the AK-47 in his Guns of the South mod?

If I remember correctly, he replaced one of the other guns... which would support my thesis.
Michael Jordan plays ball. Charles Manson kills people. I torment eager potential customers by not sharing screenshots of "Brother Against Brother." Everyone has a talent.
User avatar
ericbabe
Posts: 11848
Joined: Wed Mar 23, 2005 3:57 am
Contact:

RE: Modding weapons

Post by ericbabe »

Can't add new guns; have to replace an existing one.
Image
PanzerHue
Posts: 22
Joined: Wed Nov 21, 2007 3:20 pm
Location: Chile

RE: Modding weapons

Post by PanzerHue »

Thank you all for the help - it is working now (replacing an existing one).
 
Kind regards...
KASHANKA
Posts: 17
Joined: Fri Feb 13, 2009 1:21 pm
Location: Middle of nowhere

RE: Modding weapons

Post by KASHANKA »

So, there's still no way to add more guns?
Post Reply

Return to “Mods and Scenarios”