Seriously!
Go Back   Seriously! Forums > Serious Sam Series > Serious Sam HD > Serious Sam HD Workshop

Serious Sam HD Workshop The official forum for Serious Sam: HD projects, be it maps, mods, or something else.

Reply
 
Thread Tools Search this Thread Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
Old 01-12-2014, 06:54 AM   #1   Add To Ignore List  
Night Sparrow
 
Ryason55's Avatar
 
Joined: Nov 2006
 
Ryason55 is offline
Default General Modding Standards and Information

Just a thing I thought I'd put out there. I've noticed a number of people making... "mistakes", with their mods. So, I've decided to start a sort-of compendium of things you should and should not do, as well as some general information. I may or may not update this ever.

[Note: While this information primarily applies to Serious Sam 3, some points can be taken into consideration for Serious Sam HD]



When making model re-skins, do NOT use a local mesh

So, meshes are generally the largest part (outside of animations, but who edits those?) of any player model. Using a local mesh means that the resource for the mesh is directly tied into the model file, so only that model has that mesh data. The filesize for the Model is, of course, increased due to containing the said mesh. This is okay... right up until the model-maker copies the model file to make any number of re-skins. So, say we're making a player model that has both team colors. This means we'll have 3 models in total. With a local mesh on each one, the total filesize is essentially TRIPLED what it should be due to the presence of 3 "different" meshes. Now, consider the fact that, like, over 90% of all of the player models on the workshop are like this... yeah. This crap adds up.

Now, as for how to properly set up a series of model re-skins: Mesh modifiers. With Mesh modifiers, you can modify the Surfaces of the mesh outside of the mesh. That way, you can have all of the like models use the same (saved) mesh, but different textures. If you don't know how to set up mesh modifiers, take a look at ANY of Croteam's player model re-skins.

This rule can be applied to literally any model you can make a re-skin of, not specifically player models (they're just the largest example out there).



All non-player characters should have a "Texture" UVMap

Any mesh that's either going to be a non-playable character or otherwised attached to a non-playable character (attachment, tool, etc) should DEFINATELY have a "Texture" UVMap. See, various shader-based effects are tacked onto these characters, such as spawning and burn-out. These shaders depend on there being a "Texture" UVMap on the model. If that UVMap doesn't exist, not only will the effect appear incorrectly on the model, there will be console errors... ESPECIALLY for the burn-out effect, which complains VERY LOUDLY about it in the console. Sure they're errors that the player won't neccessarily see, but it's messy and unprofessional (and bothersome when you're trying to debug your own mods).



The Blend Mask on Legged Puppets will be overridden by Blood Effects

You know how some enemies get bloodied after you shoot them a bit? That's this effect taking place. If any existing UVMap is entered into the "mask uvmap" in the shaders for the mesh, the character WILL bleed on those surfaces as they lose HP. This is essentially how the game determines if enemies bleed (and which UVmap to use for it). Now, the thing to note is that if you put a texture into the "blend mask", it will be overridden. The texture used for bleeding is globally determined by the current Blood and Gore Skin. The only instance where it won't be overridden is when the current blood skin doesn't have a bleeding texture (everything but Red and Green blood). But just take it as a general rule that you cannot use the Blend Mask for Legged Puppets; you can only determine if they'll bleed or not.

... and yes, you can make Player Models bleed, should you desire. Though, the effect reverses in color when you have over 100 HP.
  Reply With Quote
Old 01-12-2014, 07:21 AM   #2   Add To Ignore List  
Developer Fairy
 
Solais's Avatar
 
Croteam Representative
Joined: Nov 2009
 
Solais is offline Steam ID: SolaisYosei
Default Re: General Modding Standards and Information

I'd say that the first one is really a nonissue. Model files are small in general, even if they contain the meshes inside them: SSHD in fact used most of the meshes as local, instead of saving them separately as in SS3. What bloats up the gro files in SS3, however, are the texture files, due them being HUGE in SS3.

I'd add another one, I always wanted to make a thread about this:

When you are making a City level in SS3, make sure that you check the Spawn Flags

There's a certain model entity used in most of the original City maps that doesn't have their spawn flag set to Easy. While this is fixed for nonmodded game internally, it won't apply on modded levels, so right now, most of the city levels released for SS3 have a lot of floating buildings, because the model under them doesn't exist at all on Easy. It's the best if before you release any map, you test it on multiple difficulties, including Easy, so you notice all the bugs.
__________________
Since Old Lost Age I Shine

My Serious Sam 3/HD Workshop


While I do work for Croteam, I'm first of all of this community, so my opinions are my own and do not represent Croteam's views.
Unless when I use this nice blue color I totally didn't steal from Blizzard.

Last edited by Solais; 01-12-2014 at 07:23 AM.
  Reply With Quote
Old 01-12-2014, 08:41 AM   #3   Add To Ignore List  
Night Sparrow
 
Ryason55's Avatar
 
Joined: Nov 2006
 
Ryason55 is offline
Default Re: General Modding Standards and Information

Quote:
Originally Posted by Solais
I'd say that the first one is really a nonissue. Model files are small in general, even if they contain the meshes inside them: SSHD in fact used most of the meshes as local, instead of saving them separately as in SS3.
Please re-read the title for that, specifically the "When making model re-skins" part. I'm not bagging on saving meshes for everything always; how Croteam did it in Sam HD is fine since it didn't result in duplicate local meshes (all the player models and the beheaded enemies have saved meshes). What I'm trying to do is denounce the practice of using duplicate local meshes for the sake of making model reskins, as it unneccesarily pumps up the file-size, which is a problem when this is done for almost every single custom player model on the workshop to date.

If you aren't convinced, here's some fun math: The workshop package for my Mystia model is currently 18.5MB. Her mesh, by itself, is 6MB. I currently have 7 models for her (1 base, 3 alternate colors, 3 team colors) with the one mesh shared between all of them. If I went and made the mesh local on each one, that'd make the total amount of mesh data 42MB, which would bump up the entire package to 54.5MB. There really is no excuse to not save the goddamn mesh when making reskins.


Quote:
Originally Posted by Solais
What bloats up the gro files in SS3, however, are the texture files, due them being HUGE in SS3.
When talking custom player models, this generally isn't a thing just for the fact that most custom player models for Sam 3 aren't actually from Sam 3. Also, the textures are going to exist whether or not the mesh is saved, as they're kind of required for, you know, reskinning. Now, if people started using duplicate local textures... THEN that would be a problem.
  Reply With Quote
Old 01-12-2014, 11:06 AM   #4   Add To Ignore List  
Developer Fairy
 
Solais's Avatar
 
Croteam Representative
Joined: Nov 2009
 
Solais is offline Steam ID: SolaisYosei
Default Re: General Modding Standards and Information

Ah, okay then. I was actually thinking about if I have did the same about the enemies I did in SS3, but then I remembered that most of them use modifiers as they were made before the edit data.
__________________
Since Old Lost Age I Shine

My Serious Sam 3/HD Workshop


While I do work for Croteam, I'm first of all of this community, so my opinions are my own and do not represent Croteam's views.
Unless when I use this nice blue color I totally didn't steal from Blizzard.
  Reply With Quote
Old 01-12-2014, 01:35 PM   #5   Add To Ignore List  
Oh Long Johnson
 
noam2000's Avatar
 
Joined: Sep 2012
 
noam2000 is offline
Default Re: General Modding Standards and Information

Huh,didnt know about the first one. I usually made the mesh local in order to LOWER the file size, didnt excatly expect it to even be bigger...

Anyway,very useful information here,appreciate it.
  Reply With Quote
Old 01-12-2014, 03:43 PM   #6   Add To Ignore List  
Bio
Mechanoid
 
Bio's Avatar
 
Joined: Feb 2012
Location: Earth
 
Bio is offline
Default Re: General Modding Standards and Information

Quote:
Originally Posted by Ryason55 View Post
All non-player characters should have a "Texture" UVMap

One thing I noticed with this on SSHD's editor is that the normal map textures won't actually work properly for any type of custom model unless you actually set the UVMap as "Texture". This doesn't apply to SS3's editor though.
  Reply With Quote
Old 02-04-2014, 06:30 AM   #7   Add To Ignore List  
Developer Fairy
 
Solais's Avatar
 
Croteam Representative
Joined: Nov 2009
 
Solais is offline Steam ID: SolaisYosei
Default Re: General Modding Standards and Information

I just want to remind everyone, that there are -some- official tutorials about SED3, especially when it comes to scripting:

http://www.serioussam.com/wiki/index.php?title=Lua

If you want to learn scripting in SS3, start here.

The wiki also have some other cool tutorials, so even more experienced SED users should check it out: http://www.serioussam.com/wiki/index.php

SED2 of SSII is also quite similar to the SED3 of SSHD and SS3, so its tutorial might be still useful. If you don't have Serious Sam II, download this: http://www.mediafire.com/download/9s...vt546/Help.zip
__________________
Since Old Lost Age I Shine

My Serious Sam 3/HD Workshop


While I do work for Croteam, I'm first of all of this community, so my opinions are my own and do not represent Croteam's views.
Unless when I use this nice blue color I totally didn't steal from Blizzard.

Last edited by Solais; 02-04-2014 at 06:37 AM.
  Reply With Quote
Old 03-31-2014, 10:48 PM   #8   Add To Ignore List  
Night Sparrow
 
Ryason55's Avatar
 
Joined: Nov 2006
 
Ryason55 is offline
Default Re: General Modding Standards and Information

How you SHOULD make modifications to the translation tables

Okay, there's a right way to do this, and a "wrong" way. The right way actually works pretty consistantly, and the "wrong" way leads to compatibility issues, and can outright fail if you don't know what you're doing.

The "wrong" way is essentially taking the existing "translation.tbl" (and/or "translation_All.tbl"), editing the desired lines, and including the entire file with the gro. If you're not doing a total conversion, do not do this. Doing this means that only one modder's changes to the file will be applied. Additionally, most people tend to ignore that number on the first line. This number is important, as it determines which version of the file is loaded if there are multiple instances found in the gros (this is ignored when the file is directly in the filesystem). Since Croteam generally updates this file and increases the version number every time there's an update to the game, leaving that number as is will make it so your modded translation table isn't loaded anymore. Even if you do make your version number absurdly high, your table will be missing any updates to the text that you didn't edit.

Now, the right way to do this is to make a new translation table with the specific lines you want modified. Basically, all .tbl files in the "enu" locale folder are parsed. So, say for instance you wanted to make a mod that changed the game's name on the title screen and main menu to "Mystia is pretty great", you'd set up the file as such:
Code:
55
Project.TitleSam3=Mystia is pretty great
Project.NameVerbose=Mystia is pretty great
And then save the file with a unique filename (for instance: "translation_MystiaMenu.tbl"). Note that the version number in the table will only be used if another file with the exact same name is found. This means that it won't clash with the original translation tables when you put it in a gro file.

This method can also be used for adding completely new translations to the game, since some things (Netricsa entries) require it.
  Reply With Quote
Old 04-01-2014, 02:07 AM   #9   Add To Ignore List  
Developer Fairy
 
Solais's Avatar
 
Croteam Representative
Joined: Nov 2009
 
Solais is offline Steam ID: SolaisYosei
Default Re: General Modding Standards and Information

Wait, so that number is a version number? I thought it was the number of strings in the file. That explains EVERYTHING about why my new translation.tbl files never worked.
__________________
Since Old Lost Age I Shine

My Serious Sam 3/HD Workshop


While I do work for Croteam, I'm first of all of this community, so my opinions are my own and do not represent Croteam's views.
Unless when I use this nice blue color I totally didn't steal from Blizzard.
  Reply With Quote
Old 04-01-2014, 09:51 AM   #10   Add To Ignore List  
Finzy Corp. CEO
 
Finzy's Avatar
 
Joined: Sep 2005
Location: Whatshisoffice
 
Finzy is offline
Default Re: General Modding Standards and Information

Well that's useful info. Just wish I'd magically known it sooner before I started editing hundreds of lines of translations.
  Reply With Quote
Old 04-25-2014, 10:30 PM   #11   Add To Ignore List  
Night Sparrow
 
Ryason55's Avatar
 
Joined: Nov 2006
 
Ryason55 is offline
Default Re: General Modding Standards and Information

Do not use "Environment sound" for level music

A fair number of user-made Versus maps are guilty of this. Essentially, the problem with using "Environment sound" for music is that the game considers this to be Sound, not Music. This becomes a problem when the user has customized audio settings, which have different volume settings for both Sound and Music. This is super-irritating when, for example, the user has muted the Music volume to play other music outside of the game... just to have the map's "Music" play anyways.

Now, I do see why people used "Environment sound" over "Exploration music", as the latter takes a few seconds to kick in every time you respawn. For that, I propose a super-simple script. Lets say you wanted to have a map play "MP_War03". Here's the script you'd use:
Code:
local Music = worldInfo:LoadResource("Content/SeriousSam3/Music/MP_War03.ogg")
worldInfo:ForceMusic("Continuous",Music)
"Continuous" music acts exactly the same as "Environment sound" would, except the game actually considers it to be Music. If you were wanting the script to load a different music track, you'd just have to change the filepath on the first line.
  Reply With Quote
Old 04-26-2014, 02:21 AM   #12   Add To Ignore List  
Oh Long Johnson
 
noam2000's Avatar
 
Joined: Sep 2012
 
noam2000 is offline
Default Re: General Modding Standards and Information

heh,good thing i always used "worldInfo:ForceMusic("Continuous",Music)",it always seemed better for me
  Reply With Quote
Old 07-29-2014, 12:32 PM   #13   Add To Ignore List  
Finzy Corp. CEO
 
Finzy's Avatar
 
Joined: Sep 2005
Location: Whatshisoffice
 
Finzy is offline
Default Re: General Modding Standards and Information

Finzy's Guide to: Proper use of custom normal maps & gloss maps!

Ever wondered why the console is always bitching about stuff like this a thousand times?

Standard shader in object [#ObjectAddress(CStandardShaderArgs, 0xb6000025)] has wrong texture set for normal map! ('Content/SeriousSamHD/Models/SexyLady/GiantTits_normals.tex')

...Even though you applied the normal map and it's "showing" fine on the model? Well truth is, it's not displaying it properly and it's not put in there correctly.

The game doesn't read textures correctly as normal maps unless the filename ends with _NM.tex and they are flagged as normal maps. To fix this, before creating the texture, the .tga file must end with _NM.tga, like so:

GiantTits_NM.tga -> GiantTits_NM.tex

Now when you go to create the texture, the game will recognize it as a normal map! The "flags" property will list "normalmap", and it will automatically choose 8 bit translucent or similar as the compression (which you can't change). Then, simply create the texture and apply it as a normal map, and it will display properly on the model like any other normal map texture in the game, without throwing errors.

...Ever wondered why your custom gloss maps don't seem to do anything?

Well they don't on their own if you just slap them to a model and don't do anything. To get them to show, you need to give a value to coating specularity (in the layer map), between 0-1 (ranging from less precise to more precise, for example 0.95). Then, go to coating color, and start raising that color, and hey presto, you'll notice that the specularity will actually start to show on the model (depending on the gloss map you chose of course; if you still see nothing it could be that the gloss map is too dark, or it's not a true gloss map). Also, like with normal maps, you need to specify a uvmap to use for the gloss map, and its stretch value. The game's gloss maps are named _GM.tex, and for general convenience you should also name your own custom gloss maps the same way. I'm not sure if gloss maps are dependent on having the same end to the file name like normal maps, but it sure can't hurt to name all your textures that way. Lastly, if it's a custom player model rip, you can with good conscience assume that specularity related textures are intended to use as gloss maps.

All this applies to both SS3 and SSHD. Hopefully people find it useful cause I noticed quite many custom player models and even levels seem to be suffering from this.
  Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:32 PM.