This isn’t in the ‘Mods’ area because it is EXTREMELY important that everyone be aware of it… FYI.
Howdy guys - over the next few patches (and the past few) you are going to see some BIG changes to certain script and data files. Generally these are done to help Mods. We get little if any direct benefit ourselves. However, these changes are often not backwards compatible for many reasons (oh the joys of being data-driven!).
I’d like to cover a few quick ones right now, as I know that with this last patch a few major changes will cause crashes and issues until Mods are updated. If your Mod didn’t touch any of these systems, it is likely just fine. But often Mods include files they don’t need, or they make minor edits. So, be warned. The next round of changes will likely be MUCH more of a delta to many things, so this is a sort of warm-up!
The old engine would load strike-groups based on the contents of Strikegroups.lua - now it loads any .lua file (except the one just mentioned) and adds it to a list. The files now also contain lots of info (name, title, artwork, icon, sorting order, ai preference, etc) - I won’t document that just yet (subject to change) - but now you know to go digging. If you add or remove one of these now, the UI (and right click menu!) will auto-update to reflect the delta.
As well as changes to Strikegroups - Formations are also now loaded simply by searching - a new formation can be added to the game with very little work, and as with SGs there is a fair bit of new meta-data inside their scripts.
A word about AIs & SGs - Before this patch the AI would select a Strike-group based on a random # between 1 and 3 - that’s it. Frigate Line, Fighter Screen, Capitol Phalanx - that’s it. Totally random. Now, using the AI weight property, you can allow AI to select any SG (and weight the results) - including SGs that you don’t allow to be seen on the UI, etc.
With the addition of Raider Retreat we’ve added systems to allow anyone to add Campaigns. Now you can add content and the menus will auto-show it! Again, we’ll document it properly soon - but many of you know how to look for this stuff, and will quickly notice the difference. In addition, I plan to shortly add the ability to save and load ‘campaign’ key/value data into a user profile - and allow levels to be hidden or shown with a filter - meaning levels that fork or change, based on more than just persist files. We’ll go into details once the systems are in place, but understand they are coming, and will bring a whole new level of detail to SP games.
Forthcoming Systems Edits (added 7/8)
In a forthcoming patch a LARGE number of very major systems edits is going to make future Mod authors squeal with glee, and current Mod authors maybe a bit grumpy…
I won’t go into extreme detail because we haven’t released it - and things can and will change. BUT - I wanted to give a heads-up because some of what’s being done can be planned for, etc. This has been a HUGE effort and is looking quite solid - but as with all large deltas (something like 350 files at this point), it takes time and careful testing before anyone sees it…
The main thing is that ‘rubrics’ are GONE. The game has 3 major modes: Single Player, Skirmish, and MP. But those aren’t used or exposed to scripts/assets any longer. Instead, all modes must have a GameRule (GR). If you know much about the engine, you know this was already the case (sorta) - but the new system is making this the #1 rule.
GR can ‘filter’ game content in a number of ways:
- Limit Races available
- Limit Levels available
GR also have a number of new properties that can be seen and used by assets (.ship files) and in-game (the Rules lua, AI, etc)
- Tags - essentially ‘yes no’ flags, any you can imagine.
- Numbers - any you can imagine
- Strings - seeing a pattern yet?
The properties of a GR aren’t stored in a single file (though an initial single file is used to create a GR)… instead there are a series of folders that are searched for script/properties to add to the GR. This means modding a GR for almost anything is an ‘add a new file’ process - almost NEVER a ‘change this existing file’ or ‘nuke this file’ process.
When a GR is selected the tag filters it has for Races/Levels are applied to what the game has detected, so if a level doesn’t match the GR tags for levels, it won’t show up in any lists - ditto for Races.
Races, like GR, now have properties - Tags/Numbers/Strings - and like GR they are loaded by searching sub-folders. In addition, when a GR filters (and keeps) a Race, an extra set of folders defined by the GR is searched under the Race - allowing GR to actually mutate Races. Maybe you have a ‘Free for all’ GR for DM - and the Races are all balanced - but then a ‘Topple the Empire’ GR for DM where one Race is MUCH more powerful and players are supposed to gang up, etc. This is all VERY easy now. This also means that balance tweaks and Mods become less about hacking, and more about careful planning and properties building.
AI used to be a ‘per level’ or ‘per game rule’ thing. The AI files were very heavily hard-coded for races as well. Yeah, that’s gone.
AI can still be per-level. But AI is now defined per-race (and yes, GR can override this per-race). AI scripts use the Race properties and GR properties… so instead of ‘if race is Vaygr do X’ you see ‘math value = SelfRace_GetNumber(“important_property”, 1.0)’ - no more hard coding, period.
AI also used to live in a bubble where they couldn’t see much about the world - and while this is still true (though I think we have a bit more to do there) - the new systems to query Race and GR values, on top of AI being able to vary (completely distinct code per Race if you wish!) is going to mean much smarter AI with way less hacking or hard-coding. I am excited not just for what we can do, but for what all of you will do.
If a file used to exist in some random folder (I’m looking at you BuildAndResearch!!!) - it’s now most likely found under a specific Race’s path. Almost every script or config asset has been moved and rebuilt to work properly. In theory adding a new Race will be CRAZY easy.
Oh, and that old ‘Random’ Race select in Game setup? ‘Random’ is now a type of Race - and it can choose to filter the other races. So while ‘Random’ can be a Race which selects any playable (and allowed by the GR) race, it can also apply stronger limits…
- Random HW1 Race
- Random HW2 Race
- Random Evil Race
- Races With Extra Arms
You get the picture. And as Mod authors, you can go nuts - without hacking.
I’ll outline more as it seems solid/safe to do so… As always, if I wrote something here you want clarity on (when I can) - or ideas you think I might be able to use now to get you something you want, let me know…
- Please use this space to ask questions, get clarifications, etc…