Jump to content
The Dark Mod Forums

Sotha's mapping thread


Sotha

Recommended Posts

I need to make a special 'bag' container which gives items to the player when the player frobs it.

 

Is there a script command that can be used to give a player a certain object? Like I had a bunch of important objects in the blueroom and when the player frobs the 'bag' I could use a script to

 

$important_item.Add_It_To_Player_Inventory_As_If_The_Player_Would_Have_Frobbed_The_Item_Itself();

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

well I made a simple loot bag in Business as useal V2, that you could maybe use as something to start from..

 

How does it work? Is it "stash" in the map. I'm looking at it right now. Does it give player tools etc to the player? It looks like an ordinary special loot item, I've made several of those already.

 

What I need is a frobable object that gives items upons frobbing. A bag. Frob it, you receive an arrow. Frob again, you receive a health potion. Frob again, bag is empty, you get nothing.

 

The reason why I need it is rather stupid. I want to make a stash that teleports to a different location upon each map restart. I first tried to make it so that all the objects are bound to a container entity and I teleport the container around. For some reason the teleportation is unrealiable. Sometimes all the contents teleport with the container. Sometimes the container teleports, but the items in it do not. I was trying to circumvent this by making a single object to teleport. With that the teleportation would always work. But I don't know how to make it give items to the player.

 

I think the teleport failure is due to close proximity of the objects in the container, the stuff is rather cramped and overlapping. (Yep, tried to set them solid 0 already...)

 

Teleporting the container AND its contents separately would be an insane amount of work, since I would have to check the origins for each and every one of the stashed object.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

Hooray! I figured it out! It too way too long time, but in the end the persistency was rewarded.

 

Lesson: If you have moveable objects bound to a func_static thing and you teleport the func_static around, there is a risk that the moveables will not teleport with the func_static. I have absolutely no idea why it is so, but it just simply is.

 

In order to get it working, you must give all the bounded moveable objects spawnarg "spawnclass idStaticEntity"

After that teleportation works like a charm. There is a downside though. You should make sure the player will not be able to drop the objects. If you let the player do that, the objects will float in air since they are no longer true moveables.

 

Phew...

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

Is there a script command that can be used to give a player a certain object? Like I had a bunch of important objects in the blueroom and when the player frobs the 'bag' I could use a script to

 

$important_item.Add_It_To_Player_Inventory_As_If_The_Player_Would_Have_Frobbed_The_Item_Itself();

 

 

$book->addItemToInv($player1);

 

When you do this, you'll get the "You just picked up something" message.

 

If you don't want that message (the item is being added silently), you can set this spawnarg on the item:

 

"inv_no_pickup_message" "1"

 

-------------

 

In general, when looking to see if a script function exists to do something, you can examine the files darkmod/script/doom_events.script and darkmod/script/tdm_events script. Searching for "inv" in those turns up everything you can do with inventory.

Link to comment
Share on other sites

Thanks a million! This gives even more power and lets me side step the limitations idStaticEntity imposes.

 

The cache is now fully working. If someone wants to make such a cache, here is how:

 

Make a func_static stash object. A bag, for example. Give it "frobable 1" and give it S&R response frob. The effect should be trigger. The target should be a atdm:target_callscriptfunction, which "call inventory_grab".

 

The script is as follows:

 


float cache_state = 0; // a global mapwide variable to tell the map how much stuff the player has taken from the cache.

void inventory_grab()
{

sys.println("inventory grab"); // Print the text to the console

   if ( cache_state == 0 ) {
       sys.println("Give item 0");
       $atdm_ammo_waterarrow_4.addItemToInv($player1);

   }

   if ( cache_state == 1 ) {
       sys.println("Give item 1");
       $atdm_ammo_waterarrow_7.addItemToInv($player1);

   }

   if ( cache_state == 2 ) {
       sys.println("Give item 2");
       $atdm_ammo_waterarrow_12.addItemToInv($player1);

   }

cache_state = cache_state + 1; // increment the variable to make the script give the next object.

}

 

Replace the "atdm_ammo_waterarrow_x" entitynames with any objects lying around in your blueroom.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

Nice.

 

Is there an appropriate Wiki page to add this to?

 

Thanks. No, there was no good place to store this info, but I took the liberty of creating Loot-entry into the wiki. I put some basic information in there and added this new Loot Cache concept there.

http://wiki.thedarkm....php?title=Loot

 

I think the Loot paintings entry should probably be moved into the Loot entry for consistency, but I don't know how to do it.

http://wiki.thedarkm...=Loot_paintings

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

I was asked how to make the button controlled briefing longer. I made a 10 page version of it for those who have a lot to say. Grab it here if you need such a long briefing.

http://www.mediafire.com/?fsh9kg9en0mil0w

 

It is based on mandrasola image useage.

 

Also, remember to cut the briefing once you know how many pages it will be. By cutting I mean that you edit the file so that the last page will not show next button which leads to an empty page. Some authors never do this and it looks so sloppy it makes my eyes burn. Instructions are in the beginning of the mainmenu_briefing.gui file. Thanks!

  • Like 1

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

Monthly report:

 

Everything is finished, except I'm still missing some conversation materials, maps, briefing and a little bit of scripting and tuning. Oh, and testing.

 

I gotta wait for 1.08 though, since some AI behave foolishly in the current version. Just out of curiosity, does anyone have any idea how long till 1.08 is out? Month? Three months? Six months? The bugtracker shows already an impressive amount of fixes...

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

  • 4 months later...

First of all, I'm not mapping. I just happened to have a few hours free time to actually test one idea I've been brewing. It is a sort of technique development experiment, nothing more.

 

I've wanted to learn to build something organic... Something like the builder roads, which have not been show in TDM FMs yet.

http://wiki.thedarkm...e=Builder_Roads

 

The tecnique is relatively simple, cutting many corners with the correct workflow. The end result is modular road units. It takes some time to build one unit, but completing several of them, one could mash 'em together into something like this.

http://i.imgur.com/KOwFO.jpg

 

The creation involves patchwork and Fidcal's grass edges. With a correct workflow these can be made surprisingly quickly. The scene in the image file consists of three road units. The first two are identical, and the last one has been modified to form the upward hill. Creating the first module took 0.5-1 hours, but once the modules are done, they can very quickly cloned and combined.

 

I've not figured out how to visportallize such roads. Maybe a uphill, downhill, uphill and a func_portal? Also the trees pose a problem, since they generate an insane amount of tris, probably this is sorted out with LOD system.

 

I'll write a wiki entry once I have time again..

  • Like 3

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

I really like the colors on that scene... Maybe an open space has simply to be designed as a big one piece of map and worked around that, but the pathway technique is sure to be useful in many different situations, like inner gardens or medieval street sections. In fact, it would be great to have a good number of those alpha textures in several directions and manners, to be able to fake texture blending (for example, in your case I believe you used the grass alpha textures on two patches that hover over the "road" one; you could even more easily do the same with the road patch instead, over a sinlge grass base, if we were to have stone and dirt alpha textures that can be aligned in a road strip (blending on both sides). We do have some dirt and ash alpha textures, but I cant remember if they were linear or radial, I can only remember radial ones to be used as piles for fireplaces, which would be useless for roads and other linear blends).

Edited by RPGista
Link to comment
Share on other sites

Yep, there is a grass alpha layer on the road-grass interface. The placement of the alpha-layer is the most tedious part, but with the correct workflow, you can do it very quickly.

 

You can easily make similar lighting: I just wanted a quick screenshot in daylight so that the road is clearly visible in the screenie. I simply took a torch light source and threw it into the sky. Copied the torch light _color value onto my ambient_world and reduced the value of the ambient_world into 50% of the original. Surprisingly good result for such a quick lighting solution. Of course, if someone wanted to use that lighting in their mission, they should use a normal light entity instead of the torch, because the torch flickers.... ;)

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

Looks good to me. I had some scenes that call for a road like this, not least a level for my campaign idea on the Builder's Road. I think I even wanted to title it "On the Builder's Road".

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to comment
Share on other sites

  • 2 weeks later...

First off, great idea, love it.

I've not figured out how to visportallize such roads. Maybe a uphill, downhill, uphill and a func_portal? Also the trees pose a problem, since they generate an insane amount of tris, probably this is sorted out with LOD system.

using func_portals exclusively probably isn't going to do much for you unless you have an insane amount of clutter that makes it hard for the player to see 30 feet in front of him (nhat3).

The direction the player is facing will have an impact as well, so don't count out visportals on a long road. Perhaps put in a very short modular section, with no trees in it, made for visportals to pass through without taxing too heavily for being rendered on both sides of the portal.

Using visportals exclusively is also problematic, giving the player the full force of the performance hit when standing at either end of the winding road. I don't know if a func_portal could mitigate that or not, its probably very situationally dependent.

Link to comment
Share on other sites

I was thinking about some fog and a func_portals. Should work. Also elevation can be used as a cutoff: a func_portal visportal on top of a bump should work especially with fog. L-shaped road turns leave the possibility to use traditional visportals. Tunnels, ravines and bridges leave easy vp possibility, but are maybe too obvious and unsuitable for old wilderness roads.

 

The main problem is indeed cutting the road modules into correct size: the module that is penetrated by the VP will always drawn whether the vp is closed or open. This calls out a need for special very short road modules that are designed to be the road VP junction.

 

All in all, the workflow of road creation seems definately require thorough preplanning.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

the module that is penetrated by the VP will always drawn whether the vp is closed or open. This calls out a need for special very short road modules that are designed to be the road VP junction.

exactly

All in all, the workflow of road creation seems definately require thorough preplanning.

Rough enough for the mapper, but especially if you are the prefabber/modeller. I do not envy your task :unsure:

Link to comment
Share on other sites

  • 2 weeks later...

Since rumors are treason, I'll be give an overview about my little project I call The Ultimate Modularization.

 

Recently I played Fallout 3 and in a sudden realization it struct me that many of the dungeons are just models mashed-up, like this:

dungeontiles.jpeg?iact=hc&vpx=933&vpy=392&dur=3235&hovh=165&hovw=306&tx=216&ty=97&sig=116774634271667470092&ei=V9dSUPHkEYX64QSY2oGIBg&page=1&tbnh=114&tbnw=212&start=0&ndsp=20&ved=1t:429,r:9,s:0,i:114

 

See?

892430906.jpg?iact=hc&vpx=542&vpy=145&dur=2489&hovh=201&hovw=251&tx=160&ty=116&sig=116774634271667470092&ei=WQ9YUNuYLK3O4QTs34HgDg&page=1&tbnh=132&tbnw=165&start=0&ndsp=30&ved=1t:429,r:2,s:0,i:75

 

So if AAA titles do that why don't we? I'm experimenting now with Ultimate Modularization, where rooms and corridors are individual pieces, but built so the entire room or corridor or any part of it can be simply cloned and mashed together. Each piece or module contains everything: details, visportals, sound speakers, lights.

 

Creating one detailed module means always lower work amount, you place it, can slightly change it, store the changed module and you keep building up amount of modules you have. At some point all the mapper has to do for world geometry is to clone-and-place it. Want a window here? Clone, place. Want a doorway here? Clone, place. Want something similar, but still somewhat different what you already have? Clone, retexturize, place! Want something unique you don't yet have. Build new module for it, clone and place!

 

Since every single geometry piece you create can be reused (or retextured and reused) everywhere: speedbuilding has never been this fast. Once you have the modules, of course.

 

The module specification works in tiles, and each tile eats a cube of 144x144x144 units in the world. Modules then fill one or more of these tiles. Some might say that this reduces the world into cubical dimensions but it is A LIE! Non-standard room shapes are still allowed, they still use tiles of 144x144x144 units, but expand into neighbouring tile. Some of the tile space is filled with the irregularity and some of it is left empty.

http://i.imgur.com/WwjKP.png

1) is incorrect, tile size cannot be crossed over. 2) is perfect, one module consists of two tiles, irregularities are allowed. 3) Because of the modular principle, the world is easily expanded towards outside later, if needed.

 

Here is a screenie of player inside a vaulted corridor built from modules:

http://i.imgur.com/dJw1Z.jpg

The corridor could be expanded, turned, forked, changed simply by cloning new modules and placing them after each other.

 

Early prototype corridor modules going to a preliminary staircase module:

http://i.imgur.com/jr2b6.jpg

Module boundaries are marked with red.

 

So what I've been doing is designing and creating these modules. Creating one is small and nice parcel of work and challenge for a few hours. Once I'm ready with enough modules, I'll mash 'em up into a detailed world geometry to show it works. Once the world geometry is done, heh, I dunno... If I have time, I might do the AI, patrols and all the other stuff it takes to make a mission.

 

But the main fun for me now is to build and experiment with the modules. Once I'm done with a collection of perfect modules, I'll release them for the community to use. In simple terms, if this works, the modules mean that a totally newbie mapper, who only can clone and move things in DR can harness my mapping skills at their leisure: they can create their own unique world geometries from Sotha-quality geometry pieces easily and efficiently.

 

Perhaps, in the future, TDM mapping will be easier.

  • Like 2

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

It seems you have kinda-sorta invented Thief III, since it relies very heavily on prefabricated bits of architecture to build levels. The difference is, these "static meshes" are made in an external modelling program, while yours are more editor-based.

 

Anyway, complex prefabs are always useful - if not as a sole way to build levels (that could become boring in the long run), but as easily imported terrain features.

Come the time of peril, did the ground gape, and did the dead rest unquiet 'gainst us. Our bands of iron and hammers of stone prevailed not, and some did doubt the Builder's plan. But the seals held strong, and the few did triumph, and the doubters were lain into the foundations of the new sanctum. -- Collected letters of the Smith-in-Exile, Civitas Approved

Link to comment
Share on other sites

It seems you have kinda-sorta invented Thief III, since it relies very heavily on prefabricated bits of architecture to build levels. The difference is, these "static meshes" are made in an external modelling program, while yours are more editor-based.

 

Anyway, complex prefabs are always useful - if not as a sole way to build levels (that could become boring in the long run), but as easily imported terrain features.

 

Like in Fallout 3, this seems to be a standard these days. While modelling program created modules are superior in appearance, editor based modules are more versatile as, if the mapper so pleases, they can change the modules arbitrarily (retexture, twist patches, add brushesh, etc) after placement.

 

The modular state of mind is worthwhile for the mapper to remember, as it virtually removes the need of painstakingly rebuilding areas due to geometry colliding. With modules, you are always on-the-plan.

 

Whether they will be boring in the long run will be seen. It cannot be know at this point, but I am hopeful since the editor module approach allows arbitrary changes to the modules to make things interesting.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

I like the modules idea. And in some way I already build like this in the editor, because it is easier to handle when no brush is messing up all the dimensions, and you don't have to think: "is this brush 64x128 or 56x128 or why is it off the thicker lines (at gridsize 4)"?

I think this tunnel concept works for manor houses and caverns.

On open city maps you probably need a "upside down" concept of this. ^^ So you have got a plane surface and place walls of buildings on it.

 

[...]

Perhaps, in the future, TDM mapping will be easier.

Ok, let's assume a newbie is using these modules. There is still this hurdle to place everything right without leaks, to put in you own readables, items, triggers and so on.

When you look at the new Portal 2 editor you will see that this one took away all this hurdles. But sadly I don't see this for DarkRadiant coming. - So what other opportunities do we have? Maybe it can be even be handled by a webinterface and some php+html+jQuery? o.O Imagine a chequerboard on the right and a list with images of all modules on the left. Then just drag and drop (via jQuery) the module to the field you like. Some modules can have a textfield for a readable. Or a pulldownmenu to place a zombie or guard.

In the end you just click "Save to map." (Sure, you have to compile this on your machine with dmap. -.-' Which is another hurdle. Isn't there a way to compile it on the server and zip up your own pk4?)

 

Sure, it doesn't need php+html for this because it would work the same way in any other programming language. But these are easy to build up in a short time and are beginner friendly (in maintenance and handling).

Edited by Radiant
Link to comment
Share on other sites

I think Sotha's point is not necessarily to create a drag and drop editor mechanics for TDM, but actually save impressive amounts of time building each portion of the map from scratch. After a while, you are BEGGING for ready-made pieces you can just copy and resuse in your map (oh no, not another archway... Oh wait, I can just copy the one I made before and change a bunch of things, pheww); the same applies for doors (specially non-standard ones), windows, stairs, facade elements like balconies, etc.

 

Take that corridor shot for example (which I really like): if you can get one of those vaulted sections (a square in plan view), you can copy it X times in one direction, then insert one with the window, continue copying the deafult one, then another with a ready made door to one side, and the only thing you would need to draw by hand would be the ends of it. It would save you all the trouble of creating the vaults, texturing them and aligning the whole thing, cutting the wall to pieces and fitting a window there, or a working door - just place the prefabs, adjust it to your liking, and then resuse. You are left with a solid geometry that only needs detailing. I think to have architectural prefabs like that (and there are some already available) would be very profitable indeed.

Edited by RPGista
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recent Status Updates

    • Ansome

      Finally got my PC back from the shop after my SSD got corrupted a week ago and damaged my motherboard. Scary stuff, but thank goodness it happened right after two months of FM development instead of wiping all my work before I could release it. New SSD, repaired Motherboard and BIOS, and we're ready to start working on my second FM with some added version control in the cloud just to be safe!
      · 0 replies
    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
×
×
  • Create New...