Homeworld Remastered Karos Graveyard

Announcing the new Homeworld Remastered Karos Graveyard, the largest modding wiki for Homeworld Remastered. It includes tutorials, documentation, a dictionary, resources, tools, links, functions, user functions, scopes, variables, and dumps. The wiki also contains all relevant content from the original Homeworld 2 Karos Graveyard, and all similar modding wiki’s are being consolidated into it. Over a thousand pages have been created, and everyone is encouraged to contribute.

See the About page for more information. Admins include @Mikali, @Sastrei, @EatThePath, @corodius1, and myself.

8 Likes

Hell yeah :smiley:

Thanks cloaked and everyone who built this!

2 Likes

Very nice work!

2 Likes

Do we have a tutorial on how the new “Tags” and “ExtFilter” systems work? I was never able to understand them.

1 Like

I’ll try to start collating that information today.

Until then this thread is the best resource Mod Filtering - just say no to hacked files

Edit: First version is up! https://github.com/hwrm/KarosGraveyard/wiki/Filters-and-Tags

Its probably worth mentioning Nathanius divide by zero crash too! That if you are using filters and default strike groups you must add to the PassFilter the following:

Or the game might spontaneously crash mid-game! Looking very neat though!

2 Likes

Epic work! :smiley:

2 Likes

I still don’t “get” it.

:frowning:

I’ll take a stab at explaining it, please let me know if it makes sense or not and, if possible, where I lose you. Since the previously linked stuff contains plenty of syntax examples I’ll just mostly stick to the concepts.

Tags and filters are a way to control what content is loaded or visible in varying contexts. There are two main layers of this, the first being the “ExtFilter”.

The ExtFilter determines in essence if a file is loaded by the mod. This primarily allows mods to exclude content from the base game without having to go do anything complicated or weird to force it out of existence. It also provides a way to easily manage unfinished or dev-only content in a mod without having to add too many extra steps in the mod deployment process.

The ExtFilter for a mod is controlled by the Data:\Scripts\ConfigFilters.lua file, and can also be augmented through command line flags. It’s not specified anywhere I’m aware of, but I assume the configfilters of the last mod loaded takes precedence if there are multiple.

The second layer is when filtering is used in various other contexts within a mod. For instance, game rules use filtering to determine what maps and races are available in that gametype, and races use filtering to determine what formations are available. This makes it possible to define consistent categories of content without having to maintain master lists of that content. For example if I wanted to make a sets of factions in two groups, ‘core’ and ‘outer rim’, and have each group use entirely different formations, I can simply set a tag on each new formation instead of having to add to the formations list of all appropriate factions whenever I create a formation.

That’s what it does and why. Now to the how.

A filter has two elements, and two steps. It has a list of ‘pass’ tags and a list of ‘fail’ tags. First the filter collects every file that contains one or more of the pass tags, or just collects all valid files if the pass tag list is empty. Then the filter checks all the collected files and discards any that contain one or more of the fail tags, if there are fail tags defined. What’s left is what the game uses.

I hope this helps.

A list of files that you can add tags and filters to might help me understand.

:frowning:

Filters are a bit strange and confusing at first as its a strange implementation but once you get it, its super easy.

For Filters, if you have a race file for example (lets say scripts/races/hiligran.lua), there will be a line which has ExtFilter = "...". If we change it to ExtFilter = "example", and in your configfilters.lua file you have FailFilter = "example", it will not load the file. This is because it will check the ExtFilters of each file, and if it’s in the FailList it won’t load it.

To make a configfilters.lua file navigate to scripts/and make the file there. It consists of PassFilter = "" and FailFilter = "" If you have a PassFilter, every file that is loaded which has an ExtFilter must be in the PassFilter list or it will not load.

You can apply ExtFilters to races, levels, campaigns & strike groups.

Tags is a similar system but this is done after the ExtFilter. For example you would give each race or level a tag. In the hiligram.lua file mentioned before you have Tags = "...", let’s make it Tags = "examplerace". Now in a rules file (which defines the game mode type, for example deathmatch) you would change Race_Pass_Tags = "..." to Race_Pass_Tags = "examplerace". It will now only load the hiligram race as its the only race with the tag “examplerace”. The same would apply for levels (maps) with Level_Pass_Tags.

A good example of this is how Deathmatch HW1 only has HW1 races and Deathmatch HW2 only HW2 races. For HW1 deathmatch (scripts/rules/deathmathhw1.lua) it has Race_Pass_Tags = "race_dm_hw1" and for HW2 deathmatch (scripts/rules/deathmathhw2.lua) it has Race_Pass_Tags = "race_dm_hw2". So HW1 factions would have "race_dm_hw1" as one of there Tags, and HW2 factions would have "race_dm_hw2" as one of there Tags.

An important thing to note, if you are going to use a PassFilter make sure to add sgf_gbx & sgf_hwrm to it or the game will crash randomly.

Hope this helps!

4 Likes

Thanks. I will try to read that when I next get a chance.

I’ve done lots of cleanup recently of the Functions list and added some more scope pages to help with organization.

5 Likes

Added documentation for

SobGroup_SetShaderValues
addShaderProp
setShaderChannels

2 Likes

It might be with linking to this thread as well:

1 Like