Author Topic: New moddability since 19.0: A modder's development digest(Updated\w Nov changes)  (Read 1701 times)

0 Members and 1 Guest are viewing this topic.

Offline EatThePath

  • 27
  • Laser Lich
    • Twitter
New moddability since 19.0: A modder's development digest(Updated\w Nov changes)
Since we've been the better part of a year without a stable release the temptation to try the shiny new things or enjoy a choice bugfix is hard to resist. I've certainly fallen to it. And looking for bugs to report to the SCP is always a noble endeavor, but we can't very well test or explore things we don't know exist. I've noticed that even people who've been keeping a decent watch on the dev channels are often unaware of some of the new features, even some that are in released campaigns now.

Inspired by that, and some Discord discussions, I went over the project history between 19.0.0's release and November 1st to note down every change that seemed to offer new or significantly updated possibilities for modders. "Under the hood" changes, smaller bugfixes, and ongoing projects that haven't yet reached fruition are omitted. Sometimes there's a bit of a grey area between this and bugfixes, I'm erring on the side of inclusion if it seems to open up possibilities to me.

I also want to be clear, this isn't an SCP produced document and I'm not on the SCP team. I consulted with a few members when things were unclear and got a lot of very gracious and kind help, but if something here turns out to be wrong yell at me, not them. And if it is, tell me so I can go in and fix it. Neither is this a comprehensive list of changes to the engine, lots of bugfixes and groundwork for future features have been happening along the way

Finally, while I try to provide an idea of how a feature works I strongly encourage you to look it up on the wiki to be sure before actually using it. And if you have problems with them after that, maybe it's a bug you should report.

Edit: Updated to include changes done in November, marked with (Nov)

F3 Lab improvements
  • Texture replacements respected
  • Display damage lightning
  • Blow ships up
  • Fire primaries and dumbfire secondaries
  • Trigger animations

New command line flags
  • "-weaponspew", dumps weapon stats data and MVP style descriptions into the debug log, limited to player usable weapons normally, "-weaponspew all" includes stats for all weapons.
  • "-no_screenshake" flag disables most screenshake, unless in multiplayer.


#BEGIN TABLES

Misc
  • New Iff_defs.tbl option "+Hotkey team:", allows the modder to override the game"s default logic for determining which hotkey list a team appears on.
  • traitor.tbl can now specify unique text to use when particular debriefing personas are active.
  • Intel entries should now have no practical length limit.
  • Mainhall modular tables, xxx-hall.tbm, are now fully modular and can modify previously defined mainhalls. These support +nocreate functionality.

Particles effects, -part.tbm
  • "+Length:" field added to particle definitions, making the particle be treated like a laser bitmap when set.
  • Particle effects now accept a list of bitmap sprites to randomly choose between. Simply set +Filename: to a list of filenames, in the same way as other lists in tables, instead of a single filename.

Ships.tbl, -shp.tbm
  • Tables can now determine if a ship has a deathroll or splits in it's death explosion, to override the automatic options.
  • "#Wing Formation" section added which allows the definition of new formations to be used by wings. See the wiki for details.
  • The ability to dual-fire secondary weapons can now be disabled on a per-ship level with the "no doublefire" flag. AI_profiles settings for this also exist
  • Flyby sounds are optional and can be omitted.
  • Ship engine loop can be set to none now.
New per-ship sound settings
  • Sounds can now be defined for the following things on a per-ship basis.
  • Deathroll with "$DeathRollSnd:"
  • Subsystem death with "$SubsysExplosionSnd:"
  • Collision with light, heavy, and shielded objects "+Collision Sound Light:", and so on.
  • Likewise for collisions of the ship's debris via entries of the same name in the debris section.
  • Debris explosions in with "+Explosion Sound:" in the debris section.
  • Debris ambient with "+Ambient Sound:" " in the debris section.
  • New afterburner options let you set a minimum amount of fuel in the tank before activating, a minimum time to run when activated, and a cooldown time between activation. See here for info. (Nov)
  • Trail 'spread', which causes trails to have expanding variations in them rather than being perfectly smooth. (Nov)
  • The obscure shield-to-weapon charge shunting and visa versa system is now tuneable in tables, see wiki starting here. (Nov)

Weapons.tbl, -wep.tbm
  • GLORY GLORY THE WEAPON TYPE LIMIT HAS BEEN BUMPED FROM 300 TO 500, REJOICE. If your mod depends on another mod and has been broken for a while, try it again on a recent build and this might have helped.
  • Mutlilock, previously seen in Wings of Dawn builds, has been integrated into FSO proper. Missile one fighter twice, or two fighters once! It's a big topic, and has already had some options added since it was integrated, so definitely check the wiki entries from here down to see what's possible.
  • If you want to use a modular table to change a weapon with a model into a laser, now you can by setting the weapon model to none
  • SSMs can now be fired from turrets, something that evidently didn't work previously.
  • Changes in remote detonation handling allow multi-stage weapons where the last stage is remote detonated, something which previously did not work for multiple reasons.
New Entries
  • "$Spawn Minimum Angle:" for weapons with children sets an inner cone within the standard spawn cone, within which weapons are not spawned.
  • "$Free Flight Speed Factor:" sets Missile speeds during free flight as a multiple of normal speed, replacing the non-functional "$Free Flight Speed:"
  • Beams now have the ability to grow over time as well as shrink, see the wiki for  the new BeamInfo properties.
  • "+Turning Acceleration Time:" in secondary homing settings, controls what it says. Requires the "$AI use framerate independent turning:" mod setting to be enabled.
  • "$Collision Radius Override:" lets you do what it says in case your model or bitmap is bigger than you want.
    New and updated flags
  • "no impact spew" weapon flag suppresses hit particles.
  • "resets" burst flag that resets the burst shots available if a full firewait passes without firing.
  • "No Radius Doubling" weapon flag can now be applied to interceptable secondaries that aren't bombs.
  • Continuously spawning weapons: a weapon can now spawn children at a configurable frequency, rather than once at the end of their life. Can have an additional initial delay before starting spawn cycles, and play effects on spawns. See the wiki starting here for specifics. (Nov)
  • Trail 'spread', which causes trails to have expanding variations in them rather than being perfectly smooth. (Nov)
  • Target lock restrictions by ship type, class, or species, formerly a multilock missile only feature, have been made available on all missiles. See the wiki starting here (Nov)
  • Configurable IFF targeting restrictions have also been added to the above, allowing amoung other things weapons that can lock friendlies. (Nov)

AI_profiles.tbl, -aip.tbm
  • "$use actual primary range:" now also makes the AI respect "+Weapon Min Range:" on non-turreted weapons.
New Entries
  • "override radius for subsystem path points:" sets a new default distance for determining if a ship has reached a point in a model subsystem path.
  • "$lead indicator second-order prediction factor:" makes the lead indicator try to account for rotational velocity. The value can be set to values between 0 and 1 to change the strength of the effect, and applies to auto-aim or HUD, but not AI.
  • "$fix ramming stationary targets bug:" enables or disables said bugfix.
  • "$Swarmers Lead Targets:" enables smarter swarm missiles.
  • "$respect ship axial turnrate differences:" makes AIs respect the turn times of the direction they're actually turning in, which they apparently haven't been doing, at least not in all cases.
  • "$Shockwaves Always Damage Bombs:" lets bombs take damage from shockwaves
  • "$Shockwaves Damage All Object Types Once:" Prevents bombs from taking shockwave damage multiple times from the same shockwave when above is enabled
  • "$ships with no shields can manage ETS:" flag does what it says, because normally they can't.
  • "$better combat collision avoidance for fightercraft:" makes fighters avoid large objects more reliably, and recover from running into them faster if they still can't avoid it.
  • "$disable player secondary doublefire:" and "$disable ai secondary doublefire:" ai_profiles settings remove the ability to dual fire secondaries. A per-weapon flag for this also exists.

Game_Settings.tbl, -mod.tbm
New Entries
  • "$AI use framerate independent turning:" enables fix for subtle and long standing issues with framerate dependence for missiles and to a lesser extent AI controlled ships. Potentially has balance implications for people who haven't been playing at 60 FPS. Enable with care and test thoroughly.
  • "+AI respect tabled turn time and rotdamp:", which requires the above setting, itself makes turn time values accurate, rather than the normal ambiguous relationship between table and reality.
  • "$Use tabled strings for the default language" turns on using use of tstrings.tbl for english mods.
  • "$Damage Threshold for Weapons Subsystems to Trigger Turret Inaccuracy:"allows you to control what the name describes.
  • "$Render player muzzle flashes in cockpit:" allows the enabling of what it says, as they are now off by default.
#END TABLES

Mission building

The wiki may not have caught up to new SEXPs entirely, but remember that in addition to help in FRED the "-output_sexps" command line flag will make debug builds spit out a comprehensive html document for your reference.

General
  • Chain delays and intervals in missions can now be defined in milliseconds, with FRED support.
  • FRED can now add and remove items in the list of backgrounds.
  • Heading/pitch/bank of objects is now directly editable in FRED rather than just pointing at things.
  • new FRED checkbox for jettisoning ships that are undocked in FRED
  • ship-create can now specify the team of the new ship.
  • Ships are now allowed to have empty display names.
  • Ships on the back side of a subspace portal can no longer be hit by a phantom ship, either when the ship is entering or exiting. (Nov)
  • An optional flag added to ship-maneuver that lets it add to existing maneuvers rather than override them.  (Nov)

New SEXPs
  • center-distance and bbox-distance are replacing distance. The new SEXPs measure the distance between two ship's centers or the closest parts of their bounding boxes, respectively. The old distance measures from center to bounding box, so gives different results depending on order. The old one still works, but using the new ones is recommended.
  • center-distance-subsystem and bbox-distance-subsystem similarly replace distance-ship-subystem.
  • clear-debris clears debris from the mission.
  • clear-weapons likewise clears shots and missiles.
  • change-background switches between different items in the mission's background list, during play.
  • set-debriefing-persona changes the debriefing persona.
  • add-to-collision-group2 and remove-from-collision-group2 can add/remove any number of ships to/from one group at a time, where the old collisions group sexps would add/remove one ship to/from any number of groups at a time.
  • for-ship-class, for-ship-type, for-ship-team, for-ship-species for-players all generate sets of ships via their respective criteria to feed into when-argument. for-players is most useful in multiplayer, but still works outside it.
  • get-power-output sexp allows you to access this otherwise unused ship table value. (Nov)

Scripting
Keep in mind that in addition to the wiki reference the engine can generate scripting documentation for you by running debug with the -output_scripting flag, and it's rather nice documentation. In fact this list includes improvements to the way that is generated!

General
  • pure lua scripts can be used instead of lua tables.
  • Added interface for tracing runtime of lua functions via the capabilities built into the engine. Useful for diagnosing performance intensive code areas.
  • Added support for Lua coroutines. For more information on what that means and enables, see m!m's tutorial on the wiki.
  • Vastly improved scripting documentation handling. Each parameter now has an actual type that has a link in the documentation. Also added support for generating LuaDoc definitions from that information.
  • Several new scripting functions, including but not limited to ba.rand32, ba.rand32f, ba.clear, createRandomVector, perturb for vectors or matrixes, randomInCircle, and randomInSphere.
  • LuaSEXPs can refer to sound table entries.
  • ship-create can specify team for new ships now.
  • tb.ShipTypes collection added, similar to ShipClasses collection.
  • API added for serialization of data.

New scripting hooks
  • command and regular briefings.
  • pain flash.
  • beginning of ship departure from a mission.
  • debris creation.
  • Countermeasure launch.

New access
  • Linear damping.
  • Creating matrixes from vectors.
  • Expanded access to intel and tech room entries.
  • Added full access to the audio streams.
  • Can now check if a mission is a red alert mission.
  • Added getCenterPosition for ships who have off-center origins.
  • Hitpos as hook variable for all collision hooks.
  • Chunk type of debris.

As you can see the SCP team has been quite busy, and I want to extend my thanks to them for both their efforts on the code and their help to me in setting this up. In particular I want to thank Asteroth, Cybrog, Wookiejedi, and m!m for helping me with the areas I understood poorly and in places directly contributing explanations.

If this helps you, or if you see ways to improve it, please let me know. Now, go forth and mod!
« Last Edit: December 03, 2020, 07:54:33 pm by EatThePath »
Name your damn turrets and sounds! Numbers alone aren't helpful!
"if disco is dead then I am the laser lich"
"...[Warmachine] keeps changing as fast as EatThePath can force the engine to do his dark bidding..."

 
Re: New moddability since 19.0: A modder's development digest
Excellent job writing this heads up! :yes:

However I noticed that some of the points (I just checked for "$Shockwaves Always Damage Bombs:" in AI_profiles and the "no impact spew" weapon flag) aren't listed on the wiki.

 

Offline EatThePath

  • 27
  • Laser Lich
    • Twitter
Re: New moddability since 19.0: A modder's development digest
This is true. Things sometimes slip through. At time of writing my intial notes, I didn't find wiki info for those, or +Hotkey Team in IFFs, information about the current mainhall modularity, the random particle sprites, or the collision group 2 and celar sexps. Some of those might have been filled in since
Name your damn turrets and sounds! Numbers alone aren't helpful!
"if disco is dead then I am the laser lich"
"...[Warmachine] keeps changing as fast as EatThePath can force the engine to do his dark bidding..."

 
Re: New moddability since 19.0: A modder's development digest
That's a pretty neat digest.

 

Offline Iain Baker

  • 29
  • 'Sup?
    • Steam
    • Twitter
    • NOMAD's Reviews
Re: New moddability since 19.0: A modder's development digest
Sweet, although about 90% of that went way over my head. Scripting - is that something people making films do?  :lol: :lol: :lol: derp-de-derp
Wanna check out my video games, technology and media website? If so, visit; https://www.nomadsreviews.co.uk/

Interested in hiring my freelance writing, proof-reading, editing, SEO, TTSO, Web Development or Social Media Management services? If so, please messege me at [email protected]

 

Offline EatThePath

  • 27
  • Laser Lich
    • Twitter
Re: New moddability since 19.0: A modder's development digest
well, that's a big part of why I broke it up into sections, so that people can focus on the parts relevant to the kind of modding they're comfortable with. That and the sheer length, of course.
Name your damn turrets and sounds! Numbers alone aren't helpful!
"if disco is dead then I am the laser lich"
"...[Warmachine] keeps changing as fast as EatThePath can force the engine to do his dark bidding..."

 

Offline EatThePath

  • 27
  • Laser Lich
    • Twitter
Re: New moddability since 19.0: A modder's development digest
Some really cool stuff came in November, so I'm amending this. I'm adding the new stuff into the main list, but here's the Novemeber things just on their own if that's more useful for you.
Weapons.tbl, -wep.tbm
  • Continuously spawning weapons: a weapon can now spawn children at a configurable frequency, rather than once at the end of their life. Can have an additional initial delay before starting spawn cycles, and play effects on spawns. See the wiki starting here for specifics.
  • Trail 'spread', which causes trails to have expanding variations in them rather than being perfectly smooth.
  • Target lock restrictions by ship type, class, or species, formerly a multilock missile only feature, have been made available on all missiles. See the wiki starting here (Nov)
  • Configurable IFF targeting restrictions have also been added to the above, allowing amoung other things weapons that can lock friendlies. (Nov)

Ships.tbl, -shp.tbm
  • New afterburner options let you set a minimum amount of fuel in the tank before activating, a minimum time to run when activated, and a cooldown time between activation. See here for info.
  • Trail 'spread', which causes trails to have expanding variations in them rather than being perfectly smooth.
  • The obscure shield-to-weapon charge shunting and visa versa system is now tuneable in tables, see wiki starting here.
  • Tables can now determine if a ship has a deathroll or splits in it's death explosion, to override the automatic options.

Mission building
  • Ships on the back side of a subspace portal can no longer be hit by a phantom ship, either when the ship is entering or exiting.
  • An optional flag added to ship-maneuver that lets it add to existing maneuvers rather than override them. 
  • get-power-output sexp allows you to access this otherwise unused ship table value.
« Last Edit: December 03, 2020, 07:54:51 pm by EatThePath »
Name your damn turrets and sounds! Numbers alone aren't helpful!
"if disco is dead then I am the laser lich"
"...[Warmachine] keeps changing as fast as EatThePath can force the engine to do his dark bidding..."

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: New moddability since 19.0: A modder's development digest

[/li][li]An optional flag added to ship-maneuver that lets it add to existing maneuvers rather than override them. 

I'm cackling