Jump to content


Photo

Apples and Peaches: Obsttorte's Mapping and Scripting Thread

mapping scripting obsttorte

418 replies to this topic

#226 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5247 posts

Posted 10 May 2013 - 04:06 AM

Do you want this discussion here in this thread, or would you like to create a new thread to discuss it in more detail?

http://forums.thedar...y-level-system/
FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#227 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5247 posts

Posted 12 August 2013 - 11:29 AM

There is a file called "mainmenu_objectives.gui" included in the main mod, which controlls the appearence of the objectives screen in the main menu. However, a comment at the beginning of this file says, that it should not be modified.

Actually, I just did that and couldn't see any problems with that.

So my question is: Is this just a general advice as some changes may cause problems, or do I oversee something? To be more clearly, I changed the appearence of the icons in front of the objectives (the checkboxes).
FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#228 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5247 posts

Posted 13 August 2013 - 03:29 AM

:smile:

Attached Thumbnails

  • bilderbuch.jpg

  • PsymH likes this
FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#229 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 36515 posts

Posted 13 August 2013 - 06:54 PM

So my question is: Is this just a general advice as some changes may cause problems, or do I oversee something?


I think it's just general advice.

#230 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5247 posts

Posted 19 August 2013 - 04:09 PM

I was able to improve my automap a bit. The pk4 linked below is a little demonstration. Beneath the fact that I've used pictures this time, I was able to easen the setup fairly. I hope you like it.

http://www.mediafire...7rj/automap.pk4
FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#231 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5247 posts

Posted 20 August 2013 - 10:14 AM

UPDATE: AUTOMAP

Finally I was able to easen the setup for the automap. Here is the example pk4: Attached File  automap.pk4.txt   836.29KB   224 downloads

What steps need to be done?

1. Create the map:

This is obviously up to you, but if you like I can create a wiki article describing an easy approach to this.

2. Set up the location system:

You need to use this, as the single pieces of the map are corresponding to single locations. Give the locations unique, remarkable names, like "garden" or "guard_quarters" or whatever.

3. Set up the map gui:

The gui looks like this:
windowDef Desktop
{
		rect	  0,0,640,480
		nocursor 1

	windowDef background_map
	{
		rect	  64,48, 512, 394
		background "guis/automap/map_of"
		visible 1
	
	}
	....
}
This is the basic gui, showing the background image of the map (in this case the default image shipped with the startmap package). Where the dots are, you have to include the following
windowDef garden
		{
			rect 100,100,380,300
			background "guis/automap/garden"
			visible	"gui::gui_garden"
		}

for each location. It is important, that the name of the argument behind visible is of the following form:
"gui::gui_XYZ"
where XYZ is the name of the location entity. background is the image to show, and rect defines the rect where it is suppossed to be drawn. This depends on your images, though.

4. The entity definition and the code:

Both are shipped with the pk4, but you have to adjust the definition for your purpose. It looks like this:
entityDef atdm:automap
{
	"inherit"			"atdm:map_base"

	"editor_usage"		"game map of terrain for player" // THIS ONLY SHOWS IN ENTITY INSPECTOR

	"inv_name"			"Map" // SHOWS IN PLAYER'S INVENTORY.
	"inv_icon"			"guis/assets/game_maps/map_of_icon.tga"
	"gui"				"guis/automap/automap.gui"
	"scriptobject"	"inventory_automap"
}
There are two spawnargs that are important. inv_name is the name shown in the player inventory, so you may change it as you need it. gui is the name of the gui file used.

If you want to have several maps, make copies of this definition, give them all unique names (for example atdm:automap_groundfloor, atdm:automap_upperfloor etc.) and set the gui as needed.


That's it. Have fun testing it out. :)
  • RPGista likes this
FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#232 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5247 posts

Posted 23 August 2013 - 02:53 PM

This happens if something does not work as I've expected it ...

properly.jpg

Always stay on the bright side of life ... :)
  • Goldwell likes this
FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#233 Lux

Lux

    Advanced Member

  • Member
  • PipPipPip
  • 1575 posts

Posted 23 August 2013 - 03:02 PM

...THAT's gonna leave a mark :o

Edited by Lux, 23 August 2013 - 03:03 PM.


#234 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5247 posts

Posted 29 August 2013 - 05:34 AM

I'm trying to let a texture move. AFAIK this can be achieved via the command scroll, but somehow I can't get it to work. Any ideas?

Nevermind. I'm, an idiot.
FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#235 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5247 posts

Posted 30 August 2013 - 03:08 PM

*
POPULAR

FADING WALLS



A little explanation on how the above can be accomplished. What you see there are basically two simple patches with two different but quite simple textures on them. Both are func_static and the first one responses to the stim fire, as it is caused by a fire arrow. This could also be something else, a different stim or whatever else you imagine. The effect on the response is to call a script function, which I will describe later on.

First about the materials. Both of them look quite similar:
textures/blendaway
{
    {
        maskcolor                
        map makealpha(textures/glass/glass1)
        alphatest parm5
    }
    diffusemap textures/darkmod/stone/brick/blocks_brown
}
This is the main part of the material definition for both textures. On the second one I added a further line to create the effect of glowing. What does these lines do?

The first block is for creating an alpha (transparency) map.

The command maskcolor says that the following lines (within the block) should not effect the color settings, so nothing is written to the red, green or blue channel. Only alpha is affected.

The second line adds the alpha. makealpha takes an image and convert its color values to an alpha value, by taking the intermediate value at each pixel and setting the color channels to one (that's why the first command is needed).

The third command alphatest has the effect that everything that has an alpha value lower then the given argument, in this case parm5 (which equals shaderParm5 in the editor), should not be rendered. This is basically used on decals, like leaves or dirt for example.

The last command outside the block adds our image on top.

So, as you can see what is visible and what not is controlled by two aspects. parm5 tells what parts should be rendered and which not and the choice of the image in makealpha tells us the distribution of those points.

As I've already said there is a script called which applies the effect. It looks as follows:
void fadeaway()
{
    float i;
    for (i=0;i<120;i++)
    {
        $patch.setShaderParm(5,i*0.01);
        $patch2.setShaderParm(5,(i-10)*0.01);
        sys.waitFrame();
    }
    $patch.remove();
    $patch2.remove();
}
patch is the name of the most frontward patch, patch2 the name of that behind it. Now, as you may see the code does nothing else then constantly increasing the shaderParm5 value (and therefore parm5 in the shader). As the texture on the second patch uses the same alpha, its fading is started a bit later (accomplished by the substraction) to accomplish the colored edge effect (the blue-greenish glow). After the fade-out is done, both patches get removed from game, so you can walk through them. If you want to let the wall appear later on, you could also just set them to nonsolid.

The glowing effect of the second texture is added by these lines in the material definition of the texture used on the second patch
    {
            blend add
            map models/darkmod/props/textures/holywater
            rgb 1
    }
The image applied is the same used for the diffusemap. As you can see I've used the texture that is used on the holy water potions. The rgb value controlls how strong the glowing effect is. 1 is already the maximum.
  • Bikerdude, Dragofer, nbohr1more and 2 others like this
FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#236 RPGista

RPGista

    Advanced Member

  • Member
  • PipPipPip
  • 1429 posts

Posted 31 August 2013 - 01:57 AM

Thats an amazing effect... Seems like a fantastic mechanics to have in more magical oriented missions, or the classic fantasy maze. The fact you are always thoroughly documenting the procedures and donating all the assets to the community in undiluted, ready to use form, is indeed very valuable.

#237 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5247 posts

Posted 31 August 2013 - 03:21 AM

Thank you for the kind words :)
FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#238 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5247 posts

Posted 10 September 2013 - 03:51 PM

Thought I made my little status update here instead of spamming the "So what you are ..." thread.

I'm basically done with the basic brushwork on my speedbuild FM. I've also fixed the lighting problem I had to 99%, meaning there is still one area left where it is a bit buggy. I've already detailed a lot during the way, and will continue this tomorrow.

The starting section is still missing, but it will only consist out of two to three rooms or so, so I can do this in a few hours. Performance is great so far. If nothing worse appears, I'll need some betatesters at friday or so to check this one out, and can hopefully relase it at the end of this weekend.

I plan to release this as my unconventional Gameplay contest entry. I have two other missions in the making for that purpose, but they are too big to be finished til deadline. The smaller one should hopefully be ready til the end of October, the larger one I hope to finish til christmas. Don't know if I'll hit that personal deadlines though.

Taking all parts into consideration I mapped four to five months on the latter one, which should give you an impression of it's rough size. I hope it's worth the effort.

After these things are done I want to concentrate on small missions next year, as these provide a better workflow, and will hopefully engage new mappers two work on small missions themselves instead of getting lost in overambigious projects. And I definetely want to make an undead mission one day.

Some notes on the speedbuild WIP.
Spoiler

  • nbohr1more likes this
FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#239 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5247 posts

Posted 12 September 2013 - 08:31 AM

Update on my WIP:

Basic brushwork is done. Today I'll add models and details and will monsterclip everything. Tomorrow I'll setup the ai, special things as well as objectives and the map. So I guess I can start betatesting this on saturday. Everyone who wants to is happily invited.

Here are some screenies:
Spoiler

  • PsymH likes this
FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#240 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5247 posts

Posted 12 September 2013 - 08:35 AM

Spoiler

  • PsymH likes this
FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#241 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 36515 posts

Posted 12 September 2013 - 08:55 AM

Cool! I'd love to see another
Spoiler
mission.

#242 Sotha

Sotha

    Vertical Contest Winner

  • Active Developer
  • PipPipPipPipPip
  • 5600 posts

Posted 12 September 2013 - 09:50 AM

Cool!

The outside ambient light looks way too dark if you compare it to the sky. In real life, sky brightness is sort of the minimum brightess for shadows. Probably a WIP thing, I'm sure...

Keep it up!
Clipper
-The mapper's best friend.

#243 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5247 posts

Posted 12 September 2013 - 10:34 AM

Is this better?
Spoiler


EDIT: The shadows look much darker then they do ingame.
  • PsymH likes this
FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#244 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 36515 posts

Posted 22 January 2014 - 09:43 AM

Wow, I had forgotten about all of these cool scripts; glad Nbhor pointed the fog one out to me. Are these listed on the wiki somewhere?

OK. So here is the ambient fog scriptobject.


I know zero about fog...how does your method compare to using regular foglights in terms of performance?

#245 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5247 posts

Posted 24 January 2014 - 12:47 PM

The script only uses one fog light. The radius is the same as used for the ambient light, but while testing I didn't experienced any performance impacts.

Are these listed on the wiki somewhere?

My wiki entries are listed in the link below (Obstipedia).
FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#246 Bikerdude

Bikerdude

    Mod hero

  • Member
  • PipPipPipPipPip
  • 18745 posts

Posted 24 January 2014 - 01:32 PM

My wiki entries are listed in the link below (Obstipedia).

:D

#247 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5247 posts

Posted 25 January 2014 - 01:05 PM

Black and White

Attached Thumbnails

  • broads_2014-01-25_19.02.36.jpg
  • broads_2014-01-25_19.02.54.jpg
  • broads_2014-01-25_19.03.13.jpg
  • broads_2014-01-25_19.03.33.jpg

  • Melan, Sir Taffsalot and RPGista like this
FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#248 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5247 posts

Posted 25 January 2014 - 01:19 PM

The change is done via two speric patches of different diameter (24 and 128 doom units) bound to the players head. They are using the following material:
textures/darkmod/springheel/blur
{
     //deform sprite
    nonsolid
    translucent
    {
        vertexProgram        colorProcess.vfp
        vertexParm            0        1
        vertexParm            1        0.4                        // magnitude of the distortion
        fragmentProgram        colorProcess.vfp
        fragmentMap            0        _currentRender
    }


}
HUD, gui's (e.g. readables) and the player's model are not affected by this and need to be tweaked additionally.
The first vertex parm manipulates how strong the colors are averaged, the second one seems to affect brightness (not completely sure about this one).

It's quite nice to see what can be accompished with such shader programs. I'll definetely have to dig deeper into this materia. :)

Attached Thumbnails

  • broads_2014-01-25_19.15.28.jpg

FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#249 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 36515 posts

Posted 25 January 2014 - 01:35 PM

Wow, this is awesome! All kinds of cool uses come to mind, like dream-sequences, film noir missions, etc. Is there a way to do something half way between b&w and full colour? I've wanted a desaturation filter for ages.

#250 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5247 posts

Posted 26 January 2014 - 04:42 AM

VertexParm 0 controls how much the colors get desaturated. So you could set it to 0.5 for example.

textures/darkmod/springheel/blur
{
     //deform sprite
    nonsolid
    translucent
    {
        vertexProgram        colorProcess.vfp
        vertexParm            0        0.5
        vertexParm            1        0.4                        
        fragmentProgram        colorProcess.vfp
        fragmentMap            0        _currentRender
    }


}

FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.



Reply to this topic



  



Also tagged with one or more of these keywords: mapping, scripting, obsttorte

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users