Please Help Support E-Mods.net by Donating

e-mods.net

  • 2017-09-20, 22:00:49
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search

News:

Looking for VTMR Modding Tutorials? Check out the Open Nod Development section of e-mods.net.

Author Topic: [Video Tutorial] Layers & Scenes  (Read 3084 times)

Javokis

  • Horses Dick
  • Member
  • *****
  • Karma: 21
  • Offline Offline
  • Posts: 2362
    • E-Mods.net
[Video Tutorial] Layers & Scenes
« on: 2010-02-26, 22:45:14 »

I just finished another tutorial. This time on the long awaited scenes and layers. This 3 part tutorial will teach you how to work with layers and create custom scenes for your map.

<a href="http://www.youtube.com/watch?v=wsGczK6KmaY" target="_blank">http://www.youtube.com/watch?v=wsGczK6KmaY</a>

<a href="http://www.youtube.com/watch?v=5NUOv1paWu0" target="_blank">http://www.youtube.com/watch?v=5NUOv1paWu0</a>

<a href="http://www.youtube.com/watch?v=A02LSGNvf9U" target="_blank">http://www.youtube.com/watch?v=A02LSGNvf9U</a>

I'm sure some of you are saying, "Well, it's about time!"

Enjoy!
« Last Edit: 2010-04-01, 00:32:55 by Javokis »
Logged
"There's nothing wrong with horses dicks, there's nothing wrong with sucking horses dicks." -Signo

Barnabas

  • Member
  • *
  • Karma: 3
  • Offline Offline
  • Posts: 125
[Video Tutorial] Scenes & Layers
« Reply #1 on: 2010-03-22, 17:20:39 »

What I really do not understand, is that stuff with the layers. Are layers only a maptool to make the map a little bit more clearly, when you are able to let some stuff of the layer disappear? Or do layers let the connected stuff appear and disappear ingame as well? I yes, how do that work to change between the layers ingame?
Logged
Sorry for my bad english ...

Javokis

  • Horses Dick
  • Member
  • *****
  • Karma: 21
  • Offline Offline
  • Posts: 2362
    • E-Mods.net
[Video Tutorial] Scenes & Layers
« Reply #2 on: 2010-03-22, 18:43:54 »

Layers are assigned to a scene (nsd file) that was covered in the tutorial.

You need to have layers to make a custom scene.

Changing scenes through in-game actions require knowledge in java and programming logic. Or some patience to wait till I get around to making some generic Codex Linker scripts that allow scene change.
Logged
"There's nothing wrong with horses dicks, there's nothing wrong with sucking horses dicks." -Signo

Barnabas

  • Member
  • *
  • Karma: 3
  • Offline Offline
  • Posts: 125
Re: [Video Tutorial] Layers & Scenes
« Reply #3 on: 2011-02-27, 10:35:17 »

At the moment Im standing in front of a problem:

I added some conversations to my maps, to make my maps more alive, but I want the NPC to remember the player, that talked to them yet, so that the NPCs use another conversation, when the player returns to them. I could imagine, that I have place a NPC in different layers and every NPC in the different layers uses another confersation file. If this is true, how do I activate the other layer after the first conversation? Which command do I have to add to my conversationstart .java/.class file?
Logged
Sorry for my bad english ...

Javokis

  • Horses Dick
  • Member
  • *****
  • Karma: 21
  • Offline Offline
  • Posts: 2362
    • E-Mods.net
Re: [Video Tutorial] Layers & Scenes
« Reply #4 on: 2011-03-02, 23:03:57 »

You want them to remember who spoke to them... like individually... as a party and/or as in MP?

There are several ways to do that in java. Could use a vector or array variable stored at a module level that stores a player's ID (array recommended since vectors can't be saved all that easily). I think I did something like this with my Club Abla scripts, which I think I included source code in MoTA.

Loading scenes would be easier, but you still need to have a grasp of java and how to use variable storage and condition checking. The pre-built scripts I included with my tutorials only have basic functions so you're still left with studying code to add new features.

So in a nutshell, your question steps into the realm of programming logic. I'll give you a basic idea of how you might code that:

Code: [Select]
private String convos[]   =  {"convo1", "convo2", "convo3"}; //where this is the convo NAME in the nco file
private int playerspoke[]  = new int[8]; //Since the MP game is limited to maximum of 8 players.
private int playerconvoflag[] = new int[8]; //All players start at convo 0... assuming this is initialized :/

Conditions can be a bit more complicated but using this set of variables could give you an idea on what to put at module level. I haven't coded in long while like this so bare with me. Here's what you could do with these variables:

When the player clicks:

Code: [Select]
//Start with a search for the player in the array
for(int i = 0;i < playerspoke.length;i++){
  //If the player was found then run the convo for the player
  if(playerspoke[i] == clicker.GetGUID()){
    //Here's where the convo name is used from the convo file name (nco)
    ExecuteConversation(clicker.GetGUID(), clicked.GetGUID(), convos[playerconvoflag[i]], "MyConvo.nco", CONV_XFLAG_WANTFEEDBACK);
    //Increment to the next conversation for that player
    //Make sure the convo flag doesn't exceed the number of convos
    if(playerconvoflag[i] < convos.length)
      playerconvoflag[i] += 1; //++ might blow up in 1.1.8 java for an array not initialized.
  }
}

This is a pretty flawed script but should give you a good idea of what Java can allow. This is only an idea script and shouldn't be plugged into you code unless you know what it I'm missing. This is not enough to make things work. There's still missing initializers and logic errors, but should give you a basic idea of what you can do.

Hope this helps. ;)
« Last Edit: 2011-03-02, 23:05:33 by Javokis »
Logged
"There's nothing wrong with horses dicks, there's nothing wrong with sucking horses dicks." -Signo

Barnabas

  • Member
  • *
  • Karma: 3
  • Offline Offline
  • Posts: 125
Re: [Video Tutorial] Layers & Scenes
« Reply #5 on: 2011-03-17, 04:32:29 »

I watched that great tutorial a few times now, but there is still a question left:
You created a scene with Anezka and Joseph aka Rick. When you start your chronicle, both of them are there in the beginning. How do I create a scene, that appears  during the game. For example: I do not want Anezka and Rick appear from the beginning. They should appear, when I load the scene with the scene director tool of the storyteller ingame....
Logged
Sorry for my bad english ...

Signothorn

  • Team
  • Member
  • ******
  • Karma: 3
  • Offline Offline
  • Posts: 162
Re: [Video Tutorial] Layers & Scenes
« Reply #6 on: 2011-03-18, 19:39:27 »

Jav should have his internet back in a couple days, just fyi.
Logged

GreenDragon

  • Member
  • *
  • Karma: 2
  • Offline Offline
  • Posts: 52
Re: [Video Tutorial] Layers & Scenes
« Reply #7 on: 2013-03-27, 01:31:01 »

Hmm..how come Anezka doesn't appear in-game when I assign her to a separate layer?
Logged
 

Page created in 0.067 seconds with 19 queries.