[Guide] GSB Modding 101

Welcome to the shipyards. Here you can discuss how to re-calibrate the positronic neutron flow to double power to the aft shields. Or you can discuss how to add new ships, new maps, new scenarios, new modules, etc. have fun!
User avatar
AcePalarum
Supreme Robot
Supreme Robot
Posts: 1132
Joined: Tue Dec 29, 2009 8:57 pm
Location: Lurking Right Behind You

Re: [Guide] GSB Modding 101

Postby AcePalarum » Sat Apr 07, 2012 6:05 pm

Another rather odd question; some searching of the forums failed to produce a definitive answer. Does anyone know if (and if so, how) the visual texture of a smart-bomb module can be changed? Looking at the Swarm Smart Bomb module code, I don't see a "texture =" line or anything similar. Help would be appreciated. :)
While my ability to succeed is finite, my capacity for failure knows no bounds.
*Basement Tinkerer and OCD Savant of the Friendly Community Mod Squad*

Mods: Matmos Rift, Antares Expanse, Great Powers Stations
User avatar
Praetors
Supreme Robot
Supreme Robot
Posts: 1820
Joined: Sat Oct 02, 2010 2:27 am
Location: In a Patrol mission at Argena Prime.
Contact:

Re: [Guide] GSB Modding 101

Postby Praetors » Sun Apr 08, 2012 4:32 pm

Sadly, there is no way to change the texture of the Swarmy Smart Bomb, its hardcoded.
Also, i think that call it "texture" is wrong, cuz AFAIK its a fully animated shockwave, i wonder how it works... xD
PI: positech.co.uk/forums/phpBB3/viewtopic.php?f=23&t=5698
TP: positech.co.uk/forums/phpBB3/viewtopic.php?f=23&t=6928
TG: positech.co.uk/forums/phpBB3/viewtopic.php?f=23&t=7659

Engineer of the Friendly Community Mod Squad.
User avatar
AcePalarum
Supreme Robot
Supreme Robot
Posts: 1132
Joined: Tue Dec 29, 2009 8:57 pm
Location: Lurking Right Behind You

Re: [Guide] GSB Modding 101

Postby AcePalarum » Sun Apr 08, 2012 6:49 pm

Well I call it "texture" because there's a 512X512 sprite called "smartbomb_texture" that shows the greeny-blue pattern (plus a "smartbomb_alpha" that has the circular shockwave). That's crummy, though. Especially since it means to use a smart bomb module, one must have the Swarm installed. I was hoping to avoid that. Maybe a slight reconception is in order for a module or two...
While my ability to succeed is finite, my capacity for failure knows no bounds.
*Basement Tinkerer and OCD Savant of the Friendly Community Mod Squad*

Mods: Matmos Rift, Antares Expanse, Great Powers Stations
User avatar
Dantalion
Supreme Robot
Supreme Robot
Posts: 226
Joined: Thu Nov 26, 2009 7:57 pm

Re: [Guide] GSB Modding 101

Postby Dantalion » Sun Apr 08, 2012 11:24 pm

Actually, you can replace the smart bomb texture without modifying the original files. It will however change appearance of the Swarm Smart Bomb as well to the texture you make. As long as you have smartbomb_alpha.dds and smartbomb_texture.dds in your mod's bitmaps folder. Alpha is simply a white pattern that is overlaid with the texture pattern in the second file.

Here's an example of a modified smart bomb:
Image
User avatar
AcePalarum
Supreme Robot
Supreme Robot
Posts: 1132
Joined: Tue Dec 29, 2009 8:57 pm
Location: Lurking Right Behind You

Re: [Guide] GSB Modding 101

Postby AcePalarum » Tue Apr 10, 2012 1:58 am

Okay, time for another silly question that doesn't quite get answered elsewhere.

Turrets. For the big 8X8 grid of turrets, does the image have to be a power of 2 (256X256, 512X512 etc.) or will any old square file work as long as the turrets are correctly placed along the 8X8 grid? Has anyone tried using a mapping file that wasn't a power of 2?
While my ability to succeed is finite, my capacity for failure knows no bounds.
*Basement Tinkerer and OCD Savant of the Friendly Community Mod Squad*

Mods: Matmos Rift, Antares Expanse, Great Powers Stations
User avatar
darkstar076
Supreme Robot
Supreme Robot
Posts: 2200
Joined: Sun Feb 28, 2010 2:14 am
Location: Lurking somewhere in the Forum

Re: [Guide] GSB Modding 101

Postby darkstar076 » Tue Apr 10, 2012 2:34 am

From what i remember, it does not have to be a power of 2.
The game will automatically divide the image into an 8x8 grid.
So at the very least i would recommend a multiple of 8.

In case anyone askes "If it have to be square?"
No it does not have to be square but the game will stretch the image into a square shape which may distort your long barrel howitzer into a sawnoff cannon.
Wisdom is something you generally obtain around three seconds after you needed it the most
-=Modding Guru & Egon Spengler of the Friendly Community Mod Squad=-
User avatar
AcePalarum
Supreme Robot
Supreme Robot
Posts: 1132
Joined: Tue Dec 29, 2009 8:57 pm
Location: Lurking Right Behind You

Re: [Guide] GSB Modding 101

Postby AcePalarum » Tue Apr 10, 2012 1:22 pm

darkstar076 wrote:From what i remember, it does not have to be a power of 2.
The game will automatically divide the image into an 8x8 grid.
So at the very least i would recommend a multiple of 8.


Which is, by definition, also a power of 2. :p

I'll put some non-power of 2 turrets together, test and report back on any irregularities. For science!
While my ability to succeed is finite, my capacity for failure knows no bounds.
*Basement Tinkerer and OCD Savant of the Friendly Community Mod Squad*

Mods: Matmos Rift, Antares Expanse, Great Powers Stations
User avatar
darkstar076
Supreme Robot
Supreme Robot
Posts: 2200
Joined: Sun Feb 28, 2010 2:14 am
Location: Lurking somewhere in the Forum

Re: [Guide] GSB Modding 101

Postby darkstar076 » Tue Apr 10, 2012 1:36 pm

AcePalarum wrote:Which is, by definition, also a power of 2. :p

Doh! - what i meant was you could have a 800x800 image and the game would divide it into 64 squares of 100x100 pixals . . (nice whole numbers)
Wisdom is something you generally obtain around three seconds after you needed it the most
-=Modding Guru & Egon Spengler of the Friendly Community Mod Squad=-
User avatar
AcePalarum
Supreme Robot
Supreme Robot
Posts: 1132
Joined: Tue Dec 29, 2009 8:57 pm
Location: Lurking Right Behind You

Re: [Guide] GSB Modding 101

Postby AcePalarum » Tue Apr 10, 2012 6:06 pm

Dunno how round or whole the number will be, but since I'm planning to build the turret mapping file directly from the individual square turret sprites, it will wind up a perfect multiple of 8, which should work OK. As always, time (and testing) will tell.
While my ability to succeed is finite, my capacity for failure knows no bounds.
*Basement Tinkerer and OCD Savant of the Friendly Community Mod Squad*

Mods: Matmos Rift, Antares Expanse, Great Powers Stations
User avatar
BowlNwhsprer
Supreme Robot
Supreme Robot
Posts: 125
Joined: Thu Mar 03, 2011 7:19 am
Location: US, Hawai'i, O'ahu, Mililani

Re: [Guide] GSB Modding 101

Postby BowlNwhsprer » Wed Apr 11, 2012 12:55 am

In my further testing of the unexplained aspects of modding yet to be revealed on the forums I decided to look at the Order's tractor beam systems.

Code: Select all

[tractorbeams]
0 = 279,320,363,320,58,0


Above is the tractorbeam coding for the Order's Redemption Frigate.

Below is the coding for the explanation.

Code: Select all

[tractorbeams]
0 = X1,Y1,X2,Y2,W,A


X1 / X2 = The X-coordinates for the tractor beam based on a 512x512 grid.

Y1 / Y2 = The Y-coordinates for the tractor beam based on a 512x512 grid.

Visually, it creates two points for the tractor beam animation to appear and uses value "W" for the amount of pixels to show.

Image

W = Width of the Beam. You'll need to play around with this number to get it to fit your ship hull properly.

W = 100: Wide, fat beam.

Image

A = Angle of the beam. Default is 0 because the beam for the Redemption frigate is flat at 0 degrees.

A = 58: It's off isn't it? I know.

Image

Pretty simple to utilize them. I assume they can be used for fighters, which is what I want to do.

I will will try to better explain explosions soon. I've read the tutorials but I still don't quite get it.
"Remember, the enemy's gate is down." ~ Andrew "Ender" Wiggin from Orson Scott Card's "Ender's Game"
User avatar
AcePalarum
Supreme Robot
Supreme Robot
Posts: 1132
Joined: Tue Dec 29, 2009 8:57 pm
Location: Lurking Right Behind You

Re: [Guide] GSB Modding 101

Postby AcePalarum » Wed Apr 11, 2012 2:42 am

This will be helpful when I get to assembling the station hulls for the Order. Good work sir!
While my ability to succeed is finite, my capacity for failure knows no bounds.
*Basement Tinkerer and OCD Savant of the Friendly Community Mod Squad*

Mods: Matmos Rift, Antares Expanse, Great Powers Stations
User avatar
BowlNwhsprer
Supreme Robot
Supreme Robot
Posts: 125
Joined: Thu Mar 03, 2011 7:19 am
Location: US, Hawai'i, O'ahu, Mililani

Re: [Guide] GSB Modding 101

Postby BowlNwhsprer » Thu Apr 12, 2012 10:18 am

I was thinking about how to make this thread a bit more easy to navigate and I dawned on me that maybe we could set up a wikia page =OR= utilize the Wiki for Gratuitous Space Battles as a hangar for modding tutorials, storage unit for the downloading of mods (if allowed), and adding other things (like GTB links, pictures, vids) as we go along.

The beauty of wikis is that we all can contribute (adding AND deleting) and leave our finished works of art on display. The forums then, in turn, would be for general question, answer, and direction to parts of the wiki.

It would make organization way easier when, say a regular on the forums, stops posting and we can't organize a thread (such as this one) as we do not have the power to do so. It would also remove the pressure off of the said regular of having to update all the time when the whole community has access to and can change or add information and/or data whenever they choose to.
"Remember, the enemy's gate is down." ~ Andrew "Ender" Wiggin from Orson Scott Card's "Ender's Game"
User avatar
AcePalarum
Supreme Robot
Supreme Robot
Posts: 1132
Joined: Tue Dec 29, 2009 8:57 pm
Location: Lurking Right Behind You

Re: [Guide] GSB Modding 101

Postby AcePalarum » Tue Apr 17, 2012 2:19 am

AcePalarum wrote:Dunno how round or whole the number will be, but since I'm planning to build the turret mapping file directly from the individual square turret sprites, it will wind up a perfect multiple of 8, which should work OK. As always, time (and testing) will tell.


For those interested, testing has shown that the game appears to handle non-standard turret sprite sizes just fine, as long as the turret mapping file is a square. (My test involved turrets that were 432 pixels square, with a mapping file 8 times that. Yes, there's a reason for the monster size of the file. No, I'm not going to tell. Yet.)
While my ability to succeed is finite, my capacity for failure knows no bounds.
*Basement Tinkerer and OCD Savant of the Friendly Community Mod Squad*

Mods: Matmos Rift, Antares Expanse, Great Powers Stations
Dalan Inithis
Senior Line Worker
Senior Line Worker
Posts: 7
Joined: Thu Apr 12, 2012 12:08 am

Re: [Guide] GSB Modding 101

Postby Dalan Inithis » Tue Apr 17, 2012 5:21 pm

Hey. I downloaded the demo of the game about a week ago and I am now planning to buy the game. I am quite amazed at the content of this little subsection. I was curious; how would you recommend creating a hull graphic to put into the game?
User avatar
Praetors
Supreme Robot
Supreme Robot
Posts: 1820
Joined: Sat Oct 02, 2010 2:27 am
Location: In a Patrol mission at Argena Prime.
Contact:

Re: [Guide] GSB Modding 101

Postby Praetors » Tue Apr 17, 2012 9:10 pm

Its quite simple, search the folder with hulls pictures inside the game directory, open a graphical proccessor and start cutting, pasting, recolouring, modifying the graphics of vainilla hulls. At the beginning it may be a bit slow, but when you get the point, you will be making several hulls per day ^^
PI: positech.co.uk/forums/phpBB3/viewtopic.php?f=23&t=5698
TP: positech.co.uk/forums/phpBB3/viewtopic.php?f=23&t=6928
TG: positech.co.uk/forums/phpBB3/viewtopic.php?f=23&t=7659

Engineer of the Friendly Community Mod Squad.

Return to “Gratuitous Modding”

Who is online

Users browsing this forum: No registered users and 1 guest