Since december 2012 Battlestations: Midway is supported by GameSpy no longer. The only one possibility for Midway players is GameRanger. Please visit www.gameranger.com, download Gameranger client and make new account. You can find other Midway players in the Gameranger rooms. BS:M patch 1.1.1 is required to play online battles. Iowa Mission Pack and Midway Modders Mappacks 1 and 2 are recommended.

Help to add guns to ships.

Help to add guns to ships.

-So this is the advice from Axis Crusher to me to post my questions into the forum for help.
-All i want to ask i how to add guns to ships like suboy100 did in this link: http://www.battlestations.eu/index.php/ … 15&p=9

-I have tried to add but when i luanch the game and start the mission, the game will crash.  ac
-This is what i added to the vehicleclasses.lua :

[22] =
            {
                ["Gun"] =
                {
                    [1] = 40,
                },
                ["Name"] = "AA 3 bal kozepso kosar",
                ["RestAngles"] =
                {
                    [1] = -0.785398,
                    [2] = 0.174533,
                },
                ["Windows"] =
                {
                    [1] =
                    {
                        ["MaxHorzAngle"] = 0.087266,
                        ["MaxVertAngle"] = 1.518436,
                        ["MinHorzAngle"] = -2.879793,
                        ["MinVertAngle"] = -0.139626,
                    },
                },
            },

-Simply, I copied the code of the gun of [21] slot and past it under. Then, I changed [21] to [22] and the name of the gun is from Battlestations Midway Complete version.
-I want to ask if I did something wrong or I missed something and a guide of how to add guns to ship.
-Thanks alot.
-Sorry if my English is bad, it;s not my main language.

minhdiy12
Seaman
Activity Points: 52
ranks
useravatar
Offline
5 Posts
User info in posts
Administrator has disabled public posting

Re: Help to add guns to ships.

I know from past experimentation if you use a slot number that does not exist the weapon will spawn in the centre of the unit so that is not the cause of the crash.

I see you are using gun number 40. What I recommend is to open deviceclasses.lua to check exactly which weapon it is. Note the [Mesh] entry under the device. It should reference a specific .mmod file. Use the BSP Ripper to extract your ship's .mpak and look if that .mmod is present in the models folder.

To illustrate everything a bit more clearly you can watch the video tutorials I made regarding this.
This is the playlist: https://www.youtube.com/playlist?list=P … A7i_oSynXr

Axis_Crusher
BSmodHQ/Riot Police
Moderator
Activity Points: 10353
ranks
useravatar
Offline
1690 Posts
User info in posts
Administrator has disabled public posting

Re: Help to add guns to ships.

-Thanks for your repy.
-Well, I noted that detail before.
-When the game crash, I looked for the deviceclasses.lua and know that [40] is AA Oerlikon 20mm. The ship I am working on is fletcher which was the ship suboy100 added guns successful. And the fletcher already have [40] is AA Oerlikon 20mm itself so the .mmod was already there. I also copied and pasted the vehicleclasses.lua to GGame__OnInit.mpak, GVMainMenu.mpak but it still crash.  ac
-So what more i have to check.
-And many thanks.

minhdiy12
Seaman
Activity Points: 52
ranks
useravatar
Offline
5 Posts
User info in posts
Administrator has disabled public posting

Re: Help to add guns to ships.

What's the size of the mpaks after you repacked them?
Also compare it to the size of the mpaks on the game's disc.

Axis_Crusher
BSmodHQ/Riot Police
Moderator
Activity Points: 10353
ranks
useravatar
Offline
1690 Posts
User info in posts
Administrator has disabled public posting

Re: Help to add guns to ships.

-This is the result:
Before I unpack, the size of the file on the game's disk is 535KB and size on disk is 536KB.
After I repacked, the size of the file is 536KB and size on disk is 540KB.
-There is a bit different but is that important or anything i changed inside the file.  bw

minhdiy12
Seaman
Activity Points: 52
ranks
useravatar
Offline
5 Posts
User info in posts
Administrator has disabled public posting

Re: Help to add guns to ships.

-Ok, thank for your help Axis_Crusher.
-I have just tried it again and it work perfectly without crash but I tested it on the V1.0.5 of zyy mod. So I don't know if it will work on the original game.  bp
-But there i want more thing I want to ask, how can I adjust the horizontal, vertical and rest angle.  bw

minhdiy12
Seaman
Activity Points: 52
ranks
useravatar
Offline
5 Posts
User info in posts
Administrator has disabled public posting

Re: Help to add guns to ships.

You'll have to play with that. I usually just find an existing gun on another unit that has the attributes I need and I copy that. Manually setting this will be very tricky - the values you see are radians and not degrees. You need to figure out which value is which, then determine the amout of degrees elevation, rotation and limits you need and convert it to radians.

Axis_Crusher
BSmodHQ/Riot Police
Moderator
Activity Points: 10353
ranks
useravatar
Offline
1690 Posts
User info in posts
Administrator has disabled public posting

Re: Help to add guns to ships.

-Seem to be a bit of math. I thought it was somewhat of sin, cos or tan formula.  bw  So I am gonna have to deal with the math problems.  bu

minhdiy12
Seaman
Activity Points: 52
ranks
useravatar
Offline
5 Posts
User info in posts
Administrator has disabled public posting
Axis_Crusher
BSmodHQ/Riot Police
Moderator
Activity Points: 10353
ranks
useravatar
Offline
1690 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1690
Total Polls:
69
Total Posts:
23055
Dormant:
User Info:
 
Total Users:
20199
Newest User:
kristianheine2045149
Members Online:
0
Guests Online:
356

Online: 
There are no members online

Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked

Login Form

Battlestations Shoutbox

Latest Message: 1 week, 3 days ago
  • Axis_Crusher : Bismarck Mission Pack incoming!
  • jon_man0499 : Happy belated New year to all
  • Axis_Crusher : HAPPY NEW YEAR!!!
  • YamatoFavor : Would be great if the models are from Wows
  • alantay11 : Is there a way to fill up the empty ship slots when using SurgeonSasha's Yamato? Or is it my game not showing the models?
  • Axis_Crusher : Thanks, but we already implemented both ships in the Advanced Warfare Pack a few months ago...
  • SurgeonSasha : Северная каролина («link» ямато 1945 («link»
  • Legendary Da : Hi everyone, I have one (or two) quick question about BS:M modding. I try to figure out sp mapmaking, and my first act on it was to convert a MP map to SP. However I can only play as Allies in those maps. What parameter do I have to change to play those maps as Japanese in the respective map .mpak (And where is the parameter I have to change?)?
  • N_Trainz : G'day mates, I just wanted to let those who use Windows 10 and also for those who are having troubles getting the game launching because of Games for Windows LIVE, I made a tutorial of how to get it working successfully again like on Windows 8.1. Its on my channel and here's the link to the video. «link»
  • Mokeo67 : The dictator, I downloaded the mmod2txm and I added four slots to the fletcher and a couple to the lexington.Thanks for the help though.
  • The Dictator : Makeo67 i've explained how to find the unused slots in the topic and the mmod2txm it's a program that has been shared. However there aren't so many ships with unused platforms and sme of them are in wrong positions and for move them you need to know how to change the mmod file. But if you know how to do it you can make new platfors as you want. I've shared the south dakota disposition and this one is the most intersting in my opinion
  • N_Trainz : Well it looks like we have spammers again
  • Mokeo67 : No problem Thanks for the help
  • Axis_Crusher : Not really
  • Mokeo67 : Ok thanks anyway. Do you know who does?
  • Axis_Crusher : Unfortunately I don't deal with that part of modding
  • Mokeo67 : Sorry forgot the link. «link»
  • Mokeo67 : This is the forum topic I meant. The dictator said he found the unused slots in the TXM file obtainable with the mmod2txm, what is this and is it available to use.
  • Axis_Crusher : This is your best bet: «link»
  • Mokeo67 : Also I saw on the forum that ships have unused platform slots. How do I use these?

Only registered users are allowed to post

Now Online

None

Birthdays

ZekeThrasher Send PM
birthday was Sunday, 15 January 2017

N_Trainz Send PM
birthday will Saturday, 21 January 2017