Please Help Support E-Mods.net by Donating

e-mods.net

  • 2017-11-17, 15:01:02
  • 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.

Pages: [1] 2

Author Topic: Creatinng Shapeshifting disciplines ?  (Read 3226 times)

Farquaad

  • Member
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 12
Creatinng Shapeshifting disciplines ?
« on: 2014-01-31, 12:06:47 »

Ok , as the title says : Does anybody knows how to create a shipshafting discipline? The only way for me to do it is play around with the Shape of The beast script, but its not that good... There is not a shapeshifting discipline in the game, except mist form and the Shape of The beast, which arent the brightest example to follow, mist form isnt exactly shapeshifting discipline and the Shape of The beast is somehow linked with that .ncd file and I cant change the crearure to be shapeshifted into, without editing that .ncd and this is not I want . So I dont know what the structure of the script will look like for those reasons I wrote αbove. Any help  for creating a shapeshifting discipline would be appreciated. Thanks.
Logged

Javokis

  • Horses Dick
  • Member
  • *****
  • Karma: 21
  • Offline Offline
  • Posts: 2373
    • E-Mods.net
Re: Creatinng Shapeshifting disciplines ?
« Reply #1 on: 2014-01-31, 13:05:06 »

Simple; Make a script like this for your discipline -

Code: [Select]

public class DisciplineShapeShift extends Discipline {

private static final String DISCIPLINE_NAME = "ShapeShift";

public int cast(int level, int casterGuid)
{
// do sanity checks
if(!CheckCastParameters(level, casterGuid, DISCIPLINE_NAME))
return(0);

SetupWorld(DISCIPLINE_NAME);

try
{
casterThing.AddActorEffectByLevel("ef_shapeshift", 0, 0, 0, 0);

return(1);

}
catch(Exception e)
{
CodexConsole.PrintException(e.getMessage() + " in " + DISCIPLINE_NAME + " [cast]");
return(0);
}
catch(Error e)
{
CodexConsole.PrintError(e.getMessage() + " in " + DISCIPLINE_NAME + " [cast]");
return(0);
}
}

}

Add the following line to the effects.ned file -

Code: [Select]
ef_shapeshift                   shapeOfTheBeastIcon     0       EffectShapeshift                0       0       0       0x200   0       0       0       0       1       1       2       2       3

Create an EffectShapeshift script with the following code -

Code: [Select]
public class EffectShapeshift extends Discipline {


public void effectstarted(int actorGuid, int effectGuid, int creatorGuid, int duration)
{
CodexActor actor = new CodexActor(actorGuid);

actor.ActorShapeShift("wolf", 0);
}


public void effectended(int actorGuid, int effectGuid, int creatorGuid, int reason)
{
CodexActor actor = new CodexActor(actorGuid);

actor.ActorEndShapeShift();

}

}

That's all there is to ActorShapeShift command. If you want to shapeshift into a different template then input that template instead of "wolf".
Logged
"There's nothing wrong with horses dicks, there's nothing wrong with sucking horses dicks." -Signo

Farquaad

  • Member
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 12
Re: Creatinng Shapeshifting disciplines ?
« Reply #2 on: 2014-02-01, 04:11:59 »

Thank you very much! Now, one more question. The Tzimisce modes ? Where are their sounds ? In-game I cant hear anything. No sound for speach, or pain or for any other reaction, like the the other enemies have. Am I wrong? I cant find their sound files either. Dont they have their own sounds? Or they are completly emotionless?
« Last Edit: 2014-02-01, 04:58:16 by Farquaad »
Logged

Javokis

  • Horses Dick
  • Member
  • *****
  • Karma: 21
  • Offline Offline
  • Posts: 2373
    • E-Mods.net
Re: Creatinng Shapeshifting disciplines ?
« Reply #3 on: 2014-02-01, 10:46:14 »

If you were viewing any of the wav or mp3 files with Windows Media Player then you have broke them. Do not attempt to listen to wav or mp3 files belonging to ANY game with WMP. Use Winamp or other media player that doesn't modify the files it plays.

To figure out what sounds NPC's use, you'll need NOT Editor. Each NPC has a FOLEY tag in its template referencing a .NAG file. The .NAG files are located in Resources.nob>misc>foleys. .NAG files contain a list of trigger words and the .wav files assigned to the trigger. Most wav files will be located in either Sounds.nob or Local_eng.nob (for English release).
Logged
"There's nothing wrong with horses dicks, there's nothing wrong with sucking horses dicks." -Signo

Farquaad

  • Member
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 12
Re: Creatinng Shapeshifting disciplines ?
« Reply #4 on: 2014-02-02, 05:56:13 »

One question about shapeshifting : If we shapeshift to a model [a] , the model of our player changes to that of model [a]. But some problems were created. I took two examples to shapeshift to. The first was zulu and the second was giantCobra. While I was zulu I could freely attack, but with giantCobra I couldnt. My question is how can we change our weapon to match the "entity" we shapeshifted to ? Does this happens when we shapeshift? (because when I shapeshift to zulu I CAN attack with his bite) If it does, then why cant I attack when I shapeshift to giantCobra? If it doesn't, then what must I do to equip myself the entity's weapon?
Logged

Javokis

  • Horses Dick
  • Member
  • *****
  • Karma: 21
  • Offline Offline
  • Posts: 2373
    • E-Mods.net
Re: Creatinng Shapeshifting disciplines ?
« Reply #5 on: 2014-02-02, 11:50:59 »

That seems mysterious. Sounds like something went wrong with the giantCobra template. I've done shapeshifts to giantCobra before and had no issues. But I'm thinking that the issue is in NOT Editor rather than in the script.
Logged
"There's nothing wrong with horses dicks, there's nothing wrong with sucking horses dicks." -Signo

Farquaad

  • Member
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 12
Re: Creatinng Shapeshifting disciplines ?
« Reply #6 on: 2014-02-03, 11:07:25 »

Hm, I cant seem to find a solution. Ugh, that seems I have to scrap some ideas I had about Setite Sorcery. Nevermind. I want to ask something else nevertheless : Is it possible to create a random effect on a discipline? Let me bring up an example. We have Majesty. There is one effect. How can we make a second effect, so that the two effects are not casted together on the target, but only one of the two is going to be randomly selected and casted ? How can we do such a thing ? Or to ask it more correctly : Is such a thing possible ?
« Last Edit: 2014-02-03, 11:16:52 by Farquaad »
Logged

Javokis

  • Horses Dick
  • Member
  • *****
  • Karma: 21
  • Offline Offline
  • Posts: 2373
    • E-Mods.net
Re: Creatinng Shapeshifting disciplines ?
« Reply #7 on: 2014-02-03, 11:57:14 »

Knowing how java works can go a long way in figuring that out. It's fully possible. Pretty much every command that exist in Java v1.1.8 will work (Vectors, Math, Condition logic, ect). For random stuff, go to tutorials about how Java uses random condition checks - general tutorials about programming logic can go a long way for programming stuff for VTMR. As long as you stick within Java 1.1.8, you can do anything Java will let you get away with within the events VTMR sends to the Java API. Unfortunately, Java v1.1.8 doesn't have keystroke tracking, but everything else Java related is on the table.
Logged
"There's nothing wrong with horses dicks, there's nothing wrong with sucking horses dicks." -Signo

Farquaad

  • Member
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 12
Re: Creatinng Shapeshifting disciplines ?
« Reply #8 on: 2014-02-06, 03:18:36 »

Vectors , eh ? I suppose vectors is where we start . One more question  I am sorry if I am consuming your time with my questions :-[ Is there a way we can add the effects to an activation queue ? Αν εχαμπλε : We have majesty. I want the effects to happen with a certain order : First the effect (x) will happen. Then, after it has ended, effect (y) will happen and then after it has also ended , the next effect will take the seat and so on ... Add all of the effects in queue, with the first effect starting and after each effect ends the next one will start, until there is no effects left. Is this possible ?
Logged

Javokis

  • Horses Dick
  • Member
  • *****
  • Karma: 21
  • Offline Offline
  • Posts: 2373
    • E-Mods.net
Re: Creatinng Shapeshifting disciplines ?
« Reply #9 on: 2014-02-06, 10:37:21 »

There's actually a simple way to do that - have an effect be scripted to start another effect when it ends. If you look at the effect script above, the effectended event is sent to the Java API whenever an effect ends. You can simply put an AddActorEffectBy(X) line within another effects ending event. Simplest query out there. There are of course ways to use Timers that query numerous global variables and have those timers run in a loop but note that the looped timer can go no faster than .01 seconds per query... any faster and the game will crash.

If you check out the Open Nod Development section, I have a ton of source code with plenty of examples of effects with looped timers. Look to the side panel on the right for the Eclipse Workspaces.
Logged
"There's nothing wrong with horses dicks, there's nothing wrong with sucking horses dicks." -Signo

Farquaad

  • Member
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 12
Re: Creatinng Shapeshifting disciplines ?
« Reply #10 on: 2014-02-06, 12:16:29 »

Thank you, but I already knew that , and I was talking about the main script of the discipline (DisciplineShapeShift.class) not the effect script (EffectShapeshift.class)
Logged

Javokis

  • Horses Dick
  • Member
  • *****
  • Karma: 21
  • Offline Offline
  • Posts: 2373
    • E-Mods.net
Re: Creatinng Shapeshifting disciplines ?
« Reply #11 on: 2014-02-06, 13:50:59 »

Thank you, but I already knew that , and I was talking about the main script of the discipline (DisciplineShapeShift.class) not the effect script (EffectShapeshift.class)

Now you're not making any sense. Going back to your response to vectors: The Vector package is referring to an object that is a set of other objects. A good example of how Vectors are used can be found in Wodal source code. Vectors in Wodal were used to store streaming file data, but don't tell me you knew that because I seriously doubt it. Use of vectors to query effects would be overkill - vectors should only be used if you don't know how much data will be stored or have variable data. Best to just use an array of strings containing "ef_x" values from the effects.ned file. Do note that you cannot cast disciplines while shape-shifted.

Am I to assume that you are attempting to scale a shape-shift effect by levels? If so then you can't use the discipline script to scale it because the player wont be able to cast the discipline while shape-shifted. Best to have the player upgrade their form by right-clicking the effect icon.
Logged
"There's nothing wrong with horses dicks, there's nothing wrong with sucking horses dicks." -Signo

Farquaad

  • Member
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 12
Re: Creatinng Shapeshifting disciplines ?
« Reply #12 on: 2014-02-07, 03:17:35 »

Am I to assume that you are attempting to scale a shape-shift effect by levels? If so then you can't use the discipline script to scale it because the player wont be able to cast the discipline while shape-shifted. Best to have the player upgrade their form by right-clicking the effect icon.
You assumed it. Did I said that I will be going to scale/queue anything for the shapeshift discipline or that I will use vectors? No. I am sorry if I confused you. But I wasn't refering exactly/only to the shapeshift discipline when I asked. I just gave an example with the shapeshift. My question was generally for all the disciplines. You were talking about the effect script, but I was talking about the main script. For example we are having this:


try
{
this.targetThing.AddActorEffectByLevel("ef_disc_test",Discipline.ATROPHY_DURATIONS[level], level, casterGuid, 4);
this.targetThing.AddActorEffectByLevel("ef_disc_test3",Discipline.ATROPHY_DURATIONS[level], level, casterGuid, 4);       
this.targetThing.AddActorEffectByLevel("ef_disc_test4", 0, level, casterGuid, 4);



I want to queue all those effects that are in the main script (DisciplineSomething.class). I dont want them to happen at the same time/simultaneously. I want them to happen with a certain order.
« Last Edit: 2014-02-07, 09:22:20 by Farquaad »
Logged

Javokis

  • Horses Dick
  • Member
  • *****
  • Karma: 21
  • Offline Offline
  • Posts: 2373
    • E-Mods.net
Re: Creatinng Shapeshifting disciplines ?
« Reply #13 on: 2014-02-07, 11:06:59 »

Am I to assume that you are attempting to scale a shape-shift effect by levels? If so then you can't use the discipline script to scale it because the player wont be able to cast the discipline while shape-shifted. Best to have the player upgrade their form by right-clicking the effect icon.
You assumed it. Did I said that I will be going to scale/queue anything for the shapeshift discipline or that I will use vectors? No. I am sorry if I confused you. But I wasn't refering exactly/only to the shapeshift discipline when I asked. I just gave an example with the shapeshift. My question was generally for all the disciplines. You were talking about the effect script, but I was talking about the main script. For example we are having this:


try
{
this.targetThing.AddActorEffectByLevel("ef_disc_test",Discipline.ATROPHY_DURATIONS[level], level, casterGuid, 4);
this.targetThing.AddActorEffectByLevel("ef_disc_test3",Discipline.ATROPHY_DURATIONS[level], level, casterGuid, 4);       
this.targetThing.AddActorEffectByLevel("ef_disc_test4", 0, level, casterGuid, 4);



I want to queue all those effects that are in the main script (DisciplineSomething.class). I dont want them to happen at the same time/simultaneously. I want them to happen with a certain order.

I already answered this question. I'm not sure if there's a language barrier here or what, please read over my original response.
Logged
"There's nothing wrong with horses dicks, there's nothing wrong with sucking horses dicks." -Signo

Farquaad

  • Member
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 12
Re: Creatinng Shapeshifting disciplines ?
« Reply #14 on: 2014-02-07, 12:11:31 »

Wait a minute... weren't Vectors the answer for the question about random-ity :
Hm, I cant seem to find a solution. Ugh, that seems I have to scrap some ideas I had about Setite Sorcery. Nevermind. I want to ask something else nevertheless : Is it possible to create a random effect on a discipline? Let me bring up an example. We have Majesty. There is one effect. How can we make a second effect, so that the two effects are not casted together on the target, but only one of the two is going to be randomly selected and casted ? How can we do such a thing ? Or to ask it more correctly : Is such a thing possible ?
?
right ? And your answer :
There's actually a simple way to do that - have an effect be scripted to start another effect when it ends. If you look at the effect script above, the effectended event is sent to the Java API whenever an effect ends. You can simply put an AddActorEffectBy(X) line within another effects ending event. Simplest query out there. There are of course ways to use Timers that query numerous global variables and have those timers run in a loop but note that the looped timer can go no faster than .01 seconds per query... any faster and the game will crash.

If you check out the Open Nod Development section, I have a ton of source code with plenty of examples of effects with looped timers. Look to the side panel on the right for the Eclipse Workspaces.
Isn't this your answer ? I cant seem to find any answer here . Nor there :
Thank you, but I already knew that , and I was talking about the main script of the discipline (DisciplineShapeShift.class) not the effect script (EffectShapeshift.class)

Now you're not making any sense. Going back to your response to vectors: The Vector package is referring to an object that is a set of other objects. A good example of how Vectors are used can be found in Wodal source code. Vectors in Wodal were used to store streaming file data, but don't tell me you knew that because I seriously doubt it. Use of vectors to query effects would be overkill - vectors should only be used if you don't know how much data will be stored or have variable data. Best to just use an array of strings containing "ef_x" values from the effects.ned file. Do note that you cannot cast disciplines while shape-shifted.

Am I to assume that you are attempting to scale a shape-shift effect by levels? If so then you can't use the discipline script to scale it because the player wont be able to cast the discipline while shape-shifted. Best to have the player upgrade their form by right-clicking the effect icon.
Ok , lets polish the things  ;) . I think the problems is that we messed the questions with the answers  :
First my first questions :
1)
Hm, I cant seem to find a solution. Ugh, that seems I have to scrap some ideas I had about Setite Sorcery. Nevermind. I want to ask something else nevertheless : Is it possible to create a random effect on a discipline? Let me bring up an example. We have Majesty. There is one effect. How can we make a second effect, so that the two effects are not casted together on the target, but only one of the two is going to be randomly selected and casted ? How can we do such a thing ? Or to ask it more correctly : Is such a thing possible ?
My second question :
2)
Vectors , eh ? I suppose vectors is where we start . One more question  I am sorry if I am consuming your time with my questions :-[ Is there a way we can add the effects to an activation queue ? Αν εχαμπλε : We have majesty. I want the effects to happen with a certain order : First the effect (x) will happen. Then, after it has ended, effect (y) will happen and then after it has also ended , the next effect will take the seat and so on ... Add all of the effects in queue, with the first effect starting and after each effect ends the next one will start, until there is no effects left. Is this possible ?

The first question was answered here :
There's actually a simple way to do that - have an effect be scripted to start another effect when it ends. If you look at the effect script above, the effectended event is sent to the Java API whenever an effect ends. You can simply put an AddActorEffectBy(X) line within another effects ending event. Simplest query out there. There are of course ways to use Timers that query numerous global variables and have those timers run in a loop but note that the looped timer can go no faster than .01 seconds per query... any faster and the game will crash.

If you check out the Open Nod Development section, I have a ton of source code with plenty of examples of effects with looped timers. Look to the side panel on the right for the Eclipse Workspaces.
We dealt with the first question. Now we send it the the recycling bin. It is removed.
Ok , now the second question: I still cant find the answer. Is that post the answer ? :
Thank you, but I already knew that , and I was talking about the main script of the discipline (DisciplineShapeShift.class) not the effect script (EffectShapeshift.class)

Now you're not making any sense. Going back to your response to vectors: The Vector package is referring to an object that is a set of other objects. A good example of how Vectors are used can be found in Wodal source code. Vectors in Wodal were used to store streaming file data, but don't tell me you knew that because I seriously doubt it. Use of vectors to query effects would be overkill - vectors should only be used if you don't know how much data will be stored or have variable data. Best to just use an array of strings containing "ef_x" values from the effects.ned file. Do note that you cannot cast disciplines while shape-shifted.

Am I to assume that you are attempting to scale a shape-shift effect by levels? If so then you can't use the discipline script to scale it because the player wont be able to cast the discipline while shape-shifted. Best to have the player upgrade their form by right-clicking the effect icon.

Because if that is treated as an answer, it is unfortunately not.
Logged
Pages: [1] 2
 

Page created in 0.069 seconds with 19 queries.