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: 10281
ranks
useravatar
Offline
1683 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: 10281
ranks
useravatar
Offline
1683 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: 10281
ranks
useravatar
Offline
1683 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: 10281
ranks
useravatar
Offline
1683 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1688
Total Polls:
69
Total Posts:
23035
Posts this week:
1
User Info:
 
Total Users:
19857
Newest User:
Anthonyboite
Members Online:
1
Guests Online:
683

Online: 
lisa4834

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, 4 days ago
  • 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?
  • Mokeo67 : I tried changing the bogue class carrier to a yorktown class in the phillipene sea mission and one of two things happened. The mission either didnt change or the game crashed.
  • Axis_Crusher : No problem
  • Mokeo67 : That is what im talking about. Ill have a look at it later thanks for the help
  • Axis_Crusher : specific mission’s 3_scene mpak file by working on the .lua file. There is where the bonus unit is actually added into the mission (by the script). I haven't tried it myself so good luck.
  • Axis_Crusher : I assume you are talking about the bonus units that you unlock for certain missions by completing previous ones (like the B - 25’s in the 2nd Battle of Guadalcanal). The bonus units are unlocked by completing certain objectives in the campaign - so that is linked to your campaign progress. Since that cannot be altered you must look at the missiontree.lua file. This is where the unit will show up unlocked on the mission screen. There are references to allunitslock. Also you will have to edit the
  • Mokeo67 : Thank you I will look in this file. I did unlock all the campaign missions, all you have to do is delete the text after 'prerequisite' and it will unlock. But I havent figured out how to unlock the bonus units.
  • Axis_Crusher : I also prefer it being off, just as most of the BSM community. Most players, however prefer repair to be enabled so that is what we should do. Most of our maps it will be disabled through the script however. If you want to play with the game's repair settings you can find it under shipglobals.lua

Only registered users are allowed to post

Latest Posts

Now Online

Birthdays

HyTech Send PM
birthday will Sunday, 11 December 2016

Nemesisgr Send PM
birthday will Sunday, 11 December 2016

R4tzer Send PM
birthday will Sunday, 11 December 2016

Mad.fin.69 Send PM
birthday will Thursday, 15 December 2016

Szlachcico Send PM
birthday will Thursday, 15 December 2016