Author Topic: [TUTORIAL]Five Weapons In SWBF1  (Read 815 times)

SleepKiller

  • Administrator
  • This Man Has No Life
  • *****
  • Posts: 1512
  • Awards To recognize Modders that make a most excellent contribution within the Month Releasing Multiple Mods on SWBFgamers.com
    • View Profile
    • Awards
  • Xfire:
[TUTORIAL]Five Weapons In SWBF1
« on: June 16, 2012, 08:11:28 PM »
Today marks the day we have cracked yet another limit in SWBF! We can now get five weapons instead of the old limit of four! I have tested and it seemed to crash with any more but I won't say you can't get six because after all, we now have five when the limit was thought for the past eight years to be four.

A little video showing it off before we begin the tutorial.



Now the overall process is quite simple and it works much like SWBFIIs weapon system.


I will use the CIS Assault Trooper as an example and I will add a rifle to him.
First up find this section of code.

Code: [Select]
WeaponName1 = "cis_weap_inf_torpedo_launcher"
WeaponAmmo1 = 7
WeaponName2 = "cis_weap_inf_pistol"
WeaponAmmo2 = 0
WeaponName3 = "cis_weap_inf_thermaldetonator"
WeaponAmmo3 = 3
WeaponChannel3 = 1
WeaponName4 = "cis_weap_inf_mine_dispenser"
WeaponAmmo4 = 4
WeaponChannel4 = 1

No Remove the numbers from the end of each of the commands like this.

Code: [Select]
WeaponName = "cis_weap_inf_torpedo_launcher"
WeaponAmmo = 7
WeaponName = "cis_weap_inf_pistol"
WeaponAmmo = 0
WeaponName = "cis_weap_inf_thermaldetonator"
WeaponAmmo = 3
WeaponChannel = 1
WeaponName = "cis_weap_inf_mine_dispenser"
WeaponAmmo = 4
WeaponChannel = 1

Now label each of them with WEAPONSECTION         = * like this.

Code: [Select]
WEAPONSECTION = 1
WeaponName = "cis_weap_inf_torpedo_launcher"
WeaponAmmo = 7
WEAPONSECTION = 2
WeaponName = "cis_weap_inf_pistol"
WeaponAmmo = 0
WEAPONSECTION = 3
WeaponName = "cis_weap_inf_thermaldetonator"
WeaponAmmo = 3
WeaponChannel = 1
WEAPONSECTION = 4
WeaponName = "cis_weap_inf_mine_dispenser"
WeaponAmmo = 4
WeaponChannel = 1

Now I am going to insert a section for the rifle like so.
Code: [Select]
WEAPONSECTION = 1
WeaponName = "cis_weap_inf_torpedo_launcher"
WeaponAmmo = 7
WEAPONSECTION = 2
WeaponName = "cis_weap_inf_rifle"
WeaponAmmo = 5
WEAPONSECTION = 3
WeaponName = "cis_weap_inf_pistol"
WeaponAmmo = 0
WEAPONSECTION = 4
WeaponName = "cis_weap_inf_thermaldetonator"
WeaponAmmo = 3
WeaponChannel = 1
WEAPONSECTION = 5
WeaponName = "cis_weap_inf_mine_dispenser"
WeaponAmmo = 4
WeaponChannel = 1
The class now has five weapons! Now go I expect to see classes with five weapons in everyone's mods! (A little credit to me would be nice.)

Final note, this WeaponChannel   = 1 says that the weapon is a secondary one.

Enjoy and I hope this made sense to you.



Phobos

  • Master Modder
  • INTERNET ADDICT
  • *****
  • Posts: 2223
  • Awards Shotgun Tournament 1st Place ICW2 Tournament Winner To recognize Modders that make a most excellent contribution within the Month LeaderBoard 1 organized by GDH92 and ComSharpshot Intergalactic Clan War 1 winner T.1 1v1 Tournament 1st Place organized by SleepKiller Releasing Multiple Mods on SWBFgamers.com
    • View Profile
    • Awards
Re: [TUTORIAL]Five Weapons In SWBF1
« Reply #1 on: June 16, 2012, 08:27:44 PM »
Very nice, I can think of many more weapon combinations for modded sides now. Is there a way to make the 5th weapon in the secondary weapon category instead of primary?

jdee-barc

  • kid
  • Moderators
  • Advanced Member
  • *****
  • Posts: 647
  • derp
  • Awards Releasing Multiple Mods on SWBFgamers.com
    • View Profile
    • Awards
Re: [TUTORIAL]Five Weapons In SWBF1
« Reply #2 on: June 16, 2012, 09:07:29 PM »
http://www.youtube.com/watch?v=P3ALwKeSEYs

Celebration on hold for me until I can fix my crashing issue with it  :P
« Last Edit: June 16, 2012, 09:14:01 PM by jdee-barc »
Current Projects:
Battlefront One and a Half Era Mod, v2.0. Making great progress (SWBF)

Battlefront 2 and a half era mod, v1.0. (SWBF2)
Just starting.

SleepKiller

  • Administrator
  • This Man Has No Life
  • *****
  • Posts: 1512
  • Awards To recognize Modders that make a most excellent contribution within the Month Releasing Multiple Mods on SWBFgamers.com
    • View Profile
    • Awards
  • Xfire:
Re: [TUTORIAL]Five Weapons In SWBF1
« Reply #3 on: June 16, 2012, 09:18:07 PM »
Try copying my exact final code over to the CIS Assault droid and testing it then going form there. I swear it is working on my end just don't try and do more than 5.

jdee-barc

  • kid
  • Moderators
  • Advanced Member
  • *****
  • Posts: 647
  • derp
  • Awards Releasing Multiple Mods on SWBFgamers.com
    • View Profile
    • Awards
Re: [TUTORIAL]Five Weapons In SWBF1
« Reply #4 on: June 16, 2012, 09:29:07 PM »
and suddenly it...works.  :slap: I don't get how it suddenly works now.

EDIT:
Well, it seems that you can have 3 primary weapons and 2 secondary, but not the other way around. I tried giving the arc trooper 2 primary weapons (standard rockets and pistol) and 3 secondary weapons (concussions, thermals, and mines) and it crashed.

EDIT2: The ARC trooper just won't work it seems. I have no idea why.


EDIT3: I applied it to a trooper in my mod
« Last Edit: June 17, 2012, 07:53:26 AM by jdee-barc »
Current Projects:
Battlefront One and a Half Era Mod, v2.0. Making great progress (SWBF)

Battlefront 2 and a half era mod, v1.0. (SWBF2)
Just starting.

SleepKiller

  • Administrator
  • This Man Has No Life
  • *****
  • Posts: 1512
  • Awards To recognize Modders that make a most excellent contribution within the Month Releasing Multiple Mods on SWBFgamers.com
    • View Profile
    • Awards
  • Xfire:
Re: [TUTORIAL]Five Weapons In SWBF1
« Reply #5 on: June 17, 2012, 05:28:33 PM »
I have had 2 primary and 3 secondary. You just need to add this line to weapon section 3,

WeaponChannel   = 1
.

EDIT: Oh and keep in mind that they don't appear on the spawn screen. Unless apparently done to the first slot. So be sure to spawn as the class and test it out before deciding if it works or not.
« Last Edit: June 17, 2012, 06:54:46 PM by SleepKiller »

Phobos

  • Master Modder
  • INTERNET ADDICT
  • *****
  • Posts: 2223
  • Awards Shotgun Tournament 1st Place ICW2 Tournament Winner To recognize Modders that make a most excellent contribution within the Month LeaderBoard 1 organized by GDH92 and ComSharpshot Intergalactic Clan War 1 winner T.1 1v1 Tournament 1st Place organized by SleepKiller Releasing Multiple Mods on SWBFgamers.com
    • View Profile
    • Awards
Re: [TUTORIAL]Five Weapons In SWBF1
« Reply #6 on: June 17, 2012, 07:20:41 PM »
I might know a way to make the 5th weapon show up on spawn screen using font edits and/or hex editing I'll test some ideas later.

jdee-barc

  • kid
  • Moderators
  • Advanced Member
  • *****
  • Posts: 647
  • derp
  • Awards Releasing Multiple Mods on SWBFgamers.com
    • View Profile
    • Awards
Re: [TUTORIAL]Five Weapons In SWBF1
« Reply #7 on: June 17, 2012, 08:06:07 PM »
It worked with me, they showed on the other slot but then again, I'm using a modded font (thats also smaller)
Current Projects:
Battlefront One and a Half Era Mod, v2.0. Making great progress (SWBF)

Battlefront 2 and a half era mod, v1.0. (SWBF2)
Just starting.

Phobos

  • Master Modder
  • INTERNET ADDICT
  • *****
  • Posts: 2223
  • Awards Shotgun Tournament 1st Place ICW2 Tournament Winner To recognize Modders that make a most excellent contribution within the Month LeaderBoard 1 organized by GDH92 and ComSharpshot Intergalactic Clan War 1 winner T.1 1v1 Tournament 1st Place organized by SleepKiller Releasing Multiple Mods on SWBFgamers.com
    • View Profile
    • Awards
Re: [TUTORIAL]Five Weapons In SWBF1
« Reply #8 on: June 17, 2012, 08:14:21 PM »
It worked with me, they showed on the other slot but then again, I'm using a modded font (thats also smaller)
I saw that from your screenshots. I have made a custom font slightly larger, and it cuts off 4th weapon names. So I think perhaps just using a smaller font, or perhaps calling on gamefont_supertiny instead of gamefont_tiny would show the fifth weapon. Ifs_pc_spawnselect is the file that specifies the font for weapon names. Look for gamefont_tiny and change it to something else or modify the gamefont_tiny in core.lvl

Sereja

  • Master Modder
  • Advanced Member
  • *****
  • Posts: 719
  • Waiting for medal.
  • Awards Halloween Modding Contest 2012 To recognize Modders that make a most excellent contribution within the Month Releasing Multiple Mods on SWBFgamers.com
    • View Profile
    • Awards
Re: [TUTORIAL]Five Weapons In SWBF1
« Reply #9 on: June 18, 2012, 04:08:32 AM »
Interesting invention! I test it, and found crash reason problem:
5th weapon must never have a Geometry. Probably, it may use for some throw/despenser weapon only.
Beauty is, the way to perfection.

WiP
Naboo: Otoh Gunga - 20%
Yavin IV: temple model - 10%

Sure in this            -    50%

SleepKiller

  • Administrator
  • This Man Has No Life
  • *****
  • Posts: 1512
  • Awards To recognize Modders that make a most excellent contribution within the Month Releasing Multiple Mods on SWBFgamers.com
    • View Profile
    • Awards
  • Xfire:
Re: [TUTORIAL]Five Weapons In SWBF1
« Reply #10 on: June 18, 2012, 04:48:05 AM »
Interesting invention! I test it, and found crash reason problem:
5th weapon must never have a Geometry. Probably, it may use for some throw/despenser weapon only.
I suggest you watch the video in it I have 5 weapons all with geometry.

Sereja

  • Master Modder
  • Advanced Member
  • *****
  • Posts: 719
  • Waiting for medal.
  • Awards Halloween Modding Contest 2012 To recognize Modders that make a most excellent contribution within the Month Releasing Multiple Mods on SWBFgamers.com
    • View Profile
    • Awards
Re: [TUTORIAL]Five Weapons In SWBF1
« Reply #11 on: June 18, 2012, 05:10:34 AM »
Not agree. It seems cis assault droid on your video, have mine dispenser, as 5th weapon, and as default, cis mine dispenser has no geometry (only ordance geometry). If you change it to, rebels mines, for example (it have geometry), the game is crash.
Beauty is, the way to perfection.

WiP
Naboo: Otoh Gunga - 20%
Yavin IV: temple model - 10%

Sure in this            -    50%

SleepKiller

  • Administrator
  • This Man Has No Life
  • *****
  • Posts: 1512
  • Awards To recognize Modders that make a most excellent contribution within the Month Releasing Multiple Mods on SWBFgamers.com
    • View Profile
    • Awards
  • Xfire:
Re: [TUTORIAL]Five Weapons In SWBF1
« Reply #12 on: June 18, 2012, 05:31:03 AM »
Okay, I tested it myself. I was wrong the 5th weapon can't have geometry. Thanks for pointing it out Sereja. So this means you can only use it for a grenade, mine, dispenser or something else of that nature. The other four could be normal primary weapons guns if desired still I think.

Dark_Phantom

  • The Ghost
  • Frequent Poster
  • ****
  • Posts: 119
  • Awards Recognizes a winner of an Amateur Modding Contest on this site.
    • View Profile
    • Awards
Re: [TUTORIAL]Five Weapons In SWBF1
« Reply #13 on: June 25, 2012, 02:04:06 PM »
Yes, the other 4 can be primary, I've been testing them. It's just that great 5th weapon can't have geometry (as already stated).
Why WEAPONSECTION though, I'm wondering?  I've tried using the WeaponName5 (etc) and it didn't do it.  Any explanation for it?
Is a 6th weapon like overload or something?  I tried with the same (imperial mines) as my 5th weapon, and crashed still.
Dark_Phantom
Who else?!?  You thought I was a noob?
Well, you were right.

Buckler

  • Administrator
  • INTERNET ADDICT
  • *****
  • Posts: 2764
    • View Profile
    • Awards
Re: [TUTORIAL]Five Weapons In SWBF1
« Reply #14 on: June 25, 2012, 04:23:27 PM »
SK was saying something like it was like it was done for the recon droid, when can be classified (I think) as a vehicle.  So maybe 5 is the limit for vehicles.  Not sure though...just another SWBF mystery :)

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal