Skip to content

How to use! ❤️

Aeven-Dev edited this page Jul 30, 2022 · 7 revisions

Importing Scn files! Make the world yours!

  1. Go to the the top of your screen in unity's menus, there you'll find the "Windows" menu, if you click on it it will display a bunch of things and maybe even more depending on what you have installed!
  2. If you see the option for "S4 Scn" then that means the tool is installed correctly! Clicking on it will open up more options
  • Scn IO
  • Animation Window
  • Character Loader
  • Load Aaaaall maps
  1. Click Scn IO to open up the import/export window! Here you'll have a few options but the 2 you're interested in are "Open" and "Save"! Im sure you can figure out what those do!
    • The "Append" option allows you to solect only certain parts of the scn to be loaded! Which is great if you have a very large scn file you want to open just to get a few objects out of!
    • Another setting you should keep in mind is "Scale!", S4 uses big numbers! so importing them with scale 1 will make them reaaaally big! if you want the maps to have a "normal" size for unity then I recomend you set the scale to 100, it may sound counter intuitive but think about it this way, when you export you want maps to be scaled up by 100 and when you import you want them divided by 100 in scale!
  2. Clicking Open will bring a file explorer, look for the scn file you want to open! Once you select the file it will be loaded in the currently active Scene in unity!
  3. If you selected "Append" instead, Once you select the file an extra window will open with all of the objects that were found inside that scn file! If this fails to load it might be an issue with the tool not reading the file properly :( Get in contact to fix that!
  4. You can select or deselect objects here if you want to, keep in mind that deselecting an object with children will also deselct the children automatically!
  5. Once you're happy with your selection just press "Import!" and watch as the scn file gets loaded!

Please note that for textures to be loaded they need to be in the same directory as the scn file, just like they are in the resource folder!

Exporting Unity scenes! And give back to the world with your wonderful creations!

Wonderful! So you made a map in unity and now you want it into S4? Let me show you how! First things first, we'll go through what your map needs to be played in S4

  • ScnData
  • Visuals
  • Collision
  • Spawns

In the next section we'll go over in detail what each of those points are! For now we'll continue with the process but feel free to peak at it if you need to.
Exporting is a simple as presing the Save button in the Scn IO window and chosing which ScnData objects we want to export, then just choose the folder you want it to be saved at! Maps need to be in the background folder, weapons need to be in the weapons folder, and on and on for the other types of scn files!
The files can be organized in folders, so if we take neden 1 as an example, you could put all of neden 1 scns in a folder called Neden_1 inside the background folder! but textures need to be relative to the scn file to be loaded properly so aaaaall neden 1 texture including lightmaps need to be in that folder too. And the ini file has to say object_1=Neden_1\neden_1.scn instead of just object_1=neden_1.scn, okay?

The ini file!

Now let's go over the ini file!
In resources\mapinfo you have a buuuuuuunch of .ini files, these are basically text files, so you can just open them with notepad or any text editor of your choise!
The ini file has a lot of things, and I really dont know what most stuff do! But that's fine, all we'll need to do is change a few lines to get your map into S4!
The first thing we want to do is choose an ini file to edit, it has to be a map of the same mode than the one for the map you're creating, so if you're making a TD map then you can use Station-2, Side-3, Highway, etc and if you're making a DM map you can use Neden-1, Square, Wonderland, etc! The ini file is divided in [SECTIONS], these sections have diferent names, all in caps, and all inside square brakets []
The sections we want as [STATIC] and [DYNAMIC] so scroll down the file or search for that, bellow it there will be a few lines like this

[STATIC]
;object_1=standbyroom.scn
object_1=azit.scn
object_2=azit_jump.scn
object_3=azit_jump_indicator.scn
object_4=azit_jump_spawn.scn
object_5=azit_spawn.scn
object_6=azit_oct.scn

As you can guess, this is the ini file for Azit. the ';' is like comenting out the line, basically, that line will be ignored and stanbyroom.scn wont be loaded when you enter the map.
In order for your scn file to be loaded it has to be referenced after object_x= and if your file is in an extra folder it needs to reflect that too! So replace object_1=azit.scn with object_1=YourMap\YourAwesomeMap.scn So now if you open up S4, and start an azit match your map should be the one loading up! along with the other azit elements such as the jumps, the spawns and the oct, so comment those out!

You did it! you made a map for S4! Congratulations! 🎉🎉🥳 🎉🎉

Components!

There are quite a few unity components that are needed to make sure the map gets exported properly! If you import a map you'll see quite a few of these!
The first one you should keep in mind is ScnData! This component marks a gameobject in unity as the root of your scn file, anything outside of it will not be saved into the file alrithg? Im serious here! Dont forget this part! TextureReference and CollisionData are the most common ones since all maps would need visual meshes and collision meshes
Then we have S4Animations, Bone and BoneSystem as the other components that can be considered "required"

  • TextureReference are scripts that hold some needed information about the textures so i can load load them properly into S4.
    For example, the store the path to the texture when a map is imported, or you can specify te texture name you want to use for that model.
  1. CollisionData has 2 dropdowns that define the type of collision that you want this object to be!
    The 2 types are ground and weapon, ground collision is for players and the fumbi, while weapon collision is for bullets and melee, you also have weapon_wire where is basically for wire fences, bullets go through be melee doenst! Ground collision has a few variations, the ones called steel, stone, etc are for what sound they make when you step on them, and the ones called wire are for allowingg the fumbi to go through i think.
    Then we also have the "hash" variant which basically it is no camera collision! Try it out!
  2. S4Animations holds all animation info from the file, it only works with meshes and bones and it's quite the complicated topic! Stay tuned for more info!
  3. Bonesystem is really just a way to mark the object, it holds no data at all.
  4. Bone also is there to mark the object as a bone but also helps by keeping track of the hierarchy and displaying the bone relationship

We also have Helpers! This are also components but dont actually do anything when exporting, they just help you keep things clearly defined!
We have, in alphabetical order:

  • BlastData
  • DOTData
  • EventItem
  • Jumppad
  • PointDrawer
  • SectorData
  • SeizeData
  • SpectatorCameraData
  • WarpGateData

The 4 most important ones of this list, and the ones that have actually been tested are BlastData, Jumppad, PointDrawer and WarpGateData!
BlastData holds information about breakables, you know, wood boxes, doors, and those futuristic thingymajigs in OldSchool.
You dont neeeeeeed it to create a breakable, but it holds all of the variables in one neat place.

Jumppad is one i actually worked quite hard on! It gives you a nifty little tool and visualization to edit a jumppad so you know somewhat acurately where you're gonna land with it.

PointDrawer is basically useful to mark what each of the box objects are for! It Draws an A for alpha spawns, a B for beta spawns and a fumbi head for the fumbi spawn!

Lastly we have WarpGateData, it also hold information about the warpgate and a list of the other warpgates it teleports to! It also draws a line to each of them so you can easily spot it!

The last thing i want to mention in this section is that, if you press the button "Generate map info text [].[]" it will open up a window where you can automatically generate the information required to add to the ini file based on all of the helpers!

Editing animations!

Loading up a character!

Editing uv animations!

Clone this wiki locally