Just thought I’d add in some scenario-related stuff I’ve learned through trial and error that someone might find useful. This is current as of 1.10.
[size=150]More scenario stuff: scenarioNumber.txt[/size]
[size=120]type = TUTORIAL[/size] added under the [size=120][config][/size] section of a scenario file disables hard and expert difficulties for that scenario, but makes it not count toward unlocking races.
[size=120]name = SCENARIONAME[/size] entered in the scenario file points to the folder “data\deployments\SCENARIONAME” which should contain “aifleet_easy.txt”, “aifleet_medium.txt”, and “aifleet_hard.txt” for the difficulties to be included.
[size=150]deployments\aifleet_DIFFICULTY.txt (DIFFICULTY = {easy,medium,hard})[/size]
A deployment file contains a lot of fields that pretty much look like this:
[ship0] unique number representing the order in which the ship is deployed…the AI orders seem to target lower # ships sooner than higher-# ones of the same type, range being equal
shipid = 0 same idea as above, but this is used in ship orders
name = Purple squadron in-game tooltip displayed when hovering over that ship
design = _alliance hornet fighter ship design used by the unit. In this example, there MUST be a ship design file in “data\ships” or “\My Documents\My Games\GratuitousSpaceBattles\ships” (not subfolders!) or it won’t deploy in the scenario.
pos = 1728,960 X,Y coordinates of the center of the ship. This DOES NOT have to match the “player_deployment” and “ai_deployment” in the scenario file!
quantity = 16 number of ships; don’t change from 1 except for fighters
angle = 270 starting facing of the ship, 0 = up 90 = right 180 = down 270 = left
behaviour_0 = ATTACK_FIGHTERS,-1,0.86,300.00 example order, affects order they appear in on the orders screen
behaviour_1 = ATTACK_FRIGATES,-1,0.44,200.00 attack orders work by defining "ATTACK_type,?,priority,distance
behaviour_2 = ATTACK_CRUISERS,-1,0.19,228.57
behaviour_3 = ESCORT,8,100.00,0.00 escort orders work by defining “ESCORT,shipid of target,distance,?”
angle = 270 not sure what the 2nd angle entry is for…initially thought it was turret starting direction but they always point up
[size=150]ships\alliance hornet fighter.txt[/size]
Sample ship configuration. Again, the file must appear in “data\ships” or “\My Documents\My Games\GratuitousSpaceBattles\ships” (not subfolders!) for them to show up in a deployment.
[config]
name = _alliance hornet fighter name of the design used by the game engine. THIS MUST MATCH name in the deployment file or bad stuff happens!
guiname = Alliance Hornet Fighter name of the design as it appears in text fields, info, etc
hull = Alliance Hornet Fighter hull type used by the design, which MUST be present in “data\hulls” or you get a lovely crash. Subfolders work for this one.
cost = 93 cost seems to be calculated internally; changing this value doesn’t actually do anything
[modules]
0 = fighter_pulse laser, placement of modules on the design, based on the numbering system in the hull file. These use the names from the module file.
1 = fighter_engine II,
2 = fighter power III,
[size=150]hulls\alliance\alliance hornet fighter.txt[/size]
Note that your hull can actually be anywhere in “\data\hulls” and the game will find it, but it never hurts to tidy up a bit.
[config]
classname = fighter hull type, cruiser frigate or fighter. Entering anything else defaults to cruiser. Sorry, no battleship, mothership, starbase…
name = Alliance Hornet Fighter Internal name used for the hull, which MUST match the ship file’s “design” above
guiname = Alliance Hornet Fighter Hull name that appears when you’re selecting a hull for a design
sprite = Alliance Hornet Fighter.dds picture displayed on the design screen as a background, and for anything but fighters as the default graphic
damagetexture = Alliance Hornet Fighter_damaged.dds texture displayed when the ship is damaged; for fighters it’s the entire right half of “Alliance Hornet Fighter_sprite.dds”
hulktexture = alliance_hulks.dds texture displayed when the ship is destroyed
hulkUVstart = 0 used only by fighters: where on the big texture is the hulk
hulkUVend = 3 used only by fighters: where on the big texture is the hulk
width = 11 meters width of the ship in-game. DO NOT set too high or you will crash; I was stable up to 256 before the game got finicky
height = 11 meters length of the ship in-game. Can be set ridiculously high, I tried up to 4000!
powerproduced = 2.3 Power of base hull before generators
cost = 37 Cost of base hull before modules
racename = alliance Hull is available to this race (alliance, rebel, empire, federation)
[bonuses]
0 = ARMOURBOOST,0.12 Bonus type and amount for this hull; here, it’s +12% to armor. Can be negative or positive. Valid variables are ARMOURBOOST, INTEGRITYBOOST, SHIELDBOOST, SPEEDBOOST, POWERBOOST, COSTBOOST
[runninglights]Where do the nifty blinking lights appear on the ship?
0 = 11,191,100,3,1 Light# = X,Y,Blink Speed in ms,Radius,Color
1 = 245,191,100,3,0 Default colors are (0,1,2,3) for (green,red,blue,white)
[contrails] Where does engine exhaust appear for fighters? Larger ships use [engineglows]
0 = 78,214,40,500,1.5,4 Exhaust# = X,Y,?,max length of trail,width,?
1 = 178,214,40,500,1.5,4
[targets] Where can the ship be shot? Based on a 256x256 grid. BE CAREFUL WITH “EMMITER” SPELLING or you’ll get a crash! Must match an effect in “data\particleconfigs”
0 = 76.00,91.00,0,0, target# = X,Y,no special effect on hit,no special damage texture on hit
1 = 148.00,41.50,1,1,115.00,13.00,181.00,70.00,SHIP_EMMITER_SMALL, target# = X,Y,boolean for effect on hit,boolean for damage texture on hit,x1,y1,x2,y2 of damage textures,effect on hit,(particle effects) though there aren’t any for this hull. They’d look like this: (damage_sprite_sparks-x-y),(damage_sprite_smoke-x-y)
2 = 126.50,131.00,1,1,99.00,103.00,154.00,159.00,SHIP_EMMITER_SMALL,
[slots] What can the ship equip. Coordinates are still a 256x256 grid
0 = 128.00,61.00,TURRET,(97.00-21.00),(159.00-21.00), Slot # in the ship file = X,Y,type,(x-y of hardpoint 1),(x-y of hardpoint 2),
1 = 128.00,163.00,STANDARD, You can use hardpoints for standard modules too, but obviously they don’t show up in-game as little turrets
2 = 128.00,128.00,STANDARD,
[explosions]Effects used when the ship is destroyed
0 = 0,128,128,EXP_STARTBREAKUP
1 = 0,128,128,EXP_FIGHTER_DESTROYED_LOD
2 = 0,128,128,EXP_FIGHTER_DESTROYED
3 = 0,128,128,EXP_BLASTGLARE
[size=150]DIFFERENCES between FIGHTERS and other hulls:[/size]
Something that isn’t a fighter classname uses [engineglows] rather than [contrails], for example:
[engineglows]
0 = 87,218,32,50,ALLIANCE Glow# = X,Y,width,height,color (ALLIANCE = yellow, IMPERIAL = blue, blank = white)
Large ships don’t have HULKUVSTART and HULKUVEND. They use a dedicated texture file and [hulks] instead, and the coordinates are based on a 512x512 grid (!):
[hulks]
1 = 23,158,117,445,(emit-62-215-hulk_emmiter),(emit-51-245-hulk_smoke_emmiter), fragment# = X1,Y1,X2,Y2 of the fragment on the texture,(emit-x-y-sparks),(emit-x-y-smoke),
Again, BE CAREFUL WITH SPELLING and commas!