FAF Creative Palette

8

As mentioned in the roadmap here:
https://forum.faforever.com/topic/305/creative-councilor-intro-roadmap-discussion/4

As it stands right now, the limiting factor in user created maps is without a doubt props, this means reclaim like trees or rocks.

While map authors are very much able to easily implement new custom textures and decals into their work, you'll notice that authors are more or less forced to resort to the same 2 or three props, or completely cripple their creativity because we just don't have the assets to match the idea.

Some examples:

  • All crystaline maps "need" to be the same blue purple hue. Lava/Crystal hybrids don't exist.
  • Fall/Autumn maps don't exist. Brown or otherwise dying trees force this to be impossible.
  • Most unique maps need to rely on the same black trees you're probably aware of or they cannot be done due to limitations.
  • etc.

After the older attempts to get custom props going in Gateway and Rose, we eventually pushed through a patch for the code that allows you to load props from your map folder. Or so I have been told.

(The map folder is of course - the same place we're putting stuff like custom textures now.)

This also comes with it's own set of problems and thus isn't an optimal solution:

  • Every map having to upload it's own props will flood out the servers (I assume)
  • People just don't know how to edit props, of course.
  • Similar looking props might end up having their own different mass values if authors decicde to change them in the script.
  • etc.

The FAF Creative Palette project is a simple project aimed on small edits to map assets in order to bring a larger variety of enviroments to the game. It's not a radical new concept, but can easily provide a lot of reward for little to no risk or effort.

Here is a simple example I did, I opened a crystal prop and then made one edit.

alt text

All of a sudden, these recoloured red crystals open up a number of possible use cases.

  • First, all geothermal/crystal maps don't need to be blue.
  • Lava maps can now have crystal props that fit the colour scheme.
  • More hellish maps now have a chance.
  • etc.

I want to do a number of these and then add them to FAF so that map authors can use them in their own creations. And of course, you're allowed to help on this.

That currently includes editing the following items, and i'll add onto this later:

  • Said Crystals, in a number of colours (Red, Orange, Yellow, Silver, etc)
  • Trees (Fall trees, more lava/ashen trees or in varying states of "death", pink trees for you weebs, etc)
  • Some more rocks ("Brown" rocks similar to some evergreen textures, other colours)
  • Maybe some tiny little civilian houses that resemble rocks, metal scraps)

What happens now? Well first, we'll probably announce a prop making tournament after the mapping tournament i'll announce later tonight, Due to the interesting theme for this one, making props for the tournament is also encouraged.

You can discuss it, add your suggestions or offer to assist this below. Suggestions for other things to add such as decals or textures are also fine. I'll make some more concepts to push this project forward shortly. Talk soon.

1

Hey, lovely idea!
When I was working on Supreme Props, I also noticed a lot of inconsistencies in the props. You can find more pictures and details here: https://forums.faforever.com/viewtopic.php?f=41&t=15934&start=10#p174625

Some prop models are exclusive to certain themes. E.g. the 37.5 (38) stones from the desert theme. We could already create new props by recombining existing models and textures. If relevant, the map FA and FAF Props contains all currently usable props.
2021-02-23_22-13.png

0

@biass said in FAF Creative Palette:

After the older attempts to get custom props going in Gateway and Rose, we eventually pushed through a patch for the code that allows you to load props from your map folder. Or so I have been told.

does that mean the old Gateway and Rose will work now?

0

It means he thought it did 🙂 . But they could be added to the rest of the props with this initiative.

0

@nine2 said in FAF Creative Palette:

does that mean the old Gateway and Rose will work now?

No, the map file is now all busted up and unusable, and while the merge is in, you need some extra stuff that may or may not work with an actual ranked game (clarification needed)

You can see the merge here though: https://github.com/FAForever/fa/commit/4a3efe717b5d8f060854e7e97d9d8823c91c7c63

@svenni_badbwoi said in FAF Creative Palette:

We could already create new props by recombining existing models and textures.

We will probably be doing this for a number of textures.
I think it's best if we figure out a small scope of what is going to be made, first.

1

I intent to make a batch to include additional props a week before the summer mapping tournament finishes. In turn with a bit of luck the maps from the tournament can actually go to the vault and immediately use the custom props.

To be specific: For this batch I'll accept the last props at the 10th of April. That will give me roughly 2 - 3 days to create the PR and test it. Then @keyser or possibly @speed2 can authorize the PR to the develop branch. In turn, the maps will be playable on the developers branch.

When that will be finally pushed to the master branch is beyond my knowledge. I'll leave that for keyser / speed2 to look into .

Please post your props in this topic in a convenient .zip and make sure that your props work in the ozone editor. Props that do not work in the ozone editor will not be included - I'm not going to debug your props 🙂 .

0

A short guide for people that would like to test their assets in-game:

-- Replace this with the path to your local repository.
repository =  'C:\\Workspace\\forged-alliance-forever-lua'

-- this imports a path file that is written by Forged Alliance Forever right before it starts the game.
dofile(InitFileDir .. '\\..\\fa_path.lua')
path = {}
local function mount_dir(dir, mountpoint)
    table.insert(path, { dir = dir, mountpoint = mountpoint } )
end
local function mount_contents(dir, mountpoint)
    LOG('checking ' .. dir)
    for _,entry in io.dir(dir .. '\\*') do
        if entry != '.' and entry != '..' then
            local mp = string.lower(entry)
            mp = string.gsub(mp, '[.]scd$', '')
            mp = string.gsub(mp, '[.]zip$', '')
            mount_dir(dir .. '\\' .. entry, mountpoint .. '/' .. mp)
        end
    end
end

-- Begin map mounting section
-- This section mounts movies and sounds from maps, essential for custom missions and scripted maps
local function mount_map_dir(dir, glob, mountpoint)
    LOG('mounting maps from: '..dir)
    mount_contents(dir, mountpoint)
    for _, map in io.dir(dir..glob) do
        for _, folder in io.dir(dir..'\\'..map..'\\**') do
            if folder == 'env' then
                LOG('Found env files in: '..map)
                mount_dir(dir..map..'\\effects', '/effects')
            elseif folder == 'effects' then
                LOG('Found map effects in: '..map)
                mount_dir(dir..map..'\\effects', '/effects')
            elseif folder == 'movies' then
                LOG('Found map movies in: '..map)
                mount_dir(dir..map..'\\movies', '/movies')
            elseif folder == 'sounds' then
                LOG('Found map sounds in: '..map)
                mount_dir(dir..map..'\\sounds', '/sounds')
            end
        end
    end
end

mount_map_dir(SHGetFolderPath('PERSONAL') .. 'My Games\\Gas Powered Games\\Supreme Commander Forged Alliance\\maps\\', '**', '/maps')
mount_map_dir(InitFileDir .. '\\..\\user\\My Games\\Gas Powered Games\\Supreme Commander Forged Alliance\\maps\\', '**', '/maps')

-- these are the local FAF directories. The My Games ones are only there for people with usernames that don't work in the upper ones.
mount_dir(repository, '/')

-- Begin mod mounting section
-- This section mounts sounds from the mods directory to allow mods to add custom sounds to the game
function mount_mod_sounds(MODFOLDER)
    -- searching for mods inside the modfolder
    for _,mod in io.dir( MODFOLDER..'\\*.*') do
        -- do we have a true directory ?
        if mod != '.' and mod != '..' then
            -- searching for sounds inside mod folder
            for _,folder in io.dir(MODFOLDER..'\\'..mod..'\\*.*') do
                -- if we found a folder named sounds then mount it
                if folder == 'sounds' then
                    LOG('Found mod sounds in: '..mod)
                    mount_dir(MODFOLDER..'\\'..mod..'\\sounds', '/sounds')
                    break
                end
            end
        end
    end
end
mount_mod_sounds(SHGetFolderPath('PERSONAL') .. 'My Games\\Gas Powered Games\\Supreme Commander Forged Alliance\\mods')
mount_mod_sounds(InitFileDir .. '\\..\\user\\My Games\\Gas Powered Games\\Supreme Commander Forged Alliance\\mods')
-- End mod mounting section
-- these are the classic supcom directories. They don't work with accents or other foreign characters in usernames
mount_contents(SHGetFolderPath('PERSONAL') .. 'My Games\\Gas Powered Games\\Supreme Commander Forged Alliance\\mods', '/mods')
mount_contents(SHGetFolderPath('PERSONAL') .. 'My Games\\Gas Powered Games\\Supreme Commander Forged Alliance\\maps', '/maps')
 
-- these are the local FAF directories. The My Games ones are only there for people with usernames that don't work in the uppder ones.
mount_contents(InitFileDir .. '\\..\\user\\My Games\\Gas Powered Games\\Supreme Commander Forged Alliance\\mods', '/mods')
mount_contents(InitFileDir .. '\\..\\user\\My Games\\Gas Powered Games\\Supreme Commander Forged Alliance\\maps', '/maps')

--load preferences into the game as well, letting us have much more control over their contents. This also includes cache and similar.
mount_dir(SHGetFolderPath('LOCAL_APPDATA') .. 'Gas Powered Games\\Supreme Commander Forged Alliance', '/preferences')

-- these are using the newly generated path from the dofile() statement at the beginning of this script
mount_dir(fa_path .. '\\gamedata\\*.scd', '/')
mount_dir(fa_path, '/')
hook = {
    '/schook'
}
protocols = {
    'http',
    'https',
    'mailto',
    'ventrilo',
    'teamspeak',
    'daap',
    'im',
}

This is a pretty convoluted initialization file - it loads in pretty much anything it can gets its hands on. Remember to:

  • Change the repository location to your location
  • Don't accidentally remove the ' symbols

What is particularly important is that this version looks inside the map folder for props and emitters. This works for me, it can be that I did a small oversight. In that case please do reply and we can look into it. Make sure to mention what you did and to append your initialization file.

2

some previews of my competition map and other props being added
Screenshot 2021-04-05 163743.png Screenshot 2021-04-05 163900.png
Screenshot 2021-04-05 163313.png Screenshot 2021-04-05 163224.png Screenshot 2021-04-05 163359.png

1

I've received assets from Madmax and will add them to the PR later this week 🙂