Airships: Conquer the Skies

Airships: Conquer the Skies

The Shipyard
Create and find new weapons and engines for your aerial armada. Share your best ship designs.
cataclysm 4 6 May, 2016 @ 12:06pm
Modding Troubleshooting and Advice!
having trouble modding or need some advice on how to implement ideas, ask here!

i offer my expertise to anyone who wants to learn how to mod or how they could impliment a mod.

(edit)
also here is a few lines of code you can use for mudules, note that you need to remove #'s and my commentary for using it or copy/pasting it, its also a json file so you need to use a text/code editor on it[dl.dropboxusercontent.com]
Last edited by cataclysm; 21 Oct, 2016 @ 9:12am
< >
Showing 1-15 of 79 comments
71 20 6 May, 2016 @ 1:27pm 
Title is a bit long and misleading. At a glance, I thought you were having problems and asking for advice. Might be better as 'Modding Troubleshooting and Advice!' or similar.

I definitely support the idea of a dedicated modding advice discussion.
cataclysm 4 6 May, 2016 @ 1:30pm 
changed it, becuse i'm kinda busy i just did the lazy and changed it
DocPeabody 2 7 May, 2016 @ 12:45pm 
Heyo! I got another "Mod wont load and can't tell you why" situation, so maybe you can help! Here is the folder:
https://drive.google.com/open?id=0B3rnTT4fBMKtT1Y2ZUUzdnh5LWs
This is my first attempted at hadding a custom sound, so that might have something to do with it, however, I still can't seem to figure out specifically why its not working.
cataclysm 4 7 May, 2016 @ 3:26pm 
Originally posted by DocPeabody:
Heyo! I got another "Mod wont load and can't tell you why" situation, so maybe you can help! Here is the folder:
https://drive.google.com/open?id=0B3rnTT4fBMKtT1Y2ZUUzdnh5LWs
This is my first attempted at hadding a custom sound, so that might have something to do with it, however, I still can't seem to figure out specifically why its not working.

ok... its not your code, you even did the right sound format... no you made .jpg images, not only are those terrible for doing anything art related(they are only good format for highly categorized science functions or low file-size) but it actually brakes the game, and its not transparent...

sooo... use .png for images... and it will un-bork your mod.

i have it running in my game atm, not going to save it, too mee'mee, also nice screech, it sounds like one of the Russian soviet era land mattresses...
Last edited by cataclysm; 7 May, 2016 @ 3:32pm
Snuggery 31 Jul, 2016 @ 9:10am 
Everything works fine except custom sounds. In .ogg format, in sounds folder inside mod, 128 bitrate, average 50kb in size and do not play. used fireSound and fireSoundcount 1.

Are there strings i have to put somewhere for game to recognize my sound folder?
Feeder Castro 6 31 Jul, 2016 @ 4:33pm 
"explodeHP": how does it work? i'm making a giant cannon and want it to explode at 2000 hp but it has been destroyed (exploded) at the first hit with steel wall

Thanks
Doctor Psyringe 2 Aug, 2016 @ 10:41am 
@Snuggery - Try different methods of .ogg conversion. I originally tried VLC for the creation of .ogg's and it resulted in "blank" audio. When I swapped to Adobe Audition, it worked fine. Online converters worked as well.

@DoReCiakGulp - HP's trigger underneath the primary "hp", for example;

"hp": 100, "explodeHP": 80,

After the module takes 20 damage it runs the risk of explosion.
cataclysm 4 2 Aug, 2016 @ 11:05am 
Originally posted by Snuggery:
Everything works fine except custom sounds. In .ogg format, in sounds folder inside mod, 128 bitrate, average 50kb in size and do not play. used fireSound and fireSoundcount 1.

Are there strings i have to put somewhere for game to recognize my sound folder?

you should be able to play them, you just need to make sure the have the same naming when you call them, like when you want a firing sound you make sure the name is the same as the one in the 'sounds' folder

when it comes to sound as long as the extension and encoding is .ogg it should automaticly play when you use it... you also need to specify how many variations of sounds you have for it to work correctly and you should not add any extensions to internal references like images or sounds in your files, example:
"fireSound": "da_cannon", "fireSoundCount": 3(or as many sounds as you have),
and files in your sound folder should be called (in this example)
da_cannon0.ogg da_cannon1.ogg da_cannon2.ogg da_can... ect, ect
sounds need a number after the name, and you don't reference this in the name you call for a sound but you need to add it to name of the sound in the sounds folder

also for the un-initiated to airships's mod style, the game starts counting from:
0, 1, 2 ,3 ~
instead of the human way of:
1, 2, 3, 4 ~
but saying you have 3 sounds still means you have 3 sounds and not 4 or 2


Originally posted by DoReCiakGulp:
"explodeHP": how does it work? i'm making a giant cannon and want it to explode at 2000 hp but it has been destroyed (exploded) at the first hit with steel wall

Thanks

ok, you have to take a bunch of stuff into consideration, you need to keep in mind how explodeHP or fireHP work.

these variabels say one thing, the level at which something is guaranteed to happen when any kind of damage is applied...

to demonstrate this lets set up a scenario...

you have a module that has the following values(for simplicity were going to ignore all other vitals here, and ignoring how things are capitalised properly):

"hp": 4000, "fireHP": 3000, "explodeHP": 2000, "explodeDmg": 5000,

assuming adjacency hp bonus is disabled,
this module will start with armour and a healthpool of 4000,
when one piece of armour brakes the module will start taking damage,
when its hp reaches below 3000, any shot will make it catch fire(blast damage is 99% chance, penetration damage is something like 75% chance),
when the module reaches below 2000, the module will explode(~85% chance for all damage),
and when it does explode it will deal 5000 blast damage to all modules it's touching, if you are unlucky, it will chain react and make your ship transition from a solid to a gas in a timely manner.

this is exactly how a module with these stats would react, if we take into account the adjacency bonuses for hp(and you could get extra hp from modules with bonus ship hp) looking at a handy table gives us that if your module is less 65% covered on all sides it will start at less than its base hp, this base hp, if modified by this 'feature' and if your module happens to require more than one side to be open to the sky... well lets just say that you can start with the real hp being less than the fire or explosion hp levels(that don't change no mater what) and as result you will find your module to be very sensitive to enemy fire...

you can check how much hp it has in the ingame editor when you enable the data overlay for hp, you should always try to simulate 'normal' placement for your modded modules to see if they are not decorative powder kegs or oil soaked bonfire beacons...
Last edited by cataclysm; 2 Aug, 2016 @ 11:38am
Feeder Castro 6 2 Aug, 2016 @ 2:12pm 
thank you, i tought that fire and explosion hp were a different counter. In this way the real hp of a module is actual hp - explosion hp right?
cataclysm 4 2 Aug, 2016 @ 2:38pm 
Originally posted by DoReCiakGulp:
thank you, i thought that fire and explosion hp were a different counter. In this way the real hp of a module is actual hp - explosion hp right?
ye, here is another 'real' example, of how this would work in the game, consider this a text-adventure styled battle log of what it would look like in battle

modules has 200 hp and explodes below 50 hp explosion of destruction does 10 damage and for this example steel wall armour

battle start:
module is at the edge of a ship, real hp is 168 has 3 edges touching other modules, has 3 that arren't armour has 18 hp gets shot, rifle shot(4), armour deflects(3) and takes damage(1) armour has 17 hp gets shot, cannonball(40), armour deflects(3) and takes damage(37), armour has -20 hp armour breaks module gets damaged from broken armour(20) module has 148 hp gets shot by riffle -4, module takes damage module has 144 hp gets shot, cannonball(40), module takes damage module has 114 hp gets shot, suspendium cannon(75), module takes damage module has 39 hp gets shot, rifle(4), module explodes module is dead, deals 10 damage to each touching module deals 30 total damage to surrounding modules modules also loose bonus hp that they would have gained by having adjacency(- '~13%' hp of those modules)

i hope you can see some of the effects displayed here...
Last edited by cataclysm; 2 Aug, 2016 @ 2:42pm
Feeder Castro 6 2 Aug, 2016 @ 3:00pm 
yes you are very clear, thank you again
alright i've got two mods ready to go but i the same problem for each of them, this being graphical glitches however its different on each mod:
on the first mod i have the internal graphics but the external appearences wont show up
on the second mod(a keel) all it shows is the background.
all i need is an explanation on what the different x, y's,w's and h's do as i can't figure it out myself: "appearance": {
"src": "Steam_Thruster_sprite",
"x": 1,
"y": 0,
"w": 4,
"h": 3
},
"externalApperances": [
{
"x": -1,
"y": -1,
"appearance": {
"src": "Steam_Thruster_sprite",
"x": -1,
"y": -1,
"w": 1,
"h": 3
cataclysm 4 21 Oct, 2016 @ 8:56am 
Originally posted by dictator putski:
alright i've got two mods ready to go but i the same problem for each of them, this being graphical glitches however its different on each mod:
on the first mod i have the internal graphics but the external appearences wont show up
on the second mod(a keel) all it shows is the background.
all i need is an explanation on what the different x, y's,w's and h's do as i can't figure it out myself:
"appearance": { "src": "Steam_Thruster_sprite", "x": 1, "y": 0, "w": 4, "h": 3 }, "externalApperances": ( { "x": -1, "y": -1, "appearance": { "src": "Steam_Thruster_sprite", "x": -1, "y": -1, "w": 1, "h": 3
use the [ code ] tag to display this stuff propperly

the correct use of this would be...
well you are using negatives to find your apperance and that results in nothing(i'm suprised your mod did not fail to load!) use only positve numbers in your "appearance" -s

"appearance": { "src": "Steam_Thruster_sprite", "x": 1, /* X coerdiate on the image.png */ "y": 0, /* Y coerdiate on the image.png */ "w": 4, /* width of the image sprite */ "h": 3 /* hight of the image sprite */ }, "externalApperances": ( { "x": -1, /* X postion from the 0 point of a module ingame */ "y": -1, /* Y postion from the 0 point of a module ingame */ "appearance": { "src": "Steam_Thruster_sprite", "x": 1, /*these are the same as a noramal 'appearance'*/ "y": 1, "w": 1, "h": 3 } } )
"appearance" uses X and Y to find a sprite on the source:"image", the coordinates start on 0, 0. wich is the absolute 16*16 pixels on the left-top to 63, 63. which is the absolute bottom-right 16*16 pixels.

W is used to say how wide a sprite is and will go to the right of the XY you specified earlier. H is how high it is and will expand downwards from the XY you gave. if you don't specify these the game will use '1' automaticly.

if you go out of bounds for the coordinates by saying X=63 and giving it a W=2(or more) it will error out and not load the mod. also if the W and H does not match the W and H of the modules it will also error out.

"externalApperances" allows you to specify external sprites, it will require a position(else error). again it uses a XY. positive X is right, negative is left. Positive Y goes down, negative goes up. the XY will use the top-left corner of the module as 0, 0. and like the sprite its in 16*16 pixel increments.

you can also use more than one appearance here by using more brackets example:
"externalApperances": ( { "x": #, "y": #, "appearance": { "src": "NAME.PNG", "x": #, "y": #, "w": #, "h": # } }, { "x": #, "y": #, "appearance": { "src": "NAME.PNG", "x": #, "y": #, "w": #, "h": # } }, { "x": #, "y": #, "appearance": { "src": "NAME.PNG", "x": #, "y": #, "w": #, "h": # } }, { "x": #, "y": #, "appearance": { "src": "NAME.PNG", "x": #, "y": #, "w": #, "h": # } } )

fyi, [ ] have been replaced with ( ) in this piece of code due to steam sillyness
Last edited by cataclysm; 21 Oct, 2016 @ 9:42am
cataclysm 4 21 Oct, 2016 @ 9:42am 
Originally posted by dictator putski:
did this help?
cataclysm 4 23 Oct, 2016 @ 6:28am 
...
< >
Showing 1-15 of 79 comments
Per page: 1530 50