Author Topic: How To Level Up Using Scripting by Mortis  (Read 8719 times)

0 Members and 1 Guest are viewing this topic.

Offline Amy

  • Global Moderator
  • Level 3
  • *****
  • Posts: 1235
  • Karma: +85/-10
  • Gender: Female
    • View Profile
How To Level Up Using Scripting by Mortis
« on: July 11, 2012, 06:25:18 AM »
SECTION 1:BASICS

1-Create a spell that summons a invisible creature
2-Make a new kit in the tool of your choice..
3-Set EVERY level ability to that spell. (so each level up summons that creature)

4-in the creatures AI use Level(O:Object*,I:Level*) to detect the summoners level..
5-use other commands to give level abilities...

you may ask "WHATS THE POINT, I CAN DO THIS WITHOUT SCRIPTING"

well scripting means you can do the following....

1-clerics/druids could have an avatar of their god/nature appear and say they are doing well and grant more power, likewise a good cleric with low rep could suffer from this avatar, and gain less abilities on level up..

2-Random abilities...
look at this

IF
Level(LastSummonerOf(Myself),10)
THEN
RESPONSE #50
ApplySpell(LastSummonerOf(Myself),SPELL_1)
RESPONSE #50
ApplySpell(LastSummonerOf(Myself),SPELL_2)
END

this way you can give random abilities on a level up. (great for chaotic clerics)



SECTION 2 :GETTING MORE COMPLEX....

ok, here i will explain more abilities..
In my demonist kit, a script handles normal level up's but....
At level 12 you have to decide what demon lord you serve, (this grants different abilities & altera plot)
Here's how...

Same steps as above...
BUT...
I make a cutscene, a dlg and a script.

SINCE SUMMONED CRE's CANT HAVE DEATH VAR's you must made another cre to run the cutscene..

AI Script (for invis cre)

IF
!Level(LastSummonerOf(Myself),12)
THEN
RESPONSE #100
CreateCreate("2nd cre",[-1.-1],0)
ClearAllActions()
StartCutSceneMode()
StartCutScene("YOUR CUT SCENE FILE")
DestroySelf()
END

IF
Level(LastSummonerOf(Myself),12)
THEN
RESPONSE #100
ClearAllActions()
DialogueForceInterrupt(LastSummonerOf(Myself))
END

This means if your any level but 12 the cutscene starts (this is the normal level up system shown in the script in section 1, If your level 12 the dialog that makes you pick your lord starts instead...

The Cutscene works like this

IF
Level(LastSummonerOf(Myself),10)
THEN
RESPONSE #100
CutSceneId("YOUR 2nd CREATURE Death var")
ApplySpell(LastSummonerOf(Myself),SPELL_1)
EndCutSceneMode()
DestroySelf()
END

With a different IF block for each level and ability....

The Dialog works by making a different option for each demonlord and then kicking off spells to give abilities... AND setting a local on the player so i can detect what lord he worships (for when he meets demogorgon & other powerful fiends)

There you go, enjoy...

Mortis